Package org.alfresco.repo.copy
Class AbstractBaseCopyService
java.lang.Object
org.alfresco.repo.copy.AbstractBaseCopyService
- Direct Known Subclasses:
CopyServiceImpl,FileFolderServiceImpl
This is a base class for all the copy services. Introduces general methods for collecting all the properties, which are required to perform a copying
- Since:
- 4.1.5
- Author:
- Dmitry Velichkevich
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple container for storing data required to copy a node, including the parent association that will be copied along with the new path part of the association that will be created by the copy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAssociationCopyInfo(NodeService nodeService, NodeRef sourceNodeRef, NodeRef sourceParentRef, String newName, boolean nameChanged) CalculatesQNametype of target association, which will be created after copyingvoidsetSystemNamespaces(List<String> systemNamespaces) Set the namespaces that should be treated as 'system' namespaces.
-
Constructor Details
-
AbstractBaseCopyService
public AbstractBaseCopyService()
-
-
Method Details
-
setSystemNamespaces
Set the namespaces that should be treated as 'system' namespaces.When files or folders are renamed, the association path (QName) is normally modified to follow the name of the node. If, however, the namespace of the patch QName is in this list, the association path is left alone. This allows parts of the application to use well-known paths even if the end-user is able to modify the objects cm:name value.
- Parameters:
systemNamespaces- a list of system namespaces
-
getSystemNamespaces
-
getAssociationCopyInfo
protected AbstractBaseCopyService.AssociationCopyInfo getAssociationCopyInfo(NodeService nodeService, NodeRef sourceNodeRef, NodeRef sourceParentRef, String newName, boolean nameChanged) CalculatesQNametype of target association, which will be created after copying- Parameters:
sourceNodeRef- the node that will be copied (never null)sourceParentRef- the parent of the node being copied (may be null)newName- the planned new name of the nodenameChanged- true if the name of the node is being changed- Returns:
- Returns the path part for a new association and the effective primary parent association that was used
-