org.imemex.resourceviewmanager.mappers
Class AdaptedIdentifiableGroup

java.lang.Object
  extended by org.imemex.idm.DecoratedGroup
      extended by org.imemex.resourceviewmanager.mappers.AdaptedIdentifiableGroup
All Implemented Interfaces:
Group

public class AdaptedIdentifiableGroup
extends DecoratedGroup

Adapts a group component that consists of PluginIdentifiableResourceViews to a group component that consists of IdentifiableResourceViews. This class makes sure that indirectly related views will also get adapted.

Author:
marcos

Constructor Summary
AdaptedIdentifiableGroup(Group group, long dataSourceId)
          Instantiates a new AdaptedIdentifiableGroup.
 
Method Summary
 PullOperator getSequenceAsPullOperator()
          gets Iterator over all ResourceViews in the Sequence
 PullOperator getSetAsPullOperator()
          gets Iterator over all ResourceViews in the Set
 void subscribeToSequence(PushOperator operator)
          subscribes a PushOperator to receive all ResourceViews in the Sequence.
 void subscribeToSet(PushOperator operator)
          subscribes a PushOperator to receive all ResourceViews in the Set.
 
Methods inherited from class org.imemex.idm.DecoratedGroup
addAll, addToSet, appendToSequence, insertIntoSequence, isEmpty, removeFromSequence, removeFromSequenceAt, removeFromSet, sequenceSize, setSize, size, supportsPull, supportsPush
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptedIdentifiableGroup

public AdaptedIdentifiableGroup(Group group,
                                long dataSourceId)
Instantiates a new AdaptedIdentifiableGroup.

Parameters:
decoratedGroup - - the group component to be adapted.
Method Detail

getSetAsPullOperator

public PullOperator getSetAsPullOperator()
Description copied from interface: Group
gets Iterator over all ResourceViews in the Set

Specified by:
getSetAsPullOperator in interface Group
Overrides:
getSetAsPullOperator in class DecoratedGroup
Returns:

getSequenceAsPullOperator

public PullOperator getSequenceAsPullOperator()
Description copied from interface: Group
gets Iterator over all ResourceViews in the Sequence

Specified by:
getSequenceAsPullOperator in interface Group
Overrides:
getSequenceAsPullOperator in class DecoratedGroup
Returns:

subscribeToSet

public void subscribeToSet(PushOperator operator)
Description copied from interface: Group
subscribes a PushOperator to receive all ResourceViews in the Set. The resource views are sent in events. The stream that is sent is terminated by calling close on the operator.

Specified by:
subscribeToSet in interface Group
Overrides:
subscribeToSet in class DecoratedGroup
Parameters:
operator - - the push operator to receive the events.

subscribeToSequence

public void subscribeToSequence(PushOperator operator)
Description copied from interface: Group
subscribes a PushOperator to receive all ResourceViews in the Sequence. The resource views are sent in events. The stream that is sent is terminated by calling close on the operator.

Specified by:
subscribeToSequence in interface Group
Overrides:
subscribeToSequence in class DecoratedGroup
Parameters:
operator - - the push operator to receive the events.