- 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.Updateinstance whose type isDirectoryModel.UpdateType.CREATION.static <I> DirectoryModel.Update<I>deletion(Path baseDir, Path relativePath, I initiator)Utility method to create anDirectoryModel.Updateinstance whose type isDirectoryModel.UpdateType.DELETION.PathgetBaseDir()IgetInitiator()PathgetPath()PathgetRelativePath()DirectoryModel.UpdateTypegetType()static <I> DirectoryModel.Update<I>modification(Path baseDir, Path relativePath, I initiator)Utility method to create anDirectoryModel.Updateinstance 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.Updateinstance 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 tobaseDirof the created element.initiator- The initiator of changes to the model.- Returns:
- A newly created
DirectoryModel.Updateinstance.
-
deletion
public static <I> DirectoryModel.Update<I> deletion(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Updateinstance 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 tobaseDirof the deleted element.initiator- The initiator of changes to the model.- Returns:
- A newly created
DirectoryModel.Updateinstance.
-
modification
public static <I> DirectoryModel.Update<I> modification(Path baseDir, Path relativePath, I initiator)
Utility method to create anDirectoryModel.Updateinstance 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 tobaseDirof the modified element.initiator- The initiator of changes to the model.- Returns:
- A newly created
DirectoryModel.Updateinstance.
-
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.
-
-