SilverStream
Application Server 3.5

com.sssw.rts.adminapi
Interface AgiAdmDatabase

All Superinterfaces:
AgiAdmChanges, AgiAdmContainer, AgiAdmContainerBase, AgiAdmElement, AgiAdmElementBase, AgiAdmPropertyBag
All Known Subinterfaces:
AgiDatabase

public interface AgiAdmDatabase
extends AgiAdmContainer

Implemented by objects that represent databases residing on a SilverStream Server. It contains fields that can be retrieved and set with the getProperty and setProperty methods.


Field Summary
static String DATABASE
          Defines the database type of element.
static String DB_SILVERSTREAM
          Defines the SilverMaster database as the well-known value to use for the AgiAdmServer.INFO_DATABASE_NAME additional property supplied into AgiAdmServer.getElement via the props argument.
static String PROP_DBDRIVER
          A database element property name for the database driver.
static String PROP_DBNAME
          A database element property name for database name.
static String PROP_DBPASSWD
          A database element property name for database password.
static String PROP_DBUSER
          A database element property name for database user name.
static String PROP_ISSHADOWED
          A database element property name for "is shadowed".
static String PROP_JDBCDRIVER
          A database element property name for the JDBC driver.
static String PROP_JDBCURL
          A database element property name for JDBC URL.
static String PROP_JDBCURLATTR
          A database element property name for JDBC URL attributes.
static String PROP_LDSKEY
          A database element property name for the LDS key.
static String PROP_MAX_CONNS
          A database property name for the minimum of database connections.
static String PROP_MIN_CONNS
          A database property name for the minimum of database connections.
static String PROP_SDBDRIVER
          A database element property name for the shadowed database driver.
static String PROP_SDBNAME
          A database element property name for the name of the shadowed database (the database where the system tables are stored).
static String PROP_SDBPASSWD
          A database element property name for the shadowed database password.
static String PROP_SDBUSER
          A database element property name for the shadowed database user name.
static String PROP_SJDBCDRIVER
          A database element property name for the shadowed database JDBC driver.
static String PROP_SJDBCURL
          A database element property name for the shadowed database JDBC URL.
static String PROP_SJDBCURLATTR
          A database element property name for the shadowed database JDBC URL attributes.
static String PROP_SLDSKEY
          A database element property name for the shadowed database LDS key.
static String PROP_SMAX_CONNS
          A database element property name for the maximum number of connections for the shadowed database.
static String PROP_SMIN_CONNS
          A database element property name for the minimum number of connections for the shadowed database.
static String PROP_TABLE_LIST_NAMES
          Property for specifying a subset of database tables to use when adding the database.
static String PROP_TABLE_LIST_PATTERNS
          Property for specifying a subset of database tables to use when adding the database.
 
Fields inherited from interface com.sssw.rts.adminapi.AgiAdmContainer
GET_CHILDREN_EX, GET_CHILDREN_NTDOMAINS_PRIMARY_ONLY, GET_CHILDREN_NTDOMAINS_TRUSTED_ONLY, GET_CHILDREN_SORTED, GET_CHILDREN_WITH_INFO
 
Fields inherited from interface com.sssw.rts.adminapi.AgiAdmElement
ACL_KEY, APPLY_TO_DESC, APPLY_TO_DESC_SUPPORTED, DIRECTORY_LIST_SECURITY, GET_PERMS_AS_ACL, GET_PERMS_DEFAULT, PROP_CERTIFICATE, PROP_DESCRIPTION, PROP_DOMAIN, PROP_FULL_NAME, PROP_IS_LOCKSMITH, PROP_LDAP_SERVER, PROP_NAME, PROP_NISPLUS_SERVER, PROP_PARENT_URL, PROP_PASSWORD, PROP_QUAL_NAME, PROP_TYPE, PROP_URL, REQUIRE_LOGIN, REQUIRE_LOGIN_SUPPORTED
 
Fields inherited from interface com.sssw.rts.adminapi.AgiAdmContainerBase
GET_CHILDREN_DFLT
 
Method Summary
 AgoAdmTableListChanges analyzeTableListChanges(String[] tableList, String[] tableListPatterns, boolean bCommitIfOk)
          Analyze the impact of changes to the database table list.
 void commitTableListChanges()
          Commit the changes described in analyzeTableListChanges.
 AgoAdmTableSubset getTableSubset()
          Get the current table subset, if any.
 void synchronizeSchema()
          Synchronize the database's schema.
 
Methods implemented from interface com.sssw.rts.adminapi.AgiAdmElement
getPermissions, getServerURL, getURL, getVariables, isAuthorized, setPermissions
 
