Classes | |
class | WriteXMLHandler |
Public Member Functions | |
WDALImpl (String[] args, ORB orb, POA poa, Logger logger) | |
WDAO | get_WDAO_Servant (String curl) throws CDBXMLErrorEx |
void | add_node (String curl, String xml) throws CDBRecordAlreadyExistsEx, CDBXMLErrorEx, CDBExceptionEx |
void | remove_node (String curl) throws CDBRecordDoesNotExistEx, CDBRecordIsReadOnlyEx |
void | set_DAO (String curl, String xml) throws CDBRecordDoesNotExistEx, CDBFieldDoesNotExistEx, CDBRecordIsReadOnlyEx, CDBXMLErrorEx, CDBExceptionEx |
boolean | nodeExists (String curl) |
File | getNodeFile (String curl) |
void | saveChanges (String curl, Map propertyMap) throws AcsJCDBXMLErrorEx, AcsJCDBExceptionEx, AcsJCDBFieldDoesNotExistEx |
void | validateXML (String xml) throws AcsJCDBXMLErrorEx |
Package Functions | |
DALImpl | getDALImplDelegate () |
Implementation of Writable Data Access Layer (WDAL) interface. Enables adding, removing and modifying nodes in ConfigurationDataBase (CDB). Nodes are xml files organized in directories so that directory has a xml file named exactly as directory. For example node /alma/LAMP1 is valid CDB node if there is file /alma/LAMP1/LAMP1.xml. It is implemented as wraper around DAL.
com.cosylab.cdb.jdal.WDALImpl.WDALImpl | ( | String[] | args, | |
ORB | orb, | |||
POA | poa, | |||
Logger | logger | |||
) |
Constructor as it is for DAL
args | ||
orb | ||
poa |
void com.cosylab.cdb.jdal.WDALImpl.add_node | ( | String | curl, | |
String | xml | |||
) | throws CDBRecordAlreadyExistsEx, CDBXMLErrorEx, CDBExceptionEx |
Adds a new node specified by curl to the CDB initially filed with
curl | uri for the CDB node | |
xml |
CDBRecordAlreadyExistsEx | ||
CDBXMLErrorEx | ||
CDBExceptionEx |
References com.cosylab.cdb.jdal.WDALBaseImpl.dalImpl, com.cosylab.cdb.jdal.WDALImpl.getNodeFile(), com.cosylab.cdb.jdal.WDALBaseImpl.logger, com.cosylab.cdb.jdal.WDALImpl.nodeExists(), com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter, and com.cosylab.cdb.jdal.WDALImpl.validateXML().
WDAO com.cosylab.cdb.jdal.WDALImpl.get_WDAO_Servant | ( | String | curl | ) | throws CDBXMLErrorEx |
DALImpl com.cosylab.cdb.jdal.WDALImpl.getDALImplDelegate | ( | ) | [package] |
References com.cosylab.cdb.jdal.WDALBaseImpl.dalImpl.
Referenced by com.cosylab.cdb.jdal.Server.run().
File com.cosylab.cdb.jdal.WDALImpl.getNodeFile | ( | String | curl | ) |
Returns File object for given curl
curl | uri of the CDB node |
References com.cosylab.cdb.jdal.WDALBaseImpl.dalImpl, com.cosylab.cdb.jdal.DALImpl.getRecordPath(), and com.cosylab.cdb.jdal.WDALBaseImpl.logger.
Referenced by com.cosylab.cdb.jdal.WDALImpl.add_node(), com.cosylab.cdb.jdal.WDALImpl.nodeExists(), com.cosylab.cdb.jdal.WDALImpl.remove_node(), com.cosylab.cdb.jdal.WDALImpl.saveChanges(), and com.cosylab.cdb.jdal.WDALImpl.set_DAO().
boolean com.cosylab.cdb.jdal.WDALImpl.nodeExists | ( | String | curl | ) |
Returns true if node specified with curl exists
curl | uri of the CDB node |
References com.cosylab.cdb.jdal.WDALImpl.getNodeFile().
Referenced by com.cosylab.cdb.jdal.WDALImpl.add_node(), com.cosylab.cdb.jdal.WDALImpl.remove_node(), com.cosylab.cdb.jdal.WDALImpl.saveChanges(), and com.cosylab.cdb.jdal.WDALImpl.set_DAO().
void com.cosylab.cdb.jdal.WDALImpl.remove_node | ( | String | curl | ) | throws CDBRecordDoesNotExistEx, CDBRecordIsReadOnlyEx |
Removes node identified by curl by deleting its file and directory if empty.
curl | uri for the CDB node |
CDBRecordDoesNotExistEx | ||
CDBRecordIsReadOnlyEx |
References com.cosylab.cdb.jdal.WDALBaseImpl.clear_cache(), com.cosylab.cdb.jdal.WDALBaseImpl.dalImpl, com.cosylab.cdb.jdal.WDALImpl.getNodeFile(), com.cosylab.cdb.jdal.WDALBaseImpl.logger, com.cosylab.cdb.jdal.WDALImpl.nodeExists(), and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
void com.cosylab.cdb.jdal.WDALImpl.saveChanges | ( | String | curl, | |
Map | propertyMap | |||
) | throws AcsJCDBXMLErrorEx, AcsJCDBExceptionEx, AcsJCDBFieldDoesNotExistEx |
Save changes given by map to the node identified by curl
curl | ||
propertyMap |
CDBXMLErrorEx | ||
CDBExceptionEx | ||
CDBFieldDoesNotExistEx |
References com.cosylab.cdb.jdal.WDALImpl.getNodeFile(), com.cosylab.cdb.jdal.WDALBaseImpl.logger, com.cosylab.cdb.jdal.WDALImpl.nodeExists(), and com.cosylab.cdb.jdal.WDALImpl.validateXML().
Referenced by com.cosylab.cdb.jdal.WDALImpl.set_DAO().
void com.cosylab.cdb.jdal.WDALImpl.set_DAO | ( | String | curl, | |
String | xml | |||
) | throws CDBRecordDoesNotExistEx, CDBFieldDoesNotExistEx, CDBRecordIsReadOnlyEx, CDBXMLErrorEx, CDBExceptionEx |
Change content of a node identified by curl so given xml is scanned for differences which are applied. This function can be invoked with full expanded version of the existing xml with some changes or it can be invoked by small xml with only changes to be applied. For example to change parameter 'Timeot' in Manager we can pass as xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<Manager timeout="50.0">
and new value will be saved in the xml file.
curl | uri for the CDB node | |
xml |
CDBRecordDoesNotExistEx | ||
CDBFieldDoesNotExistEx | ||
CDBRecordIsReadOnlyEx | ||
CDBXMLErrorEx | ||
CDBExceptionEx |
References com.cosylab.cdb.jdal.WDALBaseImpl.dalImpl, com.cosylab.cdb.jdal.DALImpl.get_DAO(), com.cosylab.cdb.jdal.WDALImpl.getNodeFile(), com.cosylab.cdb.jdal.WDALBaseImpl.logger, com.cosylab.cdb.jdal.XMLHandler.m_rootNode, com.cosylab.cdb.jdal.WDALImpl.nodeExists(), com.cosylab.cdb.jdal.WDALImpl.saveChanges(), and com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter.
void com.cosylab.cdb.jdal.WDALImpl.validateXML | ( | String | xml | ) | throws AcsJCDBXMLErrorEx |
Check that everything conforms to the schema in given xml. This check will be done by parser used in DAL.
xml |
AcsJCDBXMLErrorEx |
References com.cosylab.cdb.jdal.WDALBaseImpl.dalImpl, com.cosylab.cdb.jdal.DALImpl.getSaxParser(), com.cosylab.cdb.jdal.WDALBaseImpl.logger, and com.cosylab.cdb.jdal.XMLHandler.m_errorString.
Referenced by com.cosylab.cdb.jdal.WDALImpl.add_node(), and com.cosylab.cdb.jdal.WDALImpl.saveChanges().