Class UnixFSPathMapping

java.lang.Object
dev.getelements.elements.rt.transact.unix.UnixFSPathMapping
All Implemented Interfaces:
UnixFSHasFilesystemPath

public abstract class UnixFSPathMapping extends Object implements UnixFSHasFilesystemPath
  • Method Details

    • getUnixFSUtils

      public UnixFSUtils getUnixFSUtils()
      Get the UnixFSUtils associated with this UnixFSPathMapping.
      Returns:
      the utils for this mapping.
    • getPath

      public Path getPath()
      Returns the Path representing the symbolic path. This is always a fully qualified path with the context set properly.
      Returns:
      the Path instance
    • getFilesystemPath

      public Path getFilesystemPath(String transactionId)
      Description copied from interface: UnixFSHasFilesystemPath
      Gets the FS Path for hte object, appending the transaction ID.
      Specified by:
      getFilesystemPath in interface UnixFSHasFilesystemPath
      Parameters:
      transactionId - the transaction ID
      Returns:
      the Path appending the transaction ID.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • fromRTPath

      public static UnixFSPathMapping fromRTPath(UnixFSUtils utils, Path rtPath)
      Creates a UnixFSPathMapping with the supplied information which resolves a particular Path to a Path mapping.
      Parameters:
      utils - the UnixFSUtils used to determine the actual configured location
      rtPath - the Path representing the symbolic location of the resource
      Returns:
      the UnixFSPathMapping instance
    • fromFullyQualifiedFSPath

      public static UnixFSPathMapping fromFullyQualifiedFSPath(UnixFSUtils utils, HasNodeId hasNodeId, Path fsPath)
      Creates a UnixFSPathMapping with the supplied information which resolves a particular Path to a Path mapping. This assumes that the supplied Path is fully qualified in that the first component contains a stringified NodeId. This relativizes this against the path storage root and then infers the NodeId from the first component of the path.
      Parameters:
      utils - the UnixFSUtils used to determine the actual configured location
      fsPath - the Path representing the on-disk directory for the Path
      Returns:
      the UnixFSPathMapping instance