Methods implemented from interface com.sssw.rts.adminapi.AgiAdmContainerBase
addChild, getChild, getChildren
 
Methods implemented from interface com.sssw.rts.adminapi.AgiAdmElementBase
delete, getName, getType
 
Methods implemented from interface com.sssw.rts.adminapi.AgiAdmPropertyBag
getProperties, getProperty, setProperties, setProperty
 
Methods implemented from interface com.sssw.rts.adminapi.AgiAdmChanges
cancelChanges, saveChanges
 

Field Detail

DATABASE

public static final String DATABASE
Defines the database type of element.

DB_SILVERSTREAM

public static final String DB_SILVERSTREAM
Defines the SilverMaster database as the well-known value to use for the AgiAdmServer.INFO_DATABASE_NAME additional property supplied into AgiAdmServer.getElement via the props argument.

PROP_DBNAME

public static final String PROP_DBNAME
A database element property name for database name. Value type: String. Use for getting property values.

This property is read-only. The database driver can be changed by dropping and re-adding the database.


PROP_DBUSER

public static final String PROP_DBUSER
A database element property name for database user name. Value type: String. Use for getting and setting property values, adding a database.

Changes to the value will not take effect until the server is restarted.


PROP_DBPASSWD

public static final String PROP_DBPASSWD
A database element property name for database password. Value type: String. Use for setting property values, adding a database.

The value of this property cannot be retrieved. Changes to the value will not take effect until the server is restarted.


PROP_JDBCURL

public static final String PROP_JDBCURL
A database element property name for JDBC URL. Value type: String. Use for getting and setting property values, adding a database.

PROP_JDBCURLATTR

public static final String PROP_JDBCURLATTR
A database element property name for JDBC URL attributes. Value type: String. Use for getting and setting property values, adding a database.

PROP_JDBCDRIVER

public static final String PROP_JDBCDRIVER
A database element property name for the JDBC driver. Value type: String. Use for getting property values.

This property is read-only. Its value can be changed by dropping and re-adding the database.


PROP_LDSKEY

public static final String PROP_LDSKEY
A database element property name for the LDS key. Value type: String. Use for getting property values, adding a database.

This property is read-only, its value may be changed by dropping and re-adding the database.


PROP_DBDRIVER

public static final String PROP_DBDRIVER
A database element property name for the database driver. Value type: String. Use for getting property values.

This property is read-only. The database driver can be changed by dropping and re-adding the database.


PROP_MIN_CONNS

public static final String PROP_MIN_CONNS
A database property name for the minimum of database connections. Value type: Integer. Use when getting and setting property values, adding a database.

This value overrides the value set via AgiAdmServer.PROP_MINDBCONNS.


PROP_MAX_CONNS

public static final String PROP_MAX_CONNS
A database property name for the minimum of database connections. Value type: Integer. Use when getting and setting property values, adding a database.

This value overrides the value set via AgiAdmServer.PROP_MAXDBCONNS.


PROP_ISSHADOWED

public static final String PROP_ISSHADOWED
A database element property name for "is shadowed". The value of the property specifies whether the system tables should be stored separately from data tables. Value type: Boolean. Use for getting property values, adding a database.

This property is read-only. The value of this property can be changed by dropping and re-adding the database.


PROP_SDBNAME

public static final String PROP_SDBNAME
A database element property name for the name of the shadowed database (the database where the system tables are stored). Value type: String. Use for getting property values, adding a database.

This property is read-only. The shadowed database name can be changed by dropping and re-adding the database.


PROP_SDBUSER

public static final String PROP_SDBUSER
A database element property name for the shadowed database user name. Value type: String. Use for getting and setting property values, adding a database.

Changes to the value will not take effect until the server is restarted.


PROP_SDBPASSWD

public static final String PROP_SDBPASSWD
A database element property name for the shadowed database password. Value type: String. Use for setting property values, adding a database.

The value of this property cannnot be retrieved.

Changes to the value will not take effect until the server is restarted.


PROP_SJDBCURL

public static final String PROP_SJDBCURL
A database element property name for the shadowed database JDBC URL. Use for getting and setting property values, adding a database.

PROP_SJDBCURLATTR

public static final String PROP_SJDBCURLATTR
A database element property name for the shadowed database JDBC URL attributes. Value type: String. Use for getting and setting property values, adding a database.

PROP_SJDBCDRIVER

public static final String PROP_SJDBCDRIVER
A database element property name for the shadowed database JDBC driver. Value type: String. Use for getting and setting property values.

PROP_SLDSKEY

public static final String PROP_SLDSKEY
A database element property name for the shadowed database LDS key. Value type: String. Use for getting property values, adding a database.

This property is read-only. Its value can be changed by dropping and re-adding the database.


PROP_SDBDRIVER

public static final String PROP_SDBDRIVER
A database element property name for the shadowed database driver. Value type: String. Use for getting and setting property values.

PROP_SMIN_CONNS

public static final String PROP_SMIN_CONNS
A database element property name for the minimum number of connections for the shadowed database. Value type: Integer. Use for getting and setting property values, adding a database.

PROP_SMAX_CONNS

public static final String PROP_SMAX_CONNS
A database element property name for the maximum number of connections for the shadowed database. Value type: Integer. Use for getting and setting property values, adding a database.

PROP_TABLE_LIST_NAMES

public static final String PROP_TABLE_LIST_NAMES
Property for specifying a subset of database tables to use when adding the database. Each member of the list is an individual table name. This property may be used in conjunction with PROP_TABLE_LIST_PATTERNS. If neither of the properties is specified, then all the database tables are added by default.

Value type: String array

You may use this property when adding a database:

 	String[] tableList = new String[3];
 	tableList[0] = "employees";
 	tableList[1] = "hrRecords";
 	tableList[2] = "floor_Offices";
 	AgiAdmServer server = AgAdmin.getServer("myServer", -1);
 	Hashtable props = new Hashtable();
 	props.put(AgiAdmDatabase.PROP_TABLE_LIST_NAMES, tableList);
 	// ... specify other database properties ...
 	server.addChild("database1", AgiAdmDatabase.DATABASE, props);
 

PROP_TABLE_LIST_PATTERNS

public static final String PROP_TABLE_LIST_PATTERNS
Property for specifying a subset of database tables to use when adding the database. The list consists of one or more string patterns for table names. This property may be used in conjunction with PROP_TABLE_LIST_NAMES. If neither of the propertis is specified, then all the database tables are added by default.

Value type: String array

In patterns, "%" means match any substring of 0 or more characters, and "_" means match any one character.

You may use this property when adding a database:

 	String[] tableListPatterns = new String[3];
 	// get tables whose names start with "employee"
 	tableListPatterns[0] = "employee%";
 	// get tables whose names end with "MainOffice"
 	tableListPatterns[1] = "%MainOffice";
 	// match any one character between "floor" and "Offices"
  	tableListPatterns[2] = "floor_Offices";
  	AgiAdmServer server = AgAdmin.getServer("myServer", -1);
  	Hashtable props = new Hashtable();
  	props.put(AgiAdmDatabase.PROP_TABLE_LIST_PATTERNS, tableListPatterns);
  	// ... specify other database properties ...
  	server.addChild("database1", AgiAdmDatabase.DATABASE, props);
 
Method Detail

synchronizeSchema

public void synchronizeSchema()
                       throws AgoUnrecoverableSystemException,
                              AgoSecurityException
Synchronize the database's schema.
Returns:
none
Usage:

Use this method to update an existing SilverStream database schema with any structural changes made with an external tool, for example, after SQL Central was used to modify a SQL Anywhere database outside of SilverStream.

Example:
 AgiAdmDatabase db = (AgiAdmDatabase)server.getElement(
   "myDatabase", AgiAdmDatabase.DATABASE, null);
 db.synchronizeSchema();
 

analyzeTableListChanges

public AgoAdmTableListChanges analyzeTableListChanges(String[] tableList,
                                                      String[] tableListPatterns,
                                                      boolean bCommitIfOk)
                                               throws AgoUnrecoverableSystemException,
                                                      AgoSecurityException
Analyze the impact of changes to the database table list.
Parameters:
tableList - the new list of table names that is to replace the current list; each member of the list is an individual table name
tableListPatterns - the new list of table names that is to replace the current list; each member of the list is a table name pattern where "%" means match any substring of 0 or more characters; "_" means match any one character.
bCommitIfOk - if true, do a commit of changes if the analysis succeeded, otherwise just return the resulting analysis description
Returns:
AgoAdmTableListChanges (object describing the effect of the modifications)
Usage:
This method does not actually do any modifications unless bCommitIfOK is set to true; use commitTableListChanges to modify the table list.

If both the table name list and the table name pattern list are null or zero-length arrays, then the method assumes that all database tables are to be used.


commitTableListChanges

public void commitTableListChanges()
                            throws AgoUnrecoverableSystemException,
                                   AgoSecurityException
Commit the changes described in analyzeTableListChanges.
Returns:
none

getTableSubset

public AgoAdmTableSubset getTableSubset()
                                 throws AgoUnrecoverableSystemException,
                                        AgoSecurityException
Get the current table subset, if any.
Returns:
AgoAdmTableSubset describing the subset, or null if all the database tables are used for the given database

SilverStream
Application Server 3.5