org.figure8.join.businessfacades.artifact
Class DefaultAssemblyManager

java.lang.Object
  extended by org.figure8.join.businessfacades.artifact.DefaultAssemblyManager
All Implemented Interfaces:
AssemblyManager

public class DefaultAssemblyManager
extends java.lang.Object
implements AssemblyManager

This is the default implementation of AssemblyManager

Version:
$Revision: 1.3 $
Author:
Laurent Broudoux

Field Summary
protected  ArtifactManager artifactManager
          The ArtifactManager to use
protected  AssemblyDao assemblyDao
          Assembly data access object
protected  BuildDao buildDao
          Build data access object
protected  EventPublicationManager publicationManager
          The EventPublicationManager to use
 
Constructor Summary
DefaultAssemblyManager()
          Creates a new instance of DefaultAssemblyManager
 
Method Summary
 java.util.List getAssemblies(Release release)
          Retrieve all assemblies created for specified release
 Assembly getAssembly(java.lang.String key)
          Retrieve an Assembly using its unique key
 Build getBuild(java.lang.String key)
          Retrieve a Build using its unique key
 java.util.List getBuilds(Release release)
          Retrieve all builds created for specified release
 void saveAssembly(Assembly assembly, java.util.List deliverables)
          Save a specified assembly (indeed a save or update method)
 void saveBuild(Build build, java.util.List components, java.util.Map extractedComponents)
          Save a Build for a specified release (indeed a create or update method).
 void setArtifactManager(ArtifactManager artifactManager)
           
 void setAssemblyDao(AssemblyDao assemblyDao)
           
 void setBuildDao(BuildDao buildDao)
           
 void setEventPublicationManager(EventPublicationManager publicationManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buildDao

protected BuildDao buildDao
Build data access object


assemblyDao

protected AssemblyDao assemblyDao
Assembly data access object


artifactManager

protected ArtifactManager artifactManager
The ArtifactManager to use


publicationManager

protected EventPublicationManager publicationManager
The EventPublicationManager to use

Constructor Detail

DefaultAssemblyManager

public DefaultAssemblyManager()
Creates a new instance of DefaultAssemblyManager

Method Detail

setBuildDao

public void setBuildDao(BuildDao buildDao)
Parameters:
buildDao - A Build data access object

setAssemblyDao

public void setAssemblyDao(AssemblyDao assemblyDao)
Parameters:
assemblyDao - A Assembly data access object

setArtifactManager

public void setArtifactManager(ArtifactManager artifactManager)
Parameters:
artifactManager - The ArtifactManager implementation to use

setEventPublicationManager

public void setEventPublicationManager(EventPublicationManager publicationManager)
Parameters:
publicationManager - The EventPublicationManager implementation to use

saveAssembly

public void saveAssembly(Assembly assembly,
                         java.util.List deliverables)
                  throws DuplicateEntityException
Save a specified assembly (indeed a save or update method)

Specified by:
saveAssembly in interface AssemblyManager
Parameters:
assembly - The assembly to save within datastore
deliverables - A list of deliverables composing the assembly to create
Throws:
DuplicateEntityException - if another assembly with same deliverables already exists

getAssemblies

public java.util.List getAssemblies(Release release)
Retrieve all assemblies created for specified release

Specified by:
getAssemblies in interface AssemblyManager
Parameters:
release - The release to get assemblies for
Returns:
A list of org.figure8.join.businessobjects.artifact.Assembly objects

getAssembly

public Assembly getAssembly(java.lang.String key)
Retrieve an Assembly using its unique key

Specified by:
getAssembly in interface AssemblyManager
Parameters:
key - The unique key of assembly to retrieve
Returns:
The corresponding assembly or null if no assembly has this key

saveBuild

public void saveBuild(Build build,
                      java.util.List components,
                      java.util.Map extractedComponents)
               throws DuplicateEntityException
Save a Build for a specified release (indeed a create or update method).

Specified by:
saveBuild in interface AssemblyManager
Parameters:
build - The build to save within datastore.
components - A list of Components composing the build to create
extractedComponents - A map representing components to extract from an assembly. Key of map entry is a component type and value is the assembly to extract this component from.
Throws:
DuplicateEntityException - if another build with same component already exists

getBuilds

public java.util.List getBuilds(Release release)
Retrieve all builds created for specified release

Specified by:
getBuilds in interface AssemblyManager
Parameters:
release - The release to get builds for
Returns:
A list of org.figure8.join.businessobjects.artifact.Build objects

getBuild

public Build getBuild(java.lang.String key)
Retrieve a Build using its unique key

Specified by:
getBuild in interface AssemblyManager
Parameters:
key - The unique key of build to retrieve
Returns:
The corresponding build or null if no build has this key


Copyright © 2005-2008 Join. All Rights Reserved.