Delta which describes changes which has made outside system resource management. For example some
refactoring mechanisms may includes from many preparing steps and after applying refactoring
resource management should know what exactly happened with resources in the third-party
components.
When third-party component performs any changes in the resources, resource management should
be informed about external changes by creating instances of current delta and calling
Container#synchronize(ResourceDelta...).
Given resource paths should be absolute.
Example of usage:
ResourceDelta deltaUpdate = new ExternalResourceDelta(Path.valueOf("/some/path_1"), ResourceDelta.UPDATED);
ResourceDelta deltaRemove = new ExternalResourceDelta(Path.valueOf("/some/path_2"), ResourceDelta.REMOVED);
ResourceDelta deltaAdd = new ExternalResourceDelta(Path.valueOf("/some/path_3"), ResourceDelta.ADDED);
ResourceDelta deltaMove = new ExternalResourceDelta(Path.valueOf("/some/path_3"), Path.valueOf("/some/path_2"),
ResourceDelta.ADDED | ResourceDelta.MOVED_FROM | ResourceDelta.MOVED_FROM);
Workspace workspace = ... ;
workspace.synchronize(deltaUpdate, deltaRemove, deltaAdd, deltaMove).then(new Operation() {
public void apply(ResourceDelta[] appliedDeltas) throws OperationException {
//do something after deltas have been resolved
}
});