|
org.netbeans.modules.versioning/1 1.32.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.versioning.spi.VCSInterceptor
public abstract class VCSInterceptor
Versioning systems that need to intercept or listen to file system operations implement this class.
| Constructor Summary | |
|---|---|
protected |
VCSInterceptor()
Protected constructor, does nothing. |
| Method Summary | |
|---|---|
void |
afterChange(File file)
Called after a file changed. |
void |
afterCopy(File from,
File to)
Called after a file or folder has been copied. |
void |
afterCreate(File file)
Called after a new file or folder has beed created. |
void |
afterDelete(File file)
Called after a file or folder is deleted. |
void |
afterMove(File from,
File to)
Called after a file or folder has beed moved. |
void |
beforeChange(File file)
Called before a file is changed. |
boolean |
beforeCopy(File from,
File to)
Notifies the interceptor that the file or folder is about to be copied. |
boolean |
beforeCreate(File file,
boolean isDirectory)
Notifies the interceptor that the file or folder is about to be created. |
boolean |
beforeDelete(File file)
Notifies the interceptor that the file or folder is about to be deleted. |
void |
beforeEdit(File file)
Called before a file is about to enter Edit mode. |
boolean |
beforeMove(File from,
File to)
Notifies the interceptor that the file or folder is about to be moved. |
void |
doCopy(File from,
File to)
Called if beforeCopy() returns true and delegates the copy operation to this interceptor. |
void |
doCreate(File file,
boolean isDirectory)
Called if beforeCreate() returns true and delegates the create operation to this interceptor. |
void |
doDelete(File file)
Called if beforeDelete() returns true and delegates the delete operation to this interceptor. |
void |
doMove(File from,
File to)
Called if beforeMove() returns true and delegates the move operation to this interceptor. |
Object |
getAttribute(File file,
String attrName)
Queries the versioning system for a files VCS specific attribute. |
boolean |
isMutable(File file)
Queries the versioning system for file mutability (write, delete, move). |
long |
refreshRecursively(File dir,
long lastTimeStamp,
List<? super File> children)
Allows versioning system to exclude some children from recursive listening check. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected VCSInterceptor()
| Method Detail |
|---|
public boolean isMutable(File file)
file - a file to query
public Object getAttribute(File file,
String attrName)
ProvidedExtensions.RemoteLocation
file - a file to get the attribute forattrName - te attributes name
public boolean beforeDelete(File file)
file - a file or an empty folder to be deleted
public void doDelete(File file)
throws IOException
file - a file or an empty folder to delete; the interceptor will never be asked to delete a non-empty folder
IOException - if the delete operation failedpublic void afterDelete(File file)
file - deleted file
public boolean beforeMove(File from,
File to)
from - the file or folder to be movedto - destination of the file being moved
public void doMove(File from,
File to)
throws IOException
from - the file or folder to be movedto - destination of the file being moved
IOException - if the move operation failed
public void afterMove(File from,
File to)
from - original location of the fileto - current location of the file
public boolean beforeCopy(File from,
File to)
from - the file or folder to be copiedto - destination of the file being copied
public void doCopy(File from,
File to)
throws IOException
from - the file or folder to be copiedto - destination of the file being copied
IOException - if the copy operation failed
public void afterCopy(File from,
File to)
from - original location of the fileto - current location of the file
public boolean beforeCreate(File file,
boolean isDirectory)
file - file or folder to be created
public void doCreate(File file,
boolean isDirectory)
throws IOException
file - the file to createisDirectory - true if the new file should be a directory, false otherwise
IOException - if the create operation failedpublic void afterCreate(File file)
file - the new filepublic void afterChange(File file)
file - changed filepublic void beforeChange(File file)
file - to be changed filepublic void beforeEdit(File file)
file - file that was just locked and is expected to change
public long refreshRecursively(File dir,
long lastTimeStamp,
List<? super File> children)
Default implementation of this method returns -1.
dir - the directory to check timestamp forlastTimeStamp - the previously known timestamp or -1children - add subfiles that shall be iterated into this array
|
org.netbeans.modules.versioning/1 1.32.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||