Salome HOME
NRI : Check if a component-username is already associated with a component-name.
[modules/kernel.git] / idl / SALOME_ModuleCatalog.idl
1 // File: SALOME_ModuleCatalog.idl
2 // Created: Tue June 25 2001
3 // Author: Estelle Deville
4 // Project: SALOME
5 // Copyright : CEA/DEN/DMSS/LGLS
6 // $Header$
7
8 /*! \file SALOME_ModuleCatalog.idl This file conatins a set of interfaces used for  
9   creation of the catalog of components in %SALOME application
10 */
11
12 /*! \ingroup Kernel 
13 The main package of interfaces used for creation of the module catalog in %SALOME application.
14 */
15 module SALOME_ModuleCatalog
16 {
17   // Type Definitions
18 /*! 
19 This enumeration contains a set of definitions of %SALOME modules.
20 */
21   enum ComponentType {  GEOM,  /*!<Module %GEOM */
22                         MESH,  /*!<Module %MESH */
23                          Med,  /*!<Module %Med*/
24                       SOLVER,  /*!<Module of %SOLVER type */
25                         DATA,  /*!<Module %DATA */
26                         VISU,  /*!<Module %VISU */
27                       SUPERV,  /*!<Module %SUPERVISION */
28                        OTHER   /*!<Any other type of module */
29                      } ;
30 /*! 
31 This struct contains fields defining the parameters of the services.
32 */
33
34   struct ServicesParameter
35   {
36     string Parametertype; /*!<Type of the parameter.*/
37     string Parametername; /*!<Name of the parameter.*/
38   } ;
39
40   typedef sequence<ServicesParameter> ListOfServicesParameter;
41 /*! 
42 This struct contains fields completely defining each service.
43 */
44
45   struct Service
46   {
47     string                  ServiceName; /*!<Name of the service.*/
48     ListOfServicesParameter ServiceinParameter; /*!< List of input parameters of the services.*/
49     ListOfServicesParameter ServiceoutParameter; /*!< List of input parameters of the services.*/
50     boolean                 Servicebydefault; /*!<True if the service is taken with its defult fields.*/
51   } ;
52 /*! 
53 List of services of the interface.
54 */
55   typedef sequence<Service> ListOfInterfaceService;
56 /*! 
57 List of services.
58 */
59   typedef sequence<string> ListOfServices ;
60 /*! 
61 This struct contains fields defining each interface.
62 */
63   struct DefinitionInterface
64   {
65     string                 interfacename ; /*!<Name of the interface.*/
66     ListOfInterfaceService interfaceservicelist ; /*!<List of services of the interface.*/
67   } ;
68 /*! 
69 List of interface definitions.
70 */
71   typedef sequence<DefinitionInterface> ListOfDefInterface ;
72 /*! 
73 List of interfaces.
74 */
75   typedef sequence<string> ListOfInterfaces ;
76 /*! 
77 List of names of components.
78 */
79   typedef sequence<string> ListOfComponents ;
80 /*! 
81 List of names of computers.
82 */
83   typedef sequence<string> ListOfComputers ;
84 /*! 
85 This struct contains GUI elements used for representation of the module in %IAPP component.
86 */
87   struct IAPP_Affich
88   {
89     string modulename; /*!<Name of the module.*/
90     string moduleusername; /*!<UserName of the module.*/
91     string moduleicone; /*!<Icone representing the module.*/
92   };
93 /*!
94 List of pair GUI elements (component name, component icone)
95  used for representation of the module in %IAPP component.
96 */
97   typedef sequence<IAPP_Affich> ListOfIAPP_Affich ;
98
99 /*! 
100  This exception is raised when a %component, a %service or a % pathPrefix is not found.
101 */
102   exception NotFound
103   {
104     string what ; /*!<Indicates if it's a %component, a %service or a % pathPrefix.*/
105   } ;
106
107   interface Acomponent
108   {
109     // GetInterfaceList : operation to get a list of the interfaces name of
110     //                    a component
111   /*!
112    Gets a list of names of interfaces of the component
113     \return a list of interfaces of the component 
114   */
115     ListOfInterfaces GetInterfaceList() ;
116
117     // GetInterface : operation to get one interface of a component
118   
119   /*! 
120     Gets a definite interface of the component
121     \note <BR>If the specified interface doesn't exist, Notfound exception is thrown
122     \param interfacename  Name of the interface 
123     \return Required interface
124   */
125     DefinitionInterface GetInterface(in string interfacename) raises(NotFound);
126
127     // GetServiceList : operation to get a list of the services name of
128     //                  an interface of a component
129  /*! 
130    Gets a list of names of services of a definite interface belonging to the component.
131    \note <BR>If the specified interface doesn't exist, Notfound exception is thrown.
132    \param interfacename Name of the interface 
133    \return List of services of the required interface
134  */
135     ListOfServices GetServiceList(in string interfacename) raises(NotFound);
136
137     
138     // GetService : operation to get one service of an interface of a component
139   
140  /*! 
141    Gets a definite service of an interface of the component.
142    \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
143    \param interfacename Name of the interface
144    \param servicename Name of the service
145    \return Required service
146  */
147
148     Service GetService(in string interfacename, 
149                        in string servicename) raises(NotFound);
150
151     // GetDefaultService : operation to get the default service
152     //                     of an interface of a component
153 /*! 
154    Gets the default service of an interface of the component.
155    \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
156    \param interfacename Name of the interface
157    \return Required service
158  */
159
160     Service GetDefaultService(in string interfacename) raises(NotFound);
161
162     // GetPathPrefix : operation to get the PathPrefix of a computer
163  /*!  
164    Gets the prefix path of the computer containing the %component.
165    \note <BR>If the required computer doesn't exist, Notfound exception is thrown
166    \param machinename Name of the machine 
167    \return Prefix path
168  */
169
170     string GetPathPrefix(in string machinename) raises(NotFound);
171
172 /*! 
173     Sets/gets the constraint affected to the component 
174     (to be resolved by LifeCycle for the computer choice)
175 */
176     readonly attribute string constraint ;
177
178 /*! 
179 Sets/gets the name of the component
180 */
181     readonly attribute string componentname;
182
183 /*! 
184 Sets/gets the user name of the component
185 */
186     readonly attribute string componentusername;
187
188 /*! 
189 Defines whether the component can be multistudy or not
190 */
191     readonly attribute boolean multistudy;
192
193 /*! 
194 Defines the type of the component
195 */
196     readonly attribute ComponentType component_type ;
197
198 /*! 
199 Sets/gets the icone of the component (for IAPP)
200 */
201     readonly attribute string component_icone;
202   } ;
203 /*! \brief %Module catalog interface
204
205 This interface is used for creation of the module catalog in %SALOME application.
206 */
207   interface ModuleCatalog
208   {
209     void ping();
210
211 /*! 
212  Gets a list of names of computers of the catalog 
213 */   
214     ListOfComputers GetComputerList();
215
216 /*! 
217 Gets the %PathPrefix of a computer
218 */
219     string GetPathPrefix(in string machinename) raises(NotFound);
220 /*! 
221  Gets a list of names of components of the catalog 
222 */   
223     ListOfComponents GetComponentList();
224 /*! 
225 Gets a list of pair GUI elements (component name, component icone) 
226 used for representation of the module in %IAPP component.
227 */
228
229     ListOfIAPP_Affich GetComponentIconeList();
230 /*! 
231 Gets a list of names of components of a particular type, which belong to this catalog.
232 */  
233     // GetComponentList : operation to get a list of the components name of
234     //                    a particular type of the catalog   
235     ListOfComponents GetTypedComponentList(in ComponentType _component_type);
236
237 /*! 
238 Gets one component of the catalog.
239 */
240     Acomponent GetComponent(in string componentname) raises(NotFound);
241   } ;
242 };