|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Component
A representation of the model object 'Component'.
This interface is not intended to be implemented by clients.
The following features are supported:
SCAPackage.getComponent()
Field Summary | |
---|---|
static java.lang.String |
copyright
|
static int |
STATE_ABSTRACT
Indicates the Abstract state. |
static int |
STATE_IMPLEMENTED
Indicates the Implemented state. |
static int |
STATE_TYPED
Indicates the Typed state. |
static java.lang.String |
TYPE_ABSTRACT
The type string for the abstract type ("implementation.abstract"). |
Method Summary | |
---|---|
Composite |
getComposite()
|
Implementation |
getImplementation()
The Implementation is a substitution group element that will be specialized for each component type. |
java.lang.String |
getName()
Returns the value of the 'Name' attribute. |
PropertyValuesSet |
getPropertyValuesSet()
Returns the value of the 'Property Values Set' containment reference. |
java.util.List |
getReferenceValues()
|
java.util.List |
getReferenceValues(Reference reference)
|
java.util.List |
getReferenceValues(java.lang.String referenceName)
|
WireSource |
getSingleWireSource()
|
WireTarget |
getSingleWireTarget()
|
int |
getState()
|
java.lang.String |
getType()
|
WireSource |
getWireSource(Reference reference)
|
WireSource |
getWireSource(java.lang.String referenceName)
|
java.util.Collection |
getWireSourcesWiredToTarget(WireTarget wireTarget)
Return a collection of WireSource elements that have a wire to the passed wireTarget. |
WireTarget |
getWireTarget(Service service)
|
WireTarget |
getWireTarget(java.lang.String serviceName)
|
ComponentType |
resolveComponentType()
Uses the Implementation to resolve the ComponentType. |
Implementation |
setAbstractImplementation(ComponentType aComponentType)
A convenience method to set an abstract implementation type (SCAPackage.eINSTANCE.getSCACoreRoot_ImplementationAbstract()). |
void |
setName(java.lang.String value)
Sets the value of the ' Name '
attribute. |
void |
setPropertyValuesSet(PropertyValuesSet value)
Sets the value of the ' Property Values Set '
containment reference. |
void |
setReferenceValue(Reference reference,
WireTarget target)
Create a new ReferenceValue that uses the reference as the source
and the passed target to configure the target value. |
Implementation |
setSpecializedImplementation(Implementation newImplementation)
To correctly support substitution groups, the specific EMF feature for an implementation element type must be specified through a FeatureAdapter attached to the
Implementation. |
Methods inherited from interface org.eclipse.stp.core.sca.SCAObject |
---|
addStatus, clearStatus, getEObject, getFlags, getStatus |
Field Detail |
---|
static final java.lang.String TYPE_ABSTRACT
static final int STATE_ABSTRACT
AbstractImplementation
.
AbstractImplementation
,
SCAPackage.getAbstractImplementation()
,
Constant Field Valuesstatic final int STATE_TYPED
AbstractImplementation
with the type set
AbstractImplementation.getType()
.
AbstractImplementation
,
AbstractImplementation.setType(String)
,
AbstractImplementation.getType()
,
Constant Field Valuesstatic final int STATE_IMPLEMENTED
static final java.lang.String copyright
Method Detail |
---|
PropertyValuesSet getPropertyValuesSet()
If the meaning of the 'Property Values Set' containment reference isn't clear, there really should be more of a description here...
setPropertyValuesSet(PropertyValuesSet)
,
SCAPackage.getComponent_PropertyValuesSet()
void setPropertyValuesSet(PropertyValuesSet value)
Property Values Set
'
containment reference.
value
- the new value of the 'Property Values Set'
containment reference.getPropertyValuesSet()
java.lang.String getName()
If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here...
getName
in interface SCAObject
setName(String)
,
SCAPackage.getComponent_Name()
void setName(java.lang.String value)
Name
'
attribute.
setName
in interface SCAObject
value
- the new value of the 'Name' attribute.getName()
ComponentType resolveComponentType()
If the Implementation is abstract, then the ComponentType is an embedded element and cannot be shared. Otherwise, the ComponentType could be shared; the underlying implementation will determine if the ComponentType can be shared and handle it automatically.
The ComponentType can be shared in some cases. If the implementation
introspector defines an IShareableComponentTypeFactory
, then the
implementation model will be converted to URI and requested through the
ResourceSet of the Implementation that is supplied.
Therefore, resolve() should only be supplied implementations that are contained by a Component, which are contained by a ResourceSet. (The actual containment is Implementation > Component > Composite/Module > SCACoreRoot > Resource > ResourceSet).
The one special case is AbstractImplementation (SCAPackage.getAbstractImplementation()
)
which does not need to be contained to be resolved.
The feature from the implementation will be determined using the
FeatureMap of the containing Component
.
The containment requirement is to allow context for resolving a
specialized implementation. For cases where the Component or the
Implementation is not contained, use
IModelIntrospectionManager.resolve(Implementation)
to resolve an Implementation and explicitly supply the correct project as
the context.
int getState()
STATE_ABSTRACT
, STATE_TYPED
, or
STATE_IMPLEMENTED
.java.lang.String getType()
getState()
returns STATE_ABSTRACT
, the type
will be "implementation.abstract". Otherwise, the type will be the
substitution group name of the implementation.Implementation setSpecializedImplementation(Implementation newImplementation)
FeatureAdapter
attached to the
Implementation. Component Handlers or other clients should set the feature
using
FeatureAdapter.setFeature(SCAObject, EStructuralFeature)
.
For the example test, a PropertiesImplementation was created which has a
structural feature on the document root of
PropsPackage.eINSTANCE.getDocumentRoot_ImplementationProperties(). So the
correct feature to set using the FeatureAdapter for the
PropertiesImplementation EClass instances is
PropsPackage.eINSTANCE.getDocumentRoot_ImplementationProperties(). This
will ensure that when the XML document is serialized, that it uses the
substitution group element name ("implementation.properties") instead of
using the xsi:type="props:PropertiesImplementation" format.
newImplementation
- The instance of the implementation to configure this component
with.
Implementation setAbstractImplementation(ComponentType aComponentType)
aComponentType
- The component type that should be used to configure the Abstract
Implementation that will be created for this Component.
Implementation getImplementation()
Composite getComposite()
Composite
which owns this Component.void setReferenceValue(Reference reference, WireTarget target)
ReferenceValue
that uses the reference as the source
and the passed target to configure the target value.
reference
- The reference from this Configurable's type representation.target
- The endpoint that the reference should resolve toReferenceValue
,
WireSource.createWireToTarget(WireTarget)
java.util.List getReferenceValues()
ReferenceValue
objects for this component.java.util.List getReferenceValues(Reference reference)
reference
-
ReferenceValue
elements for the
passed reference. The list will contain at most one entry if the
multiplicity of the passed reference is one.java.util.List getReferenceValues(java.lang.String referenceName)
referenceName
-
ReferenceValue
elements for the
passed referenceName. The list will contain at most one entry if
the multiplicity of the passed reference is one.WireTarget getSingleWireTarget()
WireTarget
only if there is one service available on
this Component.WireTarget getWireTarget(java.lang.String serviceName)
serviceName
- The name of the service on this Configurable's abstract type
WireTarget
for the passed serviceName. The serviceName
must match the name of a service defined on the
ComponentType
otherwise null will be returned.WireTarget getWireTarget(Service service)
service
- The Service on this Configurable's abstract type
WireTarget
for the passed service. The service must be a
matching service defined on the ComponentType
otherwise
null will be returned.WireSource getWireSource(java.lang.String referenceName)
referenceName
-
WireSource
for the passed referenceName. The
referenceName must match the name of a reference defined on the
ComponentType
otherwise null will be returned.WireSource getWireSource(Reference reference)
reference
-
WireSource
for the passed reference. The reference must
be a matching reference defined on the ComponentType
otherwise null will be returned.WireSource getSingleWireSource()
WireSource
only if there is one reference available on
this Component.java.util.Collection getWireSourcesWiredToTarget(WireTarget wireTarget)
wireTarget
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |