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

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.ContractImpl
All Implemented Interfaces:
AbstractContract, Base, Extensible, OperationsConfigurator, IntentAttachPoint
Direct Known Subclasses:
AbstractReferenceImpl, AbstractServiceImpl

public class ContractImpl
extends ExtensibleImpl
implements AbstractContract

Implementation of a Contract.


Constructor Summary
protected ContractImpl()
          Constructs a new contract.
 
Method Summary
 java.util.List<ConfiguredOperation> getConfiguredOperations()
           
 InterfaceContract getInterfaceContract()
          Returns the interface contract defining the interface and callback interface for the contract.
 java.lang.String getName()
          Returns the name of the contract.
 java.util.List<Intent> getRequiredIntents()
          Returns a list of policy intents.
 IntentAttachPointType getType()
          Returns the type of the attach point such as a BindingType or an ImplementationType and so on
 boolean isCallback()
          Returns true if this contract is a reference or service created internally to handle a callback interface of another contract, false otherwise.
 void setConfiguredOperations(java.util.List<ConfiguredOperation> configuredOperations)
           
 void setInterfaceContract(InterfaceContract interfaceContract)
          Sets the interface contract defining the interface and callback interface for the contract.
 void setIsCallback(boolean isCallback)
          Sets a flag indicating whether this is a callback contract.
 void setName(java.lang.String name)
          Sets the name of the contract.
 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
 
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
clone, 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

ContractImpl

protected ContractImpl()
Constructs a new contract.

Method Detail

getName

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

Specified by:
getName in interface AbstractContract
Returns:
the name of the contract

setName

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

Specified by:
setName in interface AbstractContract
Parameters:
name - the name of the contract

getInterfaceContract

public InterfaceContract getInterfaceContract()
Description copied from interface: AbstractContract
Returns the interface contract defining the interface and callback interface for the contract.

Specified by:
getInterfaceContract in interface AbstractContract
Returns:
the interface contract

setInterfaceContract

public void setInterfaceContract(InterfaceContract interfaceContract)
Description copied from interface: AbstractContract
Sets the interface contract defining the interface and callback interface for the contract.

Specified by:
setInterfaceContract in interface AbstractContract
Parameters:
interfaceContract - the interface contract

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.

isCallback

public boolean isCallback()
Description copied from interface: AbstractContract
Returns true if this contract is a reference or service created internally to handle a callback interface of another contract, false otherwise.

Specified by:
isCallback in interface AbstractContract
Returns:
true for a callback contract, false otherwise

setIsCallback

public void setIsCallback(boolean isCallback)
Description copied from interface: AbstractContract
Sets a flag indicating whether this is a callback contract.

Specified by:
setIsCallback in interface AbstractContract
Parameters:
isCallback - true for a callback contract, false otherwise

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

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)