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
TheIDerivedDataObjectStatusListener
implementation that listens to DD status changed and applies the status converted to AEFs event to process byIScene
.
-
-
Field Summary
Fields Modifier and Type Field Description protected IDerivedDataManager
currentDerivedDataManager
-
Constructor Summary
Constructors Constructor Description DerivedDataObjectStatusConsumer(IDerivedDataManagerProvider derivedDataManagerProvider)
Creates a new consumer instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
notifyServiceEventQualifierScopeChanged(Collection<IServiceEventQualifier> qualifiers)
Notifies the consumer that the scope of processing service events was changed.protected void
removeListener()
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 Detail
-
currentDerivedDataManager
protected IDerivedDataManager currentDerivedDataManager
-
-
Constructor Detail
-
DerivedDataObjectStatusConsumer
public DerivedDataObjectStatusConsumer(IDerivedDataManagerProvider derivedDataManagerProvider)
Creates a new consumer instance.- Parameters:
derivedDataManagerProvider
- theIDerivedDataManagerProvider
.
-
-
Method Detail
-
notifyServiceEventQualifierScopeChanged
public void notifyServiceEventQualifierScopeChanged(Collection<IServiceEventQualifier> qualifiers)
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
public void statusChanged(long bmObjectId, DerivedDataObjectStatus status)
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
protected DerivedDataObjectStatusEvent convertToAefEvent(DerivedDataObjectStatus externalEvent)
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
protected void addListener(Map<Long,Collection<String>> scope)
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:
addListener(Map)
-
-