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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelationship
(String uniqueName, NodeRef source, NodeRef target) Adds a relationship from the given nodesource
to the give nodetarget
with the given unique namecreateRelationshipDefinition
(RelationshipDisplayName displayName) Creates a relationship definition using the display nameboolean
existsRelationshipDefinition
(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.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 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:RelationshipService
Gets all the existing relationship definitions- Specified by:
getRelationshipDefinitions
in interfaceRelationshipService
- Returns:
- All existing relationship definitions
- See Also:
-
getRelationshipDefinition
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:
-
createRelationshipDefinition
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:
-
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:
-
removeRelationshipDefinition
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:
-
existsRelationshipDefinition
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:
-
getRelationshipsFrom
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:
-
getRelationshipsFrom
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:
-
getRelationshipsTo
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:
-
getRelationshipsTo
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:
-
addRelationship
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:
-
removeRelationship
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:
-