- java.lang.Object
-
- eu.ess.xaos.ui.control.tree.DirectoryModel.Update<I>
-
- Type Parameters:
I
- Type of the initiator of changes to the model.
- Enclosing interface:
- DirectoryModel<I,T>
public static class DirectoryModel.Update<I> extends Object
Represents an update to the directory model.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <I> DirectoryModel.Update<I>
creation(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Update
instance whose type isDirectoryModel.UpdateType.CREATION
.static <I> DirectoryModel.Update<I>
deletion(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Update
instance whose type isDirectoryModel.UpdateType.DELETION
.Path
getBaseDir()
I
getInitiator()
Path
getPath()
Path
getRelativePath()
DirectoryModel.UpdateType
getType()
static <I> DirectoryModel.Update<I>
modification(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Update
instance whose type isDirectoryModel.UpdateType.MODIFICATION
.
-
-
-
Method Detail
-
creation
public static <I> DirectoryModel.Update<I> creation(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Update
instance whose type isDirectoryModel.UpdateType.CREATION
.- Type Parameters:
I
- Type of the initiator of changes to the model.- Parameters:
baseDir
- Base directory of the update.relativePath
- Path relative tobaseDir
of the created element.initiator
- The initiator of changes to the model.- Returns:
- A newly created
DirectoryModel.Update
instance.
-
deletion
public static <I> DirectoryModel.Update<I> deletion(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Update
instance whose type isDirectoryModel.UpdateType.DELETION
.- Type Parameters:
I
- Type of the initiator of changes to the model.- Parameters:
baseDir
- Base directory of the update.relativePath
- Path relative tobaseDir
of the deleted element.initiator
- The initiator of changes to the model.- Returns:
- A newly created
DirectoryModel.Update
instance.
-
modification
public static <I> DirectoryModel.Update<I> modification(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Update
instance whose type isDirectoryModel.UpdateType.MODIFICATION
.- Type Parameters:
I
- Type of the initiator of changes to the model.- Parameters:
baseDir
- Base directory of the update.relativePath
- Path relative tobaseDir
of the modified element.initiator
- The initiator of changes to the model.- Returns:
- A newly created
DirectoryModel.Update
instance.
-
getBaseDir
public Path getBaseDir()
- Returns:
- The base directory of the update.
-
getInitiator
public I getInitiator()
- Returns:
- The initiator of changes to the model.
-
getPath
public Path getPath()
- Returns:
- The resolved path of the updated element. This is equivalent
of calling
getBaseDir().resolve(getRelativePath())
.
-
getRelativePath
public Path getRelativePath()
- Returns:
- The path relative to
getBaseDir()
of the updated element.
-
getType
public DirectoryModel.UpdateType getType()
- Returns:
- The type of the update.
-
-