Class RelationshipServiceImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase
-
- org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipServiceImpl
-
- All Implemented Interfaces:
RecordsManagementCustomModel
,RelationshipService
public class RelationshipServiceImpl extends RecordsManagementAdminBase implements RelationshipService
The relationship service implementation- Since:
- 2.3
- Author:
- Tuna Aksoy
-
-
Field Summary
-
Fields inherited from class org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase
logger
-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel
ASPECT_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
-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipService
RELATIONSHIP_VERSIONS
-
-
Constructor Summary
Constructors Constructor Description RelationshipServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRelationship(String uniqueName, NodeRef source, NodeRef target)
Adds a relationship from the given nodesource
to the give nodetarget
with the given unique nameRelationshipDefinition
createRelationshipDefinition(RelationshipDisplayName displayName)
Creates a relationship definition using the display nameboolean
existsRelationshipDefinition(String uniqueName)
Checks if a relationship exists or notRelationshipDefinition
getRelationshipDefinition(String uniqueName)
Gets the relationship definition for the given unique nameSet<RelationshipDefinition>
getRelationshipDefinitions()
Gets all the existing relationship definitionsSet<Relationship>
getRelationshipsFrom(NodeRef nodeRef)
Gets all the relationships that come out from the given node referenceSet<Relationship>
getRelationshipsFrom(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(NodeRef nodeRef)
Gets all the relationships that go into the given node referenceSet<Relationship>
getRelationshipsTo(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 methodvoid
removeRelationship(String uniqueName, NodeRef source, NodeRef target)
Removes the relationship from the given nodesource
to the given nodetarget
with the given unique nameboolean
removeRelationshipDefinition(String uniqueName)
Removes a relationship definitionvoid
setPolicyComponent(PolicyComponent policyComponent)
Sets the policy component instanceRelationshipDefinition
updateRelationshipDefinition(String uniqueName, RelationshipDisplayName displayName)
Updates an existing relationship definition-
Methods inherited from class org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase
composeAssociationDefinitionTitle, existsTitle, getContentService, getCustomAssociations, getCustomModelRef, getDictionaryRepositoryBootstrap, getDictionaryService, getNamespaceService, getNodeService, readCustomContentModel, setContentService, setDictionaryRepositoryBootstrap, setDictionaryService, setNamespaceService, setNodeService, splitAssociationDefinitionTitle, writeCustomContentModel
-
-
-
-
Method Detail
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
Sets the policy component instance- Parameters:
policyComponent
- The policy component instance
-
init
public void init()
Initialisation method
-
getRelationshipDefinitions
public Set<RelationshipDefinition> getRelationshipDefinitions()
Description copied from interface:RelationshipService
Gets all the existing relationship definitions- Specified by:
getRelationshipDefinitions
in interfaceRelationshipService
- Returns:
- All existing relationship definitions
- See Also:
RelationshipService.getRelationshipDefinitions()
-
getRelationshipDefinition
public RelationshipDefinition getRelationshipDefinition(String uniqueName)
Description copied from interface:RelationshipService
Gets the relationship definition for the given unique name- Specified by:
getRelationshipDefinition
in interfaceRelationshipService
- Parameters:
uniqueName
- The unique name of the relationship definition- Returns:
- The relationship definition for the given unique name if it exist,
null
otherwise - See Also:
RelationshipService.getRelationshipDefinition(java.lang.String)
-
createRelationshipDefinition
public RelationshipDefinition createRelationshipDefinition(RelationshipDisplayName displayName)
Description copied from interface:RelationshipService
Creates a relationship definition using the display name- Specified by:
createRelationshipDefinition
in interfaceRelationshipService
- Parameters:
displayName
- The display name of the relationship definition- Returns:
- The new relationship definition
- See Also:
RelationshipService.createRelationshipDefinition(org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipDisplayName)
-
updateRelationshipDefinition
public RelationshipDefinition updateRelationshipDefinition(String uniqueName, RelationshipDisplayName displayName)
Description copied from interface:RelationshipService
Updates an existing relationship definition- Specified by:
updateRelationshipDefinition
in interfaceRelationshipService
- Parameters:
uniqueName
- The unique name of the relationship definitiondisplayName
- The display name of the relationship definition- Returns:
- The updated relationship definition
- See Also:
RelationshipService.updateRelationshipDefinition(java.lang.String, RelationshipDisplayName)
-
removeRelationshipDefinition
public boolean removeRelationshipDefinition(String uniqueName)
Description copied from interface:RelationshipService
Removes a relationship definition- Specified by:
removeRelationshipDefinition
in interfaceRelationshipService
- Parameters:
uniqueName
- The unique name of the relationship definition- Returns:
true
if the relationship definition was removed successfully,false
otherwise- See Also:
RelationshipService.removeRelationshipDefinition(java.lang.String)
-
existsRelationshipDefinition
public boolean existsRelationshipDefinition(String uniqueName)
Description copied from interface:RelationshipService
Checks if a relationship exists or not- Specified by:
existsRelationshipDefinition
in interfaceRelationshipService
- Parameters:
uniqueName
- The unique name of the relationship definition- Returns:
true
if the relationship definition exists,false
otherwise- See Also:
RelationshipService.existsRelationshipDefinition(java.lang.String)
-
getRelationshipsFrom
public Set<Relationship> getRelationshipsFrom(NodeRef nodeRef)
Description copied from interface:RelationshipService
Gets all the relationships that come out from the given node reference- Specified by:
getRelationshipsFrom
in interfaceRelationshipService
- Parameters:
nodeRef
- The node reference- Returns:
- All relationships that come out from the given node reference
- See Also:
RelationshipService.getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef)
-
getRelationshipsFrom
public Set<Relationship> getRelationshipsFrom(NodeRef nodeRef, String nameFilter)
Description copied from interface:RelationshipService
Gets all the relationships that come out from the given node reference that match the a given name filter.Exact match only.
- Specified by:
getRelationshipsFrom
in interfaceRelationshipService
- Parameters:
nodeRef
- The node referencenameFilter
- Name filter for results- Returns:
- All relationships that come out from the given node reference
- See Also:
RelationshipService.getRelationshipsFrom(org.alfresco.service.cmr.repository.NodeRef, String)
-
getRelationshipsTo
public Set<Relationship> getRelationshipsTo(NodeRef nodeRef)
Description copied from interface:RelationshipService
Gets all the relationships that go into the given node reference- Specified by:
getRelationshipsTo
in interfaceRelationshipService
- Parameters:
nodeRef
- The node reference- Returns:
- All relationships that go into the given node reference
- See Also:
RelationshipService.getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef)
-
getRelationshipsTo
public Set<Relationship> getRelationshipsTo(NodeRef nodeRef, String nameFilter)
Description copied from interface:RelationshipService
Gets all the relationships that go into the given node reference that match the a given name filter.Exact match only.
- Specified by:
getRelationshipsTo
in interfaceRelationshipService
- Parameters:
nodeRef
- The node referencenameFilter
- Name filter for results- Returns:
- All relationships that go into the given node reference
- See Also:
RelationshipService.getRelationshipsTo(org.alfresco.service.cmr.repository.NodeRef, String)
-
addRelationship
public void addRelationship(String uniqueName, NodeRef source, NodeRef target)
Description copied from interface:RelationshipService
Adds a relationship from the given nodesource
to the give nodetarget
with the given unique name- Specified by:
addRelationship
in interfaceRelationshipService
- Parameters:
uniqueName
- The unique name of the relationshipsource
- The node reference which the relationship come fromtarget
- The node reference which the relationship go to- See Also:
RelationshipService.addRelationship(java.lang.String, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
removeRelationship
public void removeRelationship(String uniqueName, NodeRef source, NodeRef target)
Description copied from interface:RelationshipService
Removes the relationship from the given nodesource
to the given nodetarget
with the given unique name- Specified by:
removeRelationship
in interfaceRelationshipService
- Parameters:
uniqueName
- The unique name of the relationshipsource
- The node reference which the relationship come fromtarget
- The node reference which the relationship go to- See Also:
RelationshipService.removeRelationship(java.lang.String, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
-
-