public class RelationshipServiceImpl extends RecordsManagementAdminBase implements RelationshipService
loggerRELATIONSHIP_VERSIONSASPECT_CUSTOM_ASSOCIATIONS, ASPECT_SUPPLEMENTAL_MARKING_LIST, CONSTRAINT_CUSTOM_SMLIST, CUSTOM_REF_CROSSREFERENCE, CUSTOM_REF_OBSOLETES, CUSTOM_REF_RENDITION, CUSTOM_REF_SUPERSEDES, CUSTOM_REF_SUPPORTS, CUSTOM_REF_VERSIONS, PROP_SUPPLEMENTAL_MARKING_LIST, RM_CUSTOM_MODEL, RM_CUSTOM_PREFIX, RM_CUSTOM_URI| Constructor and Description |
|---|
RelationshipServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRelationship(String uniqueName,
org.alfresco.service.cmr.repository.NodeRef source,
org.alfresco.service.cmr.repository.NodeRef target)
Adds a relationship from the given node
source
to the give node target with the given unique name |
RelationshipDefinition |
createRelationshipDefinition(RelationshipDisplayName displayName)
Creates a relationship definition using the display name
|
boolean |
existsRelationshipDefinition(String uniqueName)
Checks if a relationship exists or not
|
RelationshipDefinition |
getRelationshipDefinition(String uniqueName)
Gets the relationship definition for the given unique name
|
Set<RelationshipDefinition> |
getRelationshipDefinitions()
Gets all the existing relationship definitions
|
Set<Relationship> |
getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets all the relationships that come out from the given node reference
|
Set<Relationship> |
getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String nameFilter)
Gets all the relationships that come out from the given node reference
that match the a given name filter.
|
Set<Relationship> |
getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets all the relationships that go into the given node reference
|
Set<Relationship> |
getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String nameFilter)
Gets all the relationships that go into the given node reference
that match the a given name filter.
|
void |
init()
Initialisation method
|
void |
removeRelationship(String uniqueName,
org.alfresco.service.cmr.repository.NodeRef source,
org.alfresco.service.cmr.repository.NodeRef target)
Removes the relationship from the given node
source
to the given node target with the given unique name |
boolean |
removeRelationshipDefinition(String uniqueName)
Removes a relationship definition
|
void |
setPolicyComponent(org.alfresco.repo.policy.PolicyComponent policyComponent)
Sets the policy component instance
|
RelationshipDefinition |
updateRelationshipDefinition(String uniqueName,
RelationshipDisplayName displayName)
Updates an existing relationship definition
|
composeAssociationDefinitionTitle, existsTitle, getContentService, getCustomAssociations, getCustomModelRef, getDictionaryRepositoryBootstrap, getDictionaryService, getNamespaceService, getNodeService, readCustomContentModel, setContentService, setDictionaryRepositoryBootstrap, setDictionaryService, setNamespaceService, setNodeService, splitAssociationDefinitionTitle, writeCustomContentModelpublic void setPolicyComponent(org.alfresco.repo.policy.PolicyComponent policyComponent)
policyComponent - The policy component instancepublic void init()
public Set<RelationshipDefinition> getRelationshipDefinitions()
RelationshipServicegetRelationshipDefinitions in interface RelationshipServiceRelationshipService.getRelationshipDefinitions()public RelationshipDefinition getRelationshipDefinition(String uniqueName)
RelationshipServicegetRelationshipDefinition in interface RelationshipServiceuniqueName - The unique name of the relationship definitionnull otherwiseRelationshipService.getRelationshipDefinition(java.lang.String)public RelationshipDefinition createRelationshipDefinition(RelationshipDisplayName displayName)
RelationshipServicecreateRelationshipDefinition in interface RelationshipServicedisplayName - The display name of the relationship definitionRelationshipService.createRelationshipDefinition(org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipDisplayName)public RelationshipDefinition updateRelationshipDefinition(String uniqueName, RelationshipDisplayName displayName)
RelationshipServiceupdateRelationshipDefinition in interface RelationshipServiceuniqueName - The unique name of the relationship definitiondisplayName - The display name of the relationship definitionorg.alfresco.module.org_alfresco_module_rm.relationship.RelationshipService#updateReleationshipDefinition(java.lang.String)public boolean removeRelationshipDefinition(String uniqueName)
RelationshipServiceremoveRelationshipDefinition in interface RelationshipServiceuniqueName - The unique name of the relationship definitiontrue if the relationship definition was removed successfully, false otherwiseRelationshipService.removeRelationshipDefinition(java.lang.String)public boolean existsRelationshipDefinition(String uniqueName)
RelationshipServiceexistsRelationshipDefinition in interface RelationshipServiceuniqueName - The unique name of the relationship definitiontrue if the relationship definition exists, false otherwiseRelationshipService.existsRelationshipDefinition(java.lang.String)public Set<Relationship> getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef nodeRef)
RelationshipServicegetRelationshipsFrom in interface RelationshipServicenodeRef - The node referenceRelationshipService.getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef)public Set<Relationship> getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef nodeRef, String nameFilter)
RelationshipServiceExact match only.
getRelationshipsFrom in interface RelationshipServicenodeRef - The node referencenameFilter - Name filter for resultsRelationshipService.getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef, String)public Set<Relationship> getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef nodeRef)
RelationshipServicegetRelationshipsTo in interface RelationshipServicenodeRef - The node referenceRelationshipService.getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef)public Set<Relationship> getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef nodeRef, String nameFilter)
RelationshipServiceExact match only.
getRelationshipsTo in interface RelationshipServicenodeRef - The node referencenameFilter - Name filter for resultsRelationshipService.getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef, String)public void addRelationship(String uniqueName, org.alfresco.service.cmr.repository.NodeRef source, org.alfresco.service.cmr.repository.NodeRef target)
RelationshipServicesource
to the give node target with the given unique nameaddRelationship in interface RelationshipServiceuniqueName - The unique name of the relationshipsource - The node reference which the relationship come fromtarget - The node reference which the relationship go toRelationshipService.addRelationship(java.lang.String, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)public void removeRelationship(String uniqueName, org.alfresco.service.cmr.repository.NodeRef source, org.alfresco.service.cmr.repository.NodeRef target)
RelationshipServicesource
to the given node target with the given unique nameremoveRelationship in interface RelationshipServiceuniqueName - The unique name of the relationshipsource - The node reference which the relationship come fromtarget - The node reference which the relationship go toRelationshipService.removeRelationship(java.lang.String, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)Copyright © 2005–2016 Alfresco Software. All rights reserved.