|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.security.authority.AuthorityDAOImpl
public class AuthorityDAOImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
---|
Policy.Arg |
Field Summary |
---|
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy |
---|
ARG_0, ARG_1, ARG_2, QNAME |
Fields inherited from interface org.alfresco.repo.policy.Policy |
---|
NAMESPACE |
Constructor Summary | |
---|---|
AuthorityDAOImpl()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthorityDAOImpl()
Method Detail |
---|
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)
AuthorityDAO
authorityExists
in interface AuthorityDAO
public void addAuthority(java.util.Collection parentNames, java.lang.String childName)
AuthorityDAO
addAuthority
in interface AuthorityDAO
public void createAuthority(java.lang.String name, java.lang.String authorityDisplayName, java.util.Set authorityZones)
AuthorityDAO
createAuthority
in interface AuthorityDAO
public void deleteAuthority(java.lang.String name)
AuthorityDAO
deleteAuthority
in interface AuthorityDAO
public 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)
AuthorityDAO
getAuthorities
in interface AuthorityDAO
public java.util.Set getRootAuthorities(org.alfresco.service.cmr.security.AuthorityType type, java.lang.String zoneName)
AuthorityDAO
getRootAuthorities
in interface AuthorityDAO
public 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)
AuthorityDAO
findAuthorities
in interface AuthorityDAO
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 zones
public java.util.Set getContainedAuthorities(org.alfresco.service.cmr.security.AuthorityType type, java.lang.String parentName, boolean immediate)
AuthorityDAO
getContainedAuthorities
in interface AuthorityDAO
parentName
- the name of the containing authority
public void removeAuthority(java.lang.String parentName, java.lang.String childName)
AuthorityDAO
removeAuthority
in interface AuthorityDAO
public java.util.Set getContainingAuthorities(org.alfresco.service.cmr.security.AuthorityType type, java.lang.String name, boolean immediate)
AuthorityDAO
getContainingAuthorities
in interface AuthorityDAO
public java.util.Set getContainingAuthoritiesInZone(org.alfresco.service.cmr.security.AuthorityType type, java.lang.String authority, java.lang.String zoneName, AuthorityService.AuthorityFilter filter, int size)
AuthorityDAO
getContainingAuthoritiesInZone
in interface AuthorityDAO
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.
public java.lang.String getShortName(java.lang.String name)
AuthorityDAO
getShortName
in interface AuthorityDAO
public java.lang.String getName(org.alfresco.service.cmr.security.AuthorityType type, java.lang.String shortName)
AuthorityDAO
getName
in interface AuthorityDAO
public boolean isAuthorityContained(org.alfresco.service.cmr.repository.NodeRef authorityNodeRef, java.lang.String authorityToFind)
isAuthorityContained
in interface AuthorityDAO
public org.alfresco.service.cmr.repository.NodeRef getAuthorityNodeRefOrNull(java.lang.String name)
AuthorityDAO
getAuthorityNodeRefOrNull
in interface AuthorityDAO
public java.lang.String getAuthorityName(org.alfresco.service.cmr.repository.NodeRef authorityRef)
AuthorityDAO
getAuthorityName
in interface AuthorityDAO
authorityRef
- authority node
public java.lang.String getAuthorityDisplayName(java.lang.String authorityName)
AuthorityDAO
getAuthorityDisplayName
in interface AuthorityDAO
public void setAuthorityDisplayName(java.lang.String authorityName, java.lang.String authorityDisplayName)
AuthorityDAO
setAuthorityDisplayName
in interface AuthorityDAO
public org.alfresco.service.cmr.repository.NodeRef getOrCreateZone(java.lang.String zoneName)
AuthorityDAO
getOrCreateZone
in interface AuthorityDAO
zoneName
- the zone name
public org.alfresco.service.cmr.repository.NodeRef getZone(java.lang.String zoneName)
AuthorityDAO
getZone
in interface AuthorityDAO
zoneName
- the zone name
public java.util.Set getAuthorityZones(java.lang.String name)
AuthorityDAO
getAuthorityZones
in interface AuthorityDAO
name
- the authority long name
null
if the authority does not exist.public java.util.Set getAllAuthoritiesInZone(java.lang.String zoneName, org.alfresco.service.cmr.security.AuthorityType type)
AuthorityDAO
getAllAuthoritiesInZone
in interface AuthorityDAO
zoneName
- the zone nametype
- the authority type to filter by or null
for all authority types
public void addAuthorityToZones(java.lang.String authorityName, java.util.Set zones)
AuthorityDAO
addAuthorityToZones
in interface AuthorityDAO
public void removeAuthorityFromZones(java.lang.String authorityName, java.util.Set zones)
AuthorityDAO
removeAuthorityFromZones
in interface AuthorityDAO
public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
nodeRef
- the node referencepublic void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map before, java.util.Map after)
NodeServicePolicies.OnUpdatePropertiesPolicy
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
nodeRef
- reference to the updated nodebefore
- the node's properties before the changeafter
- the node's properties after the changepublic void init()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |