org.eclipse.stardust.engine.core.spi.extensions.model
Class BridgeObject

java.lang.Object
  extended by org.eclipse.stardust.engine.core.spi.extensions.model.BridgeObject

public class BridgeObject
extends Object

Provides an abstraction of a dereferenced AccessPoint. Contains information about the data flow direction supported by this bridge and the type of the data.

Will be used for static type checking.

Version:
$Revision$
Author:
ubirkemeyer

Constructor Summary
BridgeObject(Class endClass, org.eclipse.stardust.common.Direction direction)
           
BridgeObject(Class endClass, org.eclipse.stardust.common.Direction direction, boolean genericType)
           
 
Method Summary
 boolean acceptAssignmentFrom(BridgeObject rhs)
          Performs a static check if this bridge is valid as a data sink for the data source represented by rhs.
static BridgeObject getBridge(AccessPoint ap, String path, org.eclipse.stardust.common.Direction direction, org.eclipse.stardust.engine.core.spi.extensions.runtime.AccessPathEvaluationContext context)
          Creates a bridge object representing the dereferenced AccessPoint.
 org.eclipse.stardust.common.Direction getDirection()
          Retrieves the data flow direction of the represented data.
 Class getEndClass()
          Retrieves the type of data supported by this bridge object.
 boolean isGenericType()
          Retrieves if this bridge object is a generic type.
static boolean isValidMapping(String context, org.eclipse.stardust.common.Direction direction, AccessPoint lhsPoint, String lhsPath, AccessPoint rhsPoint, String rhsPath, org.eclipse.stardust.engine.api.model.IActivity activity)
          Performs a static check if the two given AccessPoint dereferences are compatible regarding possible data flow from one to the other.
static boolean isValidMapping(String context, org.eclipse.stardust.common.Direction direction, String accessPointId, AccessPoint lhsPoint, String lhsPath, AccessPoint rhsPoint, String rhsPath, org.eclipse.stardust.engine.api.model.IActivity activity)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BridgeObject

public BridgeObject(Class endClass,
                    org.eclipse.stardust.common.Direction direction)

BridgeObject

public BridgeObject(Class endClass,
                    org.eclipse.stardust.common.Direction direction,
                    boolean genericType)
Method Detail

getBridge

public static BridgeObject getBridge(AccessPoint ap,
                                     String path,
                                     org.eclipse.stardust.common.Direction direction,
                                     org.eclipse.stardust.engine.core.spi.extensions.runtime.AccessPathEvaluationContext context)
Creates a bridge object representing the dereferenced AccessPoint.

Parameters:
ap - The access point to be dereferenced.
path - The path expression to be used for dereferencing. Path analysis may hint on the data flow direction of the resulting bridge.
direction - The data flow direction, either Direction.INif a LHS bridge is requested or Direction.OUTif a RHS bridge is requested.
Returns:
The bridge representing the dereference result.

getEndClass

public Class getEndClass()
Retrieves the type of data supported by this bridge object. Will be Object if no static type information is available.

Returns:
The Java type of the data supported by this bridge.

getDirection

public org.eclipse.stardust.common.Direction getDirection()
Retrieves the data flow direction of the represented data. May be Direction.IN for a data sink or Direction.OUT for a data source.

Returns:
The data flow direction of this bridge.

isGenericType

public boolean isGenericType()
Retrieves if this bridge object is a generic type.

Returns:
true if the end class or any class in the path from the source class to the end class is a generic type.

acceptAssignmentFrom

public boolean acceptAssignmentFrom(BridgeObject rhs)
Performs a static check if this bridge is valid as a data sink for the data source represented by rhs.

Basic validity requires compatible data flow directions and type compatibility (if available).

Parameters:
rhs - The data source to check compatibility against.
Returns:
true if this bridge may accept assignments from the given data source, false if not.

isValidMapping

public static boolean isValidMapping(String context,
                                     org.eclipse.stardust.common.Direction direction,
                                     AccessPoint lhsPoint,
                                     String lhsPath,
                                     AccessPoint rhsPoint,
                                     String rhsPath,
                                     org.eclipse.stardust.engine.api.model.IActivity activity)
Performs a static check if the two given AccessPoint dereferences are compatible regarding possible data flow from one to the other.

Parameters:
direction - The data flow direction.
lhsPoint - The left access point.
lhsPath - The left access point's dereference.
rhsPoint - The right access point.
rhsPath - The right access point's dereference.
Returns:
true if the two dereferences are compatible, false if not.
See Also:
acceptAssignmentFrom(org.eclipse.stardust.engine.core.spi.extensions.model.BridgeObject)

isValidMapping

public static boolean isValidMapping(String context,
                                     org.eclipse.stardust.common.Direction direction,
                                     String accessPointId,
                                     AccessPoint lhsPoint,
                                     String lhsPath,
                                     AccessPoint rhsPoint,
                                     String rhsPath,
                                     org.eclipse.stardust.engine.api.model.IActivity activity)


Copyright © 2017 Eclipse Stardust. All Rights Reserved.