public interface DomainsManager
AuthRole
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:
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
Modifier and Type | Method and Description |
---|---|
AuthRole |
addAuthRole(AuthRole authRoleTemplate)
Add a new
AuthRole to an existing DomainAuth . |
boolean |
deleteAuthRole(AuthRole authRoleTemplate)
Delete an existing
AuthRole |
AuthRole |
getAuthRole(String authRolePath)
Get a
AuthRole by its (node) path. |
DomainAuth |
getDomainAuth(String domainPath)
Get a
DomainAuth 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 existing
AuthRole |
DomainAuth getDomainAuth(String domainPath) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
DomainAuth
by its (node) path. Only a domain in a valid location will be returned.domainPath
- the path of the domain to getjavax.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 wrongSortedSet<DomainAuth> getDomainAuths() throws javax.jcr.RepositoryException
DomainAuth
s. Only DomainAuths in a valid location will be returned.javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongSortedSet<DomainAuth> getDomainAuthsForUser(String user) throws IllegalArgumentException, javax.jcr.RepositoryException
user
- the name of the userDomainAuth
s having at least one AuthRole
with the provided user name.
Only domains in a valid location will be returned.IllegalArgumentException
- if the provided user name is null or invalidjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongSortedSet<DomainAuth> getDomainAuthsForUserRole(String userRole) throws IllegalArgumentException, javax.jcr.RepositoryException
userRole
- the name of the userRoleDomainAuth
s having at least one AuthRole
with the provided userRole.
Only domains in a valid location will be returned.IllegalArgumentException
- if the provided userRole name is null or invalidjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongSortedSet<DomainAuth> getDomainAuthsForGroup(String group) throws IllegalArgumentException, javax.jcr.RepositoryException
group
- the name of the groupDomainAuth
s having at least one AuthRole
with the provided group.
Only domains in a valid location will be returned.IllegalArgumentException
- if the provided group name is null or invalidjavax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongAuthRole getAuthRole(String authRolePath) throws javax.jcr.RepositoryException
AuthRole
by its (node) path. Only an authrole in a valid location will be returned.authRolePath
- the path of the authrole to getjavax.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 wrongAuthRole addAuthRole(AuthRole authRoleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
AuthRole
to an existing DomainAuth
.authRoleTemplate
- A template for the AuthRole to create from, for example a AuthRoleBean
instanceIllegalArgumentException
- 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 userRole
SecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongAuthRole updateAuthRole(AuthRole authRoleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
AuthRole
authRoleTemplate
- A template for the AuthRole to update from, for example a AuthRoleBean
instanceIllegalArgumentException
- 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 userRole
SecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongboolean deleteAuthRole(AuthRole authRoleTemplate) throws IllegalArgumentException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
AuthRole
authRoleTemplate
- The AuthRole to deleteIllegalArgumentException
- When the template or template.path is null.javax.jcr.AccessDeniedException
- if the underlying HippoSession doesn't have the userRole
SecurityConstants.USERROLE_SECURITY_APPLICATION_ADMIN
javax.jcr.RepositoryException
- if the underlying HippoSession is no longer live, or something else went wrongCopyright © 2007–2019 Hippo B.V. (http://www.onehippo.com). All rights reserved.