TANGO Java API
( TangORB-7.3.3.jar)

fr.esrf.TangoApi
Class Database

java.lang.Object
  extended by fr.esrf.TangoApi.Connection
      extended by fr.esrf.TangoApi.Database
All Implemented Interfaces:
ApiDefs

public class Database
extends Connection

Class Description: This class is the main class for TANGO database API. The TANGO database is implemented as a TANGO device server. To access it, the user has the CORBA interface command_inout(). This expects and returns all parameters as ascii strings thereby making the database laborious to use for retreing device properties and information. In order to simplify this access, a high-level API has been implemented which hides the low-level formatting necessary to convert the command_inout() return values into binary values and all CORBA aspects of the TANGO. All data types are native java types e.g. simple types an arrays.

Version:
$Revision: 1.13 $
Author:
verdier

Field Summary
 
Fields inherited from interface fr.esrf.TangoApi.ApiDefs
ALL_ASYNCH, ATT_R, ATT_W, CALLBACK, CMD, D_TCP, D_UDP, FROM_ATTR, FROM_CMD, FROM_DBASE, FROM_IOR, LOGGING_DEBUG, LOGGING_ERROR, LOGGING_FATAL, LOGGING_INFO, LOGGING_OFF, LOGGING_WARN, MISC, NO_TIMEOUT, POLLING, protocol_name, PULL_CALLBACK, PUSH_CALLBACK, TACO, TANGO
 
Constructor Summary
Database()
          Database access constructor.
Database(java.lang.String devname)
          Database constructor.
Database(java.lang.String devname, boolean check_access)
          Connection constructor.
Database(java.lang.String host, java.lang.String port)
          Database access constructor.
Database(java.lang.String host, java.lang.String port, boolean auto_reconnect)
          Database constructor.
Database(java.lang.String devname, java.lang.String param, int src)
          Connection constructor.
Database(java.lang.String devname, java.lang.String host, java.lang.String port)
          Connection constructor.
 
