Class DataDistributionByHash
- java.lang.Object
-
- org.exoplatform.services.jcr.ext.distribution.impl.AbstractDataDistributionType
-
- org.exoplatform.services.jcr.ext.distribution.impl.DataDistributionByHash
-
- All Implemented Interfaces:
DataDistributionType
public class DataDistributionByHash extends AbstractDataDistributionType
It will generate from the data id an hash code thanks to an hashing function then with this hash code it will be able to generate a hierarchy of sub-nodes withnlevels of depth for example withn = 4and MD5 as hashing function: For "john.smith" with MD5, the hash code in base 32 is 12spjkm4fhsrl151pva3f7mf1r, so the path would be "1/2/s/john.smith"- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Constructor Summary
Constructors Constructor Description DataDistributionByHash()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>getAncestors(String dataId)Gives the list of all the name of the ancestorsprotected booleanuseParametersOnLeafOnly()Indicates whether or not the node type, the mixin types and the permissions have to be used on leaf node only.-
Methods inherited from class org.exoplatform.services.jcr.ext.distribution.impl.AbstractDataDistributionType
createNode, getDataNode, getOrCreateDataNode, getOrCreateDataNode, getOrCreateDataNode, getOrCreateDataNode, getRelativePath, migrate, migrate, removeDataNode
-
-
-
-
Method Detail
-
getAncestors
protected List<String> getAncestors(String dataId)
Gives the list of all the name of the ancestors- Specified by:
getAncestorsin classAbstractDataDistributionType- Parameters:
dataId- the id of the data to find/create- Returns:
- the list of the ancestor names
-
useParametersOnLeafOnly
protected boolean useParametersOnLeafOnly()
Indicates whether or not the node type, the mixin types and the permissions have to be used on leaf node only.- Specified by:
useParametersOnLeafOnlyin classAbstractDataDistributionType- Returns:
trueif only the leaf node has to be created with the parametersfalseotherwise.
-
-