org.apache.tuscany.sca.assembly.impl
Class ComponentImpl

java.lang.Object
  extended by org.apache.tuscany.sca.assembly.impl.BaseImpl
      extended by org.apache.tuscany.sca.assembly.impl.ExtensibleImpl
          extended by org.apache.tuscany.sca.assembly.impl.ComponentImpl
All Implemented Interfaces:
java.lang.Cloneable, Base, Component, Extensible, OperationsConfigurator, IntentAttachPoint, PolicySetAttachPoint
Direct Known Subclasses:
RuntimeComponentImpl

public class ComponentImpl
extends ExtensibleImpl
implements Component, java.lang.Cloneable, OperationsConfigurator

Represents a component.


Constructor Summary
protected ComponentImpl()
          Constructs a new component.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the component.
 java.util.List<PolicySet> getApplicablePolicySets()
          Returns a list of policy sets defined in the domain, that are applicable to this PolicySetAttachPoint.
 java.lang.Boolean getAutowire()
          Return the Boolean value of autowire
 java.util.List<ConfiguredOperation> getConfiguredOperations()
           
 ConstrainingType getConstrainingType()
          Returns a constraining type defining the shape of the component.
 Implementation getImplementation()
          Returns the component implementation.
 java.lang.String getName()
          Returns the name of the component.
 java.util.List<PolicySet> getPolicySets()
          Returns a list of policy sets.
 java.util.List<ComponentProperty> getProperties()
          Returns a list of properties for the component.
 java.util.List<ComponentReference> getReferences()
          Returns a list of references used by the component.
 java.util.List<Intent> getRequiredIntents()
          Returns a list of policy intents.
 java.util.List<ComponentService> getServices()
          Returns a list of services exposed by the component.
 IntentAttachPointType getType()
          Returns the type of the attach point such as a BindingType or an ImplementationType and so on
 java.lang.String getURI()
          Returns the URI of the component.
 boolean isAutowire()
           
 void setAutowire(java.lang.Boolean autowire)
          Sets whether component references should be autowired.
 void setConfiguredOperations(java.util.List<ConfiguredOperation> configuredOperations)
           
 void setConstrainingType(ConstrainingType constrainingType)
          Sets a constraining type defining the shape of the component.
 void setImplementation(Implementation implementation)
          Sets the component implementation
 void setName(java.lang.String name)
          Sets the name of the component.
 void setPolicySets(java.util.List<PolicySet> policySets)
           
 void setRequiredIntents(java.util.List<Intent> intents)
           
 void setType(IntentAttachPointType type)
          Sets the type of the attach point such as a BindingType or an ImplementationType and so on
 void setURI(java.lang.String uri)
          Sets the URI of the component.
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ExtensibleImpl
getExtensions
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.BaseImpl
isUnresolved, setUnresolved
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Base
isUnresolved, setUnresolved
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Extensible
getExtensions
 

Constructor Detail

ComponentImpl

protected ComponentImpl()
Constructs a new component.

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: Component
Returns a clone of the component.

Specified by:
clone in interface Component
Overrides:
clone in class java.lang.Object
Returns:
a clone of the component
Throws:
java.lang.CloneNotSupportedException

getURI

public java.lang.String getURI()
Description copied from interface: Component
Returns the URI of the component.

Specified by:
getURI in interface Component
Returns:
the URI of the component

setURI

public void setURI(java.lang.String uri)
Description copied from interface: Component
Sets the URI of the component.

Specified by:
setURI in interface Component
Parameters:
uri - the URI of the component

getConstrainingType

public ConstrainingType getConstrainingType()
Description copied from interface: Component
Returns a constraining type defining the shape of the component.

Specified by:
getConstrainingType in interface Component
Returns:
a constraining type

getImplementation

public Implementation getImplementation()
Description copied from interface: Component
Returns the component implementation.

Specified by:
getImplementation in interface Component
Returns:
the component implementation

getName

public java.lang.String getName()
Description copied from interface: Component
Returns the name of the component.

Specified by:
getName in interface Component
Returns:
the name of the component

getProperties

public java.util.List<ComponentProperty> getProperties()
Description copied from interface: Component
Returns a list of properties for the component.

Specified by:
getProperties in interface Component
Returns:
a list of properties

getReferences

public java.util.List<ComponentReference> getReferences()
Description copied from interface: Component
Returns a list of references used by the component.

Specified by:
getReferences in interface Component
Returns:
a list of references used by the component

getServices

public java.util.List<ComponentService> getServices()
Description copied from interface: Component
Returns a list of services exposed by the component.

Specified by:
getServices in interface Component
Returns:
a list of services exposed by the component

setConstrainingType

public void setConstrainingType(ConstrainingType constrainingType)
Description copied from interface: Component
Sets a constraining type defining the shape of the component.

Specified by:
setConstrainingType in interface Component
Parameters:
constrainingType - the constraining type

setImplementation

public void setImplementation(Implementation implementation)
Description copied from interface: Component
Sets the component implementation

Specified by:
setImplementation in interface Component
Parameters:
implementation - the component implementation

setName

public void setName(java.lang.String name)
Description copied from interface: Component
Sets the name of the component.

Specified by:
setName in interface Component
Parameters:
name - the name of the component

getRequiredIntents

public java.util.List<Intent> getRequiredIntents()
Description copied from interface: IntentAttachPoint
Returns a list of policy intents. See the Policy Framework specification for a description of this attribute.

Specified by:
getRequiredIntents in interface IntentAttachPoint
Returns:
a list of policy intents.

getPolicySets

public java.util.List<PolicySet> getPolicySets()
Description copied from interface: PolicySetAttachPoint
Returns a list of policy sets. See the Policy Framework specification for a description of this attribute.

Specified by:
getPolicySets in interface PolicySetAttachPoint
Returns:
a list of policy sets.

isAutowire

public boolean isAutowire()

setAutowire

public void setAutowire(java.lang.Boolean autowire)
Description copied from interface: Component
Sets whether component references should be autowired.

Specified by:
setAutowire in interface Component
Parameters:
autowire - whether component references should be autowired

getAutowire

public java.lang.Boolean getAutowire()
Description copied from interface: Component
Return the Boolean value of autowire

Specified by:
getAutowire in interface Component
Returns:
null/TRUE/FALSE

getType

public IntentAttachPointType getType()
Description copied from interface: IntentAttachPoint
Returns the type of the attach point such as a BindingType or an ImplementationType and so on

Specified by:
getType in interface IntentAttachPoint
Returns:

setType

public void setType(IntentAttachPointType type)
Description copied from interface: IntentAttachPoint
Sets the type of the attach point such as a BindingType or an ImplementationType and so on

Specified by:
setType in interface IntentAttachPoint

setPolicySets

public void setPolicySets(java.util.List<PolicySet> policySets)

setRequiredIntents

public void setRequiredIntents(java.util.List<Intent> intents)

getConfiguredOperations

public java.util.List<ConfiguredOperation> getConfiguredOperations()
Specified by:
getConfiguredOperations in interface OperationsConfigurator

setConfiguredOperations

public void setConfiguredOperations(java.util.List<ConfiguredOperation> configuredOperations)

getApplicablePolicySets

public java.util.List<PolicySet> getApplicablePolicySets()
Description copied from interface: PolicySetAttachPoint
Returns a list of policy sets defined in the domain, that are applicable to this PolicySetAttachPoint. An applicable PolicySet is one that include this PolicySetAttachPoint as part of its 'appliesTo' XPath attribute.

Specified by:
getApplicablePolicySets in interface PolicySetAttachPoint
Returns:
a list of policy sets applicable to this PolicySetAttachPoint