Method Summary
 void add_device(DbDevInfo devinfo)
          Add/update a device to the database
 void add_device(java.lang.String devname, java.lang.String classname, java.lang.String servname)
          Add/update a device to the database
 void add_server(java.lang.String servname, DbDevInfo[] devinfo)
          Add a group of devices to the database.
 int checkAccessControl(java.lang.String devname)
          Check Tango Access.
 void delete_attribute_alias(java.lang.String alias)
          Query the database to delete alias for the specified attribute alias.
 void delete_class_attribute_property(java.lang.String name, java.lang.String attname, java.lang.String propname)
          Delete a property for the specified object.
 void delete_class_attribute_property(java.lang.String name, java.lang.String attname, java.lang.String[] propnames)
          Delete a list of properties for the specified object.
 void delete_class_property(java.lang.String name, DbDatum[] properties)
          Delete a list of properties for the specified object.
 void delete_class_property(java.lang.String name, java.lang.String propname)
          Delete a property for the specified object.
 void delete_class_property(java.lang.String name, java.lang.String[] propnames)
          Delete a list of properties for the specified object.
 void delete_device_alias(java.lang.String alias)
          Query the database to delete alias for the specified device alias.
 void delete_device_attribute_property(java.lang.String devname, DbAttribute attr)
          Delete an list of attributes properties for the specified object.
 void delete_device_attribute_property(java.lang.String devname, DbAttribute[] attr)
          Delete a list of attributes properties for the specified object.
 void delete_device_attribute_property(java.lang.String devname, java.lang.String attname, java.lang.String propname)
          Delete a property for the specified object.
 void delete_device_attribute_property(java.lang.String devname, java.lang.String attname, java.lang.String[] propnames)
          Delete a list of properties for the specified object.
 void delete_device_attribute(java.lang.String devname, java.lang.String attname)
          Delete an attribute for the specified object.
 void delete_device_property(java.lang.String name, DbDatum[] properties)
          Delete a list of properties for the specified object.
 void delete_device_property(java.lang.String name, java.lang.String propname)
          Delete a property for the specified object.
 void delete_device_property(java.lang.String name, java.lang.String[] propnames)
          Delete a list of properties for the specified object.
 void delete_device(java.lang.String devname)
          Delete the device of the specified name from the database
 void delete_property(java.lang.String name, DbDatum[] properties)
          Delete a list of properties for the specified object.
 void delete_property(java.lang.String name, java.lang.String propname)
          Delete a property for the specified object.
 void delete_property(java.lang.String name, java.lang.String[] propnames)
          Delete a list of properties for the specified object.
 void delete_server_info(java.lang.String servname)
          Delete server information in databse.
 void delete_server(java.lang.String devname)
          Delete the device server and its associated devices from the database.
 void export_device(DbDevExportInfo devinfo)
          Update the export info fort this device in the database.
 void export_server(DbDevExportInfo[] devinfo)
          Add a group of devices to the database.
 java.lang.String get_alias_device(java.lang.String alias)
          Query the database a device for the specified alias.
 java.lang.String[] get_attribute_alias_list(java.lang.String wildcard)
          Query the database for a list of aliases for the specified wildcard.
 java.lang.String get_attribute_alias(java.lang.String attname)
          Query the database for a list of aliases for the specified attribute.
 java.lang.String[] get_class_attribute_list(java.lang.String classname, java.lang.String wildcard)
          Query the database for a attributes defined for a class.
 DbHistory[] get_class_attribute_property_history(java.lang.String classname, java.lang.String attname, java.lang.String propname)
          Returns the history of the specified class attribute property.
 DbAttribute get_class_attribute_property(java.lang.String classname, java.lang.String attname)
          Query the database for a attribute properties for trhe specified class.
 DbAttribute[] get_class_attribute_property(java.lang.String classname, java.lang.String[] attnames)
          Query the database for a list of class attributes properties for the pecified object.
 java.lang.String get_class_for_device(java.lang.String devname)
           
 java.lang.String[] get_class_inheritance_for_device(java.lang.String devname)
           
 java.lang.String[] get_class_list(java.lang.String servname)
          Query the database for a list of classes registred in the database.
 DbHistory[] get_class_property_history(java.lang.String classname, java.lang.String propname)
          Returns the history of the specified class property.
 java.lang.String[] get_class_property_list(java.lang.String classname, java.lang.String wildcard)
          Query the database for a list of class properties for the pecified object.
 DbDatum[] get_class_property(java.lang.String name, DbDatum[] properties)
          Query the database for a list of class properties for the pecified object.
 DbDatum get_class_property(java.lang.String name, java.lang.String propname)
          Query the database for a class property for the pecified object.
 DbDatum[] get_class_property(java.lang.String name, java.lang.String[] propnames)
          Query the database for a list of class properties for the pecified object.
 java.lang.String[] get_device_alias_list(java.lang.String wildcard)
          Query the database for a list of aliases for the specified wildcard.
 java.lang.String get_device_alias(java.lang.String devname)
          Query the database for an alias for the specified device.
 java.lang.String[] get_device_attribute_list(java.lang.String devname)
          Query the database for a list of device attributes
 DbHistory[] get_device_attribute_property_history(java.lang.String devname, java.lang.String attname, java.lang.String propname)
          Returns the history of the specified device attribute property.
 DbAttribute get_device_attribute_property(java.lang.String devname, java.lang.String attname)
          Query the database for device attribute property for the pecified object.
 DbAttribute[] get_device_attribute_property(java.lang.String devname, java.lang.String[] attnames)
          Query the database for a list of device attributes properties for the pecified object.
 java.lang.String[] get_device_class_list(java.lang.String servname)
          Query the database for server devices and classes.
 java.lang.String[] get_device_domain(java.lang.String wildcard)
          Query the database for a list of device domain names witch match the wildcard provided.
 java.lang.String[] get_device_exported_for_class(java.lang.String classname)
          Query database for list of exported devices for the specified class name.
 java.lang.String[] get_device_exported(java.lang.String wildcard)
          Query database for list of exported devices.
 java.lang.String[] get_device_family(java.lang.String wildcard)
          Query the database for a list of device family names witch match the wildcard provided.
 DeviceInfo get_device_info(java.lang.String devname)
          Query the database for the export and more info of the specified device.
 java.lang.String[] get_device_list(java.lang.String wildcard)
          Query database for list of devices.
 java.lang.String[] get_device_member(java.lang.String wildcard)
          Query the database for a list of device member names witch match the wildcard provided.
 java.lang.String[] get_device_name(java.lang.String servname, java.lang.String classname)
          Query the database for a list of devices served by the specified server and of the specified class.
 DbHistory[] get_device_property_history(java.lang.String devname, java.lang.String propname)
          Returns the history of the specified device property.
 java.lang.String[] get_device_property_list(java.lang.String devname, java.lang.String wildcard)
          Query the database for a list of device properties for the pecified object.
 DbDatum[] get_device_property(java.lang.String name, DbDatum[] properties)
          Query the database for a list of device properties for the pecified object.
 DbDatum get_device_property(java.lang.String name, java.lang.String propname)
          Query the database for a device property for the pecified object.
 DbDatum[] get_device_property(java.lang.String name, java.lang.String[] propnames)
          Query the database for a list of device properties for the pecified object.
 java.lang.String[] get_host_list()
          Query the database for a list of host registred.
 java.lang.String[] get_host_list(java.lang.String wildcard)
          Query the database for a list of host registred.
 java.lang.String[] get_host_server_list(java.lang.String hostname)
          Query the database for a list of servers registred on the specified host.
 java.lang.String get_info()
          Query the database for general info about the table in the database.
 java.lang.String[] get_instance_name_list(java.lang.String servname)
          Query the database for a list of instance names registred for specified server name.
 java.lang.String[] get_object_list(java.lang.String wildcard)
          Query the database for a list of object (ie non-device) for which properties are defiend.
 java.lang.String[] get_object_property_list(java.lang.String objname, java.lang.String wildcard)
          Query the database for a list of object (ie non-device) for which properties are defiend.
 DbHistory[] get_property_history(java.lang.String objname, java.lang.String propname)
          Returns the history of the specified object property.
 DbDatum[] get_property(java.lang.String name, DbDatum[] properties)
          Query the database for a list of object (ie non-device) properties for thr dpecified object.
 DbDatum get_property(java.lang.String name, java.lang.String propname)
          Query the database for an object (ie non-device) property for the pecified object.
 DbDatum[] get_property(java.lang.String name, java.lang.String[] propnames)
          Query the database for a list of object (ie non-device) properties for the pecified object.
 DbDatum get_property(java.lang.String name, java.lang.String propname, boolean forced)
          Query the database for an object (ie non-device) property for the pecified object without access check (initilizing phase).
 java.lang.String[] get_server_class_list(java.lang.String servname)
          Query the database for a list of classes instancied for a server.
 DbServInfo get_server_info(java.lang.String servname)
          Query the database for server information.
 java.lang.String[] get_server_list()
          Query the database for a list of servers registred in the database.
 java.lang.String[] get_server_list(java.lang.String wildcard)
          Query the database for a list of servers registred in the database.
 java.lang.String[] get_server_name_list()
          Query the database for a list of server names registred in the database.
 DevFailed getAccess_devfailed()
           
 fr.esrf.TangoApi.AccessProxy getAccess_proxy()
           
 IDatabaseDAO getDatabaseDAO()
           
 java.lang.String[] getDevices(java.lang.String wildcard)
           
 java.lang.String[] getServices(java.lang.String servicename, java.lang.String instname)
          Query database for specified services.
 DbDevImportInfo import_device(java.lang.String devname)
          Query the database for the export info of the specified device.
 DbEventImportInfo import_event(java.lang.String channel_name)
          Query the database for the export info of the specified event.
 boolean isAccess_checked()
           
 boolean isCommandAllowed(java.lang.String classname, java.lang.String cmd)
          Check for specified class, the specified command is allowed.
 void put_attribute_alias(java.lang.String attname, java.lang.String aliasname)
          Set an alias for a attribute name
 void put_class_attribute_property(java.lang.String classname, DbAttribute attr)
          Insert or update a list of properties for the specified class attribute.
 void put_class_attribute_property(java.lang.String classname, DbAttribute[] attr)
          Insert or update a list of properties for the specified class attribute.
 void put_class_property(java.lang.String name, DbDatum[] properties)
          Insert or update a list of properties for the specified class.
 void put_device_alias(java.lang.String devname, java.lang.String aliasname)
          Set an alias for a device name
 void put_device_attribute_property(java.lang.String devname, DbAttribute attr)
          Insert or update a list of attribute properties for the specified device.
 void put_device_attribute_property(java.lang.String devname, DbAttribute[] attr)
          Insert or update a list of attribute properties for the specified device.
 void put_device_property(java.lang.String name, DbDatum[] properties)
          Insert or update a list of properties for the specified device The property names and their values are specified by the DbDatum array.
 void put_property(java.lang.String name, DbDatum[] properties)
          Insert or update a list of properties for the specified object The property names and their values are specified by the DbDatum array.
 void put_server_info(DbServInfo info)
          Add/update server information in databse.
 void registerService(java.lang.String serviceName, java.lang.String instanceName, java.lang.String devname)
          Register a device as a Tango service : ServiceName/InstanceName:DeviceName
 void setAccess_checked(boolean access_checked)
           
 void setAccess_devfailed(DevFailed access_devfailed)
           
 void setAccess_proxy(fr.esrf.TangoApi.AccessProxy access_proxy)
           
 void setDatabaseDAO(IDatabaseDAO databaseDAO)
           
 java.lang.String toString()
           
 void unexport_device(java.lang.String devname)
          Mark the specified server as unexported in the database.
 void unexport_server(java.lang.String devname)
          Mark all devices exported for this device server as unexported.
 void unregisterService(java.lang.String serviceName, java.lang.String instanceName, java.lang.String devname)
          Unregister a device as a Tango service : ServiceName/InstanceName:DeviceName
 
