Coverage Report - pt.digitalis.dif.dem.objects.parameters.IParameters
 
Classes in this File Line Coverage Branch Coverage Complexity
IParameters
N/A
N/A
1
 
 1  
 /**
 2  
  * 2007, Digitalis Informatica. All rights reserved. Distribuicao e Gestao de Informatica, Lda. Estrada de Paco de Arcos
 3  
  * num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 http://www.digitalis.pt
 4  
  */
 5  
 package pt.digitalis.dif.dem.objects.parameters;
 6  
 
 7  
 import pt.digitalis.dif.dem.interfaces.IStageInstance;
 8  
 import pt.digitalis.dif.exception.objects.ParameterException;
 9  
 
 10  
 /**
 11  
  * Defines an utility for parameter access for stages. It facilitates the access to all parameters of the stage and all
 12  
  * hierachical entities above it. Allows reading and writing of parameter values.
 13  
  * 
 14  
  * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a>
 15  
  * @created Nov 22, 2007
 16  
  */
 17  
 public interface IParameters {
 18  
 
 19  
     /**
 20  
      * Adds a new parameter to the current stage
 21  
      * 
 22  
      * @param <T>
 23  
      *            the parameter class type
 24  
      * @param parameterClass
 25  
      *            the new parameter class
 26  
      * @param parameterID
 27  
      *            the new parameter ID
 28  
      * @param parameterScope
 29  
      *            the parameter scope
 30  
      * @param defaultValue
 31  
      *            the default parameter
 32  
      * @param constraintDefinition
 33  
      * @return the newly created parameter (already added to the stage)
 34  
      * @throws ParameterException
 35  
      */
 36  
     public <T extends IParameter<?>> T addStageParameter(Class<T> parameterClass, String parameterID,
 37  
             ParameterScope parameterScope, String defaultValue, String constraintDefinition) throws ParameterException;
 38  
 
 39  
     /**
 40  
      * Retrieves all parameters. Gathers parameters for the stage, service, application and stage in a unique Map.
 41  
      * 
 42  
      * @return the parameter list
 43  
      * @throws ParameterException
 44  
      *             if there was an error refreshing the parameter values
 45  
      */
 46  
     public ParameterList getAllAvailableParameters() throws ParameterException;
 47  
 
 48  
     /**
 49  
      * Retrieves all application parameters. Without hierachical inheritance.
 50  
      * 
 51  
      * @return the parameter list
 52  
      * @throws ParameterException
 53  
      *             if there was an error refreshing the parameter values
 54  
      */
 55  
     public ParameterList getApplicationParameters() throws ParameterException;
 56  
 
 57  
     /**
 58  
      * Retrieves all provider parameters. Without hierachical inheritance.
 59  
      * 
 60  
      * @return the parameter list
 61  
      * @throws ParameterException
 62  
      *             if there was an error refreshing the parameter values
 63  
      */
 64  
     public ParameterList getProviderParameters() throws ParameterException;
 65  
 
 66  
     /**
 67  
      * Retrieves all service parameters. Without hierarchical inheritance.
 68  
      * 
 69  
      * @return the parameter list
 70  
      * @throws ParameterException
 71  
      *             if there was an error refreshing the parameter values
 72  
      */
 73  
     public ParameterList getServiceParameters() throws ParameterException;
 74  
 
 75  
     /**
 76  
      * Retrieves all stage parameters. Without hierachical inheritance.
 77  
      * 
 78  
      * @return the parameter list
 79  
      * @throws ParameterException
 80  
      *             if there was an error refreshing the parameter values
 81  
      */
 82  
     public ParameterList getStageParameters() throws ParameterException;
 83  
 
 84  
     /**
 85  
      * Initialize the parameter object, reading all parameter values from all scopes and sources
 86  
      * 
 87  
      * @param stage
 88  
      *            the stage
 89  
      */
 90  
     public void initialize(IStageInstance stage);
 91  
 }