public interface AuthorityDAO
Modifier and Type | Method and Description |
---|---|
void |
addAuthority(Collection<String> parentNames,
String childName)
Add a child authority to the given parent authorities
|
void |
addAuthorityToZones(String authorityName,
Set<String> zones)
Add an authority to zones
|
boolean |
authorityExists(String name)
Test if an authority already exists.
|
void |
createAuthority(String name,
String authorityDisplayName,
Set<String> authorityZones)
Create an authority.
|
void |
deleteAuthority(String name)
Delete an authority.
|
Set<String> |
findAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
String parentAuthority,
boolean immediate,
String displayNamePattern,
String zoneName)
Find authorities by display name pattern.
|
Set<String> |
getAllAuthoritiesInZone(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<String> |
getAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
String zoneName,
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<AuthorityInfo> |
getAuthoritiesInfo(org.alfresco.service.cmr.security.AuthorityType type,
String zoneName,
String displayNameFilter,
String sortBy,
boolean sortAscending,
org.alfresco.query.PagingRequest pagingRequest)
Get AuthorityInfo by type and/or zone (both cannot be null).
|
String |
getAuthorityDisplayName(String authorityName)
Get the display name for an authority
|
String |
getAuthorityName(org.alfresco.service.cmr.repository.NodeRef authorityRef)
Gets the name for the given authority node
|
org.alfresco.service.cmr.repository.NodeRef |
getAuthorityNodeRefOrNull(String name)
Get a node ref for the authority if one exists
|
Set<String> |
getAuthorityZones(String name)
Gets the name of the zone containing the specified authority.
|
Set<String> |
getContainedAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
String parentName,
boolean immediate)
Get contained authorities.
|
Set<String> |
getContainingAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
String name,
boolean immediate)
Get the authorities that contain the one given.
|
Set<String> |
getContainingAuthoritiesInZone(org.alfresco.service.cmr.security.AuthorityType type,
String authority,
String zoneName,
AuthorityService.AuthorityFilter filter,
int size)
Get a set of authorities with varying filter criteria
|
long |
getGroupCount()
Count groups i.e.
|
String |
getName(org.alfresco.service.cmr.security.AuthorityType type,
String shortName)
Create the full identifier for an authority given its short name and type.
|
org.alfresco.service.cmr.repository.NodeRef |
getOrCreateZone(String zoneName)
Gets or creates an authority zone node with the specified name
|
long |
getPersonCount()
Count people i.e.
|
Set<String> |
getRootAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
String zoneName)
Get root authorities
|
String |
getShortName(String name)
Extract the short name of an authority from its full identifier.
|
org.alfresco.service.cmr.repository.NodeRef |
getZone(String zoneName)
Gets an authority zone node with the specified name
|
boolean |
isAuthorityContained(String authority,
String authorityToFind,
Set<String> positiveHits,
Set<String> negativeHits) |
void |
removeAuthority(String parentName,
String childName)
Remove an authority.
|
void |
removeAuthority(String parentName,
String childName,
boolean cacheRefresh)
Remove an authority without authorityBridgeTableCache refresh.
|
void |
removeAuthorityFromZones(String authorityName,
Set<String> zones)
Remove an authority from zones.
|
void |
setAuthorityDisplayName(String authorityName,
String authorityDisplayName)
Set the display name for an authority
|
long getPersonCount()
type cm:person
.long getGroupCount()
type cm:authorityContainer
.void addAuthority(Collection<String> parentNames, String childName)
void createAuthority(String name, String authorityDisplayName, Set<String> authorityZones)
void deleteAuthority(String name)
Set<String> getContainedAuthorities(org.alfresco.service.cmr.security.AuthorityType type, String parentName, boolean immediate)
parentName
- the name of the containing authorityboolean isAuthorityContained(String authority, String authorityToFind, Set<String> positiveHits, Set<String> negativeHits)
void removeAuthority(String parentName, String childName, boolean cacheRefresh)
Set<String> getContainingAuthorities(org.alfresco.service.cmr.security.AuthorityType type, String name, boolean immediate)
Set<String> getContainingAuthoritiesInZone(org.alfresco.service.cmr.security.AuthorityType type, String authority, 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<AuthorityInfo> getAuthoritiesInfo(org.alfresco.service.cmr.security.AuthorityType type, String zoneName, String displayNameFilter, String sortBy, boolean sortAscending, org.alfresco.query.PagingRequest pagingRequest)
sortBy
- either "displayName", "shortName", "authorityName" or null if no sorting.org.alfresco.query.PagingResults<String> getAuthorities(org.alfresco.service.cmr.security.AuthorityType type, String zoneName, String displayNameFilter, boolean sortByDisplayName, boolean sortAscending, org.alfresco.query.PagingRequest pagingRequest)
boolean authorityExists(String name)
org.alfresco.service.cmr.repository.NodeRef getAuthorityNodeRefOrNull(String name)
String getAuthorityName(org.alfresco.service.cmr.repository.NodeRef authorityRef)
authorityRef
- authority nodeString getAuthorityDisplayName(String authorityName)
void setAuthorityDisplayName(String authorityName, String authorityDisplayName)
Set<String> getRootAuthorities(org.alfresco.service.cmr.security.AuthorityType type, String zoneName)
Set<String> findAuthorities(org.alfresco.service.cmr.security.AuthorityType type, String parentAuthority, boolean immediate, String displayNamePattern, 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 zonesString getShortName(String name)
String getName(org.alfresco.service.cmr.security.AuthorityType type, String shortName)
org.alfresco.service.cmr.repository.NodeRef getOrCreateZone(String zoneName)
zoneName
- the zone nameorg.alfresco.service.cmr.repository.NodeRef getZone(String zoneName)
zoneName
- the zone nameSet<String> getAuthorityZones(String name)
name
- the authority long namenull
if the authority does not exist.Set<String> getAllAuthoritiesInZone(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(String authorityName, Set<String> zones)
Copyright © 2005–2017 Alfresco Software. All rights reserved.