Methods inherited from class fr.esrf.TangoApi.Connection
adm_name, black_box, build_connection, checkIfTaco, checkIfTango, command_inout, command_inout, command_list_query, description, dev_import, equals, get_class_name, get_device, get_host_name, get_idl_version, get_ior, get_name, get_server_name, get_source, get_tango_host, get_timeout_millis, get_timeout, get_transparency_reconnection, getAccessControl, getDev_timeout, getIConnection, getObj, getPrev_failed_t0, getPrev_failed, info_3, info, is_taco, isAllowedCommand, isAlready_connected, isDevice_is_dbase, isPrev_failed, ping, set_source, set_timeout_millis, set_transparency_reconnection, setAccessControl, setAlready_connected, setDev_timeout, setDevice_is_dbase, setIConnection, setObj, setPrev_failed_t0, setPrev_failed, throw_dev_failed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Database

public Database()
         throws DevFailed
Database access constructor.

Throws:
DevFailed - in case of environment not corectly set.

Database

public Database(java.lang.String host,
                java.lang.String port)
         throws DevFailed
Database access constructor.

Parameters:
host - host where database is running.
port - port for database connection.
Throws:
DevFailed - in case of host or port not available

Database

public Database(java.lang.String host,
                java.lang.String port,
                boolean auto_reconnect)
         throws DevFailed
Database constructor. It makes a Database on database server.

Parameters:
host - host where database is running.
port - port for database connection.
auto_reconnect - do not reconnect if false.
Throws:
DevFailed

Database

public Database(java.lang.String devname)
         throws DevFailed
Database constructor. It imports the device.

Parameters:
devname - name of the device to be imported.
Throws:
DevFailed

Database

public Database(java.lang.String devname,
                boolean check_access)
         throws DevFailed
Connection constructor. It imports the device. And set check_access.

Parameters:
devname - name of the device to be imported.
check_access - set check_access value
Throws:
DevFailed

Database

public Database(java.lang.String devname,
                java.lang.String param,
                int src)
         throws DevFailed
Connection constructor. It imports the device.

