|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cdev.dir.DirectoryService
This abstract class is a starting point for getting DirectoryItem objects and object identifiers from string or numeric parameters. After this you can get additional information from the objects themselves.
As a first step you must get the implemented directory service with a statement like:
DirectoryService dir = cdev.dir.service.DirectoryServiceImplementation.getService();
This will also connect you to any database(s) you may need for getting data. After this you work only with the interfaces with statements like:
DeviceData devdat = dir.getDeviceData("BR1.QNO"); and : String devname = devdat.getName();
Several methods require a 'query' string for making a selection of object identifiers. The form and content of these queries is implementation dependent. For an implementation with a relational database this could be any valid 'WHERE' section of an SQL query, like 'column1=data1 AND column2=data2'. Avoid such queries in generic programs which must be ported to other implementations.
General documentation in DirectoryServiceDoc . Note: only one DirectoryServiceImplementation is installed for a site. This implementation may however address multiple DirectoryItem implementations
DeviceData
,
DeviceClass
,
DeviceList
,
DeviceProperty
,
DeviceMessage
,
BitPatternDefinition
,
cdev.dir.service.DirectoryServiceImplementation
Method Summary | |
abstract BitPatternDefinition |
getBitPatternDefinition(java.lang.String patternName)
Gets BitPatternDefinition object for the given pattern name. |
abstract DeviceProperty |
getCommonProperty(java.lang.String propertyName,
java.lang.String[] classNames)
Instantiates common DeviceProperty object for property name and device class names. |
abstract DeviceClass |
getDeviceClass(java.lang.String className)
Gets DeviceClass object when given the class name. |
abstract java.lang.String[] |
getDeviceClassNames()
Gets an array of all device class names. |
abstract java.lang.String[] |
getDeviceClassNames(java.lang.String query)
Gets an array of device class names from a query string. |
abstract DeviceData |
getDeviceData(java.lang.String deviceName)
Gets the DeviceData object from the device name. |
abstract DeviceList |
getDeviceListByName(java.lang.String listName)
Gets DeviceList object from the name of a list. |
abstract DeviceList |
getDeviceListByQuery(java.lang.String query)
Gets DeviceList object from a database query string. |
abstract java.lang.String[] |
getDeviceListNames()
Gets array of all devicelist names. |
abstract java.lang.String[] |
getDeviceListNames(java.lang.String query)
Gets array of devicelist names from a database query. |
abstract DeviceMessage |
getDeviceMessage(int messageLevel,
int messageNumber,
java.lang.String serviceName)
Gets DeviceMessage object corresponding to level, number and service. |
abstract java.lang.String[] |
getDeviceNames(java.lang.String query)
Gets device names from a query string. |
abstract DeviceProperty |
getDeviceProperty(java.lang.String propertyName,
java.lang.String className)
Gets DeviceProperty object for given property name and class name. |
static DirectoryService |
getService()
Gets unique instantiation of the directory service implementation. |
abstract int |
getSymbolValue(java.lang.String symbolCategory,
java.lang.String symbolName)
Gets the symbol value when given the symbol category and symbol name. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static DirectoryService getService() throws BadConnectionException
public abstract DeviceClass getDeviceClass(java.lang.String className) throws BadConnectionException, NoSuchDataException, TooManyValuesException
className
- the name of the device classpublic abstract java.lang.String[] getDeviceClassNames() throws BadConnectionException, NoSuchDataException
public abstract java.lang.String[] getDeviceClassNames(java.lang.String query) throws BadConnectionException, NoSuchDataException, BadQueryException
query
- a selection statement depending on the implementationpublic abstract DeviceData getDeviceData(java.lang.String deviceName) throws BadConnectionException, NoSuchDataException, TooManyValuesException
public abstract java.lang.String[] getDeviceNames(java.lang.String query) throws BadConnectionException, NoSuchDataException, BadQueryException
query
- a selection statement depending on the implementationpublic abstract java.lang.String[] getDeviceListNames() throws BadConnectionException, NoSuchDataException
public abstract java.lang.String[] getDeviceListNames(java.lang.String query) throws BadConnectionException, NoSuchDataException, BadQueryException
public abstract DeviceList getDeviceListByName(java.lang.String listName) throws BadConnectionException, NoSuchDataException, TooManyValuesException
listName
- the name of the device listpublic abstract DeviceList getDeviceListByQuery(java.lang.String query) throws BadConnectionException, NoSuchDataException, BadQueryException
query
- a selection statement depending on the implementationpublic abstract DeviceProperty getDeviceProperty(java.lang.String propertyName, java.lang.String className) throws BadConnectionException, NoSuchDataException, TooManyValuesException
className
- the name of the classpropertyName
- the property name for the classpublic abstract DeviceProperty getCommonProperty(java.lang.String propertyName, java.lang.String[] classNames) throws BadConnectionException, NoSuchDataException
To be compatible, the properties must:
The values of the composite property for the classes are :
Only the compatible characteristics defined in all the classes are listed. To be compatible, characteristics which have a property name as value must have the same name for all the classes. Characteristics which have different values for some of the classes are given the value string "MULTIVALUED"
propertyName
- the name of the propertyclassNames
- the classes for which the property should be definedpublic abstract DeviceMessage getDeviceMessage(int messageLevel, int messageNumber, java.lang.String serviceName) throws BadConnectionException, NoSuchDataException, TooManyValuesException
public abstract BitPatternDefinition getBitPatternDefinition(java.lang.String patternName) throws BadConnectionException, NoSuchDataException, TooManyValuesException
patternName
- the pattern name for the classpublic abstract int getSymbolValue(java.lang.String symbolCategory, java.lang.String symbolName) throws BadConnectionException, NoSuchDataException, TooManyValuesException
symbolCategory
- the category of the symbolsymbolName
- the name of the symbol
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |