Class PersonServiceImpl
- java.lang.Object
-
- org.alfresco.repo.transaction.TransactionListenerAdapter
-
- org.alfresco.repo.security.person.PersonServiceImpl
-
- All Implemented Interfaces:
NodeServicePolicies.BeforeCreateNodePolicy,NodeServicePolicies.BeforeDeleteNodePolicy,NodeServicePolicies.OnCreateNodePolicy,NodeServicePolicies.OnUpdatePropertiesPolicy,ClassPolicy,Policy,TransactionListener,PersonService,org.alfresco.util.transaction.TransactionListener
public class PersonServiceImpl extends TransactionListenerAdapter implements PersonService, NodeServicePolicies.BeforeCreateNodePolicy, NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPersonServiceImpl.NodeIdComparator-
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.security.PersonService
PersonService.PersonInfo
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringKEY_ALLOW_UID_UPDATEstatic java.lang.StringPEOPLE_FOLDER_SHORT_QNAMEstatic java.lang.StringSYSTEM_FOLDER_SHORT_QNAME-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeCreateNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME
-
-
Constructor Summary
Constructors Constructor Description PersonServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterCommit()Process clean up any duplicates that were flagged during the transaction.voidbeforeCreateNode(org.alfresco.service.cmr.repository.NodeRef parentRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName nodeTypeQName)Called before a new node is created.voidbeforeCreateNodeValidation(org.alfresco.service.cmr.repository.NodeRef parentRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName nodeTypeQName)voidbeforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)Called before a node is deleted.voidbeforeDeleteNodeValidation(org.alfresco.service.cmr.repository.NodeRef nodeRef)intcountPeople()Counts the number of persons registered with the system.booleancreateMissingPeople()Does this service create people on demand if they are missing.org.alfresco.service.cmr.repository.NodeRefcreatePerson(java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)Create a new person with the given properties.org.alfresco.service.cmr.repository.NodeRefcreatePerson(java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties, java.util.Set<java.lang.String> zones)Create a new person with the given properties, recording them against the given zone name (usually identifying an external user registry from which the details were obtained).voiddeletePerson(java.lang.String userName)Delete the person identified by the given user name.voiddeletePerson(org.alfresco.service.cmr.repository.NodeRef personRef)Delete the person identified by the given ref.voiddeletePerson(org.alfresco.service.cmr.repository.NodeRef personRef, boolean deleteAuthentication)Delete the person identified by the given ref, and optionally delete the associated authentication, if one.booleanequals(java.lang.Object obj)java.util.Set<org.alfresco.service.cmr.repository.NodeRef>getAllPeople()Deprecated.see getPeoplejava.util.Set<org.alfresco.service.namespace.QName>getMutableProperties()Get the list of properties that are mutable.org.alfresco.query.PagingResults<PersonService.PersonInfo>getPeople(java.lang.String pattern, java.util.List<org.alfresco.service.namespace.QName> filterStringProps, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)Get paged list of people optionally filtered and/or sorted Note: the pattern is applied to filter props (0 to 3) as startsWithIgnoreCase, which are OR'ed together, for example: cm:userName or cm:firstName or cm:lastNameorg.alfresco.query.PagingResults<PersonService.PersonInfo>getPeople(java.lang.String pattern, java.util.List<org.alfresco.service.namespace.QName> filterStringProps, java.util.Set<org.alfresco.service.namespace.QName> inclusiveAspects, java.util.Set<org.alfresco.service.namespace.QName> exclusiveAspects, boolean includeAdministraotrs, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)Get paged list of people optionally filtered and/or sortedorg.alfresco.query.PagingResults<PersonService.PersonInfo>getPeople(java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.String>> stringPropFilters, boolean filterIgnoreCase, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)Deprecated.see getPeople(String pattern, ListfilterProps, List > sortProps, PagingRequest pagingRequest) org.alfresco.service.cmr.repository.NodeRefgetPeopleContainer()Return the container that stores people.java.util.Set<org.alfresco.service.cmr.repository.NodeRef>getPeopleFilteredByProperty(org.alfresco.service.namespace.QName propertyKey, java.io.Serializable propertyValue, int count)Get people filtered by the given property name/value pair.org.alfresco.service.cmr.repository.NodeRefgetPerson(java.lang.String userName)Get a person by userName.org.alfresco.service.cmr.repository.NodeRefgetPerson(java.lang.String userName, boolean autoCreateHomeFolderAndMissingPersonIfAllowed)Retrieve the person NodeRef for ausername, optionally creating the home folder if it does not exist and optionally creating the person if they don't exist AND the PersonService is configured to allow the creation of missing personsPersonService.setCreateMissingPeople(boolean).PersonService.PersonInfogetPerson(org.alfresco.service.cmr.repository.NodeRef personRef)Retrieve the person info for an existingperson NodeReforg.alfresco.service.cmr.repository.NodeRefgetPersonOrNull(java.lang.String userName)Get a person by userName.java.lang.StringgetUserIdentifier(java.lang.String caseSensitiveUserName)Given the case sensitive user name find the approriate identifier from the person service.booleangetUserNamesAreCaseSensitive()Are user names case sensitive?inthashCode()voidinit()Spring bean init methodbooleanisEnabled(java.lang.String userName)Is the specified user, enabledbooleanisMutable()Can this service create, delete and update person information?voidnotifyPerson(java.lang.String userName, java.lang.String password)Notifies a user by email that their account has been created, and the details of it.voidonCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)Called when a new node has been created.voidonUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> after)When a uid is changed we need to create an alias for the old uid so permissions are not broken.voidonUpdatePropertiesUser(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> after)Track theenabled/disabledflag oncm:user.booleanpersonExists(java.lang.String caseSensitiveUserName)Check if a person exists.voidsetAclDAO(AclDAO aclDao)voidsetAuthenticationService(MutableAuthenticationService authenticationService)voidsetAuthorityService(AuthorityService authorityService)voidsetCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<org.alfresco.service.cmr.repository.NodeRef>> cannedQueryRegistry)Set the registry ofcanned queriesvoidsetCreateMissingPeople(boolean createMissingPeople)Set if missing people should be created.voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)voidsetDuplicateMode(java.lang.String duplicateMode)voidsetEventPublisher(org.alfresco.sync.repo.events.EventPublisher eventPublisher)voidsetHomeFolderCreationDisabled(boolean homeFolderCreationDisabled)Indicates if home folder creation should be disabled.voidsetHomeFolderCreationEager(boolean homeFolderCreationEager)Indicates if home folders should be created when the person is created or delayed until first accessed.voidsetHomeFolderManager(HomeFolderManager homeFolderManager)voidsetIncludeAutoCreated(boolean includeAutoCreated)voidsetLastIsBest(boolean lastIsBest)voidsetNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidsetPermissionServiceSPI(PermissionServiceSPI permissionServiceSPI)voidsetPermissionsManager(PermissionsManager permissionsManager)voidsetPersonCache(org.alfresco.repo.cache.SimpleCache<java.lang.String,java.util.Set<org.alfresco.service.cmr.repository.NodeRef>> personCache)Set the username to person cache.voidsetPersonProperties(java.lang.String userName, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)Set the properties on a person - some of these may be persisted in different locations - the home folder is created if it doesn't existvoidsetPersonProperties(java.lang.String userName, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties, boolean autoCreateHomeFolder)Set the properties on a person - some of these may be persisted in different locations.voidsetPolicyComponent(PolicyComponent policyComponent)voidsetProcessDuplicates(boolean processDuplicates)voidsetRepoAdminService(RepoAdminService repoAdminService)voidsetSearchService(org.alfresco.service.cmr.search.SearchService searchService)voidsetServiceRegistry(ServiceRegistry serviceRegistry)voidsetSingletonCache(org.alfresco.repo.cache.SimpleCache<java.lang.String,java.lang.Object> singletonCache)voidsetStoreUrl(java.lang.String storeUrl)voidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService)voidsetTransactionService(TransactionService transactionService)voidsetUserNameMatcher(UserNameMatcher userNameMatcher)static java.lang.StringupdateUsernameForTenancy(java.lang.String username, org.alfresco.repo.tenant.TenantService tenantService)Helper for when creating new users and people: Updates the supplied username with any required tenant details, and ensures that the tenant domains match.-
Methods inherited from class org.alfresco.repo.transaction.TransactionListenerAdapter
afterRollback, beforeCommit, beforeCompletion, flush
-
-
-
-
Field Detail
-
SYSTEM_FOLDER_SHORT_QNAME
public static final java.lang.String SYSTEM_FOLDER_SHORT_QNAME
- See Also:
- Constant Field Values
-
PEOPLE_FOLDER_SHORT_QNAME
public static final java.lang.String PEOPLE_FOLDER_SHORT_QNAME
- See Also:
- Constant Field Values
-
KEY_ALLOW_UID_UPDATE
public static final java.lang.String KEY_ALLOW_UID_UPDATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
init
public void init()
Spring bean init method
-
setCreateMissingPeople
public void setCreateMissingPeople(boolean createMissingPeople)
Set if missing people should be created.- Specified by:
setCreateMissingPeoplein interfacePersonService- Parameters:
createMissingPeople- set to true to create people- See Also:
PersonService.getPerson(String)
-
setNamespacePrefixResolver
public void setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
-
setAuthorityService
public void setAuthorityService(AuthorityService authorityService)
-
setAuthenticationService
public void setAuthenticationService(MutableAuthenticationService authenticationService)
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
-
setPermissionServiceSPI
public void setPermissionServiceSPI(PermissionServiceSPI permissionServiceSPI)
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
-
setTenantService
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
-
setSingletonCache
public void setSingletonCache(org.alfresco.repo.cache.SimpleCache<java.lang.String,java.lang.Object> singletonCache)
-
setSearchService
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
-
setRepoAdminService
public void setRepoAdminService(RepoAdminService repoAdminService)
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
-
setStoreUrl
public void setStoreUrl(java.lang.String storeUrl)
-
setUserNameMatcher
public void setUserNameMatcher(UserNameMatcher userNameMatcher)
-
setDuplicateMode
public void setDuplicateMode(java.lang.String duplicateMode)
-
setIncludeAutoCreated
public void setIncludeAutoCreated(boolean includeAutoCreated)
-
setLastIsBest
public void setLastIsBest(boolean lastIsBest)
-
setProcessDuplicates
public void setProcessDuplicates(boolean processDuplicates)
-
setHomeFolderManager
public void setHomeFolderManager(HomeFolderManager homeFolderManager)
-
setHomeFolderCreationEager
public void setHomeFolderCreationEager(boolean homeFolderCreationEager)
Indicates if home folders should be created when the person is created or delayed until first accessed.
-
setHomeFolderCreationDisabled
public void setHomeFolderCreationDisabled(boolean homeFolderCreationDisabled)
Indicates if home folder creation should be disabled.
-
setAclDAO
public void setAclDAO(AclDAO aclDao)
-
setPermissionsManager
public void setPermissionsManager(PermissionsManager permissionsManager)
-
setCannedQueryRegistry
public void setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<org.alfresco.service.cmr.repository.NodeRef>> cannedQueryRegistry)
Set the registry ofcanned queries
-
setPersonCache
public void setPersonCache(org.alfresco.repo.cache.SimpleCache<java.lang.String,java.util.Set<org.alfresco.service.cmr.repository.NodeRef>> personCache)
Set the username to person cache.
-
getPerson
public org.alfresco.service.cmr.repository.NodeRef getPerson(java.lang.String userName)
Get a person by userName. The person is store in the repository. The person may be created as a side effect of this call, depending on the setting ofto create missing people or not. The home folder will also be created as a side effect if it does not exist.- Specified by:
getPersonin interfacePersonService- Parameters:
userName- - the userName key to find the person- Returns:
- Returns the person node, either existing or new
- See Also:
PersonService.setCreateMissingPeople(boolean),PersonService.createMissingPeople()
-
getPerson
public PersonService.PersonInfo getPerson(org.alfresco.service.cmr.repository.NodeRef personRef) throws NoSuchPersonException
Retrieve the person info for an existingperson NodeRef- Specified by:
getPersonin interfacePersonService- Parameters:
personRef- NodeRef- Returns:
- PersonInfo (username, firstname, lastname)
- Throws:
NoSuchPersonException- if the person doesn't exist
-
getPersonOrNull
public org.alfresco.service.cmr.repository.NodeRef getPersonOrNull(java.lang.String userName)
Get a person by userName. The person is store in the repository. No missing person objects will be created as a side effect of this call. If the person is missing from the repository null will be returned.- Specified by:
getPersonOrNullin interfacePersonService- Parameters:
userName- - the userName key to find the person- Returns:
- Returns the existing person node, or null if does not exist.
- See Also:
PersonService.createMissingPeople()
-
getPerson
public org.alfresco.service.cmr.repository.NodeRef getPerson(java.lang.String userName, boolean autoCreateHomeFolderAndMissingPersonIfAllowed)Retrieve the person NodeRef for ausername, optionally creating the home folder if it does not exist and optionally creating the person if they don't exist AND the PersonService is configured to allow the creation of missing personsPersonService.setCreateMissingPeople(boolean). If not allowed to create missing persons and the person does not exist aNoSuchPersonExceptionexception will be thrown.- Specified by:
getPersonin interfacePersonService- Parameters:
userName- of the person NodeRef to retrieveautoCreateHomeFolderAndMissingPersonIfAllowed- If the person exits: should we create the home folder if it does not exist? If the person exists AND the creation of missing persons is allowed should we create both the person and home folder.- Returns:
- NodeRef of the person as specified by the username
-
personExists
public boolean personExists(java.lang.String caseSensitiveUserName)
Check if a person exists.- Specified by:
personExistsin interfacePersonService- Parameters:
caseSensitiveUserName- the user name- Returns:
- Returns true if the user exists, otherwise false
-
afterCommit
public void afterCommit()
Process clean up any duplicates that were flagged during the transaction.- Specified by:
afterCommitin interfaceTransactionListener- Specified by:
afterCommitin interfaceorg.alfresco.util.transaction.TransactionListener- Overrides:
afterCommitin classTransactionListenerAdapter
-
createMissingPeople
public boolean createMissingPeople()
Does this service create people on demand if they are missing. If this is true, a call to getPerson() will create a person if they are missing.- Specified by:
createMissingPeoplein interfacePersonService- Returns:
- true if people are created on demand and false otherwise.
-
getMutableProperties
public java.util.Set<org.alfresco.service.namespace.QName> getMutableProperties()
Get the list of properties that are mutable. Some service may only allow a limited list of properties to be changed. This may be those persisted in the repository or those that can be changed in some other implementation such as LDAP.- Specified by:
getMutablePropertiesin interfacePersonService- Returns:
- A set of QNames that identify properties that can be changed
-
setPersonProperties
public void setPersonProperties(java.lang.String userName, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)Set the properties on a person - some of these may be persisted in different locations - the home folder is created if it doesn't exist- Specified by:
setPersonPropertiesin interfacePersonService- Parameters:
userName- - the user for which the properties should be set.properties- - the map of properties to set (as the NodeService)
-
setPersonProperties
public void setPersonProperties(java.lang.String userName, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties, boolean autoCreateHomeFolder)Set the properties on a person - some of these may be persisted in different locations.- Specified by:
setPersonPropertiesin interfacePersonService- Parameters:
userName- - the user for which the properties should be set.properties- - the map of properties to set (as the NodeService)autoCreateHomeFolder- should we auto-create the home folder if it doesn't exist.
-
isMutable
public boolean isMutable()
Can this service create, delete and update person information?- Specified by:
isMutablein interfacePersonService- Returns:
- true if this service allows mutation to people.
-
createPerson
public org.alfresco.service.cmr.repository.NodeRef createPerson(java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)
Create a new person with the given properties. The userName is one of the properties. Users with duplicate userNames are not allowed.- Specified by:
createPersonin interfacePersonService- Returns:
- NodeRef
-
createPerson
public org.alfresco.service.cmr.repository.NodeRef createPerson(java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties, java.util.Set<java.lang.String> zones)Create a new person with the given properties, recording them against the given zone name (usually identifying an external user registry from which the details were obtained). The userName is one of the properties. Users with duplicate userNames are not allowed.- Specified by:
createPersonin interfacePersonService- Parameters:
properties- the propertieszones- a set if zones including the identifier for the external user registry owning the person information, ornullor an empty set- Returns:
- the node ref
-
notifyPerson
public void notifyPerson(java.lang.String userName, java.lang.String password)Notifies a user by email that their account has been created, and the details of it. Normally called afterPersonService.createPerson(Map)orPersonService.createPerson(Map, Set)where email notifications are required.- Specified by:
notifyPersonin interfacePersonService- Parameters:
userName- of the person to notifypassword- of the person to notify
-
getPeopleContainer
public org.alfresco.service.cmr.repository.NodeRef getPeopleContainer()
Return the container that stores people.- Specified by:
getPeopleContainerin interfacePersonService- Returns:
- NodeRef
-
deletePerson
public void deletePerson(java.lang.String userName)
Delete the person identified by the given user name.- Specified by:
deletePersonin interfacePersonService- Parameters:
userName- String
-
deletePerson
public void deletePerson(org.alfresco.service.cmr.repository.NodeRef personRef)
Delete the person identified by the given ref.- Specified by:
deletePersonin interfacePersonService- Parameters:
personRef- NodeRef
-
deletePerson
public void deletePerson(org.alfresco.service.cmr.repository.NodeRef personRef, boolean deleteAuthentication)Delete the person identified by the given ref, and optionally delete the associated authentication, if one.- Specified by:
deletePersonin interfacePersonService- Parameters:
personRef- NodeRefdeleteAuthentication- boolean
-
getAllPeople
public java.util.Set<org.alfresco.service.cmr.repository.NodeRef> getAllPeople()
Deprecated.see getPeopleGet all the people we know about.- Specified by:
getAllPeoplein interfacePersonService- Returns:
- a set of people in no specific order.
-
getPeople
public org.alfresco.query.PagingResults<PersonService.PersonInfo> getPeople(java.lang.String pattern, java.util.List<org.alfresco.service.namespace.QName> filterStringProps, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)
Get paged list of people optionally filtered and/or sorted Note: the pattern is applied to filter props (0 to 3) as startsWithIgnoreCase, which are OR'ed together, for example: cm:userName or cm:firstName or cm:lastName- Specified by:
getPeoplein interfacePersonService- Parameters:
pattern- pattern to apply to filter props - "startsWith" and "ignoreCase"filterStringProps- list of filter properties (these are OR'ed)sortProps- sort property, eg. cm:username ascendingpagingRequest- skip, max + optional query execution id
author janv
-
getPeople
public org.alfresco.query.PagingResults<PersonService.PersonInfo> getPeople(java.lang.String pattern, java.util.List<org.alfresco.service.namespace.QName> filterStringProps, java.util.Set<org.alfresco.service.namespace.QName> inclusiveAspects, java.util.Set<org.alfresco.service.namespace.QName> exclusiveAspects, boolean includeAdministraotrs, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)
Get paged list of people optionally filtered and/or sorted- Specified by:
getPeoplein interfacePersonService- Parameters:
pattern- StringfilterStringProps- list of filter properties (with "startsWith" values), eg. cm:username "al" might match "alex", "alice", ...inclusiveAspects- if set, filter out any people that don't have one of these aspectsexclusiveAspects- if set, filter out any people that do have one of these aspectsincludeAdministraotrs- true to include administrators in the results.sortProps- sort property, eg. cm:username ascendingpagingRequest- skip, max + optional query execution id
-
getPeople
public org.alfresco.query.PagingResults<PersonService.PersonInfo> getPeople(java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.String>> stringPropFilters, boolean filterIgnoreCase, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)
Deprecated.see getPeople(String pattern, ListfilterProps, List > sortProps, PagingRequest pagingRequest) Get paged list of people optionally filtered and/or sorted- Specified by:
getPeoplein interfacePersonService- Parameters:
stringPropFilters- list of filter properties (with "startsWith" values), eg. cm:username "al" might match "alex", "alice", ...filterIgnoreCase- true to ignore case when filtering, false to be case-sensitive when filteringsortProps- sort property, eg. cm:username ascendingpagingRequest- skip, max + optional query execution id
author janv
-
getPeopleFilteredByProperty
public java.util.Set<org.alfresco.service.cmr.repository.NodeRef> getPeopleFilteredByProperty(org.alfresco.service.namespace.QName propertyKey, java.io.Serializable propertyValue, int count)Get people filtered by the given property name/value pair. In order to get paging, usePersonService.getPeople(List, boolean, List, PagingRequest)- Specified by:
getPeopleFilteredByPropertyin interfacePersonService- Parameters:
propertyKey- property key of property to filter people bypropertyValue- property value of property to filter people bycount- the number of results to retrieve, up to a maximum of 1000- Returns:
- people filtered by the given property name/value pair
- See Also:
PersonService.getPeople(List, boolean, List, PagingRequest)
-
onCreateNode
public void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Called when a new node has been created.- Specified by:
onCreateNodein interfaceNodeServicePolicies.OnCreateNodePolicy- Parameters:
childAssocRef- the created child association reference
-
beforeCreateNode
public void beforeCreateNode(org.alfresco.service.cmr.repository.NodeRef parentRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName nodeTypeQName)Description copied from interface:NodeServicePolicies.BeforeCreateNodePolicyCalled before a new node is created.- Specified by:
beforeCreateNodein interfaceNodeServicePolicies.BeforeCreateNodePolicy- Parameters:
parentRef- the parent node referenceassocTypeQName- the association type qualified nameassocQName- the association qualified namenodeTypeQName- the node type qualified name
-
beforeCreateNodeValidation
public void beforeCreateNodeValidation(org.alfresco.service.cmr.repository.NodeRef parentRef, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName nodeTypeQName)
-
beforeDeleteNode
public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:NodeServicePolicies.BeforeDeleteNodePolicyCalled before a node is deleted.- Specified by:
beforeDeleteNodein interfaceNodeServicePolicies.BeforeDeleteNodePolicy- Parameters:
nodeRef- the node reference
-
beforeDeleteNodeValidation
public void beforeDeleteNodeValidation(org.alfresco.service.cmr.repository.NodeRef nodeRef)
-
getUserIdentifier
public java.lang.String getUserIdentifier(java.lang.String caseSensitiveUserName)
Given the case sensitive user name find the approriate identifier from the person service. If the system is case sensitive it will return the same string. If case insentive it will return the common object. If the user does not exist it will return null;- Specified by:
getUserIdentifierin interfacePersonService- Parameters:
caseSensitiveUserName- String- Returns:
- String
-
getUserNamesAreCaseSensitive
public boolean getUserNamesAreCaseSensitive()
Are user names case sensitive?- Specified by:
getUserNamesAreCaseSensitivein interfacePersonService- Returns:
- boolean
-
onUpdateProperties
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> after)When a uid is changed we need to create an alias for the old uid so permissions are not broken. This can happen when an already existing user is updated via LDAP e.g. migration to LDAP, or when a user is auto created and then updated by LDAP This is probably less likely after 3.2 and sync on missing person See https://issues.alfresco.com/jira/browse/ETWOTWO-389 (non-Javadoc)- Specified by:
onUpdatePropertiesin interfaceNodeServicePolicies.OnUpdatePropertiesPolicy- Parameters:
nodeRef- reference to the updated nodebefore- the node's properties before the changeafter- the node's properties after the change
-
onUpdatePropertiesUser
public void onUpdatePropertiesUser(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> before, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> after)Track theenabled/disabledflag oncm:user.
-
countPeople
public int countPeople()
Description copied from interface:PersonServiceCounts the number of persons registered with the system.- Specified by:
countPeoplein interfacePersonService- Returns:
- int
-
updateUsernameForTenancy
public static java.lang.String updateUsernameForTenancy(java.lang.String username, org.alfresco.repo.tenant.TenantService tenantService) throws TenantDomainMismatchExceptionHelper for when creating new users and people: Updates the supplied username with any required tenant details, and ensures that the tenant domains match. If Multi-Tenant is disabled, returns the same username.- Throws:
TenantDomainMismatchException
-
isEnabled
public boolean isEnabled(java.lang.String userName)
Description copied from interface:PersonServiceIs the specified user, enabled- Specified by:
isEnabledin interfacePersonService- Returns:
- true = enabled.
-
setEventPublisher
public void setEventPublisher(org.alfresco.sync.repo.events.EventPublisher eventPublisher)
-
-