Parameters:
devname - name of the device to be imported.
param - String parameter to import device.
src - Source to import device (ior, dbase...)
Throws:
DevFailed

Database

public Database(java.lang.String devname,
                java.lang.String host,
                java.lang.String port)
         throws DevFailed
Connection constructor. It imports the device.

Parameters:
devname - name of the device to be imported.
host - host where database is running.
port - port for database connection.
Throws:
DevFailed
Method Detail

getDatabaseDAO

public IDatabaseDAO getDatabaseDAO()

setDatabaseDAO

public void setDatabaseDAO(IDatabaseDAO databaseDAO)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

get_info

public java.lang.String get_info()
                          throws DevFailed
Query the database for general info about the table in the database.

Returns:
the result of the query as String.
Throws:
DevFailed

get_host_list

public java.lang.String[] get_host_list()
                                 throws DevFailed
Query the database for a list of host registred.

Returns:
the list of all hosts registred in TANGO database.
Throws:
DevFailed

get_host_list

public java.lang.String[] get_host_list(java.lang.String wildcard)
                                 throws DevFailed
Query the database for a list of host registred.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the list of the hosts registred in TANGO database with the specified wildcard.
Throws:
DevFailed

get_server_class_list

public java.lang.String[] get_server_class_list(java.lang.String servname)
                                         throws DevFailed
Query the database for a list of classes instancied for a server.

Parameters:
servname - server name and instance name (ie.: Serial/i1).
Returns:
the list of all classes registred in TANGO database for servname except the DServer class (existing on all Tango device server).
Throws:
DevFailed

get_server_name_list

public java.lang.String[] get_server_name_list()
                                        throws DevFailed
Query the database for a list of server names registred in the database.

Returns:
the list of all server names registred in TANGO database.
Throws:
DevFailed

get_instance_name_list

public java.lang.String[] get_instance_name_list(java.lang.String servname)
                                          throws DevFailed
Query the database for a list of instance names registred for specified server name.

Parameters:
servname - server name.
Returns:
the list of all instance names for specified server name.
Throws:
DevFailed

get_server_list

public java.lang.String[] get_server_list()
                                   throws DevFailed
Query the database for a list of servers registred in the database.

Returns:
the list of all servers registred in TANGO database.
Throws:
DevFailed

get_server_list

public java.lang.String[] get_server_list(java.lang.String wildcard)
                                   throws DevFailed
Query the database for a list of servers registred in the database.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the list of all servers registred in TANGO database.
Throws:
DevFailed

get_host_server_list

public java.lang.String[] get_host_server_list(java.lang.String hostname)
                                        throws DevFailed
Query the database for a list of servers registred on the specified host.

Parameters:
hostname - the specified host name.
Returns:
the list of the servers registred in TANGO database for the specified host.
Throws:
DevFailed

get_server_info

public DbServInfo get_server_info(java.lang.String servname)
                           throws DevFailed
Query the database for server information.

Parameters:
servname - The specified server name.
Returns:
The information found for the specified server in a DBServInfo object.
Throws:
DevFailed

put_server_info

public void put_server_info(DbServInfo info)
                     throws DevFailed
Add/update server information in databse.

Parameters:
info - Server information for the specified server in a DbServinfo object.
Throws:
DevFailed

delete_server_info

public void delete_server_info(java.lang.String servname)
                        throws DevFailed
Delete server information in databse.

Parameters:
servname - Server name.
Throws:
DevFailed

add_device

public void add_device(DbDevInfo devinfo)
                throws DevFailed
Add/update a device to the database

Parameters:
devinfo - The device name, class and server specified in object.
Throws:
DevFailed

add_device

public void add_device(java.lang.String devname,
                       java.lang.String classname,
                       java.lang.String servname)
                throws DevFailed
Add/update a device to the database

Parameters:
devname - The device name
classname - The class.
servname - The server name.
Throws:
DevFailed

delete_device

public void delete_device(java.lang.String devname)
                   throws DevFailed
Delete the device of the specified name from the database

Parameters:
devname - The device name.
Throws:
DevFailed

get_device_info

public DeviceInfo get_device_info(java.lang.String devname)
                           throws DevFailed
Query the database for the export and more info of the specified device.

Parameters:
devname - The device name.
Returns:
the information in a DbGetDeviceInfo.
Throws:
DevFailed

get_device_list

public java.lang.String[] get_device_list(java.lang.String wildcard)
                                   throws DevFailed
Query database for list of devices.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
The list of devices
Throws:
DevFailed

import_device

public DbDevImportInfo import_device(java.lang.String devname)
                              throws DevFailed
Query the database for the export info of the specified device.

Parameters:
devname - The device name.
Returns:
the information in a DbDevImportInfo.
Throws:
DevFailed

unexport_device

public void unexport_device(java.lang.String devname)
                     throws DevFailed
Mark the specified server as unexported in the database.

Parameters:
devname - The device name.
Throws:
DevFailed

export_device

public void export_device(DbDevExportInfo devinfo)
                   throws DevFailed
Update the export info fort this device in the database.

Parameters:
devinfo - Device information to export.
Throws:
DevFailed

get_device_class_list

public java.lang.String[] get_device_class_list(java.lang.String servname)
                                         throws DevFailed
Query the database for server devices and classes.

Parameters:
servname - The specified server name.
Returns:
The devices and classes (e.g. "id11/motor/1", "StepperMotor", "id11/motor/2", "StepperMotor",....)
Throws:
DevFailed

