org.eclipse.stp.core.sca
Interface WireSource

All Superinterfaces:
SCAObject
All Known Subinterfaces:
EntryPoint

public interface WireSource
extends SCAObject

This interface represents a source for a conceptual wire. A wire is a conceptual mapping of a source element in the model to a target element.

The SCAObject.getName() API will return the soure URI to this source.

Use the SCAObject.getFlags() method to get the flags for this target and then you can use the Flags.isBoundaryElement(int) method to determine if the target is a boundary target element. Boundary elements are EntryPoint and ExternalService elements.

You can obtain a WireSource by using APIs on Composite or Component.

If the element returns true for isComponentOwned() you may cast down to ComponentWireHandle for additional APIs.

This interface is not intended to be implemented by clients.

Since:
1.0
See Also:
WireTarget, Reference, EntryPoint, ExternalService, Composite.resolveWireSource(String), Component.getWireSource(Reference), Component.getWireSource(String)

Method Summary
 void createWireToTarget(WireTarget wireTarget)
          This method is used as a convenience to create a wire to the WireTarget that is passed.
 boolean deleteWireToTarget(WireTarget wireTarget)
          This method is used as a convenience to delete a wire to the WireTarget that is passed.
 Interface getInterface()
          Return an Interface that is assigned to this source of a wire.
 java.util.List getWiredTargets()
          This is a convenience method to return an unmodifiable list of WireTarget elements which are actually wired to this WireSource.
 boolean isComponentOwned()
          Return true if this WireSource originates from a Component.
 boolean isResolved()
          Return true if this source was resolved to an element in the SCA model.
 boolean matches(WireTarget wireTarget)
          NOT IMPLEMENTED.
 
Methods inherited from interface org.eclipse.stp.core.sca.SCAObject
addStatus, clearStatus, getEObject, getFlags, getName, getStatus, setName
 

Method Detail

getInterface

Interface getInterface()
Return an Interface that is assigned to this source of a wire.

Returns:
Interface

matches

boolean matches(WireTarget wireTarget)
NOT IMPLEMENTED.

Parameters:
wireTarget - The wireTarget to test for compatibility.
Returns:
True if and only if the Interface of the given wireTarget is compatible with this WireSource.

createWireToTarget

void createWireToTarget(WireTarget wireTarget)
This method is used as a convenience to create a wire to the WireTarget that is passed. This method will not perform any validation to ensure that the wire is valid.

Parameters:
wireTarget -

deleteWireToTarget

boolean deleteWireToTarget(WireTarget wireTarget)
This method is used as a convenience to delete a wire to the WireTarget that is passed. This method will not perform any validation to ensure that the wire is valid.

Parameters:
wireTarget - The wire target to delete from this wire source's inlined wires.
Returns:
True if the wire was deleted and false otherwise.

getWiredTargets

java.util.List getWiredTargets()
This is a convenience method to return an unmodifiable list of WireTarget elements which are actually wired to this WireSource.

Returns:
List of WireTarget

isResolved

boolean isResolved()
Return true if this source was resolved to an element in the SCA model. If false is returned you can use the SCAObject.getName() method to get the original source URI.

Returns:
boolean

isComponentOwned

boolean isComponentOwned()
Return true if this WireSource originates from a Component.

Returns:
boolean