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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidresourceCopied(ILocation oldLoc, ILocation newLoc) Resource on given location was copied.voidresourceCreated(ILocation loc) Resource on given location was created.voidResource on given location was modified (either its resource properties, custom properties or contents).voidresourceMoved(ILocation oldLoc, ILocation newLoc) Resource was moved from old to new location.voidresourceRemoved(ILocation loc) Resource on given location was removed.
-
Constructor Details
-
FileChangesListenerAdapter
public FileChangesListenerAdapter()
-
-
Method Details
-
resourceCreated
Description copied from interface:IFileChangesListenerResource on given location was created.If both resource and its parent folder were created, event is sent for each of them.
- Specified by:
resourceCreatedin interfaceIFileChangesListener- Parameters:
loc- location
-
resourceCopied
Description copied from interface:IFileChangesListenerResource 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:
resourceCopiedin interfaceIFileChangesListener- Parameters:
oldLoc- old locationnewLoc- new location
-
resourceRemoved
Description copied from interface:IFileChangesListenerResource on given location was removed.If folder is removed, only one event is sent. Events about removed children are not sent.
- Specified by:
resourceRemovedin interfaceIFileChangesListener- Parameters:
loc- location
-
resourceModified
Description copied from interface:IFileChangesListenerResource on given location was modified (either its resource properties, custom properties or contents).Changes of children do not affect parent folders.
- Specified by:
resourceModifiedin interfaceIFileChangesListener- Parameters:
loc- location
-
resourceMoved
Description copied from interface:IFileChangesListenerResource 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:
resourceMovedin interfaceIFileChangesListener- Parameters:
oldLoc- old locationnewLoc- new location
-