get_device_name

public java.lang.String[] get_device_name(java.lang.String servname,
                                          java.lang.String classname)
                                   throws DevFailed
Query the database for a list of devices served by the specified server and of the specified class.

Parameters:
servname - The server name.
classname - The class name
Returns:
the device names are stored in an array of strings.
Throws:
DevFailed

get_device_domain

public java.lang.String[] get_device_domain(java.lang.String wildcard)
                                     throws DevFailed
Query the database for a list of device domain names witch match the wildcard provided.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the device domain are stored in an array of strings.
Throws:
DevFailed

get_device_family

public java.lang.String[] get_device_family(java.lang.String wildcard)
                                     throws DevFailed
Query the database for a list of device family names witch match the wildcard provided.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the device family are stored in an array of strings.
Throws:
DevFailed

get_device_member

public java.lang.String[] get_device_member(java.lang.String wildcard)
                                     throws DevFailed
Query the database for a list of device member names witch match the wildcard provided.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the device member are stored in an array of strings.
Throws:
DevFailed

add_server

public void add_server(java.lang.String servname,
                       DbDevInfo[] devinfo)
                throws DevFailed
Add a group of devices to the database.

Parameters:
servname - Server name for these devices.
devinfo - Devices and server information.
Throws:
DevFailed

delete_server

public void delete_server(java.lang.String devname)
                   throws DevFailed
Delete the device server and its associated devices from the database.

Parameters:
devname - the device name.
Throws:
DevFailed

export_server

public void export_server(DbDevExportInfo[] devinfo)
                   throws DevFailed
Add a group of devices to the database.

Parameters:
devinfo - Devices and server information.
Throws:
DevFailed

unexport_server

public void unexport_server(java.lang.String devname)
                     throws DevFailed
Mark all devices exported for this device server as unexported.

Parameters:
devname - the device name.
Throws:
DevFailed

get_object_list

public java.lang.String[] get_object_list(java.lang.String wildcard)
                                   throws DevFailed
Query the database for a list of object (ie non-device) for which properties are defiend.

Parameters:
wildcard - wildcard (* matches any charactere).
Returns:
objects for which properties are defiened list.
Throws:
DevFailed

get_object_property_list

public java.lang.String[] get_object_property_list(java.lang.String objname,
                                                   java.lang.String wildcard)
                                            throws DevFailed
Query the database for a list of object (ie non-device) for which properties are defiend.

Parameters:
objname - object name.
wildcard - wildcard (* matches any charactere).
Returns:
Property names..
Throws:
DevFailed

get_property

public DbDatum[] get_property(java.lang.String name,
                              java.lang.String[] propnames)
                       throws DevFailed
Query the database for a list of object (ie non-device) properties for the pecified object.

Parameters:
name - Object name.
propnames - list of property names.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_property

public DbDatum get_property(java.lang.String name,
                            java.lang.String propname)
                     throws DevFailed
Query the database for an object (ie non-device) property for the pecified object.

Parameters:
name - Object name.
propname - list of property names.
Returns:
property in DbDatum object.
Throws:
DevFailed

get_property

public DbDatum get_property(java.lang.String name,
                            java.lang.String propname,
                            boolean forced)
                     throws DevFailed
Query the database for an object (ie non-device) property for the pecified object without access check (initilizing phase).

Parameters:
name - Object name.
propname - list of property names.
Returns:
property in DbDatum object.
Throws:
DevFailed

get_property

public DbDatum[] get_property(java.lang.String name,
                              DbDatum[] properties)
                       throws DevFailed
Query the database for a list of object (ie non-device) properties for thr dpecified object. The property names are specified by the DbDatum array objects.

Parameters:
name - Object name.
properties - list of property DbDatum objects.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

put_property

public void put_property(java.lang.String name,
                         DbDatum[] properties)
                  throws DevFailed
Insert or update a list of properties for the specified object The property names and their values are specified by the DbDatum array.

Parameters:
name - Object name.
properties - Properties names and values array.
Throws:
DevFailed

delete_property

public void delete_property(java.lang.String name,
                            java.lang.String[] propnames)
                     throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Object name.
propnames - Property names.
Throws:
DevFailed

delete_property

public void delete_property(java.lang.String name,
                            java.lang.String propname)
                     throws DevFailed
Delete a property for the specified object.

Parameters:
name - Object name.
propname - Property names.
Throws:
DevFailed

delete_property

public void delete_property(java.lang.String name,
                            DbDatum[] properties)
                     throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Object name.
properties - Property DbDatum objects.
Throws:
DevFailed

get_class_property_list

public java.lang.String[] get_class_property_list(java.lang.String classname,
                                                  java.lang.String wildcard)
                                           throws DevFailed
Query the database for a list of class properties for the pecified object.

Parameters:
classname - device name.
wildcard - propertie's wildcard (* matches any charactere).
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_device_property_list

public java.lang.String[] get_device_property_list(java.lang.String devname,
                                                   java.lang.String wildcard)
                                            throws DevFailed
Query the database for a list of device properties for the pecified object.

Parameters:
devname - device name.
wildcard - propertie's wildcard (* matches any charactere).
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_class_for_device

public java.lang.String get_class_for_device(java.lang.String devname)
                                      throws DevFailed
Throws:
DevFailed

get_class_inheritance_for_device

public java.lang.String[] get_class_inheritance_for_device(java.lang.String devname)
                                                    throws DevFailed
