1 /**
2 * - Digitalis Internal Framework v2.0 -
3 *
4 * (C) 2007, Digitalis Informatica.
5 *
6 * Distribuicao e Gestao de Informatica, Lda.
7 * Estrada de Paco de Arcos num.9 - Piso -1
8 * 2780-666 Paco de Arcos
9 * Telefone: (351) 21 4408990
10 * Fax: (351) 21 4408999
11 * http://www.digitalis.pt
12 */
13 package pt.digitalis.dif.dem.managers;
14
15 import pt.digitalis.dif.dem.Entity;
16 import pt.digitalis.dif.dem.interfaces.IApplication;
17 import pt.digitalis.dif.dem.interfaces.IProvider;
18 import pt.digitalis.dif.dem.interfaces.IService;
19 import pt.digitalis.dif.dem.interfaces.IStage;
20 import pt.digitalis.dif.dem.objects.parameters.IParameter;
21 import pt.digitalis.dif.dem.objects.parameters.ParameterList;
22
23 /**
24 * Manages the DEM parameters, providing operations for access, pooling and persistence.
25 *
26 * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a>
27 * @author Rodrigo Gonçalves <a href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a>
28 * @created 2007/06/01
29 *
30 */
31 public interface IParameterManager {
32
33 /**
34 * Return a parameter for the given entity
35 *
36 * @param entityType
37 * the type of the entity
38 * @param entityID
39 * the id of the entity
40 * @param parameterID
41 * the id of the parameter
42 * @return the parameter object if found
43 */
44 public IParameter<?> getParameter(Entity entityType, String entityID, String parameterID);
45
46 /**
47 * Returns an IParameter implementation for the given class
48 *
49 * @param typeClassName
50 * the class name to check
51 * @return an instance of IParameter
52 */
53 public IParameter<?> getParameterInstanceForType(String typeClassName);
54
55 /**
56 * Return the parameters for the given entity
57 *
58 * @param entityType
59 * the type of the entity
60 * @param entityID
61 * the id of the entity
62 * @return the parameter list if found
63 */
64 public ParameterList getParameters(Entity entityType, String entityID);
65
66 /**
67 * Gets the parameters of a given Application.
68 *
69 * @param application
70 * the application for which the parameters should be retrieved
71 * @return the application parameters
72 */
73 public ParameterList getParameters(IApplication application);
74
75 /**
76 * Gets the parameters of a given Provider.
77 *
78 * @param provider
79 * the provider for which the parameters should be retrieved
80 * @return the provider parameters
81 */
82 public ParameterList getParameters(IProvider provider);
83
84 /**
85 * Gets the parameters of a given Service.
86 *
87 * @param service
88 * the service for which the parameters should be retrieved
89 * @return the service parameters
90 */
91 public ParameterList getParameters(IService service);
92
93 /**
94 * Gets the parameters of a given Stage.
95 *
96 * @param stage
97 * the stage for which the parameters should be retrieved
98 * @return the stage parameters
99 */
100 public ParameterList getParameters(IStage stage);
101
102 /**
103 * Checks if the given className is a supported parameter type
104 *
105 * @param typeClassName
106 * the class name to check
107 * @return T is the class is supported
108 */
109 public boolean isParameterTypeSupported(String typeClassName);
110
111 /**
112 * Registers an entity parameter
113 *
114 * @param parameter
115 * the parameter to register
116 */
117 public void registerParameter(IParameter<?> parameter);
118 }