org.figure8.join.businessfacades.environment
Class DefaultParameterManager

java.lang.Object
  extended by org.figure8.join.businessfacades.environment.DefaultParameterManager
All Implemented Interfaces:
ParameterManager

public class DefaultParameterManager
extends java.lang.Object
implements ParameterManager

This is the default implementation of ParameterManager.

Version:
$Revision: 1.4 $
Author:
Jerome Evrard, Laurent Broudoux

Constructor Summary
DefaultParameterManager()
          Creates a new instance of DefaultParameterManager
 
Method Summary
 java.util.List getAllParameters()
          Search all the parameter instances.
 Parameter getParameter(java.lang.String name)
          Get a parameter by its name.
 ParameterValue getParameterValue(long id)
          Retrieve the ParameterValue having this unique identifier
 java.util.List getParameterValues(java.lang.String environmentKey, java.lang.String targetName)
          Retrieve the list of current parameter values for a given environment and a given target.
 void removeParameter(Parameter parameter)
          Remove a parameter.
 void removeParameterValue(ParameterValue value)
          Remove a parameter value.
 java.util.List renderParameterValues(java.lang.String environmentKey, java.lang.String targetName)
          Retrieve and render the list of current parameter values for a given environment and a given target.
 void saveParameter(Parameter parameter)
          Save a parameter within datastore.
 void saveParameterValue(ParameterValue value)
          Save a parameter value wrapper within datastore.
 void setParameterDao(ParameterDao dao)
           
 void setParameterValueDao(ParameterValueDao dao)
           
 void setPhysicalEnvironmentDao(PhysicalEnvironmentDao dao)
           
 void setPropertiesExtractor(PropertiesExtractor extractor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultParameterManager

public DefaultParameterManager()
Creates a new instance of DefaultParameterManager

Method Detail

setParameterDao

public void setParameterDao(ParameterDao dao)
Parameters:
dao - A Parameter data access object

setParameterValueDao

public void setParameterValueDao(ParameterValueDao dao)
Parameters:
dao - A ParameterValue data access object

setPhysicalEnvironmentDao

public void setPhysicalEnvironmentDao(PhysicalEnvironmentDao dao)
Parameters:
dao - A PysicalEnvironment data access object

setPropertiesExtractor

public void setPropertiesExtractor(PropertiesExtractor extractor)
Parameters:
extractor - The PropertiesExtractor implementation to use

saveParameter

public void saveParameter(Parameter parameter)
Save a parameter within datastore.

Specified by:
saveParameter in interface ParameterManager
Parameters:
parameter - The parameter to save

getParameter

public Parameter getParameter(java.lang.String name)
Get a parameter by its name.

Specified by:
getParameter in interface ParameterManager
Parameters:
name - The parameter name to get
Returns:
The parameter instance or null

getAllParameters

public java.util.List getAllParameters()
Search all the parameter instances.

Specified by:
getAllParameters in interface ParameterManager
Returns:
A list of Parameter

removeParameter

public void removeParameter(Parameter parameter)
Remove a parameter.

Specified by:
removeParameter in interface ParameterManager
Parameters:
parameter - The parameter to remove.

saveParameterValue

public void saveParameterValue(ParameterValue value)
Save a parameter value wrapper within datastore.

Specified by:
saveParameterValue in interface ParameterManager
Parameters:
value - The parameter value to save

getParameterValues

public java.util.List getParameterValues(java.lang.String environmentKey,
                                         java.lang.String targetName)
Retrieve the list of current parameter values for a given environment and a given target.

Specified by:
getParameterValues in interface ParameterManager
Parameters:
environmentKey - The key of the physical environment to retrieve values for
targetName - The name of the deployment target to retrieve values for
Returns:
A list of org.figure8.join.businessobjects.environment.ParameterValue

renderParameterValues

public java.util.List renderParameterValues(java.lang.String environmentKey,
                                            java.lang.String targetName)
Retrieve and render the list of current parameter values for a given environment and a given target. Rendering consist in tranforming values expressed with meta-language.

Specified by:
renderParameterValues in interface ParameterManager
Parameters:
environmentKey - The key of the physical environment to retrieve values for
targetName - The name of the deployment target to retrieve values for
Returns:
A list of org.figure8.join.businessobjects.environment.ParameterValue

getParameterValue

public ParameterValue getParameterValue(long id)
Retrieve the ParameterValue having this unique identifier

Specified by:
getParameterValue in interface ParameterManager
Parameters:
id - The unique identifier of value ot retrieve
Returns:
The ParameterValue having this identifier or null if no one matches

removeParameterValue

public void removeParameterValue(ParameterValue value)
Remove a parameter value.

Specified by:
removeParameterValue in interface ParameterManager
Parameters:
value - The parameter value to remove.


Copyright © 2005-2008 Join. All Rights Reserved.