|
org.netbeans.modules.masterfs/2 2.38 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.masterfs.providers.ProvidedExtensions
public class ProvidedExtensions
Encapsulate a group of individual factory methods that are responsible for creating objects
of specific interfaces. If subclassed and provided by
AnnotationProvider.getInterceptionListener() then
individual instances will be called by MasterFileSystem
There may exist more than one instance of ProvidedExtensions
at a given moment and therefore there is defined for
every method wheter will be called by MasterFileSystem
for every present instance or just for the first one.
ProvidedExtensions.IOHandler,
InterceptionListener| Nested Class Summary | |
|---|---|
static interface |
ProvidedExtensions.DeleteHandler
|
static interface |
ProvidedExtensions.IOHandler
|
| Constructor Summary | |
|---|---|
ProvidedExtensions()
Default constructor |
|
ProvidedExtensions(boolean providesCanWrite)
Creates a new ProvidedExtensions. |
|
| Method Summary | ||
|---|---|---|
void |
beforeChange(FileObject fo)
|
|
void |
beforeCopy(FileObject from,
File to)
Called by MasterFileSystem before FileObject
is copied |
|
void |
beforeCreate(FileObject parent,
String name,
boolean isFolder)
|
|
void |
beforeDelete(FileObject fo)
|
|
void |
beforeMove(FileObject from,
File to)
Called by MasterFileSystem before FileObject
is moved |
|
boolean |
canWrite(File f)
Called by MasterFileSystem when FileObject is queried for writability with the
canWrite() method. |
|
void |
copyFailure(FileObject from,
File to)
Called by MasterFileSystem after a FileObject
copy failed |
|
void |
copySuccess(FileObject from,
File to)
Called by MasterFileSystem after FileObject
was successfully copied |
|
void |
createdExternally(FileObject fo)
Called by MasterFileSystem after FileObject
was created externally |
|
void |
createFailure(FileObject parent,
String name,
boolean isFolder)
|
|
void |
createSuccess(FileObject fo)
|
|
void |
deletedExternally(FileObject fo)
Called by MasterFileSystem after FileObject
was deleted externally |
|
void |
deleteFailure(FileObject fo)
|
|
void |
deleteSuccess(FileObject fo)
|
|
void |
fileChanged(FileObject fo)
Called by MasterFileSystem after FileObject
was changed |
|
void |
fileLocked(FileObject fo)
|
|
void |
fileUnlocked(FileObject fo)
|
|
Object |
getAttribute(File file,
String attrName)
Called by MasterFileSystem when FileObject is
queried for attribute and attribute's name starts with ProvidedExtensions
prefix. |
|
ProvidedExtensions.IOHandler |
getCopyHandler(File from,
File to)
Return instance of ProvidedExtensions.IOHandler
that is responsible for copying the file or null. |
|
ProvidedExtensions.DeleteHandler |
getDeleteHandler(File f)
|
|
ProvidedExtensions.IOHandler |
getMoveHandler(File from,
File to)
Return instance of ProvidedExtensions.IOHandler
that is responsible for moving the file or null. |
|
ProvidedExtensions.IOHandler |
getRenameHandler(File from,
String newName)
|
|
void |
moveFailure(FileObject from,
File to)
Called by MasterFileSystem after a FileObject
move failed |
|
void |
moveSuccess(FileObject from,
File to)
Called by MasterFileSystem after FileObject
was successfully |
|
static
|
priorityIO(Callable<T> run)
Allows registered exceptions to execute some I/O priority action. |
|
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 |
|---|
public ProvidedExtensions(boolean providesCanWrite)
providesCanWrite - true if this instance is meant to
determine a files #canWrite() value, otherwise false.public ProvidedExtensions()
| Method Detail |
|---|
public ProvidedExtensions.IOHandler getCopyHandler(File from,
File to)
ProvidedExtensions.IOHandler
that is responsible for copying the file or null.
Just the first non null instance of IOHandler is used by
MasterFileSystem
from - file to be copiedto - target to copy this file to
ProvidedExtensions.IOHandler
that is responsible for copying the file or null
public ProvidedExtensions.IOHandler getMoveHandler(File from,
File to)
ProvidedExtensions.IOHandler
that is responsible for moving the file or null.
Just the first non null instance of IOHandler is used by
MasterFileSystem
from - file to be movedto - target to move this file to
ProvidedExtensions.IOHandler
that is responsible for moving the file or null
public ProvidedExtensions.IOHandler getRenameHandler(File from,
String newName)
public ProvidedExtensions.DeleteHandler getDeleteHandler(File f)
public void createSuccess(FileObject fo)
createSuccess in interface InterceptionListener
public void createFailure(FileObject parent,
String name,
boolean isFolder)
createFailure in interface InterceptionListener
public void beforeCreate(FileObject parent,
String name,
boolean isFolder)
beforeCreate in interface InterceptionListenerpublic void deleteSuccess(FileObject fo)
deleteSuccess in interface InterceptionListenerpublic void deleteFailure(FileObject fo)
deleteFailure in interface InterceptionListenerpublic void beforeDelete(FileObject fo)
beforeDelete in interface InterceptionListenerpublic void createdExternally(FileObject fo)
MasterFileSystem after FileObject
was created externally
fo - created filepublic void deletedExternally(FileObject fo)
MasterFileSystem after FileObject
was deleted externally
fo - deleted filepublic void fileChanged(FileObject fo)
MasterFileSystem after FileObject
was changed
fo - changed file
public void beforeCopy(FileObject from,
File to)
MasterFileSystem before FileObject
is copied
from - FileObject to be movedto - File target to move this file to
public void copySuccess(FileObject from,
File to)
MasterFileSystem after FileObject
was successfully copied
from - FileObject to be movedto - File target to move this file to
public void copyFailure(FileObject from,
File to)
MasterFileSystem after a FileObject
copy failed
from - FileObject to be movedto - File target to move this file to
public void beforeMove(FileObject from,
File to)
MasterFileSystem before FileObject
is moved
from - FileObject to be movedto - File target to move this file to
public void moveSuccess(FileObject from,
File to)
MasterFileSystem after FileObject
was successfully
from - FileObject to be movedto - File target to move this file to
public void moveFailure(FileObject from,
File to)
MasterFileSystem after a FileObject
move failed
from - FileObject to be movedto - File target to move this file topublic boolean canWrite(File f)
MasterFileSystem when FileObject is queried for writability with the
canWrite() method.
f - a file to query
public void beforeChange(FileObject fo)
public void fileLocked(FileObject fo)
throws IOException
IOExceptionpublic void fileUnlocked(FileObject fo)
public Object getAttribute(File file,
String attrName)
MasterFileSystem when FileObject is
queried for attribute and attribute's name starts with ProvidedExtensions
prefix.
attrName - name of attribute
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 interated into this array
public static <T> T priorityIO(Callable<T> run)
throws Exception
callable - the Callable to run
Exception - the exception thrown by the callable
|
org.netbeans.modules.masterfs/2 2.38 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||