Package com._1c.g5.v8.dt.aef2.bm.events
Class DerivedDataObjectStatusConsumer
java.lang.Object
com._1c.g5.aef2.events.AbstractServiceConsumer<DerivedDataObjectStatus,DerivedDataObjectStatusEvent>
com._1c.g5.v8.dt.aef2.bm.events.DerivedDataObjectStatusConsumer
- All Implemented Interfaces:
IServiceConsumer<DerivedDataObjectStatus>
,IDerivedDataObjectStatusListener
public class DerivedDataObjectStatusConsumer
extends AbstractServiceConsumer<DerivedDataObjectStatus,DerivedDataObjectStatusEvent>
implements IDerivedDataObjectStatusListener
The
IDerivedDataObjectStatusListener
implementation that listens to DD status changed and applies the
status converted to AEFs event to process by IScene
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDerivedDataObjectStatusConsumer
(IDerivedDataManagerProvider derivedDataManagerProvider) Creates a new consumer instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addListener
(Map<Long, Collection<String>> scope) Adds an appropriate DD object status listener the specified DD change scope.protected DerivedDataObjectStatusEvent
convertToAefEvent
(DerivedDataObjectStatus externalEvent) Converts the given external event to AEF service event.void
dispose()
Disposes the consumer.void
Notifies the consumer that the scope of processing service events was changed.protected void
Removes the currently assigned listener of DD object status events.void
selectionChanged
(org.eclipse.core.resources.IProject project) Sets the selected project.void
statusChanged
(long bmObjectId, DerivedDataObjectStatus status) Notifies the listener that the DD status is being changed for the tracked object.Methods inherited from class com._1c.g5.aef2.events.AbstractServiceConsumer
accept, getEventTracker, intitialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com._1c.g5.v8.derived.IDerivedDataObjectStatusListener
statusChanged
-
Field Details
-
currentDerivedDataManager
-
-
Constructor Details
-
DerivedDataObjectStatusConsumer
Creates a new consumer instance.- Parameters:
derivedDataManagerProvider
- theIDerivedDataManagerProvider
.
-
-
Method Details
-
notifyServiceEventQualifierScopeChanged
Description copied from interface:IServiceConsumer
Notifies the consumer that the scope of processing service events was changed.- Specified by:
notifyServiceEventQualifierScopeChanged
in interfaceIServiceConsumer<DerivedDataObjectStatus>
- Overrides:
notifyServiceEventQualifierScopeChanged
in classAbstractServiceConsumer<DerivedDataObjectStatus,
DerivedDataObjectStatusEvent> - Parameters:
qualifiers
- the service event qualifiers.
-
selectionChanged
public void selectionChanged(org.eclipse.core.resources.IProject project) Sets the selected project.- Parameters:
project
- theIProject
, can benull
.
-
dispose
public void dispose()Description copied from interface:IServiceConsumer
Disposes the consumer.- Specified by:
dispose
in interfaceIServiceConsumer<DerivedDataObjectStatus>
- Overrides:
dispose
in classAbstractServiceConsumer<DerivedDataObjectStatus,
DerivedDataObjectStatusEvent>
-
statusChanged
Description copied from interface:IDerivedDataObjectStatusListener
Notifies the listener that the DD status is being changed for the tracked object.- Specified by:
statusChanged
in interfaceIDerivedDataObjectStatusListener
- Parameters:
bmObjectId
- Object id for the object which DD status have been changed.status
- The current status of DD for the target object. Cannot benull
.
-
convertToAefEvent
Description copied from class:AbstractServiceConsumer
Converts the given external event to AEF service event.- Specified by:
convertToAefEvent
in classAbstractServiceConsumer<DerivedDataObjectStatus,
DerivedDataObjectStatusEvent> - Parameters:
externalEvent
- the external service event.- Returns:
- the AEF
IServiceEvent
successor.
-
addListener
Adds an appropriate DD object status listener the specified DD change scope. By default, the consumer subscribes itself to the DD manager to directly transform DD object status events into AEF2 BM service events.Subclasses may override this method to implement custom behavior.
- Parameters:
scope
- the DD change scope to subscribe the listener to
-
removeListener
protected void removeListener()Removes the currently assigned listener of DD object status events.Subclasses may override this method to implement custom behavior.
- See Also:
-