Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::cdb::jdal::WDALImpl Class Reference

Inheritance diagram for com::cosylab::cdb::jdal::WDALImpl:

Inheritance graph
[legend]
Collaboration diagram for com::cosylab::cdb::jdal::WDALImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WDALImpl (String[] args, ORB orb, POA poa)
WDAO get_WDAO_Servant (String curl) throws CDBXMLErrorEx, CDBRecordDoesNotExistEx, CDBRecordIsReadOnlyEx
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
Logger getLogger ()

Package Attributes

Logger m_logger

Private Member Functions

void parseXML (String xml, XMLHandler xmlSolver) throws CDBXMLErrorEx
synchronized void writeXmlData (String curl, String xmlData) throws AcsJCDBExceptionEx
void checkforChanges (String name, XMLTreeNode node, Map map, DAOImpl dao) throws AcsJCDBFieldDoesNotExistEx, AcsJCDBXMLErrorEx

Private Attributes

POA poa = null
HashMap wdaoMap = new HashMap()

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
[inline]
 

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 [inline]
 

Adds a new node specified by curl to the CDB initaly filed with

Parameters:
curl uri for the CDB node
xml 
Exceptions:
CDBRecordAlreadyExistsEx 
CDBXMLErrorEx 
CDBExceptionEx 

void com::cosylab::cdb::jdal::WDALImpl::checkforChanges String  name,
XMLTreeNode  node,
Map  map,
DAOImpl  dao
throws AcsJCDBFieldDoesNotExistEx, AcsJCDBXMLErrorEx [inline, private]
 

Recursively scans nodes and check every property with current xml

Parameters:
name 
node 
map 
dao 
Exceptions:
AcsJCDBFieldDoesNotExistEx 
AcsJCDBXMLErrorEx 

WDAO com::cosylab::cdb::jdal::WDALImpl::get_WDAO_Servant String  curl  )  throws CDBXMLErrorEx, CDBRecordDoesNotExistEx, CDBRecordIsReadOnlyEx [inline]
 

Logger com::cosylab::cdb::jdal::WDALImpl::getLogger  )  [inline]
 

File com::cosylab::cdb::jdal::WDALImpl::getNodeFile String  curl  )  [inline]
 

Returns File object for given curl

Parameters:
curl uri of the CDB node
Returns:
File object for CDB node

boolean com::cosylab::cdb::jdal::WDALImpl::nodeExists String  curl  )  [inline]
 

Returns true if node specified with curl exists

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

void com::cosylab::cdb::jdal::WDALImpl::parseXML String  xml,
XMLHandler  xmlSolver
throws CDBXMLErrorEx [inline, private]
 

void com::cosylab::cdb::jdal::WDALImpl::remove_node String  curl  )  throws CDBRecordDoesNotExistEx, CDBRecordIsReadOnlyEx [inline]
 

Removes node identified by curl by deleting its file and directory if empty.

Parameters:
curl uri for the CDB node
Exceptions:
CDBRecordDoesNotExistEx 
CDBRecordIsReadOnlyEx 

void com::cosylab::cdb::jdal::WDALImpl::saveChanges String  curl,
Map  propertyMap
throws AcsJCDBXMLErrorEx, AcsJCDBExceptionEx, AcsJCDBFieldDoesNotExistEx [inline]
 

Save changes given by map to the node identified by curl

Parameters:
curl 
propertyMap 
Exceptions:
CDBXMLErrorEx 
CDBExceptionEx 
CDBFieldDoesNotExistEx 

void com::cosylab::cdb::jdal::WDALImpl::set_DAO String  curl,
String  xml
throws CDBRecordDoesNotExistEx, CDBFieldDoesNotExistEx, CDBRecordIsReadOnlyEx, CDBXMLErrorEx, CDBExceptionEx [inline]
 

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 

void com::cosylab::cdb::jdal::WDALImpl::validateXML String  xml  )  throws AcsJCDBXMLErrorEx [inline]
 

Check that everything conforms to the schema in given xml. This check will be done by parser used in DAL.

Parameters:
xml 
Exceptions:
AcsJCDBXMLErrorEx 

synchronized void com::cosylab::cdb::jdal::WDALImpl::writeXmlData String  curl,
String  xmlData
throws AcsJCDBExceptionEx [inline, private]
 

Writes given xml to disk overwriting eventualy existing file

Parameters:
curl uri for the CDB node
xmlData xml to write
Exceptions:
CDBExceptionEx general CDB exception if something goes wrong while saving


Member Data Documentation

Logger com::cosylab::cdb::jdal::WDALImpl::m_logger [package]
 

POA com::cosylab::cdb::jdal::WDALImpl::poa = null [private]
 

HashMap com::cosylab::cdb::jdal::WDALImpl::wdaoMap = new HashMap() [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:12:23 2009 for ACS Java API by doxygen 1.3.8