Classes | Public Member Functions | Package Functions

com.cosylab.cdb.jdal.WDALImpl Class Reference

Inheritance diagram for com.cosylab.cdb.jdal.WDALImpl:
com.cosylab.cdb.jdal.WDALBaseImpl com.cosylab.cdb.jdal.Recoverer

List of all members.

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 ()

Detailed Description

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.

Author:
dvitas

Constructor & Destructor Documentation

com.cosylab.cdb.jdal.WDALImpl.WDALImpl ( String[]  args,
ORB  orb,
POA  poa,
Logger  logger 
)

Constructor as it is for DAL

Parameters:
args 
orb 
poa 

Member Function Documentation

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

Parameters:
curl uri for the CDB node
xml 
Exceptions:
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().

DALImpl com.cosylab.cdb.jdal.WDALImpl.getDALImplDelegate (  )  [package]
File com.cosylab.cdb.jdal.WDALImpl.getNodeFile ( String  curl  ) 
boolean com.cosylab.cdb.jdal.WDALImpl.nodeExists ( String  curl  ) 

Returns true if node specified with curl exists

Parameters:
curl uri of the CDB node
Returns:
true if node exists false otherwise

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.

Parameters:
curl uri for the CDB node
Exceptions:
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

Parameters:
curl 
propertyMap 
Exceptions:
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.

Parameters:
curl uri for the CDB node
xml 
Exceptions:
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.

Parameters:
xml 
Exceptions:
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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties