Class AbstractBaseCopyService

java.lang.Object
org.alfresco.repo.copy.AbstractBaseCopyService
Direct Known Subclasses:
CopyServiceImpl, FileFolderServiceImpl

public class AbstractBaseCopyService extends Object
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
  • Constructor Details

    • AbstractBaseCopyService

      public AbstractBaseCopyService()
  • Method Details

    • setSystemNamespaces

      public void setSystemNamespaces(List<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 List<String> getSystemNamespaces()
    • getAssociationCopyInfo

      protected AbstractBaseCopyService.AssociationCopyInfo getAssociationCopyInfo(NodeService nodeService, NodeRef sourceNodeRef, NodeRef sourceParentRef, String newName, boolean nameChanged)
      Calculates QName type 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 node
      nameChanged - 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