pt.digitalis.dif.dem.objects.parameters
Class ParametersImpl

java.lang.Object
  extended by pt.digitalis.dif.dem.objects.parameters.ParametersImpl
All Implemented Interfaces:
IParameters

public class ParametersImpl
extends Object
implements IParameters

IParameters default implementation

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
Nov 22, 2007

Constructor Summary
ParametersImpl()
           
 
Method Summary
<T extends IParameter<?>>
T
addStageParameter(Class<T> parameterClass, String parameterID, ParameterScope parameterScope, String defaultValue, String constraintDefinition)
          Adds a new parameter to the current stage
 ParameterList getAllAvailableParameters()
          Retrieves all parameters.
 ParameterList getApplicationParameters()
          Retrieves all application parameters.
 ParameterList getProviderParameters()
          Retrieves all provider parameters.
 ParameterList getServiceParameters()
          Retrieves all service parameters.
 ParameterList getStageParameters()
          Retrieves all stage parameters.
 void initialize(IStageInstance stage)
          Initialize the parameter object, reading all parameter values from all scopes and sources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParametersImpl

public ParametersImpl()
Method Detail

addStageParameter

public <T extends IParameter<?>> T addStageParameter(Class<T> parameterClass,
                                                     String parameterID,
                                                     ParameterScope parameterScope,
                                                     String defaultValue,
                                                     String constraintDefinition)
                                          throws ParameterException
Description copied from interface: IParameters
Adds a new parameter to the current stage

Specified by:
addStageParameter in interface IParameters
Type Parameters:
T - the parameter class type
Parameters:
parameterClass - the new parameter class
parameterID - the new parameter ID
parameterScope - the parameter scope
defaultValue - the default parameter
Returns:
the newly created parameter (already added to the stage)
Throws:
ParameterException
See Also:
IParameters.addStageParameter(java.lang.Class, java.lang.String, pt.digitalis.dif.dem.objects.parameters.ParameterScope, java.lang.String, java.lang.String)

getAllAvailableParameters

public ParameterList getAllAvailableParameters()
                                        throws ParameterException
Description copied from interface: IParameters
Retrieves all parameters. Gathers parameters for the stage, service, application and stage in a unique Map.

Specified by:
getAllAvailableParameters in interface IParameters
Returns:
the parameter list
Throws:
ParameterException - if there was an error refreshing the parameter values
See Also:
IParameters.getAllAvailableParameters()

getApplicationParameters

public ParameterList getApplicationParameters()
                                       throws ParameterException
Description copied from interface: IParameters
Retrieves all application parameters. Without hierachical inheritance.

Specified by:
getApplicationParameters in interface IParameters
Returns:
the parameter list
Throws:
ParameterException - if there was an error refreshing the parameter values
See Also:
IParameters.getApplicationParameters()

getProviderParameters

public ParameterList getProviderParameters()
                                    throws ParameterException
Description copied from interface: IParameters
Retrieves all provider parameters. Without hierachical inheritance.

Specified by:
getProviderParameters in interface IParameters
Returns:
the parameter list
Throws:
ParameterException - if there was an error refreshing the parameter values
See Also:
IParameters.getProviderParameters()

getServiceParameters

public ParameterList getServiceParameters()
                                   throws ParameterException
Description copied from interface: IParameters
Retrieves all service parameters. Without hierarchical inheritance.

Specified by:
getServiceParameters in interface IParameters
Returns:
the parameter list
Throws:
ParameterException - if there was an error refreshing the parameter values
See Also:
IParameters.getServiceParameters()

getStageParameters

public ParameterList getStageParameters()
                                 throws ParameterException
Description copied from interface: IParameters
Retrieves all stage parameters. Without hierachical inheritance.

Specified by:
getStageParameters in interface IParameters
Returns:
the parameter list
Throws:
ParameterException - if there was an error refreshing the parameter values
See Also:
IParameters.getStageParameters()

initialize

public void initialize(IStageInstance stage)
Description copied from interface: IParameters
Initialize the parameter object, reading all parameter values from all scopes and sources

Specified by:
initialize in interface IParameters
Parameters:
stage - the stage
See Also:
IParameters.initialize(pt.digitalis.dif.dem.interfaces.IStageInstance)


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.