Package org.eso.ias.cdb
Interface CdbReader
- All Known Implementing Classes:
RdbReader
,StructuredTextReader
public interface CdbReader
Interface to read data from the configuration database.
All get methods return an
Optional
that is empty if the data to read was not found in the CDB.
They throw an exception in case of error.
Life cycle:
init()
must be called before reading data from the CDB, to get the resourcesshutdown()
must be invoked when te CDB reader is not needed anymore, to free the allocated resources
- Author:
- acaproni
-
Method Summary
Modifier and TypeMethodDescriptionRead the ASCE configuration from the CDB.Get the IDs of the ASCEs.Return the ASCEs belonging to the given DASU.Get the configuration of the client with the passed identifier.Read the DASU configuration from the CDB.Get the IDs of the DASUs.Return the DASUs to deploy in the Supervisor with the given identifiergetIas()
Get the Ias configuration from a CDB.Get the IASIO with the given IDGet the IASIOs.Return the IASIOs in input to the given ASCE.Get the configuration of the plugin with the passed identifier.getSupervisor
(String id) Read the supervisor configuration from the CDB.Get the IDs of the Supervisors.getTemplate
(String template_id) Read the ttemplate configuration from the CDB.Return the templated IASIOs in input to the given ASCE.Get the templates.getTransferFunction
(String tf_id) Read the transfer function configuration from the CDB.Get the transfer functions.void
init()
Initialize the CDBvoid
shutdown()
Close the CDB and release the associated resources
-
Method Details
-
getIas
Get the Ias configuration from a CDB.- Returns:
- The ias configuration read from the CDB
- Throws:
IasCdbException
- In case of error getting the IAS
-
getIasios
Get the IASIOs.- Returns:
- The IASIOs read from the CDB
- Throws:
IasCdbException
- In case of error getting the IASIOs
-
getIasio
Get the IASIO with the given ID- Parameters:
id
- The ID of the IASIO to read the configuration- Returns:
- The IASIO read from the CDB
- Throws:
IasCdbException
- In case of error getting the IASIO
-
getSupervisor
Read the supervisor configuration from the CDB.- Parameters:
id
- The not null nor empty supervisor identifier- Returns:
- The Supervisor read from the CDB
- Throws:
IasCdbException
- In case of error getting the Supervisor
-
getTransferFunction
Read the transfer function configuration from the CDB.- Parameters:
tf_id
- The notnull
nor empty transfer function identifier- Returns:
- The transfer function read from the CDB
- Throws:
IasCdbException
- in case of error reading from the CDB
-
getTransferFunctions
Get the transfer functions.- Returns:
- The transfer functions read from the CDB
- Throws:
IasCdbException
- In case of error getting the transfer functions
-
getTemplate
Read the ttemplate configuration from the CDB.- Parameters:
template_id
- The notnull
nor empty identifier of the template- Returns:
- The template read from the CDB
- Throws:
IasCdbException
- in case of error reading from the CDB
-
getTemplates
Get the templates.- Returns:
- The templates read from the CDB
- Throws:
IasCdbException
- In case of error getting the templates
-
getAsce
Read the ASCE configuration from the CDB.- Parameters:
id
- The not null nor empty ASCE identifier- Returns:
- The ASCE read from the file
- Throws:
IasCdbException
- In case of error getting the ASCE
-
getDasu
Read the DASU configuration from the CDB.- Parameters:
id
- The not null nor empty DASU identifier- Returns:
- The DASU read from the file
- Throws:
IasCdbException
- In case of error getting the DASU
-
getDasusToDeployInSupervisor
Return the DASUs to deploy in the Supervisor with the given identifier- Parameters:
id
- The notnull
nor empty identifier of the supervisor- Returns:
- A set of DASUs to deploy in the supervisor with the passed id
- Throws:
IasCdbException
- in case of error reading CDB or if the supervisor with the give identifier does not exist
-
getAscesForDasu
Return the ASCEs belonging to the given DASU.- Parameters:
id
- The notnull
nor empty identifier of the DASU- Returns:
- A set of ASCEs running in the DASU with the passed id
- Throws:
IasCdbException
- in case of error reading CDB or if the DASU with the give identifier does not exist
-
getIasiosForAsce
Return the IASIOs in input to the given ASCE.- Parameters:
id
- The notnull
nor empty identifier of the ASCE- Returns:
- A set of IASIOs in input to the ASCE
- Throws:
IasCdbException
- in case of error reading CDB or if the ASCE with the give identifier does not exist
-
getSupervisorIds
Get the IDs of the Supervisors. This method is useful to deploy the supervisors- Returns:
- The the IDs of the supervisors read from the CDB
- Throws:
IasCdbException
- In case of error getting the IDs of the supervisors
-
getDasuIds
Get the IDs of the DASUs.- Returns:
- The IDs of the DASUs read from the CDB
- Throws:
IasCdbException
- In case of error getting the IDs of the DASUs
-
getAsceIds
Get the IDs of the ASCEs.- Returns:
- The IDs of the ASCEs read from the CDB
- Throws:
IasCdbException
- In case of error getting the IDs of the ASCEs
-
getTemplateInstancesIasiosForAsce
Collection<TemplateInstanceIasioDao> getTemplateInstancesIasiosForAsce(String id) throws IasCdbException Return the templated IASIOs in input to the given ASCE. These inputs are the one generated by a different template than that of the ASCE (@see #124)- Parameters:
id
- The notnull
nor empty identifier of the ASCE- Returns:
- A set of template instance of IASIOs in input to the ASCE
- Throws:
IasCdbException
- in case of error reading CDB or if the ASCE with the give identifier does not exist
-
getClientConfig
Get the configuration of the client with the passed identifier. The configuration is passed as a string whose format depends on the client implementation.- Parameters:
id
- The not null nor empty ID of the IAS client- Returns:
- The configuration of the client
- Throws:
IasCdbException
- In case of error getting the configuration of the client
-
getPlugin
Get the configuration of the plugin with the passed identifier. The configuration of the plugin can be read from a file or from the CDB. In both cases, the configuration is returned as #PluginConfigDao. This m,ethod returns the configuration from the CDB; reading from file is not implemented here.- Parameters:
id
- The not null nor empty ID of the IAS plugin- Returns:
- The configuration of the plugin
- Throws:
IasCdbException
- In case of error getting the configuration of the plugin
-
getPluginIds
- Returns:
- The IDs of all the plugins in the CDB
- Throws:
IasCdbException
- In case of error getting the IDs of the plugins
-
getClientIds
- Returns:
- The IDs of all the plugins in the CDB
- Throws:
IasCdbException
- In case of error getting the IDs of the clients
-
init
Initialize the CDB- Throws:
IasCdbException
-
shutdown
Close the CDB and release the associated resources- Throws:
IasCdbException
-