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
loggerFields 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_URIFields inherited from interface org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipService
RELATIONSHIP_VERSIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelationship(String uniqueName, NodeRef source, NodeRef target) Adds a relationship from the given nodesourceto the give nodetargetwith the given unique namecreateRelationshipDefinition(RelationshipDisplayName displayName) Creates a relationship definition using the display namebooleanexistsRelationshipDefinition(String uniqueName) Checks if a relationship exists or notgetRelationshipDefinition(String uniqueName) Gets the relationship definition for the given unique nameGets all the existing relationship definitionsgetRelationshipsFrom(NodeRef nodeRef) Gets all the relationships that come out from the given node referencegetRelationshipsFrom(NodeRef nodeRef, String nameFilter) Gets all the relationships that come out from the given node reference that match the a given name filter.getRelationshipsTo(NodeRef nodeRef) Gets all the relationships that go into the given node referencegetRelationshipsTo(NodeRef nodeRef, String nameFilter) Gets all the relationships that go into the given node reference that match the a given name filter.voidinit()Initialisation methodvoidremoveRelationship(String uniqueName, NodeRef source, NodeRef target) Removes the relationship from the given nodesourceto the given nodetargetwith the given unique namebooleanremoveRelationshipDefinition(String uniqueName) Removes a relationship definitionvoidsetPolicyComponent(PolicyComponent policyComponent) Sets the policy component instanceupdateRelationshipDefinition(String uniqueName, RelationshipDisplayName displayName) Updates an existing relationship definitionMethods 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
-
Constructor Details
-
RelationshipServiceImpl
public RelationshipServiceImpl()
-
-
Method Details
-
setPolicyComponent
Sets the policy component instance- Parameters:
policyComponent- The policy component instance
-
init
public void init()Initialisation method -
getRelationshipDefinitions
Description copied from interface:RelationshipServiceGets all the existing relationship definitions- Specified by:
getRelationshipDefinitionsin interfaceRelationshipService- Returns:
- All existing relationship definitions
- See Also:
-
getRelationshipDefinition
Description copied from interface:RelationshipServiceGets the relationship definition for the given unique name- Specified by:
getRelationshipDefinitionin interfaceRelationshipService- Parameters:
uniqueName- The unique name of the relationship definition- Returns:
- The relationship definition for the given unique name if it exist,
nullotherwise - See Also:
-
createRelationshipDefinition
Description copied from interface:RelationshipServiceCreates a relationship definition using the display name- Specified by:
createRelationshipDefinitionin interfaceRelationshipService- Parameters:
displayName- The display name of the relationship definition- Returns:
- The new relationship definition
- See Also:
-
updateRelationshipDefinition
public RelationshipDefinition updateRelationshipDefinition(String uniqueName, RelationshipDisplayName displayName) Description copied from interface:RelationshipServiceUpdates an existing relationship definition- Specified by:
updateRelationshipDefinitionin interfaceRelationshipService- Parameters:
uniqueName- The unique name of the relationship definitiondisplayName- The display name of the relationship definition- Returns:
- The updated relationship definition
- See Also:
-
removeRelationshipDefinition
Description copied from interface:RelationshipServiceRemoves a relationship definition- Specified by:
removeRelationshipDefinitionin interfaceRelationshipService- Parameters:
uniqueName- The unique name of the relationship definition- Returns:
trueif the relationship definition was removed successfully,falseotherwise- See Also:
-
existsRelationshipDefinition
Description copied from interface:RelationshipServiceChecks if a relationship exists or not- Specified by:
existsRelationshipDefinitionin interfaceRelationshipService- Parameters:
uniqueName- The unique name of the relationship definition- Returns:
trueif the relationship definition exists,falseotherwise- See Also:
-
getRelationshipsFrom
Description copied from interface:RelationshipServiceGets all the relationships that come out from the given node reference- Specified by:
getRelationshipsFromin interfaceRelationshipService- Parameters:
nodeRef- The node reference- Returns:
- All relationships that come out from the given node reference
- See Also:
-
getRelationshipsFrom
Description copied from interface:RelationshipServiceGets all the relationships that come out from the given node reference that match the a given name filter.Exact match only.
- Specified by:
getRelationshipsFromin interfaceRelationshipService- Parameters:
nodeRef- The node referencenameFilter- Name filter for results- Returns:
- All relationships that come out from the given node reference
- See Also:
-
getRelationshipsTo
Description copied from interface:RelationshipServiceGets all the relationships that go into the given node reference- Specified by:
getRelationshipsToin interfaceRelationshipService- Parameters:
nodeRef- The node reference- Returns:
- All relationships that go into the given node reference
- See Also:
-
getRelationshipsTo
Description copied from interface:RelationshipServiceGets all the relationships that go into the given node reference that match the a given name filter.Exact match only.
- Specified by:
getRelationshipsToin interfaceRelationshipService- Parameters:
nodeRef- The node referencenameFilter- Name filter for results- Returns:
- All relationships that go into the given node reference
- See Also:
-
addRelationship
Description copied from interface:RelationshipServiceAdds a relationship from the given nodesourceto the give nodetargetwith the given unique name- Specified by:
addRelationshipin 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:
-
removeRelationship
Description copied from interface:RelationshipServiceRemoves the relationship from the given nodesourceto the given nodetargetwith the given unique name- Specified by:
removeRelationshipin 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:
-