Package fr.becpg.repo.helper.impl
Class AssociationServiceImplV2
java.lang.Object
fr.becpg.repo.policy.AbstractBeCPGPolicy
fr.becpg.repo.helper.impl.AssociationServiceImplV2
- All Implemented Interfaces:
AssociationService,org.alfresco.repo.cache.RefreshableCacheListener,org.alfresco.repo.coci.CheckOutCheckInServicePolicies.OnCheckIn,org.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy,org.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy,org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy,org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy,org.alfresco.repo.node.NodeServicePolicies.OnDeleteAssociationPolicy,org.alfresco.repo.node.NodeServicePolicies.OnDeleteChildAssociationPolicy,org.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy,org.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy,org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy,org.alfresco.repo.policy.AssociationPolicy,org.alfresco.repo.policy.ClassPolicy,org.alfresco.repo.policy.Policy,org.alfresco.util.cache.RefreshableCacheListener,org.springframework.beans.factory.InitializingBean
public class AssociationServiceImplV2
extends AbstractBeCPGPolicy
implements AssociationService, org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy, org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy, org.alfresco.repo.node.NodeServicePolicies.OnDeleteAssociationPolicy, org.alfresco.repo.node.NodeServicePolicies.OnDeleteChildAssociationPolicy, org.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy, org.alfresco.repo.coci.CheckOutCheckInServicePolicies.OnCheckIn, org.alfresco.repo.cache.RefreshableCacheListener, org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy, org.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy, org.springframework.beans.factory.InitializingBean
AssociationServiceImpl class.
- Version:
- $Id: $Id
- Author:
- matthieu
-
Nested Class Summary
Nested classes/interfaces inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
AbstractBeCPGPolicy.BeCPGPolicyTransactionListenerNested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
org.alfresco.repo.policy.Policy.Arg -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion,Set<org.alfresco.service.cmr.repository.NodeRef>> private org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion,ChildAssocCacheEntry> private CommonDataListSortprivate DataSourceprivate EntityDictionaryServiceprivate static Set<org.alfresco.service.namespace.QName>private static Set<org.alfresco.service.cmr.repository.StoreRef>private static final org.apache.commons.logging.Logprivate static final Stringprivate org.alfresco.service.namespace.NamespaceServiceprivate org.alfresco.repo.domain.node.NodeDAOprivate static final Stringprivate org.alfresco.service.cmr.security.PermissionServiceprivate org.alfresco.repo.domain.qname.QNameDAOprivate org.alfresco.util.cache.AsynchronouslyRefreshedCacheRegistryprivate org.mybatis.spring.SqlSessionTemplateprivate org.alfresco.repo.tenant.TenantServiceprivate static final StringFields inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
ASSOC_REGISTRY, KEY_PENDING_DELETE_NODES, KEY_REGISTRY, lockService, nodeService, policyBehaviourFilter, policyComponent, postTransactionListener, transactionListenerFields inherited from interface org.alfresco.repo.coci.CheckOutCheckInServicePolicies.OnCheckIn
QNAMEFields inherited from interface org.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy
QNAMEFields inherited from interface org.alfresco.repo.copy.CopyServicePolicies.OnCopyNodePolicy
ARG_0, ARG_1, QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteChildAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAMEFields inherited from interface org.alfresco.repo.policy.Policy
NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildCriteriaFilterMap(List<AssociationCriteriaFilter> criteriaFilters) buildQueryParameters(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName listTypeQname) protected booleancanCurrentUserRead(Long aclId, Set<String> authorities) Checks if the current user has read permissions for the given ACL ID.private List<org.alfresco.service.cmr.repository.NodeRef>dbChildAssocSearch(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName childType, Map<String, Boolean> sortProps) voiddoInit()doInit.org.alfresco.service.cmr.repository.NodeRefgetChildAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the child association for a given node with the specified association type.List<org.alfresco.service.cmr.repository.NodeRef>getChildAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the child associations for a given node with the specified association type.List<org.alfresco.service.cmr.repository.NodeRef>getChildAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.namespace.QName childTypeQName) Retrieves the child associations for a given node with the specified association type and child type.List<org.alfresco.service.cmr.repository.NodeRef>getChildAssocs(org.alfresco.service.cmr.repository.NodeRef listNodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.namespace.QName childTypeQName, Map<String, Boolean> sortMap) Retrieves the child associations for a given list node with the specified association type and list type.getChildAssocsByType(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the child associations by type for a given node with the specified association type.private List<org.alfresco.service.cmr.repository.NodeRef>getChildAssocsImpl(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.namespace.QName childType, Map<String, Boolean> sortProps) getEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName listTypeQname, boolean isOrOperator, List<AssociationCriteriaFilter> criteriaFilters) Retrieves entity source associations with filtering and pagination.getEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName listTypeQname, boolean isOrOperator, List<AssociationCriteriaFilter> criteriaFilters, org.alfresco.query.PagingRequest pagingRequest) Retrieves entity source associations with filtering, pagination, and permission checking.getEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName listTypeQname, boolean isOrOperator, List<AssociationCriteriaFilter> criteriaFilters, org.alfresco.query.PagingRequest pagingRequest, boolean checkPermissions) Retrieves entity source associations with filtering, pagination, and permission checking.<T> TgetFromCache(org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion, T> cache, AssociationCacheRegion cacheKey, Supplier<T> callback) getFromCache.List<org.alfresco.service.cmr.repository.NodeRef>getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef) Retrieves the source associations for a given node.List<org.alfresco.service.cmr.repository.NodeRef>getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the source associations for a given node with the specified association type.List<org.alfresco.service.cmr.repository.NodeRef>getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, Boolean includeVersions) Retrieves the source associations for a given node with the specified association type and versioning options.List<org.alfresco.service.cmr.repository.NodeRef>getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, Boolean includeVersions, Integer maxResults, Integer offset) Retrieves the source associations for a given node with the specified association type, versioning options, and pagination.List<org.alfresco.service.cmr.repository.NodeRef>getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, Boolean includeVersions, Integer maxResults, Integer offset, boolean checkPermissions) Retrieves the source associations for a given node with the specified association type, versioning options, pagination, and permission checking.org.alfresco.service.cmr.repository.NodeRefgetTargetAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the target association for a given node with the specified association type.List<org.alfresco.service.cmr.repository.NodeRef>getTargetAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the target associations for a given node with the specified association type.private List<EntitySourceAssoc>internalEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName listTypeQname, List<AssociationCriteriaFilter> criteriaFilters, org.alfresco.query.PagingRequest pagingRequest, boolean checkPermissions) private booleanisDefaultSort(Map<String, Boolean> sortProps) voidonCheckIn(org.alfresco.service.cmr.repository.NodeRef nodeRef) voidonCopyComplete(org.alfresco.service.namespace.QName classRef, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destinationRef, boolean copyToNewNode, Map<org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef> copyMap) voidonCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef associationRef) voidonCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef, boolean arg1) voidonDeleteAssociation(org.alfresco.service.cmr.repository.AssociationRef associationRef) voidonDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef) voidonDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef, boolean arg1) voidonRefreshableCacheEvent(org.alfresco.util.cache.RefreshableCacheEvent refreshableCacheEvent) voidonRestoreNode(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef) voidonUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, Map<org.alfresco.service.namespace.QName, Serializable> before, Map<org.alfresco.service.namespace.QName, Serializable> after) private <T> List<T>queryItems(String template, Map<String, Object> params, Integer maxResults, Integer offset, boolean checkPermissions, Predicate<T> permissionChecker) voidremoveAllCacheAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef) Removes all cached associations for a given node.private voidremoveCachedAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) voidremoveChildCachedAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Removes the child cached association for a given node with the specified association type.voidsetAssocsCache(org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion, Set<org.alfresco.service.cmr.repository.NodeRef>> assocsCache) Setter for the fieldassocsCache.voidsetChildsAssocsCache(org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion, ChildAssocCacheEntry> childsAssocsCache) Setter for the fieldchildsAssocsCache.voidsetDataSource(DataSource dataSource) Setter for the fielddataSource.voidsetEntityDictionaryService(EntityDictionaryService entityDictionaryService) Setter for the fieldentityDictionaryService.voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the fieldnamespaceService.voidsetNodeDAO(org.alfresco.repo.domain.node.NodeDAO nodeDAO) Setter for the fieldnodeDAO.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) Setter for the fieldnodeService.voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the fieldpermissionService.voidsetQnameDAO(org.alfresco.repo.domain.qname.QNameDAO qnameDAO) Setter for the fieldqnameDAO.voidsetRegistry(org.alfresco.util.cache.AsynchronouslyRefreshedCacheRegistry registry) Setter for the fieldregistry.voidsetSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate) Setter for the fieldsqlSessionTemplate.voidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService) Setter for the fieldtenantService.voidupdate(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, List<org.alfresco.service.cmr.repository.NodeRef> toUpdateNodeRefs) Updates the associations for a given node with the specified association type.voidupdate(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.cmr.repository.NodeRef assocNodeRef) Updates the associations for a given node with the specified association type.private StringMethods inherited from class fr.becpg.repo.policy.AbstractBeCPGPolicy
containsNodeInQueue, containsNodeInQueue, disableOnCopyBehaviour, doAfterAssocsCommit, doAfterCommit, doBeforeAssocsCommit, doBeforeCommit, generateDefaultKey, getCopyCallback, getKeyRegistry, init, isBeCPGVersion, isEntityTemplate, isNotLocked, isPendingDelete, isPropChanged, isVersionNode, isVersionStoreNode, isWorkingCopyOrVersion, queueAssoc, queueAssoc, queueNode, queueNode, setLockService, setPolicyBehaviourFilter, setPolicyComponent, unQueueNode, unQueueNode
-
Field Details
-
logger
private static final org.apache.commons.logging.Log logger -
entityDictionaryService
-
dataSource
-
tenantService
private org.alfresco.repo.tenant.TenantService tenantService -
namespaceService
private org.alfresco.service.namespace.NamespaceService namespaceService -
commonDataListSort
-
sqlSessionTemplate
private org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate -
permissionService
private org.alfresco.service.cmr.security.PermissionService permissionService -
nodeDAO
private org.alfresco.repo.domain.node.NodeDAO nodeDAO -
childsAssocsCache
private org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion,ChildAssocCacheEntry> childsAssocsCache -
assocsCache
private org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion,Set<org.alfresco.service.cmr.repository.NodeRef>> assocsCache -
registry
private org.alfresco.util.cache.AsynchronouslyRefreshedCacheRegistry registry -
ignoredAssocs
-
ignoredStoreRefs
-
qnameDAO
private org.alfresco.repo.domain.qname.QNameDAO qnameDAO -
UPDATE_ASSOC_COUNT
- See Also:
-
OFFSET_PARAM
- See Also:
-
MAXRESULTS_PARAM
- See Also:
-
-
Constructor Details
-
AssociationServiceImplV2
public AssociationServiceImplV2()
-
-
Method Details
-
setNodeDAO
public void setNodeDAO(org.alfresco.repo.domain.node.NodeDAO nodeDAO) Setter for the field
nodeDAO.- Parameters:
nodeDAO- aNodeDAOobject
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the field
permissionService.- Parameters:
permissionService- aPermissionServiceobject
-
setSqlSessionTemplate
public void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate) Setter for the field
sqlSessionTemplate.- Parameters:
sqlSessionTemplate- aSqlSessionTemplateobject
-
setRegistry
public void setRegistry(org.alfresco.util.cache.AsynchronouslyRefreshedCacheRegistry registry) Setter for the field
registry.- Parameters:
registry- aAsynchronouslyRefreshedCacheRegistryobject
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) Setter for the field
nodeService.- Overrides:
setNodeServicein classAbstractBeCPGPolicy- Parameters:
nodeService- aNodeServiceobject.
-
setEntityDictionaryService
Setter for the field
entityDictionaryService.- Parameters:
entityDictionaryService- aEntityDictionaryServiceobject.
-
setDataSource
Setter for the field
dataSource.- Parameters:
dataSource- a DataSource object.
-
setTenantService
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService) Setter for the field
tenantService.- Parameters:
tenantService- aTenantServiceobject.
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the field
namespaceService.- Parameters:
namespaceService- aNamespaceServiceobject.
-
setQnameDAO
public void setQnameDAO(org.alfresco.repo.domain.qname.QNameDAO qnameDAO) Setter for the field
qnameDAO.- Parameters:
qnameDAO- aQNameDAOobject.
-
setChildsAssocsCache
public void setChildsAssocsCache(org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion, ChildAssocCacheEntry> childsAssocsCache) Setter for the field
childsAssocsCache.- Parameters:
childsAssocsCache- aSimpleCacheobject
-
setAssocsCache
public void setAssocsCache(org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion, Set<org.alfresco.service.cmr.repository.NodeRef>> assocsCache) Setter for the field
assocsCache.- Parameters:
assocsCache- aSimpleCacheobject
-
update
public void update(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, List<org.alfresco.service.cmr.repository.NodeRef> toUpdateNodeRefs) Updates the associations for a given node with the specified association type.- Specified by:
updatein interfaceAssociationService- Parameters:
nodeRef- the node reference to update associations forqName- the association type QNametoUpdateNodeRefs- the list of node references to associate with the node
-
update
public void update(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.cmr.repository.NodeRef assocNodeRef) Updates the associations for a given node with the specified association type.- Specified by:
updatein interfaceAssociationService- Parameters:
nodeRef- the node reference to update associations forqName- the association type QNameassocNodeRef- the node reference to associate with the node
-
getTargetAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getTargetAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the target associations for a given node with the specified association type.- Specified by:
getTargetAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the target associations forqName- the association type QName- Returns:
- the list of target association node references
-
getTargetAssoc
public org.alfresco.service.cmr.repository.NodeRef getTargetAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the target association for a given node with the specified association type.- Specified by:
getTargetAssocin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the target association forqName- the association type QName- Returns:
- the target association node reference
-
getChildAssoc
public org.alfresco.service.cmr.repository.NodeRef getChildAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the child association for a given node with the specified association type.- Specified by:
getChildAssocin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the child association forqName- the association type QName- Returns:
- the child association node reference
-
getChildAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getChildAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the child associations for a given node with the specified association type.- Specified by:
getChildAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the child associations forqName- the association type QName- Returns:
- the list of child association node references
-
getChildAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getChildAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.namespace.QName childTypeQName) Retrieves the child associations for a given node with the specified association type and child type.- Specified by:
getChildAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the child associations forqName- the association type QNamechildTypeQName- the child type QName- Returns:
- the list of child association node references
-
getChildAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getChildAssocs(org.alfresco.service.cmr.repository.NodeRef listNodeRef, org.alfresco.service.namespace.QName qName, org.alfresco.service.namespace.QName childTypeQName, @Nullable Map<String, Boolean> sortMap) Retrieves the child associations for a given list node with the specified association type and list type.- Specified by:
getChildAssocsin interfaceAssociationService- Parameters:
listNodeRef- the list node reference to retrieve the child associations forqName- the association type QNamechildTypeQName- the list type QName filtersortMap- the sort map- Returns:
- the list of child association node references
-
getChildAssocsImpl
-
getChildAssocsByType
public ChildAssocCacheEntry getChildAssocsByType(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the child associations by type for a given node with the specified association type.- Specified by:
getChildAssocsByTypein interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the child associations by type forqName- the association type QName- Returns:
- the child association cache entry
-
isDefaultSort
-
dbChildAssocSearch
-
getSourcesAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef) Retrieves the source associations for a given node.- Specified by:
getSourcesAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the source associations for- Returns:
- the list of source association node references
-
getSourcesAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Retrieves the source associations for a given node with the specified association type.- Specified by:
getSourcesAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the source associations forqName- the association type QName pattern- Returns:
- the list of source association node references
-
getSourcesAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, Boolean includeVersions) Retrieves the source associations for a given node with the specified association type and versioning options.- Specified by:
getSourcesAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the source associations forqName- the association type QName patternincludeVersions- whether to include versioned associations- Returns:
- the list of source association node references
-
getSourcesAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, Boolean includeVersions, Integer maxResults, Integer offset) Retrieves the source associations for a given node with the specified association type, versioning options, and pagination.- Specified by:
getSourcesAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the source associations forqName- the association type QName patternincludeVersions- whether to include versioned associationsmaxResults- the maximum number of results to returnoffset- the offset for pagination- Returns:
- the list of source association node references
-
getSourcesAssocs
public List<org.alfresco.service.cmr.repository.NodeRef> getSourcesAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName, Boolean includeVersions, Integer maxResults, Integer offset, boolean checkPermissions) Retrieves the source associations for a given node with the specified association type, versioning options, pagination, and permission checking.- Specified by:
getSourcesAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to retrieve the source associations forqName- the association type QNameincludeVersions- whether to include versioned associationsmaxResults- the maximum number of results to returnoffset- the offset for paginationcheckPermissions- whether to check permissions- Returns:
- the list of source association node references
-
queryItems
-
canCurrentUserRead
Checks if the current user has read permissions for the given ACL ID.- Parameters:
aclId- the ACL ID to checkauthorities- the user's authorities- Returns:
- true if the user can read, false otherwise
-
getEntitySourceAssocs
public List<EntitySourceAssoc> getEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName listTypeQname, boolean isOrOperator, List<AssociationCriteriaFilter> criteriaFilters) Retrieves entity source associations with filtering and pagination.- Specified by:
getEntitySourceAssocsin interfaceAssociationService- Parameters:
nodeRefs- the node references to checkassocQName- the association type QNamelistTypeQname- the list type QNameisOrOperator- whether to use OR operator for filteringcriteriaFilters- the criteria filters to apply- Returns:
- the list of entity source associations
-
getEntitySourceAssocs
public List<EntitySourceAssoc> getEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName listTypeQname, boolean isOrOperator, List<AssociationCriteriaFilter> criteriaFilters, org.alfresco.query.PagingRequest pagingRequest) Retrieves entity source associations with filtering, pagination, and permission checking.- Specified by:
getEntitySourceAssocsin interfaceAssociationService- Parameters:
nodeRefs- the node references to checkassocQName- the association type QNamelistTypeQname- the list type QNameisOrOperator- whether to use OR operator for filteringcriteriaFilters- the criteria filters to applypagingRequest- the pagination request- Returns:
- the list of entity source associations
-
getEntitySourceAssocs
public List<EntitySourceAssoc> getEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName listTypeQname, boolean isOrOperator, List<AssociationCriteriaFilter> criteriaFilters, org.alfresco.query.PagingRequest pagingRequest, boolean checkPermissions) Retrieves entity source associations with filtering, pagination, and permission checking.- Specified by:
getEntitySourceAssocsin interfaceAssociationService- Parameters:
nodeRefs- the node references to checkassocTypeQName- the association type QNamelistTypeQname- the list type QNameisOrOperator- whether to use OR operator for filteringcriteriaFilters- the criteria filters to applypagingRequest- the pagination requestcheckPermissions- whether to check permissions- Returns:
- the list of entity source associations
-
internalEntitySourceAssocs
private List<EntitySourceAssoc> internalEntitySourceAssocs(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName listTypeQname, List<AssociationCriteriaFilter> criteriaFilters, org.alfresco.query.PagingRequest pagingRequest, boolean checkPermissions) -
buildQueryParameters
-
buildCriteriaFilterMap
-
wrap
-
doInit
public void doInit()doInit.
- Specified by:
doInitin classAbstractBeCPGPolicy
-
onCopyComplete
public void onCopyComplete(org.alfresco.service.namespace.QName classRef, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destinationRef, boolean copyToNewNode, Map<org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef> copyMap) - Specified by:
onCopyCompletein interfaceorg.alfresco.repo.copy.CopyServicePolicies.OnCopyCompletePolicy- Overrides:
onCopyCompletein classAbstractBeCPGPolicy
-
onDeleteAssociation
public void onDeleteAssociation(org.alfresco.service.cmr.repository.AssociationRef associationRef) - Specified by:
onDeleteAssociationin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnDeleteAssociationPolicy
-
onCreateAssociation
public void onCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef associationRef) - Specified by:
onCreateAssociationin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
-
onRestoreNode
public void onRestoreNode(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef) - Specified by:
onRestoreNodein interfaceorg.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy
-
onDeleteChildAssociation
public void onDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef) - Specified by:
onDeleteChildAssociationin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnDeleteChildAssociationPolicy
-
onCreateChildAssociation
public void onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef, boolean arg1) - Specified by:
onCreateChildAssociationin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
-
onDeleteNode
public void onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef associationRef, boolean arg1) - Specified by:
onDeleteNodein interfaceorg.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy
-
onCheckIn
public void onCheckIn(org.alfresco.service.cmr.repository.NodeRef nodeRef) - Specified by:
onCheckInin interfaceorg.alfresco.repo.coci.CheckOutCheckInServicePolicies.OnCheckIn
-
onUpdateProperties
public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, Map<org.alfresco.service.namespace.QName, Serializable> before, Map<org.alfresco.service.namespace.QName, Serializable> after) - Specified by:
onUpdatePropertiesin interfaceorg.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
-
removeCachedAssoc
private void removeCachedAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) -
removeChildCachedAssoc
public void removeChildCachedAssoc(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qName) Removes the child cached association for a given node with the specified association type.- Specified by:
removeChildCachedAssocin interfaceAssociationService- Parameters:
nodeRef- the node reference to remove the child cached association forqName- the association type QName
-
removeAllCacheAssocs
public void removeAllCacheAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef) Removes all cached associations for a given node.- Specified by:
removeAllCacheAssocsin interfaceAssociationService- Parameters:
nodeRef- the node reference to remove all cached associations for
-
getFromCache
public <T> T getFromCache(org.alfresco.repo.cache.SimpleCache<AssociationCacheRegion, T> cache, AssociationCacheRegion cacheKey, Supplier<T> callback) getFromCache.
- Type Parameters:
T- a T class- Parameters:
cache- aSimpleCacheobjectcacheKey- aAssociationCacheRegionobjectcallback- aSupplierobject- Returns:
- a T object
-
onRefreshableCacheEvent
public void onRefreshableCacheEvent(org.alfresco.util.cache.RefreshableCacheEvent refreshableCacheEvent) - Specified by:
onRefreshableCacheEventin interfaceorg.alfresco.util.cache.RefreshableCacheListener
-
getCacheId
- Specified by:
getCacheIdin interfaceorg.alfresco.util.cache.RefreshableCacheListener
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-