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 voidaddListener(Map<Long, Collection<String>> scope) Adds an appropriate DD object status listener the specified DD change scope.protected DerivedDataObjectStatusEventconvertToAefEvent(DerivedDataObjectStatus externalEvent) Converts the given external event to AEF service event.voiddispose()Disposes the consumer.voidNotifies the consumer that the scope of processing service events was changed.protected voidRemoves the currently assigned listener of DD object status events.voidselectionChanged(org.eclipse.core.resources.IProject project) Sets the selected project.voidstatusChanged(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, intitializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IServiceConsumerNotifies the consumer that the scope of processing service events was changed.- Specified by:
notifyServiceEventQualifierScopeChangedin interfaceIServiceConsumer<DerivedDataObjectStatus>- Overrides:
notifyServiceEventQualifierScopeChangedin 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:IServiceConsumerDisposes the consumer.- Specified by:
disposein interfaceIServiceConsumer<DerivedDataObjectStatus>- Overrides:
disposein classAbstractServiceConsumer<DerivedDataObjectStatus,DerivedDataObjectStatusEvent>
-
statusChanged
Description copied from interface:IDerivedDataObjectStatusListenerNotifies the listener that the DD status is being changed for the tracked object.- Specified by:
statusChangedin 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:AbstractServiceConsumerConverts the given external event to AEF service event.- Specified by:
convertToAefEventin classAbstractServiceConsumer<DerivedDataObjectStatus,DerivedDataObjectStatusEvent> - Parameters:
externalEvent- the external service event.- Returns:
- the AEF
IServiceEventsuccessor.
-
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:
-