Package org.alfresco.repo.copy
Class AbstractBaseCopyService
- java.lang.Object
-
- org.alfresco.repo.copy.AbstractBaseCopyService
-
- Direct Known Subclasses:
CopyServiceImpl,FileFolderServiceImpl
public class AbstractBaseCopyService extends java.lang.ObjectThis 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 Classes Modifier and Type Class Description static classAbstractBaseCopyService.AssociationCopyInfoSimple 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 Constructor Description AbstractBaseCopyService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractBaseCopyService.AssociationCopyInfogetAssociationCopyInfo(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef sourceParentRef, java.lang.String newName, boolean nameChanged)CalculatesQNametype of target association, which will be created after copyingjava.util.List<java.lang.String>getSystemNamespaces()voidsetSystemNamespaces(java.util.List<java.lang.String> systemNamespaces)Set the namespaces that should be treated as 'system' namespaces.
-
-
-
Method Detail
-
setSystemNamespaces
public void setSystemNamespaces(java.util.List<java.lang.String> systemNamespaces)
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
public java.util.List<java.lang.String> getSystemNamespaces()
-
getAssociationCopyInfo
protected AbstractBaseCopyService.AssociationCopyInfo getAssociationCopyInfo(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef sourceParentRef, java.lang.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
-
-