Interface DataDistributionType

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.jcr.Node getDataNode​(javax.jcr.Node rootNode, String dataId)
      Retrieves the node from the JCR under the given root node and corresponding to the given data id.
      javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode, String dataId)
      Tries to get the node from the JCR and if it cannot be found, it will create it automatically.
      javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode, String dataId, String nodeType)
      Tries to get the node from the JCR and if it cannot be found, it will create it automatically.
      javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode, String dataId, String nodeType, List<String> mixinTypes)
      Tries to get the node from the JCR and if it cannot be found, it will create it automatically.
      javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode, String dataId, String nodeType, List<String> mixinTypes, Map<String,​String[]> permissions)
      Tries to get the node from the JCR and if it cannot be found, it will create it automatically.
      void migrate​(javax.jcr.Node rootNode)
      Migrate from old structure to new one.
      void migrate​(javax.jcr.Node rootNode, String nodeType, List<String> mixinTypes, Map<String,​String[]> permissions)
      Migrate from old structure to new one.
      void removeDataNode​(javax.jcr.Node rootNode, String dataId)
      Remove the node from the JCR if it exists
    • Method Detail

      • getDataNode

        javax.jcr.Node getDataNode​(javax.jcr.Node rootNode,
                                   String dataId)
                            throws javax.jcr.PathNotFoundException,
                                   javax.jcr.RepositoryException
        Retrieves the node from the JCR under the given root node and corresponding to the given data id.
        Parameters:
        rootNode - the root node under which the data to find is stored
        dataId - the id of the data to find
        Returns:
        the Node corresponding to the data to find
        Throws:
        javax.jcr.PathNotFoundException - if the data cannot be find
        javax.jcr.RepositoryException - if an error occurred while trying to get the expected data
      • getOrCreateDataNode

        javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode,
                                           String dataId)
                                    throws javax.jcr.RepositoryException
        Tries to get the node from the JCR and if it cannot be found, it will create it automatically.
        Parameters:
        rootNode - the root node under which the data to find is stored
        dataId - the id of the data to find/create
        Returns:
        the Node corresponding to the data to find
        Throws:
        javax.jcr.RepositoryException - if an error occurred while trying to get or create the expected data
      • getOrCreateDataNode

        javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode,
                                           String dataId,
                                           String nodeType)
                                    throws javax.jcr.RepositoryException
        Tries to get the node from the JCR and if it cannot be found, it will create it automatically. If the node has to be created, the node will be created with the given node type.
        Parameters:
        rootNode - the root node under which the data to find is stored
        dataId - the id of the data to find/create
        nodeType - the node type to use in case we need to create the node
        Returns:
        the Node corresponding to the data to find
        Throws:
        javax.jcr.RepositoryException - if an error occurred while trying to get or create the expected data
      • getOrCreateDataNode

        javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode,
                                           String dataId,
                                           String nodeType,
                                           List<String> mixinTypes)
                                    throws javax.jcr.RepositoryException
        Tries to get the node from the JCR and if it cannot be found, it will create it automatically. If the node has to be created, the node will be created with the given node type and given mixin types.
        Parameters:
        rootNode - the root node under which the data to find is stored
        dataId - the id of the data to find/create
        nodeType - the node type to use in case we need to create the node
        mixinTypes - the mixin types to use in case we need to create the node
        Returns:
        the Node corresponding to the data to find
        Throws:
        javax.jcr.RepositoryException - if an error occurred while trying to get or create the expected data
      • getOrCreateDataNode

        javax.jcr.Node getOrCreateDataNode​(javax.jcr.Node rootNode,
                                           String dataId,
                                           String nodeType,
                                           List<String> mixinTypes,
                                           Map<String,​String[]> permissions)
                                    throws javax.jcr.RepositoryException
        Tries to get the node from the JCR and if it cannot be found, it will create it automatically. If the node has to be created, the node will be created with the given node type, given mixin types and given permissions.
        Parameters:
        rootNode - the root node under which the data to find is stored
        dataId - the id of the data to find/create
        nodeType - the node type to use in case we need to create the node
        mixinTypes - the mixin types to use in case we need to create the node
        permissions - the permissions to use in case we need to create the node
        Returns:
        the Node corresponding to the data to find
        Throws:
        javax.jcr.RepositoryException - if an error occurred while trying to get or create the expected data
      • removeDataNode

        void removeDataNode​(javax.jcr.Node rootNode,
                            String dataId)
                     throws javax.jcr.RepositoryException
        Remove the node from the JCR if it exists
        Parameters:
        rootNode - the root node under which the data to remove is stored
        dataId - the id of the data to remove
        Throws:
        javax.jcr.RepositoryException - if an error occurred while trying to remove the expected data
      • migrate

        void migrate​(javax.jcr.Node rootNode)
              throws javax.jcr.RepositoryException
        Migrate from old structure to new one.
        Parameters:
        rootNode - the root node under which the data to migrate is stored
        Throws:
        javax.jcr.RepositoryException - if an error occurred during migration
      • migrate

        void migrate​(javax.jcr.Node rootNode,
                     String nodeType,
                     List<String> mixinTypes,
                     Map<String,​String[]> permissions)
              throws javax.jcr.RepositoryException
        Migrate from old structure to new one.
        Parameters:
        rootNode - the root node under which the data to migrate is stored
        nodeType - the node type to use in case we need to create the node
        mixinTypes - the mixin types to use in case we need to create the node
        permissions - the permissions to use in case we need to create the node
        Throws:
        javax.jcr.RepositoryException - if an error occurred during migration