Throws:
DevFailed

get_device_property

public DbDatum[] get_device_property(java.lang.String name,
                                     java.lang.String[] propnames)
                              throws DevFailed
Query the database for a list of device properties for the pecified object.

Parameters:
name - device name.
propnames - list of property names.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_device_property

public DbDatum get_device_property(java.lang.String name,
                                   java.lang.String propname)
                            throws DevFailed
Query the database for a device property for the pecified object.

Parameters:
name - device name.
propname - property name.
Returns:
property in DbDatum object.
Throws:
DevFailed

get_device_property

public DbDatum[] get_device_property(java.lang.String name,
                                     DbDatum[] properties)
                              throws DevFailed
Query the database for a list of device properties for the pecified object. The property names are specified by the DbDatum array objects.

Parameters:
name - device name.
properties - list of property DbDatum objects.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

put_device_property

public void put_device_property(java.lang.String name,
                                DbDatum[] properties)
                         throws DevFailed
Insert or update a list of properties for the specified device The property names and their values are specified by the DbDatum array.

Parameters:
name - device name.
properties - Properties names and values array.
Throws:
DevFailed

delete_device_property

public void delete_device_property(java.lang.String name,
                                   java.lang.String[] propnames)
                            throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Device name.
propnames - Property names.
Throws:
DevFailed

delete_device_property

public void delete_device_property(java.lang.String name,
                                   java.lang.String propname)
                            throws DevFailed
Delete a property for the specified object.

Parameters:
name - Device name.
propname - Property name.
Throws:
DevFailed

delete_device_property

public void delete_device_property(java.lang.String name,
                                   DbDatum[] properties)
                            throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Device name.
properties - Property DbDatum objects.
Throws:
DevFailed

get_device_attribute_list

public java.lang.String[] get_device_attribute_list(java.lang.String devname)
                                             throws DevFailed
Query the database for a list of device attributes

Parameters:
devname - device name.
Returns:
attribute names.
Throws:
DevFailed

get_device_attribute_property

public DbAttribute[] get_device_attribute_property(java.lang.String devname,
                                                   java.lang.String[] attnames)
                                            throws DevFailed
Query the database for a list of device attributes properties for the pecified object.

Parameters:
devname - device name.
attnames - attribute names.
Returns:
properties in DbAttribute objects array.
Throws:
DevFailed

get_device_attribute_property

public DbAttribute get_device_attribute_property(java.lang.String devname,
                                                 java.lang.String attname)
                                          throws DevFailed
Query the database for device attribute property for the pecified object.

Parameters:
devname - device name.
attname - attribute name.
Returns:
property in DbAttribute object.
Throws:
DevFailed

put_device_attribute_property

public void put_device_attribute_property(java.lang.String devname,
                                          DbAttribute[] attr)
                                   throws DevFailed
Insert or update a list of attribute properties for the specified device. The property names and their values are specified by the DbAttribute array.

Parameters:
devname - device name.
attr - attribute names, and properties (names and values).
Throws:
DevFailed

put_device_attribute_property

public void put_device_attribute_property(java.lang.String devname,
                                          DbAttribute attr)
                                   throws DevFailed
Insert or update a list of attribute properties for the specified device. The property names and their values are specified by the DbAttribute.

Parameters:
devname - device name.
attr - attribute name, and properties (names and values).
Throws:
DevFailed

delete_device_attribute_property

public void delete_device_attribute_property(java.lang.String devname,
                                             DbAttribute attr)
                                      throws DevFailed
Delete an list of attributes properties for the specified object.

Parameters:
devname - Device name.
attr - attribute name, and properties (names).
Throws:
DevFailed

delete_device_attribute_property

public void delete_device_attribute_property(java.lang.String devname,
                                             DbAttribute[] attr)
                                      throws DevFailed
Delete a list of attributes properties for the specified object.

Parameters:
devname - Device name.
attr - attribute names, and properties (names) in array.
Throws:
DevFailed

delete_device_attribute_property

public void delete_device_attribute_property(java.lang.String devname,
                                             java.lang.String attname,
                                             java.lang.String[] propnames)
                                      throws DevFailed
Delete a list of properties for the specified object.

Parameters:
devname - Device name.
attname - Attribute name.
propnames - Property names.
Throws:
DevFailed

delete_device_attribute_property

public void delete_device_attribute_property(java.lang.String devname,
                                             java.lang.String attname,
                                             java.lang.String propname)
                                      throws DevFailed
Delete a property for the specified object.

Parameters:
devname - Device name.
attname - Attribute name.
propname - Property name.
Throws:
DevFailed

delete_device_attribute

public void delete_device_attribute(java.lang.String devname,
                                    java.lang.String attname)
                             throws DevFailed
Delete an attribute for the specified object.

Parameters:
devname - Device name.
attname - Attribute name.
Throws:
DevFailed

get_class_list

public java.lang.String[] get_class_list(java.lang.String servname)
                                  throws DevFailed
Query the database for a list of classes registred in the database.

Parameters:
servname - server name
Returns:
the list of all servers registred in TANGO database.
Throws:
DevFailed

get_class_property

public DbDatum[] get_class_property(java.lang.String name,
                                    java.lang.String[] propnames)
                             throws DevFailed
Query the database for a list of class properties for the pecified object.

Parameters:
name - Class name.
propnames - list of property names.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

get_class_property

public DbDatum get_class_property(java.lang.String name,
                                  java.lang.String propname)
                           throws DevFailed
Query the database for a class property for the pecified object.

Parameters:
name - Class name.
propname - list of property names.
Returns:
property in DbDatum object.
Throws:
DevFailed

get_class_property

public DbDatum[] get_class_property(java.lang.String name,
                                    DbDatum[] properties)
                             throws DevFailed
Query the database for a list of class properties for the pecified object. The property names are specified by the DbDatum array objects.

Parameters:
name - Class name.
properties - list of property DbDatum objects.
Returns:
properties in DbDatum objects.
Throws:
DevFailed

put_class_property

public void put_class_property(java.lang.String name,
                               DbDatum[] properties)
                        throws DevFailed
Insert or update a list of properties for the specified class. The property names and their values are specified by the DbDatum array.

Parameters:
name - Class name.
properties - Properties names and values array.
Throws:
DevFailed

delete_class_property

public void delete_class_property(java.lang.String name,
                                  java.lang.String[] propnames)
                           throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Class name.
propnames - Property names.
Throws:
DevFailed

delete_class_property

public void delete_class_property(java.lang.String name,
                                  java.lang.String propname)
                           throws DevFailed
Delete a property for the specified object.

Parameters:
name - Class name.
propname - Property name.
Throws:
DevFailed

delete_class_property

public void delete_class_property(java.lang.String name,
                                  DbDatum[] properties)
                           throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Class name.
properties - Property DbDatum objects.
Throws:
DevFailed

get_class_attribute_list

public java.lang.String[] get_class_attribute_list(java.lang.String classname,
                                                   java.lang.String wildcard)
                                            throws DevFailed
Query the database for a attributes defined for a class. All attributes for a class attribute are returned.

Parameters:
classname - class name.
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
attributes list for specified class
Throws:
DevFailed

get_class_attribute_property

public DbAttribute get_class_attribute_property(java.lang.String classname,
                                                java.lang.String attname)
                                         throws DevFailed
Query the database for a attribute properties for trhe specified class.

Parameters:
classname - class name.
attname - attribute name
Returns:
attribute properties for specified class and attribute.
Throws:
DevFailed

get_class_attribute_property

public DbAttribute[] get_class_attribute_property(java.lang.String classname,
                                                  java.lang.String[] attnames)
                                           throws DevFailed
Query the database for a list of class attributes properties for the pecified object.

Parameters:
classname - Class name.
attnames - list of attribute names.
Returns:
attribute properties for specified class and attributes.
Throws:
DevFailed

put_class_attribute_property

public void put_class_attribute_property(java.lang.String classname,
                                         DbAttribute[] attr)
                                  throws DevFailed
Insert or update a list of properties for the specified class attribute. The attribute name, the property names and their values are specified by the DbAttribute.

Parameters:
classname - Class name.
attr - DbAttribute objects containing attribute names, property names and property values.
Throws:
DevFailed

put_class_attribute_property

public void put_class_attribute_property(java.lang.String classname,
                                         DbAttribute attr)
                                  throws DevFailed
Insert or update a list of properties for the specified class attribute. The attribute name, the property names and their values are specified by the DbAttribute.

Parameters:
classname - Class name.
attr - DbAttribute object containing attribute name, property names and property values.
Throws:
DevFailed

delete_class_attribute_property

public void delete_class_attribute_property(java.lang.String name,
                                            java.lang.String attname,
                                            java.lang.String propname)
                                     throws DevFailed
Delete a property for the specified object.

Parameters:
name - Class name.
propname - Property names.
Throws:
DevFailed

delete_class_attribute_property

public void delete_class_attribute_property(java.lang.String name,
                                            java.lang.String attname,
                                            java.lang.String[] propnames)
                                     throws DevFailed
Delete a list of properties for the specified object.

Parameters:
name - Class name.
attname - attribute name.
propnames - Property names.
Throws:
DevFailed

get_device_exported

public java.lang.String[] get_device_exported(java.lang.String wildcard)
                                       throws DevFailed
Query database for list of exported devices.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
The list of exported devices
Throws:
DevFailed

get_device_exported_for_class

public java.lang.String[] get_device_exported_for_class(java.lang.String classname)
                                                 throws DevFailed
Query database for list of exported devices for the specified class name.

Parameters:
classname - class name to query the exported devices.
Returns:
The list of exported devices
Throws:
DevFailed

get_device_alias_list

public java.lang.String[] get_device_alias_list(java.lang.String wildcard)
                                         throws DevFailed
Query the database for a list of aliases for the specified wildcard.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the device aliases are stored in an array of strings.
Throws:
DevFailed

get_device_alias

public java.lang.String get_device_alias(java.lang.String devname)
                                  throws DevFailed
Query the database for an alias for the specified device.

Parameters:
devname - device's name.
Returns:
the device alias found.
Throws:
DevFailed

get_alias_device

public java.lang.String get_alias_device(java.lang.String alias)
                                  throws DevFailed
Query the database a device for the specified alias.

Parameters:
alias - The device name.alias
Returns:
the device aliases are stored in an array of strings.
Throws:
DevFailed

put_device_alias

public void put_device_alias(java.lang.String devname,
                             java.lang.String aliasname)
                      throws DevFailed
Set an alias for a device name

Parameters:
devname - device name.
aliasname - alias name.
Throws:
DevFailed

delete_device_alias

public void delete_device_alias(java.lang.String alias)
                         throws DevFailed
