com.codemonster.surinam.core.model
Class ImplementationBlueprint

java.lang.Object
  extended by com.codemonster.surinam.core.model.BlueprintBase
      extended by com.codemonster.surinam.core.model.ContractBlueprint
          extended by com.codemonster.surinam.core.model.ImplementationBlueprint
All Implemented Interfaces:
Blueprint

public class ImplementationBlueprint
extends ContractBlueprint

This is the standard Blueprint for all Implementations. Note that implementations can be written by anyone (not necessarily the same entity that defines the Contract) and often are versioned.

This blueprint specifies an Implementation such as to enable the binding to a Contract that is already registered with the Service Directory. This essentially, binds a local implementation with an interface that exists at a higher level in the loader hierarchy.

Note the thing that discriminates this class from a service contract is that there is an implementation of a known Service Interface. Remember, implementations are essentially living in isolation, communicating with other services through shared interfaces that are loaded higher up in the hierarchy as to be visible to multiple implementations.


Constructor Summary
ImplementationBlueprint()
           
ImplementationBlueprint(String deploymentRoot, String implementingClass, String description, String organization, String releaseDate)
          This constructor takes all the parameters for an implementation except service bindings.
ImplementationBlueprint(String deploymentRoot, String implementingClass, String description, String organization, String releaseDate, String binding)
          This constructor takes all the parameters of the simpler version along with a list of service bindings.
 
Method Summary
 void addInjectedProperty(ServiceProperty svcProperty)
          Add a property to be injected into any new instance of an implementation.
 void addInjectedService(ServiceToFieldInjectionPair pair)
           
 void clearInjectedServiceList()
           
 List<ServiceProperty> getInjectedProperties()
           
 Iterator<ServiceToFieldInjectionPair> getInjectedServices()
           
 String getReleaseDate()
          This is a little 'syntactic sugar' since implementations have releases, not publications.
 String getServiceBinding()
           
 String getVersion()
           
 String getVersionedName()
           
 VersionedProviderImplementationName getVersionedProviderImplName()
           
 void setImplementingClass(String implementingClass)
          We override the base for this method so we can populate the versioned object.
 void setInjectedServices(List<ServiceToFieldInjectionPair> injectedServices)
           
 void setReleaseDate(String releaseDate)
          This is a little 'syntactic sugar' since implementations have releases, not publications.
 void setServiceBinding(String service)
           
 void setVersion(String version)
           
 void setVersionedProviderImplName(VersionedProviderImplementationName versionedProviderImplName)
           
 
Methods inherited from class com.codemonster.surinam.core.model.ContractBlueprint
addClasspathSegment, getClasspath, getClasspathAsArray, getPathSegments, setDefiningClass, setPathSegments
 
Methods inherited from class com.codemonster.surinam.core.model.BlueprintBase
getAuthor, getDeploymentRoot, getDescription, getImplementingClass, getOrganization, getPublicationDate, setAuthor, setDeploymentRoot, setDescription, setOrganization, setPublicationDate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplementationBlueprint

public ImplementationBlueprint()

ImplementationBlueprint

public ImplementationBlueprint(String deploymentRoot,
                               String implementingClass,
                               String description,
                               String organization,
                               String releaseDate)
                        throws MalformedURLException
This constructor takes all the parameters for an implementation except service bindings.

Parameters:
deploymentRoot - The root path that is prepended to all class paths.
implementingClass - The fq implementation class name.
description - A brief description of this implementation (taken from annotation).
organization - The organization maintaining this implementation.
releaseDate - The publication date of record as given by the organization.
Throws:
MalformedURLException - Thrown if there is a problem with the classpath.

ImplementationBlueprint

public ImplementationBlueprint(String deploymentRoot,
                               String implementingClass,
                               String description,
                               String organization,
                               String releaseDate,
                               String binding)
                        throws MalformedURLException
This constructor takes all the parameters of the simpler version along with a list of service bindings.

Parameters:
deploymentRoot - The root path that is prepended to all class paths.
implementingClass - The fq implementation class name.
description - A brief description of this implementation (taken from annotation).
organization - The organization maintaining this implementation.
releaseDate - The publication date of record as given by the organization.
binding - A list of services that this implementation is bound to.
Throws:
MalformedURLException - Thrown if there is a problem with the classpath.
Method Detail

addInjectedProperty

public void addInjectedProperty(ServiceProperty svcProperty)
Add a property to be injected into any new instance of an implementation.

Parameters:
svcProperty - The property to be injected into the service implementation.

getInjectedProperties

public List<ServiceProperty> getInjectedProperties()
Returns:
Returns the list of properties that are slated for injection into the service implementation.

setImplementingClass

public void setImplementingClass(String implementingClass)
We override the base for this method so we can populate the versioned object.

Overrides:
setImplementingClass in class BlueprintBase
Parameters:
implementingClass - the FQ name of the class that provides the implementation.

getServiceBinding

public final String getServiceBinding()

setServiceBinding

public final void setServiceBinding(String service)

addInjectedService

public final void addInjectedService(ServiceToFieldInjectionPair pair)

clearInjectedServiceList

public final void clearInjectedServiceList()

getInjectedServices

public final Iterator<ServiceToFieldInjectionPair> getInjectedServices()

setInjectedServices

public final void setInjectedServices(List<ServiceToFieldInjectionPair> injectedServices)

getReleaseDate

public final String getReleaseDate()
This is a little 'syntactic sugar' since implementations have releases, not publications.

Returns:
Returns the release date for this implementation.

setReleaseDate

public final void setReleaseDate(String releaseDate)
This is a little 'syntactic sugar' since implementations have releases, not publications.

Parameters:
releaseDate - This is the date for this release.

getVersion

public final String getVersion()

setVersion

public final void setVersion(String version)

getVersionedName

public final String getVersionedName()

getVersionedProviderImplName

public final VersionedProviderImplementationName getVersionedProviderImplName()

setVersionedProviderImplName

public final void setVersionedProviderImplName(VersionedProviderImplementationName versionedProviderImplName)


Copyright © 2010. All Rights Reserved.