Class CloneComponent

    • Field Detail

      • ROLE

        public static final String ROLE
        Avalon Role
    • Method Detail

      • addNodeWithUUID

        public Node addNodeWithUUID​(Node srcNode,
                                    Node parentNode,
                                    String nodeName)
                             throws RepositoryException
        Adds a node to a parent node using a source node for name, type and potential UUID.
        Parameters:
        srcNode - the source node.
        parentNode - the parent node for the newly created node.
        nodeName - the node name to use.
        Returns:
        the created node.
        Throws:
        RepositoryException - if an error occurs.
      • getOrCloneNode

        public Node getOrCloneNode​(Session destSession,
                                   Node node,
                                   String version)
                            throws RepositoryException
        Get or clone a node in a specified version.
        Parameters:
        destSession - the destination session.
        node - the node in the source workspace.
        version - the node version to clone, null to get the current version.
        Returns:
        the cloned Node in the destination session.
        Throws:
        RepositoryException - if an error occurs.
      • cloneContentNodeWithWorkflow

        public Node cloneContentNodeWithWorkflow​(Session destSession,
                                                 Node node,
                                                 Predicate propertyPredicate,
                                                 Predicate nodePredicate,
                                                 String version)
                                          throws RepositoryException
        Clone a content node, cloning its workflow along.
        Parameters:
        destSession - the destination session.
        node - the node to clone.
        propertyPredicate - a test on the properties.
        nodePredicate - a test on the nodes.
        version - the version of the node to clone.
        Returns:
        the cloned node.
        Throws:
        RepositoryException - if an error occurs.
      • createNodeClone

        protected Node createNodeClone​(Node srcNode,
                                       Node parentNode,
                                       String desiredNodeName)
                                throws RepositoryException
        Create a clone of the specified node.
        Parameters:
        srcNode - the node to clone.
        parentNode - the node under which to create the clonde.
        desiredNodeName - the wanted node name.
        Returns:
        the cloned node.
        Throws:
        RepositoryException - if an error occurs.
      • orderNode

        public void orderNode​(Node parentNode,
                              String nodeName,
                              Node node)
                       throws RepositoryException
        Reorder a node, mirroring the order in the default workspace.
        Parameters:
        parentNode - the parent of the source Node in the default workspace.
        nodeName - the node name.
        node - the node in the destination workspace to be reordered.
        Throws:
        RepositoryException - if an error occurs.