Package org.apache.wicket.security.strategies

Examples of org.apache.wicket.security.strategies.SecurityException


   */
  public static String alias(Component component)
  {
    // might be useful in wicket core itself
    if (component == null)
      throw new SecurityException("Specified component is null");
    Page page = null;
    try
    {
      page = component.getPage();
    }
    catch (IllegalStateException e)
    {
      throw new SecurityException("Unable to create alias for component: " + component, e);
    }
    String alias = alias(page.getClass());
    String relative = component.getPageRelativePath();
    if (relative == null || "".equals(relative))
      return alias;
View Full Code Here


   * @return an alias
   */
  public static String alias(Class<?> class1)
  {
    if (class1 == null)
      throw new SecurityException("Specified class is null");
    return class1.getName();
  }
View Full Code Here

   * @return an alias
   */
  public static String containerAlias(MarkupContainer container)
  {
    if (container == null)
      throw new SecurityException("specified markupcontainer is null");
    MarkupContainer parent = container;
    PrependingStringBuffer buffer = new PrependingStringBuffer(150);
    while (parent != null)
    {
      if (buffer.length() > 0)
View Full Code Here

   * @return an array with aliases for this component
   */
  public static String[] containerAliasses(Component component)
  {
    if (component == null)
      throw new SecurityException("specified component is null");
    MarkupContainer parent = null;
    if (component instanceof MarkupContainer)
      parent = (MarkupContainer)component;
    else
      parent = component.getParent();
View Full Code Here

   */
  protected final Hive getHive()
  {
    Hive hive = HiveMind.getHive(hiveQueen);
    if (hive == null)
      throw new SecurityException("No hive registered for " + hiveQueen);
    return hive;
  }
View Full Code Here

   */
  @Override
  public boolean hasPermission(Permission permission, Subject subject)
  {
    if (permission == null)
      throw new SecurityException("permission is not allowed to be null");
    if (getHive().hasPermission(subject, permission))
      return true;
    logPermissionDenied(permission, subject);
    return false;

View Full Code Here

    if (context instanceof LoginContext)
    {
      loginContainer.login((LoginContext) context);
    }
    else
      throw new SecurityException("Unable to process login with context: " + context);
  }
View Full Code Here

  {
    if (context instanceof LoginContext)
    {
      return loginContainer.logoff((LoginContext) context);
    }
    throw new SecurityException("Unable to process logoff with context: " + context);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.security.strategies.SecurityException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.