toolbox.web
Class PermissionFilter.Permission

Package class diagram package PermissionFilter.Permission
java.lang.Object
  extended by toolbox.web.PermissionFilter.Permission
Enclosing class:
PermissionFilter

 class PermissionFilter.Permission
extends java.lang.Object

Inner class that represents a single access permission.


Constructor Summary
PermissionFilter.Permission(java.lang.String name, java.lang.String denied, java.lang.String invertTmpls, java.lang.String invertActs, java.util.Set templates, java.util.Set actions)
          Construct a new Permission.
 
Method Summary
(package private)  boolean allowAction(java.lang.String actionName)
          Return true if this permission allows access to execute the given action name.
(package private)  boolean allowTemplate(java.lang.String tmplName)
          Return true if this permission allows access to view the given template name.
(package private)  java.lang.String getDeniedUrl()
          Return the access denied url for this permission.
(package private)  java.lang.String getName()
          Return the name of this permission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionFilter.Permission

PermissionFilter.Permission(java.lang.String name,
                            java.lang.String denied,
                            java.lang.String invertTmpls,
                            java.lang.String invertActs,
                            java.util.Set templates,
                            java.util.Set actions)
Construct a new Permission.

Parameters:
name - The name of the permission. This must correlate with one of the values that will be carried in the session.
denied - Forward the request to this resource if the the session does not contain the correct permission.
invertTmpls - String indicating that the template list must be inverted.
invertActs - String indicating that the action list must be inverted.
templates - A set of valid templates that may be accessed by a session with this permission.
actions - A set of valid actions that may be accessed by a session with this permission.
Method Detail

getName

java.lang.String getName()
Return the name of this permission

Returns:
String containing the name of this permission.

getDeniedUrl

java.lang.String getDeniedUrl()
Return the access denied url for this permission.

Returns:
String containing the access denied url.

allowTemplate

boolean allowTemplate(java.lang.String tmplName)
Return true if this permission allows access to view the given template name.

Parameters:
tmplName - String containing template name.
Returns:
boolean indicating whether access is allowed or not.

allowAction

boolean allowAction(java.lang.String actionName)
Return true if this permission allows access to execute the given action name.

Parameters:
actionName - String containing action name.
Returns:
boolean indicating whether access is allowed or not.