|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.security.spi.impl.DefaultSecurityMappingHandler
SecurityMappingHandler
Field Summary | |
private SecurityAccess |
commonQueries
Common queries. |
(package private) HierarchyResolver |
groupHierarchyResolver
The group hierarchy resolver. |
(package private) HierarchyResolver |
roleHierarchyResolver
The role hierarchy resolver. |
Constructor Summary | |
DefaultSecurityMappingHandler(SecurityAccess commonQueries)
Constructor providing access to the common queries. |
|
DefaultSecurityMappingHandler(SecurityAccess commonQueries,
HierarchyResolver roleHierarchyResolver,
HierarchyResolver groupHierarchyResolver)
Constructor providing access to the common queries and hierarchy resolvers. |
Method Summary | |
HierarchyResolver |
getGroupHierarchyResolver()
Gets the HierarchyResolver to be used for resolving group hierarchy. |
Set |
getGroupPrincipals(String username)
Gets the group principals for the given user according to the relevant hierarchy resolution rules. |
Set |
getGroupPrincipalsInRole(String roleFullPathName)
Gets the group principals for the given role according to the relevant hierarchy resolution rules. |
HierarchyResolver |
getRoleHierarchyResolver()
Gets the HierarchyResolver to be used for resolving role hierarchy. |
Set |
getRolePrincipals(String username)
Gets the role principals for the given user according to the relevant hierarchy resolution rules. |
Set |
getRolePrincipalsInGroup(String groupFullPathName)
Gets the role principals for the given group according to the relevant hierarchy resolution rules. |
Set |
getUserPrincipalsInGroup(String groupFullPathName)
Gets the user principals for the given group according to the relevant hierarchy resolution rules. |
Set |
getUserPrincipalsInRole(String roleFullPathName)
Gets the user principals for the given role according to the relevant hierarchy resolution rules. |
void |
removeRolePrincipal(String username,
String roleFullPathName)
Removes the role principal on a given user. |
void |
removeRolePrincipalInGroup(String groupFullPathName,
String roleFullPathName)
Removes the role principal on a given user. |
void |
removeUserPrincipalInGroup(String username,
String groupFullPathName)
Removes the user principal from the given group. |
void |
setGroupHierarchyResolver(HierarchyResolver groupHierarchyResolver)
Sets the HierarchyResolver used for resolving group hierarchy. |
void |
setRoleHierarchyResolver(HierarchyResolver roleHierarchyResolver)
Sets the HierarchyResolver to be used for resolving role hierachy. |
void |
setRolePrincipal(String username,
String roleFullPathName)
Sets the role principal on a given user. |
void |
setRolePrincipalInGroup(String groupFullPathName,
String roleFullPathName)
Sets the role principal on a given user. |
void |
setUserPrincipalInGroup(String username,
String groupFullPathName)
Sets the user principal in the given group. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
HierarchyResolver roleHierarchyResolver
HierarchyResolver groupHierarchyResolver
private SecurityAccess commonQueries
Constructor Detail |
public DefaultSecurityMappingHandler(SecurityAccess commonQueries)
Constructor providing access to the common queries.
public DefaultSecurityMappingHandler(SecurityAccess commonQueries, HierarchyResolver roleHierarchyResolver, HierarchyResolver groupHierarchyResolver)
Constructor providing access to the common queries and hierarchy resolvers.
Method Detail |
public HierarchyResolver getRoleHierarchyResolver()
SecurityMappingHandler
Gets the HierarchyResolver
to be used for resolving role hierarchy.
getRoleHierarchyResolver
in interface SecurityMappingHandler
public void setRoleHierarchyResolver(HierarchyResolver roleHierarchyResolver)
SecurityMappingHandler
Sets the HierarchyResolver
to be used for resolving role hierachy.
setRoleHierarchyResolver
in interface SecurityMappingHandler
roleHierarchyResolver
- The role HierarchyResolver
.SecurityMappingHandler.setRoleHierarchyResolver(org.apache.jetspeed.security.HierarchyResolver)
public HierarchyResolver getGroupHierarchyResolver()
SecurityMappingHandler
Gets the HierarchyResolver
to be used for resolving group hierarchy.
getGroupHierarchyResolver
in interface SecurityMappingHandler
public void setGroupHierarchyResolver(HierarchyResolver groupHierarchyResolver)
SecurityMappingHandler
Sets the HierarchyResolver
used for resolving group hierarchy.
setGroupHierarchyResolver
in interface SecurityMappingHandler
groupHierarchyResolver
- The group HierarchyResolver
.SecurityMappingHandler.setGroupHierarchyResolver(org.apache.jetspeed.security.HierarchyResolver)
public Set getRolePrincipals(String username)
SecurityMappingHandler
Gets the role principals for the given user according to the relevant hierarchy resolution rules.
getRolePrincipals
in interface SecurityMappingHandler
username
- The user name.
Principal- See Also:
SecurityMappingHandler.getRolePrincipals(java.lang.String)
public void setRolePrincipal(String username, String roleFullPathName) throws org.apache.jetspeed.security.SecurityException
SecurityMappingHandler
Sets the role principal on a given user. Existence of the role or the user must be checked prior to invoking this method. If a principal does not exist in the security mapping store, it will be created for the purpose of security mapping only.
setRolePrincipal
in interface SecurityMappingHandler
username
- The user to add the role principal to.roleFullPathName
- The full path of the role principal to add.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
. An exeption needs to be
thrown if the user does not exist.SecurityMappingHandler.setRolePrincipal(java.lang.String,
java.lang.String)
public void removeRolePrincipal(String username, String roleFullPathName) throws org.apache.jetspeed.security.SecurityException
SecurityMappingHandler
Removes the role principal on a given user.
If a mapping only record does not have any mapping, this method will remove the record as well.
removeRolePrincipal
in interface SecurityMappingHandler
username
- The user to remove the role principal from.roleFullPathName
- The full path of the role principal to remove.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
. An exeption needs to be
thrown if the user does not exist.SecurityMappingHandler.removeRolePrincipal(java.lang.String,
java.lang.String)
public Set getRolePrincipalsInGroup(String groupFullPathName)
SecurityMappingHandler
Gets the role principals for the given group according to the relevant hierarchy resolution rules.
getRolePrincipalsInGroup
in interface SecurityMappingHandler
groupFullPathName
- The group full path name.
Principal- See Also:
SecurityMappingHandler.getRolePrincipalsInGroup(java.lang.String)
public void setRolePrincipalInGroup(String groupFullPathName, String roleFullPathName) throws org.apache.jetspeed.security.SecurityException
SecurityMappingHandler
Sets the role principal on a given user.
setRolePrincipalInGroup
in interface SecurityMappingHandler
groupFullPathName
- The group to add the role principal to.roleFullPathName
- The full path of the role principal to add.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
. An exeption needs to be
thrown if the group does not exist.SecurityMappingHandler.setRolePrincipalInGroup(java.lang.String,
java.lang.String)
public void removeRolePrincipalInGroup(String groupFullPathName, String roleFullPathName) throws org.apache.jetspeed.security.SecurityException
SecurityMappingHandler
Removes the role principal on a given user.
removeRolePrincipalInGroup
in interface SecurityMappingHandler
groupFullPathName
- The group to remove the role principal from.roleFullPathName
- The full path of the role principal to remove.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
. An exeption needs to be
thrown if the group does not exist.SecurityMappingHandler.removeRolePrincipalInGroup(java.lang.String,
java.lang.String)
public Set getGroupPrincipals(String username)
SecurityMappingHandler
Gets the group principals for the given user according to the relevant hierarchy resolution rules.
getGroupPrincipals
in interface SecurityMappingHandler
username
- The user name.
GroupPrincipal- See Also:
SecurityMappingHandler.getGroupPrincipals(java.lang.String)
public Set getGroupPrincipalsInRole(String roleFullPathName)
SecurityMappingHandler
Gets the group principals for the given role according to the relevant hierarchy resolution rules.
getGroupPrincipalsInRole
in interface SecurityMappingHandler
roleFullPathName
- The role full path name.
Principal- See Also:
SecurityMappingHandler.getGroupPrincipalsInRole(java.lang.String)
public Set getUserPrincipalsInRole(String roleFullPathName)
SecurityMappingHandler
Gets the user principals for the given role according to the relevant hierarchy resolution rules.
getUserPrincipalsInRole
in interface SecurityMappingHandler
roleFullPathName
- The role full path name.
Principal- See Also:
SecurityMappingHandler.getUserPrincipalsInRole(java.lang.String)
public Set getUserPrincipalsInGroup(String groupFullPathName)
SecurityMappingHandler
Gets the user principals for the given group according to the relevant hierarchy resolution rules.
getUserPrincipalsInGroup
in interface SecurityMappingHandler
groupFullPathName
- The group full path name.
Principal- See Also:
SecurityMappingHandler.getUserPrincipalsInGroup(java.lang.String)
public void setUserPrincipalInGroup(String username, String groupFullPathName) throws org.apache.jetspeed.security.SecurityException
SecurityMappingHandler
Sets the user principal in the given group.
Existence of the group or the user must be checked prior to invoking this method. If a principal does not exist in the security mapping store, it will be created for the purpose of security mapping only.
setUserPrincipalInGroup
in interface SecurityMappingHandler
username
- The user to add to the group principal.groupFullPathName
- The full path of the group principal.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
. An exeption needs to be
thrown if the user does not exist.SecurityMappingHandler.setUserPrincipalInGroup(java.lang.String,
java.lang.String)
public void removeUserPrincipalInGroup(String username, String groupFullPathName) throws org.apache.jetspeed.security.SecurityException
SecurityMappingHandler
Removes the user principal from the given group.
removeUserPrincipalInGroup
in interface SecurityMappingHandler
username
- The user to remove from the group principal.groupFullPathName
- The full path of the group principal.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
. An exeption needs to be
thrown if the user does not exist.SecurityMappingHandler.removeUserPrincipalInGroup(java.lang.String,
java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |