public interface AuthorityDAO
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthority(java.util.Collection parentNames,
java.lang.String childName)
Add a child authority to the given parent authorities
|
void |
addAuthorityToZones(java.lang.String authorityName,
java.util.Set zones)
Add an authority to zones
|
boolean |
authorityExists(java.lang.String name)
Test if an authority already exists.
|
void |
createAuthority(java.lang.String name,
java.lang.String authorityDisplayName,
java.util.Set authorityZones)
Create an authority.
|
void |
deleteAuthority(java.lang.String name)
Delete an authority.
|
java.util.Set |
findAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String parentAuthority,
boolean immediate,
java.lang.String displayNamePattern,
java.lang.String zoneName)
Find authorities by display name pattern.
|
java.util.Set |
getAllAuthoritiesInZone(java.lang.String zoneName,
org.alfresco.service.cmr.security.AuthorityType type)
Gets the names of all authorities in a zone, optionally filtered by type.
|
org.alfresco.query.PagingResults |
getAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName,
java.lang.String displayNameFilter,
boolean sortByDisplayName,
boolean sortAscending,
org.alfresco.query.PagingRequest pagingRequest)
Get authority names by type and/or zone (both cannot be null).
|
org.alfresco.query.PagingResults |
getAuthoritiesInfo(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName,
java.lang.String displayNameFilter,
java.lang.String sortBy,
boolean sortAscending,
org.alfresco.query.PagingRequest pagingRequest)
Get AuthorityInfo by type and/or zone (both cannot be null).
|
java.lang.String |
getAuthorityDisplayName(java.lang.String authorityName)
Get the display name for an authority
|
java.lang.String |
getAuthorityName(org.alfresco.service.cmr.repository.NodeRef authorityRef)
Gets the name for the given authority node
|
org.alfresco.service.cmr.repository.NodeRef |
getAuthorityNodeRefOrNull(java.lang.String name)
Get a node ref for the authority if one exists
|
java.util.Set |
getAuthorityZones(java.lang.String name)
Gets the name of the zone containing the specified authority.
|
java.util.Set |
getContainedAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String parentName,
boolean immediate)
Get contained authorities.
|
java.util.Set |
getContainingAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String name,
boolean immediate)
Get the authorities that contain the one given.
|
java.util.Set |
getContainingAuthoritiesInZone(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String authority,
java.lang.String zoneName,
AuthorityService.AuthorityFilter filter,
int size)
Get a set of authorities with varying filter criteria
|
long |
getGroupCount()
Count groups i.e.
|
java.lang.String |
getName(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String shortName)
Create the full identifier for an authority given its short name and type.
|
org.alfresco.service.cmr.repository.NodeRef |
getOrCreateZone(java.lang.String zoneName)
Gets or creates an authority zone node with the specified name
|
long |
getPersonCount()
Count people i.e.
|
java.util.Set |
getRootAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName)
Get root authorities
|
java.lang.String |
getShortName(java.lang.String name)
Extract the short name of an authority from its full identifier.
|
org.alfresco.service.cmr.repository.NodeRef |
getZone(java.lang.String zoneName)
Gets an authority zone node with the specified name
|
boolean |
isAuthorityContained(java.lang.String authority,
java.lang.String authorityToFind,
java.util.Set positiveHits,
java.util.Set negativeHits) |
void |
removeAuthority(java.lang.String parentName,
java.lang.String childName)
Remove an authority.
|
void |
removeAuthorityFromZones(java.lang.String authorityName,
java.util.Set zones)
Remove an authority from zones.
|
void |
setAuthorityDisplayName(java.lang.String authorityName,
java.lang.String authorityDisplayName)
Set the display name for an authority
|
long getPersonCount()
type cm:person.long getGroupCount()
type cm:authorityContainer.void addAuthority(java.util.Collection parentNames,
java.lang.String childName)
void createAuthority(java.lang.String name,
java.lang.String authorityDisplayName,
java.util.Set authorityZones)
void deleteAuthority(java.lang.String name)
java.util.Set getContainedAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String parentName,
boolean immediate)
parentName - the name of the containing authorityboolean isAuthorityContained(java.lang.String authority,
java.lang.String authorityToFind,
java.util.Set positiveHits,
java.util.Set negativeHits)
void removeAuthority(java.lang.String parentName,
java.lang.String childName)
java.util.Set getContainingAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String name,
boolean immediate)
java.util.Set getContainingAuthoritiesInZone(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String authority,
java.lang.String zoneName,
AuthorityService.AuthorityFilter filter,
int size)
type - authority type or null for all typesauthority - if non-null, only return those authorities who contain this authorityzoneName - if non-null, only include authorities in the named zonefilter - optional callback to apply further filter criteria or nullsize - if greater than zero, the maximum results to return. The search strategy used is varied depending on this number.org.alfresco.query.PagingResults getAuthoritiesInfo(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName,
java.lang.String displayNameFilter,
java.lang.String sortBy,
boolean sortAscending,
org.alfresco.query.PagingRequest pagingRequest)
sortBy - either "displayName", "shortName", "authorityName" or null if no sorting.org.alfresco.query.PagingResults getAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName,
java.lang.String displayNameFilter,
boolean sortByDisplayName,
boolean sortAscending,
org.alfresco.query.PagingRequest pagingRequest)
boolean authorityExists(java.lang.String name)
org.alfresco.service.cmr.repository.NodeRef getAuthorityNodeRefOrNull(java.lang.String name)
java.lang.String getAuthorityName(org.alfresco.service.cmr.repository.NodeRef authorityRef)
authorityRef - authority nodejava.lang.String getAuthorityDisplayName(java.lang.String authorityName)
void setAuthorityDisplayName(java.lang.String authorityName,
java.lang.String authorityDisplayName)
java.util.Set getRootAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName)
java.util.Set findAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String parentAuthority,
boolean immediate,
java.lang.String displayNamePattern,
java.lang.String zoneName)
parentAuthority - if non-null, will look only for authorities who are a child of the named parentimmediate - if true then only search root groups if parentAuthority is null, or immediate children of parentAuthority if it is non-null.zoneName - - may be null to indicate all zonesjava.lang.String getShortName(java.lang.String name)
java.lang.String getName(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String shortName)
org.alfresco.service.cmr.repository.NodeRef getOrCreateZone(java.lang.String zoneName)
zoneName - the zone nameorg.alfresco.service.cmr.repository.NodeRef getZone(java.lang.String zoneName)
zoneName - the zone namejava.util.Set getAuthorityZones(java.lang.String name)
name - the authority long namenull if the authority does not exist.java.util.Set getAllAuthoritiesInZone(java.lang.String zoneName,
org.alfresco.service.cmr.security.AuthorityType type)
zoneName - the zone nametype - the authority type to filter by or null for all authority typesvoid addAuthorityToZones(java.lang.String authorityName,
java.util.Set zones)
void removeAuthorityFromZones(java.lang.String authorityName,
java.util.Set zones)
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.