Package org.uberfire.backend.vfs
Class PathFactory
- java.lang.Object
-
- org.uberfire.backend.vfs.PathFactory
-
public final class PathFactory extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPathFactory.PathImpl
-
Field Summary
Fields Modifier and Type Field Description static StringLOCK_FILE_EXTENSIONstatic StringVERSION_PROPERTY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PathfromLock(Path lockPath)Returns the path of the locked file for the provided lock.static PathnewLock(Path path)static PathnewLockPath(Path path)Returns a path of a lock for the provided file.static PathnewPath(String fileName, String uri)static PathnewPath(String fileName, String uri, Map<String,Object> attrs)static PathnewPathBasedOn(String fileName, String uri, Path path)
-
-
-
Field Detail
-
LOCK_FILE_EXTENSION
public static final String LOCK_FILE_EXTENSION
- See Also:
- Constant Field Values
-
VERSION_PROPERTY
public static String VERSION_PROPERTY
-
-
Method Detail
-
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.
-
-