org.figure8.join.control.form
Class PermissionForm
java.lang.Object
org.apache.struts.action.ActionForm
org.figure8.join.control.JoinForm
org.figure8.join.control.form.PermissionForm
- All Implemented Interfaces:
- java.io.Serializable
public class PermissionForm
- extends JoinForm
Form object used for manipulating Roles and Permissions into Join application.
- Version:
- $Revision: 1.1 $
- Author:
- Laurent Broudoux
- See Also:
- Serialized Form
Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
Constructor Summary |
PermissionForm()
Creates a new instance of PermissionForm. |
Methods inherited from class org.figure8.join.control.JoinForm |
addActionError, addActionError, addActionError, getGuiMessageResources, getId, getIdStr, getMessageResources, setId, setIdStr, validate, validateEntityObjectId |
Methods inherited from class org.apache.struts.action.ActionForm |
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PermissionForm
public PermissionForm()
- Creates a new instance of PermissionForm.
getName
public java.lang.String getName()
- Returns:
- Name of security role associated to permission
setName
public void setName(java.lang.String name)
- Parameters:
name
- Name of security role to associate with permission
getDescription
public java.lang.String getDescription()
- Returns:
- Description of security role associated to permission
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description
- Description of security role to associate with permission
getPermissionResourceResolverClass
public java.lang.String getPermissionResourceResolverClass()
- Returns:
- FQN of PermissionResourceResolver implementation to use for role
setPermissionResourceResolverClass
public void setPermissionResourceResolverClass(java.lang.String permissionResourceResolverClass)
- Parameters:
permissionResourceResolverClass
- FQN of PermissionResourceResolver implementation to use for role
getUserId
public java.lang.String getUserId()
- Returns:
- The identifier of user currently associated with permissions
setUserId
public void setUserId(java.lang.String userId)
- Parameters:
userId
- The identifier of user to associate with permissions
getRoles
public java.util.Map getRoles()
- Returns:
- Map of roles associated to user.
getMappedRole
public java.lang.Object getMappedRole(java.lang.String key)
- Parameters:
key
- Name of role to get association for
- Returns:
- "on" string if role is associated to user, null otherwise
setMappedRole
public void setMappedRole(java.lang.String key,
java.lang.Object value)
- Parameters:
key
- Name of role to set association forvalue
- Value of association ("on" || "off" || boolean value)
getResources
public java.util.Map getResources()
- Returns:
- Map of permissions resources associated to user.
getMappedResourcesAsStrings
public java.lang.String[] getMappedResourcesAsStrings(java.lang.String key)
- Parameters:
key
- Name of role to get resources for
- Returns:
- Array of resources for permissions, null if no permission
getMappedResources
public java.lang.Object[] getMappedResources(java.lang.String key)
- Parameters:
key
- Name of role to get resources for
- Returns:
- Array of resources for permissions, null if no permission
setMappedResources
public void setMappedResources(java.lang.String key,
java.lang.Object[] value)
- Parameters:
key
- Name of role to set permissions forvalue
- Array of resources for permissions
addPermission
public void addPermission(Permission permission)
- Parameters:
permission
- Existing user's permission to add to mapped ones
doValidate
public void doValidate(java.lang.String operation,
org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Validation of form attributes.
- Specified by:
doValidate
in class JoinForm
- Parameters:
operation
- String representing the operation to invoke on Actionmapping
- Mapping between forwards name and path for this actionrequest
- The servlet container request wrapper
reset
public void reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Reset form attributes.
- Overrides:
reset
in class JoinForm
- Parameters:
mapping
- Mapping between forwards name and path for this actionrequest
- The servlet container request wrapper
Copyright © 2005-2008 Join. All Rights Reserved.