|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Server-side interface that represents a database. This interface extends AgiAdmDatabase and adds some public methods. It provides access to other server-side objects such as AgiTables and allows the programmer to invoke business objects and create URLs for Servlets.
This interface is implemented by objects representing individual
databases on a server. They can be obtained from AgiServer objects using
the getChildren()
and getDatabase()
methods,
or from Business Objects by calling evt.getDatabase()
on
any business object event. An Enumeration of AgiDatabase
objects representing all databases on the server can be obtained by calling
AgiServer.getDatabases()
.
AgiServer
Fields inherited from interface com.sssw.rts.adminapi.AgiAdmDatabase |
DATABASE,
DB_SILVERSTREAM,
PROP_DBDRIVER,
PROP_DBNAME,
PROP_DBPASSWD,
PROP_DBUSER,
PROP_ISSHADOWED,
PROP_JDBCDRIVER,
PROP_JDBCURL,
PROP_JDBCURLATTR,
PROP_LDSKEY,
PROP_MAX_CONNS,
PROP_MIN_CONNS,
PROP_SDBDRIVER,
PROP_SDBNAME,
PROP_SDBPASSWD,
PROP_SDBUSER,
PROP_SJDBCDRIVER,
PROP_SJDBCURL,
PROP_SJDBCURLATTR,
PROP_SLDSKEY,
PROP_SMAX_CONNS,
PROP_SMIN_CONNS,
PROP_TABLE_LIST_NAMES,
PROP_TABLE_LIST_PATTERNS |
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 | |
String |
createServletResource(String url,
String businessObjectName)
Creates a ServletResource (URL) in this database. |
com.sssw.srv.agents.AgoUUID |
createUserContentResource(String url,
String mimeTypeStr,
String busObjName)
Creates a new AgoUserContentResource for the specified URL. |
String |
getName()
Returns the name of this database |
com.sssw.srv.agents.AgoUserContentResource |
getResourceFromURL(String url)
Obtains the AgoUserContentResource with the specified URL. |
com.sssw.srv.agents.AgoUserContentResource |
getResourceFromUUID(com.sssw.srv.agents.AgoUUID uuid)
Obtains the AgoUserContentResource with the specified AgoUUID |
AgiTable |
getTable(String name)
Returns an AgiTable object allowing access to individual tables You must specify the name of a table within this database. |
Enumeration |
getTables()
Return an enumeration of objects implementing AgiTable representing all non-system tables in database. |
Serializable |
invokeAgent(String name)
Deprecated. as of SilverStream Version 2.0. Use AgiInvokeBusinessObject.invokeBusinessObject(String) ,
which can throw any Exception thrown by the
business object's invoked event. |
Serializable |
invokeAgent(String name,
Serializable param)
Deprecated. as of SilverStream version 2.0. Use AgiInvokeBusinessObject.invokeBusinessObject(String, Serializable) ,
which can throw any Exception thrown by the business object's invoked event. |
Methods implemented from interface com.sssw.rts.adminapi.AgiAdmDatabase |
analyzeTableListChanges,
commitTableListChanges,
getTableSubset,
synchronizeSchema |
Methods implemented from interface com.sssw.srv.api.AgiDatabaseConnection |
getConnection,
getConnectionCount,
getUnallocatedConnectionCount,
releaseConnection |
Methods implemented from interface com.sssw.rt.util.AgiInvokeBusinessObject |
invokeBusinessObject,
invokeBusinessObject |
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,
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 |
Method Detail |
public String getName()
This example gets the name of the database that a business object is in.
String dbName = evt.getDatabase().getName();
public AgiTable getTable(String name)
name
- name of a table in this database to return an AgiTable forAgiTable myTable = evt.getDatabase().getTable("myTable");
public Enumeration getTables()
Enumeration tables = evt.getDatabase().getTables(); while (tables.hasMoreElements()) { AgiTable table = (AgiTable)tables.nextElement(); // do something with the table }
public Serializable invokeAgent(String name, Serializable param) throws AgoUnrecoverableSystemException, IOException
AgiInvokeBusinessObject.invokeBusinessObject(String, Serializable)
,
which can throw any Exception thrown by the business object's invoked event.
name
- full name (including package) of an agent
(business object) to invoke. The agent should be in the same
database. To call an agent in a different database on the same server
prepend the name of the database and a ":" to the name.param
- (optional) a parameter to pass to the agent (business
object)
The method returns a result as set by the agent via
AgoInvokedEvent.setResult()
.
AgiInvokeBusinessObject.invokeBusinessObject( String agentSpec )
,
AgiInvokeBusinessObject.invokeBusinessObject( String agentSpec, Serializable param )
,
AgoInvokedEvent.setResult( Serializable, String )
,
AgoInvokedEvent.setResult( Serializable )
public Serializable invokeAgent(String name) throws AgoUnrecoverableSystemException, IOException
AgiInvokeBusinessObject.invokeBusinessObject(String)
,
which can throw any Exception thrown by the
business object's invoked event.
name
- full name (including package) of an agent
(business object) to invoke. The agent should be in the same
database. To call an agent in a different database on the same server
prepend the name of the database and a ":" to the nameAgiInvokeBusinessObject.invokeBusinessObject( String agentSpec )
,
AgiInvokeBusinessObject.invokeBusinessObject( String agentSpec, Serializable param )
,
AgoInvokedEvent.setResult(Serializable, String)
,
AgoInvokedEvent.setResult(Serializable)
public String createServletResource(String url, String businessObjectName) throws AgoUnrecoverableSystemException, IOException
url
- URL in String form relative to this database (should
not begin with '/')businessObjectName
- the fully qualified class name (including
package) of the servlet to call to process requests received by this
resource.If the URL has more than one component, all intervening components are created as container resources.
This is an example of an invoked business object creating an URL that is passed in as a String parameter to the business object
AgiDatabase db = evt.getDatabase(); db.createServletResource((String)evt.getParameter(), "myServlet");
public com.sssw.srv.agents.AgoUUID createUserContentResource(String url, String mimeTypeStr, String busObjName) throws AgoUnrecoverableSystemException
url
- the URl to createmimeTypeStr
- the MIME Type of the URLbusObjName
- name of the Servlet this resource should call.If the URL has more than one component, all intervening components are created as container resources. The URL should be relative (that is, it should not begin with a /) to the webbase of the business object.
public com.sssw.srv.agents.AgoUserContentResource getResourceFromUUID(com.sssw.srv.agents.AgoUUID uuid) throws com.sssw.srv.agents.AgoUnknownResourceException, com.sssw.srv.agents.AgoInvalidResourceException
uuid
- createServletResource()
. Servlet resources don't expose
their UUIDs so this method should not be needed.
public com.sssw.srv.agents.AgoUserContentResource getResourceFromURL(String url) throws com.sssw.srv.agents.AgoUnknownResourceException, com.sssw.srv.agents.AgoInvalidResourceException
url
- the URL of the resource to get in String form
relative to this database (should not begin with '/').createServletResource()
. Servlet resources don't expose
their UUIDs so this method should not be needed.
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |