|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.wcm.apps.server.util.AccessRoles
This class manages Access Roles.
Nested Class Summary | |
static class |
AccessRoles.DefinedRole
These objects are contained in a List returned by getDefinedRoles method |
class |
AccessRoles.Role
Represents Access Role object |
Field Summary | |
static java.lang.String |
ROLE_TYPE_AE_ADMINS
|
static java.lang.String |
ROLE_TYPE_PS_CONSOLE
|
static java.lang.String |
ROLE_TYPE_PS_DESIGNER
|
static java.lang.String |
ROLE_TYPE_PW_ADMINISTRATOR
|
static java.lang.String |
ROLE_TYPE_PW_CONFIGURATION
|
static java.lang.String |
ROLE_TYPE_PW_DESIGNER
|
Method Summary | |
boolean |
checkRoleAccess(java.util.Collection roles)
Checks if the current user belogs to any of the roles passed in the roles Collection. |
boolean |
checkRoleAccess(java.lang.String roleId)
Checks if the current user belongs to the passed role |
boolean |
checkRoleAccess(java.lang.String[] roles)
Checks if the current user belogs to any of the roles passed in the roles array. |
AccessRoles.Role |
createRole(java.lang.String roleName)
Creates a new role |
AccessRoles.Role |
createTemporaryRole(java.lang.String roleName,
java.lang.String roleType,
java.lang.String description)
Creates a temporary new role |
void |
deleteAllRoles()
Deletes all roles. |
void |
deleteRole(java.lang.String roleId)
Deletes a role |
AccessRoles.Role |
getAdminRole()
Returns AccessRoles.Role object that represents the administrators role |
java.util.List |
getDefinedRoles()
This method will return a list of all roles defined in the system, even if the current user does not have access to some or all of them. |
static AccessRoles |
getEmptyInstance(com.filenet.wcm.toolkit.server.util.WcmDataStore ds)
Returns an instance of AccessRoles object with the administrator role. |
static AccessRoles |
getInstance(com.filenet.wcm.toolkit.server.util.WcmDataStore ds)
Factory method to obtain the instance of AccessRole object |
AccessRoles.Role |
getRole(java.lang.String roleId)
Finds role based on role id |
java.util.List |
getRoleList()
Return the list of AccessRoles.Role object that the current user can see |
java.util.Map |
getRoleMap()
Return map of role ids to role names. |
java.lang.String |
getRoleName(java.lang.String roleId)
Retrieves role name for a role id. |
AccessRoles.Role |
getSystemRole(java.lang.String systemRoleType)
Finds a system role based on role type. |
java.util.Set |
getSystemRoleSet()
Return a set of role types. |
java.util.Set |
getUserRoles()
Returns a set of role ids that the current user can see |
static AccessRoles |
initializeRoles(com.filenet.wcm.toolkit.server.util.WcmDataStore ds,
AccessRoles.Role adminRoleTemplate)
Creates a set of system roles. |
void |
loadPermissions()
Loads members collection for each role. |
void |
saveRoles()
Saves all roles. |
static java.util.List |
sortRoleList(java.util.List roles)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ROLE_TYPE_AE_ADMINS
public static final java.lang.String ROLE_TYPE_PW_ADMINISTRATOR
public static final java.lang.String ROLE_TYPE_PW_CONFIGURATION
public static final java.lang.String ROLE_TYPE_PW_DESIGNER
public static final java.lang.String ROLE_TYPE_PS_CONSOLE
public static final java.lang.String ROLE_TYPE_PS_DESIGNER
Method Detail |
public java.lang.String getRoleName(java.lang.String roleId)
roleId
- public AccessRoles.Role getRole(java.lang.String roleId)
roleId
- public AccessRoles.Role getSystemRole(java.lang.String systemRoleType)
systemRoleType
- public java.util.List getRoleList()
public java.util.Map getRoleMap()
public java.util.Set getSystemRoleSet()
public AccessRoles.Role getAdminRole()
public static AccessRoles getInstance(com.filenet.wcm.toolkit.server.util.WcmDataStore ds) throws java.lang.Exception
java.lang.Exception
public static AccessRoles initializeRoles(com.filenet.wcm.toolkit.server.util.WcmDataStore ds, AccessRoles.Role adminRoleTemplate) throws java.lang.Exception
ds
- adminRoleTemplate
-
java.lang.Exception
public static AccessRoles getEmptyInstance(com.filenet.wcm.toolkit.server.util.WcmDataStore ds) throws java.lang.Exception
ds
-
java.lang.Exception
public java.util.Set getUserRoles()
public void saveRoles() throws java.lang.Exception
java.lang.Exception
public void loadPermissions() throws java.lang.Exception
java.lang.Exception
public void deleteAllRoles()
public void deleteRole(java.lang.String roleId)
roleId
- public AccessRoles.Role createRole(java.lang.String roleName) throws java.lang.Exception
roleName
-
java.lang.Exception
public AccessRoles.Role createTemporaryRole(java.lang.String roleName, java.lang.String roleType, java.lang.String description)
roleName
- roleType
- indicates this role is a system role
public boolean checkRoleAccess(java.util.Collection roles)
roles
-
public boolean checkRoleAccess(java.lang.String[] roles)
roles
-
public boolean checkRoleAccess(java.lang.String roleId)
roleId
- GUID for a normal role or a role type for a system role
public java.util.List getDefinedRoles()
public static java.util.List sortRoleList(java.util.List roles)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |