Class PathFactory


  • public final class PathFactory
    extends Object
    • Method Detail

      • newLock

        public static Path newLock​(Path path)
      • newLockPath

        public static Path newLockPath​(Path path)
        Returns a path of a lock for the provided file.

        Examples:

         default://main@myteam/dora/src/main/resources/com/myteam/dora/sample.drl
                   branch@space/project/path/to/file.extension                      =>
         default://locks@system/system/myteam/main/dora/src/main/resources/com/myteam/dora/sample.drl
        
         
        Parameters:
        path - the path of a file for which a lock should be created, must not be null.
        Returns:
        the lock path
      • fromLock

        public static Path fromLock​(Path lockPath)
        Returns the path of the locked file for the provided lock.

        Examples:

         default://locks@system/system/myteam/main/dora/src/main/resources/com/myteam/dora/sample.drl.ulock
         default://main@myteam/dora/src/main/resources/com/myteam/dora/sample.drl
                   branch@space/project/path/to/file.extension                      =>
         
        Parameters:
        lockPath - the path of a lock, must not be null.
        Returns:
        the locked path.