cern.cmw.rda.client
Class CmwDirectoryServer

java.lang.Object
  extended by cern.cmw.rda.client.CmwDirectoryServer
All Implemented Interfaces:
DeviceDirectory

public class CmwDirectoryServer
extends Object
implements DeviceDirectory

Default CMW implementation of the DirectoryServer interface

This class is a wrapper for the CORBA directory server and is the default implementation of the DeviceDirectory interface.

Author:
K. Kostro Copyright: Copyright (c) The CMW project

Company: CERN


Constructor Summary
CmwDirectoryServer()
           
 
Method Summary
 Map<String,Object> getDeviceInfo(List<String> deviceNames)
          Gets a list of device infos for the directory.
 DeviceInfo getDeviceInfo(String deviceName)
           
 DeviceInfo getDeviceInfoFromOldDir(String deviceName)
          Deprecated. 
 HashMap getDeviceInfoMap(String groupQuery)
          Deprecated. 
 void saveAll(HashMap infoEntries)
          Null operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmwDirectoryServer

public CmwDirectoryServer()
Method Detail

getDeviceInfo

public DeviceInfo getDeviceInfo(String deviceName)
                         throws InternalException,
                                BadParameter
Specified by:
getDeviceInfo in interface DeviceDirectory
Throws:
InternalException
BadParameter

getDeviceInfoFromOldDir

@Deprecated
public DeviceInfo getDeviceInfoFromOldDir(String deviceName)
Deprecated. 

Specified by:
getDeviceInfoFromOldDir in interface DeviceDirectory

getDeviceInfo

public Map<String,Object> getDeviceInfo(List<String> deviceNames)
                                 throws InternalException
Description copied from interface: DeviceDirectory
Gets a list of device infos for the directory.

Specified by:
getDeviceInfo in interface DeviceDirectory
Parameters:
deviceNames - The list of devices.
Returns:
A map with the device name as the key. The value is either a DeviceInfo instance or an Exception if the devis not found/bound.
Throws:
InternalException - If the directory server is unreachable/available.

getDeviceInfoMap

@Deprecated
public HashMap getDeviceInfoMap(String groupQuery)
                         throws InternalException,
                                BadParameter
Deprecated. 

Calls the CORBA device directory server to perform the specified SQL query. Returns results as HashMap of DeviceInfo with device names as key. The query must me such that device names are in the first column of the result and servernames in the second. Example of a valid query:

Throws:
BadParameter - if the query is invalid.
InternalException - in case of internal errors such as DB access errors.

saveAll

public void saveAll(HashMap infoEntries)
Null operation. Device information should be in one database only.



Copyright © 2007 CERN. All Rights Reserved.