Interface DomainsManager
-
public interface DomainsManager
Provides administrative (crud) domain management; currently limited to onlyAuthRole
s of an existing domain.Note that this manager only provides and allows operations on
DomainAuth
s in a valid location!A domain location is valid if:
- it is a domain (directly) under a hipposys:domainfolder parent node below /hippo:configuration/hippo:domains
- it is a domain (directly) under a hipposys:federateddomainfolder parent node with depth >= 2
Likewise, access and operations on
AuthRole
s is only provided for authroles directly under a valid domain location.All modifying operations require the underlying HippoSession to have userRole
SecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthRole
addAuthRole(AuthRole authRoleTemplate)
Add a newAuthRole
to an existingDomainAuth
.boolean
deleteAuthRole(AuthRole authRoleTemplate)
Delete an existingAuthRole
AuthRole
getAuthRole(String authRolePath)
Get aAuthRole
by its (node) path.DomainAuth
getDomainAuth(String domainPath)
Get aDomainAuth
by its (node) path.SortedSet<DomainAuth>
getDomainAuths()
SortedSet<DomainAuth>
getDomainAuthsForGroup(String group)
SortedSet<DomainAuth>
getDomainAuthsForUser(String user)
SortedSet<DomainAuth>
getDomainAuthsForUserRole(String userRole)
AuthRole
updateAuthRole(AuthRole authRoleTemplate)
Update an existingAuthRole
-
-
-
Method Detail
-
getDomainAuth
DomainAuth getDomainAuth(String domainPath) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
Get aDomainAuth
by its (node) path. Only a domain in a valid location will be returned.- Parameters:
domainPath
- the path of the domain to get- Returns:
- the DomainAuth object
- Throws:
javax.jcr.ItemNotFoundException
- when the domain node doesn't exist, or is in an invalid locationjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
getDomainAuths
SortedSet<DomainAuth> getDomainAuths() throws javax.jcr.RepositoryException
- Returns:
- all the
DomainAuth
s. Only DomainAuths in a valid location will be returned. - Throws:
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
getDomainAuthsForUser
SortedSet<DomainAuth> getDomainAuthsForUser(String user) throws IllegalArgumentException, javax.jcr.RepositoryException
- Parameters:
user
- the name of the user- Returns:
- the
DomainAuth
s having at least oneAuthRole
with the provided user name. Only domains in a valid location will be returned. - Throws:
IllegalArgumentException
- if the provided user name is null or invalidjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
getDomainAuthsForUserRole
SortedSet<DomainAuth> getDomainAuthsForUserRole(String userRole) throws IllegalArgumentException, javax.jcr.RepositoryException
- Parameters:
userRole
- the name of the userRole- Returns:
- the
DomainAuth
s having at least oneAuthRole
with the provided userRole. Only domains in a valid location will be returned. - Throws:
IllegalArgumentException
- if the provided userRole name is null or invalidjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
getDomainAuthsForGroup
SortedSet<DomainAuth> getDomainAuthsForGroup(String group) throws IllegalArgumentException, javax.jcr.RepositoryException
- Parameters:
group
- the name of the group- Returns:
- the
DomainAuth
s having at least oneAuthRole
with the provided group. Only domains in a valid location will be returned. - Throws:
IllegalArgumentException
- if the provided group name is null or invalidjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
getAuthRole
AuthRole getAuthRole(String authRolePath) throws javax.jcr.RepositoryException
Get aAuthRole
by its (node) path. Only an authrole in a valid location will be returned.- Parameters:
authRolePath
- the path of the authrole to get- Returns:
- the AuthRole object
- Throws:
javax.jcr.ItemNotFoundException
- when the authrole node doesn't exist, or is in an invalid locationjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
addAuthRole
AuthRole addAuthRole(AuthRole authRoleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
Add a newAuthRole
to an existingDomainAuth
.- Parameters:
authRoleTemplate
- A template for the AuthRole to create from, for example aAuthRoleBean
instance- Returns:
- the created AuthRole
- Throws:
IllegalArgumentException
- When the template, template.name, template.domainPath or template.role is null.javax.jcr.ItemNotFoundException
- When there is no (valid) domain located at template.domainPathjavax.jcr.ItemExistsException
- When there already is an AuthRole named template.name under template.domainPathjavax.jcr.AccessDeniedException
- if the underlying HippoSession doesn't have the userRoleSecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
updateAuthRole
AuthRole updateAuthRole(AuthRole authRoleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
Update an existingAuthRole
- Parameters:
authRoleTemplate
- A template for the AuthRole to update from, for example aAuthRoleBean
instance- Returns:
- a fresh instance of the AuthRole after the update
- Throws:
IllegalArgumentException
- When the template, template.name, template.domainPath or template.role is null.javax.jcr.ItemNotFoundException
- When there is no (valid) domain located at template.domainPathjavax.jcr.AccessDeniedException
- if the underlying HippoSession doesn't have the userRoleSecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
deleteAuthRole
boolean deleteAuthRole(AuthRole authRoleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
Delete an existingAuthRole
- Parameters:
authRoleTemplate
- The AuthRole to delete- Returns:
- true if the AuthRole was deleted; false if not (not found or in an invalid location)
- Throws:
IllegalArgumentException
- When the template or template.path is null.javax.jcr.AccessDeniedException
- if the underlying HippoSession doesn't have the userRoleSecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrong
-
-