Class PathConverter

java.lang.Object
com.flowable.content.engine.impl.fs.PathConverter

public class PathConverter
extends java.lang.Object
Converts between a unique content index and a relative File path. Uses a nested tree of folders (depth based on iterationDepth) with a maximum number of children (based on blockSize). The leaves of the trees will be the actual content files. This way, no folder will have more children than the 'blockSize' set, keeping the folders balanced.
Author:
Frederik Heremans
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.math.BigInteger blockSize  
    protected int blockSizeInt  
    protected int iterationDepth  
  • Constructor Summary

    Constructors 
    Constructor Description
    PathConverter()  
  • Method Summary

    Modifier and Type Method Description
    int getBlockSize()  
    java.math.BigInteger getIdForPath​(java.io.File path)  
    int getIterationDepth()  
    java.io.File getPathForId​(java.math.BigInteger id)  
    void setBlockSize​(int blockSize)  
    void setIterationDepth​(int iterationDepth)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getPathForId

      public java.io.File getPathForId​(java.math.BigInteger id)
      Returns:
      a path representing the content with the given unique content index.
    • getIdForPath

      public java.math.BigInteger getIdForPath​(java.io.File path)
    • setBlockSize

      public void setBlockSize​(int blockSize)
    • getBlockSize

      public int getBlockSize()
    • setIterationDepth

      public void setIterationDepth​(int iterationDepth)
    • getIterationDepth

      public int getIterationDepth()