Class FileChangesListenerAdapter
- All Implemented Interfaces:
IFileChangesListener
- Direct Known Subclasses:
ExtendedFileChangesListenerAdapter
Extend this class to create a file change listener and override the methods
for the events of interest. (If you implement the IFileChangesListener
interface, you have to define all of the methods in it. This abstract
class defines null methods for them all, so you can only have to define methods
for events you care about.)
Create a listener object using the extended class and then register it with
a repository service using the service's addFileChangesListener
method. When a file(folder) is changed, created, moved, copyed or removed
the relevant method in the listener object is invoked and the
ILocation
is passed to it.
- Author:
- POLARION SOFTWARE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
resourceCopied
(ILocation oldLoc, ILocation newLoc) Resource on given location was copied.void
resourceCreated
(ILocation loc) Resource on given location was created.void
Resource on given location was modified (either its resource properties, custom properties or contents).void
resourceMoved
(ILocation oldLoc, ILocation newLoc) Resource was moved from old to new location.void
resourceRemoved
(ILocation loc) Resource on given location was removed.
-
Constructor Details
-
FileChangesListenerAdapter
public FileChangesListenerAdapter()
-
-
Method Details
-
resourceCreated
Description copied from interface:IFileChangesListener
Resource on given location was created.If both resource and its parent folder were created, event is sent for each of them.
- Specified by:
resourceCreated
in interfaceIFileChangesListener
- Parameters:
loc
- location
-
resourceCopied
Description copied from interface:IFileChangesListener
Resource on given location was copied.Some storage implementations may not be able to detect the copy and may issue
IFileChangesListener.resourceCreated(ILocation)
instead.If folders are copied, only one event is sent. Events about copied children are not sent.
- Specified by:
resourceCopied
in interfaceIFileChangesListener
- Parameters:
oldLoc
- old locationnewLoc
- new location
-
resourceRemoved
Description copied from interface:IFileChangesListener
Resource on given location was removed.If folder is removed, only one event is sent. Events about removed children are not sent.
- Specified by:
resourceRemoved
in interfaceIFileChangesListener
- Parameters:
loc
- location
-
resourceModified
Description copied from interface:IFileChangesListener
Resource on given location was modified (either its resource properties, custom properties or contents).Changes of children do not affect parent folders.
- Specified by:
resourceModified
in interfaceIFileChangesListener
- Parameters:
loc
- location
-
resourceMoved
Description copied from interface:IFileChangesListener
Resource was moved from old to new location.Some storage implementations may not be able to detect the move and may issue
IFileChangesListener.resourceRemoved(ILocation)
andIFileChangesListener.resourceCreated(ILocation)
(in either order) instead.If folders are moved, only one event is sent. Events about moved children are not sent.
- Specified by:
resourceMoved
in interfaceIFileChangesListener
- Parameters:
oldLoc
- old locationnewLoc
- new location
-