Query the database to delete alias for the specified device alias.

Parameters:
alias - device alias name.
Throws:
DevFailed

get_attribute_alias_list

public java.lang.String[] get_attribute_alias_list(java.lang.String wildcard)
                                            throws DevFailed
Query the database for a list of aliases for the specified wildcard.

Parameters:
wildcard - Wildcard char is '*' and matches wildvcard characters.
Returns:
the device aliases are stored in an array of strings.
Throws:
DevFailed

get_attribute_alias

public java.lang.String get_attribute_alias(java.lang.String attname)
                                     throws DevFailed
Query the database for a list of aliases for the specified attribute.

Parameters:
attname - The attribute name.
Returns:
the device aliases are stored in an array of strings.
Throws:
DevFailed

put_attribute_alias

public void put_attribute_alias(java.lang.String attname,
                                java.lang.String aliasname)
                         throws DevFailed
Set an alias for a attribute name

Parameters:
attname - attribute name.
aliasname - alias name.
Throws:
DevFailed

delete_attribute_alias

public void delete_attribute_alias(java.lang.String alias)
                            throws DevFailed
Query the database to delete alias for the specified attribute alias.

Parameters:
alias - device alias name.
Throws:
DevFailed

getDevices

public java.lang.String[] getDevices(java.lang.String wildcard)
                              throws DevFailed
Throws:
DevFailed

import_event

public DbEventImportInfo import_event(java.lang.String channel_name)
                               throws DevFailed
Query the database for the export info of the specified event.

Parameters:
channel_name - The event name.
Returns:
the information in a DbEventImportInfo.
Throws:
DevFailed

get_device_property_history

public DbHistory[] get_device_property_history(java.lang.String devname,
                                               java.lang.String propname)
                                        throws DevFailed
Returns the history of the specified device property.

Parameters:
devname - Device name
propname - Property name (can be wildcarded)
Throws:
DevFailed - in case of failure

get_device_attribute_property_history

public DbHistory[] get_device_attribute_property_history(java.lang.String devname,
                                                         java.lang.String attname,
                                                         java.lang.String propname)
                                                  throws DevFailed
Returns the history of the specified device attribute property.

Parameters:
devname - Device name
attname - Attribute name (can be wildcarded)
propname - Property name (can be wildcarded)
Throws:
DevFailed - in case of failure

get_class_property_history

public DbHistory[] get_class_property_history(java.lang.String classname,
                                              java.lang.String propname)
                                       throws DevFailed
Returns the history of the specified class property.

Parameters:
classname - Class name
propname - Property name (can be wildcarded)
Throws:
DevFailed - in case of failure

get_class_attribute_property_history

public DbHistory[] get_class_attribute_property_history(java.lang.String classname,
                                                        java.lang.String attname,
                                                        java.lang.String propname)
                                                 throws DevFailed
Returns the history of the specified class attribute property.

Parameters:
classname - Class name
attname - Attribute name (can be wildcarded)
propname - Property name (can be wildcarded)
Throws:
DevFailed - in case of failure

get_property_history

public DbHistory[] get_property_history(java.lang.String objname,
                                        java.lang.String propname)
                                 throws DevFailed
Returns the history of the specified object property.

Parameters:
objname - Object name
propname - Property name (can be wildcarded)
Throws:
DevFailed - in case of failure

getServices

public java.lang.String[] getServices(java.lang.String servicename,
                                      java.lang.String instname)
                               throws DevFailed
Query database for specified services.

Parameters:
servicename - The service name.
instname - The instance name (could be * for all instances).
Returns:
The device names found for specified service and instance.
Throws:
DevFailed - in case of failure

registerService

public void registerService(java.lang.String serviceName,
                            java.lang.String instanceName,
                            java.lang.String devname)
                     throws DevFailed
Register a device as a Tango service : ServiceName/InstanceName:DeviceName

Parameters:
serviceName - Service's name
instanceName - Instance service's name
devname - Device's name
Throws:
DevFailed

unregisterService

public void unregisterService(java.lang.String serviceName,
                              java.lang.String instanceName,
                              java.lang.String devname)
                       throws DevFailed
Unregister a device as a Tango service : ServiceName/InstanceName:DeviceName

Parameters:
serviceName - Service's name
instanceName - Instance service's name
devname - Device's name
Throws:
DevFailed

checkAccessControl

public int checkAccessControl(java.lang.String devname)
Check Tango Access. - Check if control access is requested. - Check who is the user and the host. - Check access for this user, this host and the specified device.

Parameters:
devname - Specified device name.
Returns:
The Tango access controle found.

isCommandAllowed

public boolean isCommandAllowed(java.lang.String classname,
                                java.lang.String cmd)
                         throws DevFailed
Check for specified class, the specified command is allowed.

Parameters:
classname - Specified class name.
cmd - Specified command name.
Throws:
DevFailed

isAccess_checked

public boolean isAccess_checked()

setAccess_checked

public void setAccess_checked(boolean access_checked)

getAccess_devfailed

public DevFailed getAccess_devfailed()

setAccess_devfailed

public void setAccess_devfailed(DevFailed access_devfailed)

getAccess_proxy

public fr.esrf.TangoApi.AccessProxy getAccess_proxy()

setAccess_proxy

public void setAccess_proxy(fr.esrf.TangoApi.AccessProxy access_proxy)

TANGO Java API
( TangORB-7.3.3.jar)