public abstract class AbstractDataDistributionType extends Object implements DataDistributionType
| Constructor and Description |
|---|
AbstractDataDistributionType() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.jcr.Node |
createNode(javax.jcr.Node parentNode,
String nodeName,
String nodeType,
List<String> mixinTypes,
Map<String,String[]> permissions,
boolean isLeaf,
boolean callSave)
Creates the node of the given node type with the given node name directly under
the given parent node, using the given mixin types and permissions
|
protected abstract List<String> |
getAncestors(String dataId)
Gives the list of all the name of the ancestors
|
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.
|
protected String |
getRelativePath(String dataId)
Gives the relative path corresponding to the given id of the data to find/create
|
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
|
protected abstract boolean |
useParametersOnLeafOnly()
Indicates whether or not the node type, the mixin types and the permissions have to
be used on leaf node only.
|
public javax.jcr.Node getDataNode(javax.jcr.Node rootNode,
String dataId)
throws javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
getDataNode in interface DataDistributionTyperootNode - the root node under which the data to find is storeddataId - the id of the data to findjavax.jcr.PathNotFoundException - if the data cannot be findjavax.jcr.RepositoryException - if an error occurred while trying to get the expected datapublic javax.jcr.Node getOrCreateDataNode(javax.jcr.Node rootNode,
String dataId)
throws javax.jcr.RepositoryException
getOrCreateDataNode in interface DataDistributionTyperootNode - the root node under which the data to find is storeddataId - the id of the data to find/createjavax.jcr.RepositoryException - if an error occurred while trying to get or create the expected datapublic javax.jcr.Node getOrCreateDataNode(javax.jcr.Node rootNode,
String dataId,
String nodeType)
throws javax.jcr.RepositoryException
getOrCreateDataNode in interface DataDistributionTyperootNode - the root node under which the data to find is storeddataId - the id of the data to find/createnodeType - the node type to use in case we need to create the nodejavax.jcr.RepositoryException - if an error occurred while trying to get or create the expected datapublic javax.jcr.Node getOrCreateDataNode(javax.jcr.Node rootNode,
String dataId,
String nodeType,
List<String> mixinTypes)
throws javax.jcr.RepositoryException
getOrCreateDataNode in interface DataDistributionTyperootNode - the root node under which the data to find is storeddataId - the id of the data to find/createnodeType - the node type to use in case we need to create the nodemixinTypes - the mixin types to use in case we need to create the nodejavax.jcr.RepositoryException - if an error occurred while trying to get or create the expected datapublic javax.jcr.Node getOrCreateDataNode(javax.jcr.Node rootNode,
String dataId,
String nodeType,
List<String> mixinTypes,
Map<String,String[]> permissions)
throws javax.jcr.RepositoryException
getOrCreateDataNode in interface DataDistributionTyperootNode - the root node under which the data to find is storeddataId - the id of the data to find/createnodeType - the node type to use in case we need to create the nodemixinTypes - the mixin types to use in case we need to create the nodepermissions - the permissions to use in case we need to create the nodejavax.jcr.RepositoryException - if an error occurred while trying to get or create the expected datapublic void removeDataNode(javax.jcr.Node rootNode,
String dataId)
throws javax.jcr.RepositoryException
removeDataNode in interface DataDistributionTyperootNode - the root node under which the data to remove is storeddataId - the id of the data to removejavax.jcr.RepositoryException - if an error occurred while trying to remove the expected datapublic void migrate(javax.jcr.Node rootNode)
throws javax.jcr.RepositoryException
migrate in interface DataDistributionTyperootNode - the root node under which the data to migrate is storedjavax.jcr.RepositoryException - if an error occurred during migrationpublic void migrate(javax.jcr.Node rootNode,
String nodeType,
List<String> mixinTypes,
Map<String,String[]> permissions)
throws javax.jcr.RepositoryException
migrate in interface DataDistributionTyperootNode - the root node under which the data to migrate is storednodeType - the node type to use in case we need to create the nodemixinTypes - the mixin types to use in case we need to create the nodepermissions - the permissions to use in case we need to create the nodejavax.jcr.RepositoryException - if an error occurred during migrationprotected javax.jcr.Node createNode(javax.jcr.Node parentNode,
String nodeName,
String nodeType,
List<String> mixinTypes,
Map<String,String[]> permissions,
boolean isLeaf,
boolean callSave)
throws javax.jcr.RepositoryException
parentNode - the parent nodenodeName - the name of the node to createnodeType - the node type to usemixinTypes - the list of mixin types to usepermissions - the map of permissions to useisLeaf - indicates whether or not the current node to create is the leaf nodejavax.jcr.RepositoryException - if any exception occurs while creating the nodeprotected String getRelativePath(String dataId)
dataId - the id of the data to find/createprotected abstract List<String> getAncestors(String dataId)
dataId - the id of the data to find/createprotected abstract boolean useParametersOnLeafOnly()
true if only the leaf node has to be created with the parameters
false otherwise.Copyright © 2015 eXo Platform SAS. All Rights Reserved.