Class ExtendedFileChangesListenerAdapter
- All Implemented Interfaces:
IExtendedFileChangesListener
,IFileChangesListener
Extend this class to create an extended file change listener and override the methods
for the events of interest. (If you implement the IExtendedFileChangesListener
interface, you have to define all of the methods in it. This abstract
class defines null methods for them all, so you only have to define methods
for events you care about.)
This adapter by default ignore change events, to change that behaviour overwrite
ignoresResourceChanges
method to return false
.
Create a listener object using the extended class and then register it with
a repository service using the service's addFileChangesListener
method. When a new revision appears the revisionAdded
method is
invoked with revision Id. In case of an event involving resources the methods in FileChangesListenerAdapter
are invoked passing the locations (ILocation
) where the changes happened. All those methods provide
empty implementation.
- Author:
- POLARION SOFTWARE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether this listener is interested only in revisions.void
revisionAdded
(String revision) Deprecated, for removal: This API element is subject to removal in a future version.void
revisionAdded
(String repositoryName, String revision) Revision was added.Methods inherited from class com.polarion.platform.service.repository.FileChangesListenerAdapter
resourceCopied, resourceCreated, resourceModified, resourceMoved, resourceRemoved
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.polarion.platform.service.repository.IExtendedFileChangesListener
revisionProcessed
Methods inherited from interface com.polarion.platform.service.repository.IFileChangesListener
resourceCopied, resourceCreated, resourceModified, resourceMoved, resourceRemoved
-
Constructor Details
-
ExtendedFileChangesListenerAdapter
public ExtendedFileChangesListenerAdapter()
-
-
Method Details
-
revisionAdded
Deprecated, for removal: This API element is subject to removal in a future version.This method was never called. -
ignoresResourceChanges
public boolean ignoresResourceChanges()Description copied from interface:IExtendedFileChangesListener
Whether this listener is interested only in revisions.Allows optimizations in revision retrieval.
- Specified by:
ignoresResourceChanges
in interfaceIExtendedFileChangesListener
- Returns:
true
if only revision additions are interesting from this listener- See Also:
-
revisionAdded
Description copied from interface:IExtendedFileChangesListener
Revision was added.It is assured that this event is sent after all other events based on the same revision are sent.
All listeners regardless their registered resource locations are called.
- Specified by:
revisionAdded
in interfaceIExtendedFileChangesListener
- Parameters:
repositoryName
- identifier of the repository that the revision belongs to.revision
- revision (notnull
)- Since:
- 3.21.1
- See Also:
-
revisionAdded(java.lang.String, java.lang.String)
instead