public class AuthorityDAOImpl extends java.lang.Object implements AuthorityDAO, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
Policy.ArgQNAMEARG_0, ARG_1, ARG_2, QNAME| Constructor and Description |
|---|
AuthorityDAOImpl() |
| 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 |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Called before a node is deleted.
|
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 authorities by type and/or zone
|
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
|
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
|
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
|
void |
init() |
boolean |
isAuthorityContained(org.alfresco.service.cmr.repository.NodeRef authorityNodeRef,
java.lang.String authorityToFind) |
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
Called after a node's properties have been changed.
|
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 |
setAclDAO(AclDAO aclDao) |
void |
setAuthorityDisplayName(java.lang.String authorityName,
java.lang.String authorityDisplayName)
Set the display name for an authority
|
void |
setAuthorityLookupCache(org.alfresco.repo.cache.SimpleCache authorityLookupCache) |
void |
setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry cannedQueryRegistry) |
void |
setChildAuthorityCache(org.alfresco.repo.cache.SimpleCache childAuthorityCache) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPersonService(PersonService personService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService) |
void |
setStoreUrl(java.lang.String storeUrl) |
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
void |
setUserAuthorityCache(org.alfresco.repo.cache.SimpleCache userAuthorityCache) |
void |
setZoneAuthorityCache(org.alfresco.repo.cache.SimpleCache zoneAuthorityCache) |
void |
setZoneAuthoritySampleSize(int zoneAuthoritySampleSize)
Sets number of authorities in a zone to pre-cache, allowing quick generation of 'first n' results and adaption of
search technique based on hit rate.
|
public void setZoneAuthoritySampleSize(int zoneAuthoritySampleSize)
zoneAuthoritySampleSize - the zoneAuthoritySampleSize to setpublic void setStoreUrl(java.lang.String storeUrl)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
public void setAuthorityLookupCache(org.alfresco.repo.cache.SimpleCache authorityLookupCache)
public void setUserAuthorityCache(org.alfresco.repo.cache.SimpleCache userAuthorityCache)
public void setZoneAuthorityCache(org.alfresco.repo.cache.SimpleCache zoneAuthorityCache)
public void setChildAuthorityCache(org.alfresco.repo.cache.SimpleCache childAuthorityCache)
public void setPersonService(PersonService personService)
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setAclDAO(AclDAO aclDao)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry cannedQueryRegistry)
public boolean authorityExists(java.lang.String name)
AuthorityDAOauthorityExists in interface AuthorityDAOpublic void addAuthority(java.util.Collection parentNames,
java.lang.String childName)
AuthorityDAOaddAuthority in interface AuthorityDAOpublic void createAuthority(java.lang.String name,
java.lang.String authorityDisplayName,
java.util.Set authorityZones)
AuthorityDAOcreateAuthority in interface AuthorityDAOpublic void deleteAuthority(java.lang.String name)
AuthorityDAOdeleteAuthority in interface AuthorityDAOpublic 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)
AuthorityDAOgetAuthorities in interface AuthorityDAOpublic java.util.Set getRootAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String zoneName)
AuthorityDAOgetRootAuthorities in interface AuthorityDAOpublic 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)
AuthorityDAOfindAuthorities in interface AuthorityDAOparentAuthority - 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 zonespublic java.util.Set getContainedAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String parentName,
boolean immediate)
AuthorityDAOgetContainedAuthorities in interface AuthorityDAOparentName - the name of the containing authoritypublic void removeAuthority(java.lang.String parentName,
java.lang.String childName)
AuthorityDAOremoveAuthority in interface AuthorityDAOpublic java.util.Set getContainingAuthorities(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String name,
boolean immediate)
AuthorityDAOgetContainingAuthorities in interface AuthorityDAOpublic java.util.Set getContainingAuthoritiesInZone(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String authority,
java.lang.String zoneName,
AuthorityService.AuthorityFilter filter,
int size)
AuthorityDAOgetContainingAuthoritiesInZone in interface AuthorityDAOtype - 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.public java.lang.String getShortName(java.lang.String name)
AuthorityDAOgetShortName in interface AuthorityDAOpublic java.lang.String getName(org.alfresco.service.cmr.security.AuthorityType type,
java.lang.String shortName)
AuthorityDAOgetName in interface AuthorityDAOpublic boolean isAuthorityContained(org.alfresco.service.cmr.repository.NodeRef authorityNodeRef,
java.lang.String authorityToFind)
isAuthorityContained in interface AuthorityDAOpublic org.alfresco.service.cmr.repository.NodeRef getAuthorityNodeRefOrNull(java.lang.String name)
AuthorityDAOgetAuthorityNodeRefOrNull in interface AuthorityDAOpublic java.lang.String getAuthorityName(org.alfresco.service.cmr.repository.NodeRef authorityRef)
AuthorityDAOgetAuthorityName in interface AuthorityDAOauthorityRef - authority nodepublic java.lang.String getAuthorityDisplayName(java.lang.String authorityName)
AuthorityDAOgetAuthorityDisplayName in interface AuthorityDAOpublic void setAuthorityDisplayName(java.lang.String authorityName,
java.lang.String authorityDisplayName)
AuthorityDAOsetAuthorityDisplayName in interface AuthorityDAOpublic org.alfresco.service.cmr.repository.NodeRef getOrCreateZone(java.lang.String zoneName)
AuthorityDAOgetOrCreateZone in interface AuthorityDAOzoneName - the zone namepublic org.alfresco.service.cmr.repository.NodeRef getZone(java.lang.String zoneName)
AuthorityDAOgetZone in interface AuthorityDAOzoneName - the zone namepublic java.util.Set getAuthorityZones(java.lang.String name)
AuthorityDAOgetAuthorityZones in interface AuthorityDAOname - the authority long namenull if the authority does not exist.public java.util.Set getAllAuthoritiesInZone(java.lang.String zoneName,
org.alfresco.service.cmr.security.AuthorityType type)
AuthorityDAOgetAllAuthoritiesInZone in interface AuthorityDAOzoneName - the zone nametype - the authority type to filter by or null for all authority typespublic void addAuthorityToZones(java.lang.String authorityName,
java.util.Set zones)
AuthorityDAOaddAuthorityToZones in interface AuthorityDAOpublic void removeAuthorityFromZones(java.lang.String authorityName,
java.util.Set zones)
AuthorityDAOremoveAuthorityFromZones in interface AuthorityDAOpublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicybeforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicynodeRef - the node referencepublic void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
NodeServicePolicies.OnUpdatePropertiesPolicyonUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicynodeRef - reference to the updated nodebefore - the node's properties before the changeafter - the node's properties after the changepublic void init()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.