Content Manager OnDemand V8.5 WEK APIs

com.ibm.edms.od
Class ODServer

java.lang.Object
  extended by com.ibm.edms.od.ODServer
All Implemented Interfaces:
java.io.Serializable

public class ODServer
extends java.lang.Object
implements java.io.Serializable

A class representing a connection to an OnDemand server. From this class you can logon to an OnDemand Server, logoff from an OnDemand Server, change the user's password, get a listing of OnDemand Folders that are available to the user, and open an OnDemand Folder (ODFolder) for document searches and retrieval.

The ODServer object is the base object of a single ODWEK Instance. All other ODWEK (OnDemand Web Enablement Kit) objects such as ODFolder, ODHit, and etc. will be based on this ODServer object.

This grouping of objects will be referred to in this JavaDoc as a single ODWEK Instance.

WARNING:
It is the application developer's responsibility to limit concurrent access to a single ODWEK Instance. Failure to do so will result in unexpected results. If the client application requires more throughput, then additional ODWEK Instances should be initialized to handle an increased number of threads.
For Example: If the application was to make two simultaneous ODFolder.Search() calls against a single ODWEK Instance, the second search will be blocked until the first completes. Best Usage here would be to have a separate ODWEK Instance to handle each ODFolder.search() call separately.

(c) Copyright IBM Corp. 1993, 2003. All Rights Reserved

See Also:
ODServer.ODServer(ODConfig), ODServer.ODServer(), ODServer.cancel(), Serialized Form

Constructor Summary
ODServer()
          Deprecated. Use ODServer.ODServer(ODConfig cfg). Removed v8.4.
ODServer(ODConfig cfg)
          The class constructor.
 
Method Summary
 ODHold addHold(java.lang.String name, java.lang.String desc)
          Add a new Hold Definition to the OnDemand Server.
 void cancel()
          Cancel the current search or retrieve operation.
 void changePassword(java.lang.String newPassword)
          Change the user's password.
 void changePassword(java.lang.String server, java.lang.String user, java.lang.String password, java.lang.String newPassword)
          Change the user's password.
 long getAnnotationAddMask()
          Get the mask to determine which types of annotations can be added, and what the default is set to.
 ODApplicationGroup getApplicationGroup(long id)
          Get an ODApplicationGroup object.
 ODApplicationGroup getApplicationGroup(java.lang.String name)
          Get an ODApplicationGroup object.
 java.lang.String[] getApplicationGroupNames()
          Get String[] of names for all Application Groups available to this user/server.
 java.lang.String[] getApplicationGroupNames(java.lang.String criteria)
          Get String[] of Application Group names that match the criteria.
 java.util.Enumeration getCabinets()
          Get the Cabinets defined for this ODServer.
 char getConnectType()
          Get the connection type used during logon.
 long getCurrentDate(char qual)
          Return the current date in the OnDemand Internal date format.
 java.lang.String getExternalDate(long internalDate, java.lang.String fmt, char qual)
          Convert an OnDemand Internal date format to a formatted string
 java.lang.String getFolderDescription(java.lang.String fldName)
          Get the folder description for the specified folder.
 java.util.Enumeration getFolderNames()
          Get the folder names.
 java.util.Enumeration getFolderNames(java.lang.String criteria)
          Get the list of folder names that match the search criteria.
 java.util.Enumeration getFolders()
          Return an Enumeration of all ODFolder objects available to this user/server.
 java.util.Enumeration getFolders(java.lang.String criteria)
          Return an Enumeration of all ODFolder objects available to this user/server, limited by the search criteria specified.
 java.util.Enumeration getHolds()
          Get an enumeration of ODHold objects that are defined for this OnDemand Server/User.
 long getInternalDate(java.lang.String date, java.lang.String fmt, char qual)
          Convert date string to OnDemand Internal date format.
 java.lang.String getMessageOfTheDay()
           
 int getNumCabinets()
          Get the number of Cabinets defined for this ODServer.
 int getNumFolders()
          Get the number of folders available, based on the user permissions associated with this ODServer object.
 int getNumFolders(java.lang.String criteria)
          Get the number of folders.
 java.lang.String getOS()
          Get the OS type that the OnDemand Server is running on.
 java.lang.String getPassword()
          Return the user's password.
 int getPort()
          Get the port used for logon.
 java.lang.String getServerName()
          Get the server name.
 java.lang.String[] getServerPrinters()
          Return a list of server printers.
 char getServerPrinterType(java.lang.String printer)
          Return the type of the specified server printer.
 long getServerTimeoutValue()
          Get the server timeout value.
 java.util.Hashtable getTransformViewersForDocType(char doctype)
          Get a listing of Transform viewer names that are defined for a specific docType.
 ODUser getUser()
          Get the ODUser object for the current user.
 java.lang.String getUserAlias()
          Get the alias of the user.
 java.lang.String getUserId()
          Get the name of the user.
 java.lang.String getVersion()
          Get the ODWEK Version string for this version of the ODApi.jar.
 void initialize(java.lang.String applicationName)
          Initialize the connection to the OnDemand server.
 void initialize(java.lang.String configDir, java.lang.String applicationName)
          Deprecated. Use ODServer.initialize(String applicationName). Removed v8.4.
 void initialize(java.lang.String configDir, java.lang.String applicationName, int code_page)
          Deprecated. Use ODServer.initialize(String applicationName). Removed v8.4.
 boolean isInitialized()
          Determine whether the ODServer object is currently initialized.
 boolean isServerTimedOut()
          Get the server timeout status.
 boolean keepServerAlive()
          Keep the connection alive by resetting the server timeout timer.
 void logoff()
          This method will log the user off of the OD server.
 void logon()
          This method is used to logon to the server.
 void logon(java.lang.String server, java.lang.String user, java.lang.String password)
          This method is used to logon to the OnDemand server.
 void logon(java.lang.String server, java.lang.String user, java.lang.String password, char connectType, int port, java.lang.String resv)
          Deprecated. Use ODServer#logon(ODServer,User, Password).
 void logon(java.lang.String server, java.lang.String user, java.lang.String password, java.lang.String new_password)
          This method is used to logon to the OnDemand server.
 ODFolder openFolder(java.lang.String fldName)
          This method will open the specified folder.
 void setConnectType(char connectType)
          This method is used to set the server connection type.
 void setPassword(java.lang.String password)
          Set the password for the user.
 void setPort(int port)
          Set the OD port number.
 void setServerName(java.lang.String server)
          Set the name of the OnDemand server to logon with.
 void setSSL(boolean useSSL, java.lang.String keyRingFile, java.lang.String keyStashFile)
          Set details for SSL usages with this ODServer.
 void setUserAlias(java.lang.String user_alias)
          Set the name of the user alias to log onto OD with.
 void setUserId(java.lang.String user)
          Set the name of the user to log onto OD with.
 void terminate()
          Terminate the connection to the OnDemand server.
 void unifiedLogon(java.lang.String server)
          This method will use UnifiedLogon to logon to the server.
 byte[] viewerPassthru(java.lang.String queryStr)
          This method is used to pass ODWEK document viewer requests for data through to the ODWEK code.
 byte[] xmlParse(java.lang.String xml, int action, boolean continueOnError, int exportFlags, int exportEncoding, java.lang.String exportSchemaLocation, ODCallback odc)
          Interface to arsxml batch administration client.
 byte[] xmlParse(java.lang.String xml, int action, java.util.Properties xmlProperties, ODCallback odc)
          Interface to arsxml batch administration client.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODServer

public ODServer()
Deprecated. Use ODServer.ODServer(ODConfig cfg). Removed v8.4.

The class constructor.

See Also:
ODServer.ODServer(ODConfig)

ODServer

public ODServer(ODConfig cfg)
The class constructor. This constructor takes a ODConfig object which contains all the configuration details for this ODServer.

Parameters:
cfg - ODConfig object with the configuration details.
See Also:
ODConfig
Method Detail

initialize

public void initialize(java.lang.String applicationName)
                throws ODException
Initialize the connection to the OnDemand server. This method must be called after object creation and before the logon method is called.

Parameters:
applicationName - This is the application name that will be invoked by the ODWEK viewers via URL when requesting addition document data. This should include the relative webserver path.
EXAMPLE:
      odServer.initialze("/CustomServlet/");
 
Throws:
ODException
See Also:
ODServer.initialize(String configDir, String applicationName), ODServer.viewerPassthru(java.lang.String)

initialize

public void initialize(java.lang.String configDir,
                       java.lang.String applicationName)
                throws ODException
Deprecated. Use ODServer.initialize(String applicationName). Removed v8.4.

Initialize the connection to the OnDemand server. This method must be called after object creation and before the logon method is called.

Parameters:
configDir - The directory where the arswww.ini file exists.
applicationName - This is the application name that will be invoked by the ODWEK viewers via URL when requesting addition document data. This should include the relative webserver path.
EXAMPLE:
      odServer.initialze("/CustomServlet/");
 
Throws:
ODException
See Also:
#setApplicationName

initialize

public void initialize(java.lang.String configDir,
                       java.lang.String applicationName,
                       int code_page)
                throws ODException
Deprecated. Use ODServer.initialize(String applicationName). Removed v8.4.

Initialize the connection to the OnDemand server. This method must be called after object creation and before the logon method is called.

NOTE: ODWEK will only use Codepage 1208 internally. All input/output from ODWEK APIs will be 1208.

Parameters:
configDir - The directory where the arswww.ini file exists.
applicationName - This is the application name that will be invoked by the ODWEK viewers via URL when requesting addition document data. This should include the relative webserver path.
EXAMPLE:
      odServer.initialze("/CustomServlet/");
 
Throws:
ODException
See Also:
#setApplicationName

terminate

public void terminate()
Terminate the connection to the OnDemand server. This method must be called when you are done with the server object. NOTE: Only ODServer objects that have been sucessfully initialized need to be terminated.

See Also:
#initialize(), ODServer.isInitialized()

isInitialized

public boolean isInitialized()
Determine whether the ODServer object is currently initialized.

Returns:
true or false.

cancel

public void cancel()
Cancel the current search or retrieve operation. To issue this call you will need to create another thread and make the call from that thread using the same ODServer object that the search/retrieve call was made from.
Notes:
  1. Based on timing of where the server-side transaction is currently running, a cancellation may not always be possible.
  2. For search methods a successful cancel call is not considered an error and therefore a partial hit list may be returned.
  3. For retrieve methods a successful cancel call is considered an error and therefore the retrieve method call will throw an exception.


logon

public void logon(java.lang.String server,
                  java.lang.String user,
                  java.lang.String password,
                  char connectType,
                  int port,
                  java.lang.String resv)
           throws java.lang.Exception
Deprecated. Use ODServer#logon(ODServer,User, Password).

This method is used to logon to the OnDemand server.

Parameters:
server - The name of the OD server.
user - The name of the user.
password - The user's password.
Throws:
java.lang.Exception

logon

public void logon(java.lang.String server,
                  java.lang.String user,
                  java.lang.String password)
           throws java.lang.Exception
This method is used to logon to the OnDemand server.

Parameters:
server - The name of the OD server.
user - The name of the user.
password - The user's password.
Throws:
java.lang.Exception
See Also:
ODServer.setSSL(boolean, java.lang.String, java.lang.String)

logon

public void logon(java.lang.String server,
                  java.lang.String user,
                  java.lang.String password,
                  java.lang.String new_password)
           throws java.lang.Exception
This method is used to logon to the OnDemand server.

Parameters:
server - The name of the OD server.
user - The name of the user.
password - The user's password.
new_password - A new password to be set if the current password has expired.
Throws:
java.lang.Exception
See Also:
ODServer.initialize(java.lang.String), ODServer.setSSL(boolean, java.lang.String, java.lang.String)

unifiedLogon

public void unifiedLogon(java.lang.String server)
                  throws java.lang.Exception
This method will use UnifiedLogon to logon to the server. Only OnDemand Servers on Windows or z/OS provide support for Unified Logon. See OnDemand Server Install and Config documentation for details on configuring Unified Logon support with the OnDemand Servers.

Parameters:
server - The name of the OD server.
Throws:
java.lang.Exception
See Also:
ODServer.setSSL(boolean, java.lang.String, java.lang.String)

logon

public void logon()
           throws java.lang.Exception
This method is used to logon to the server. This method is to be called only after ODServer.setServerName(java.lang.String), ODServer.setUserId(java.lang.String) and ODServer.setPassword(java.lang.String) have been called.

Throws:
java.lang.Exception
See Also:
ODServer.initialize(java.lang.String), ODServer.setUserId(java.lang.String), ODServer.setPassword(java.lang.String), ODServer.setServerName(java.lang.String), ODServer.setSSL(boolean, java.lang.String, java.lang.String)

logoff

public void logoff()
            throws java.lang.Exception
This method will log the user off of the OD server.

Throws:
java.lang.Exception

changePassword

public void changePassword(java.lang.String server,
                           java.lang.String user,
                           java.lang.String password,
                           java.lang.String newPassword)
                    throws java.lang.Exception
Change the user's password. This method will logon/logoff the user on if the logon method was not previously called.

Parameters:
server - The name of the OD server.
user - The name of the user.
password - The user's password.
newPassword - The user's new password.
Throws:
java.lang.Exception - "Incorrect Logon Parameters" if Server, UserID or Password are not set.

changePassword

public void changePassword(java.lang.String newPassword)
                    throws java.lang.Exception
Change the user's password. This method will logon/logoff the user on if the logon method was not previously called. IF the user is not logged on, then this method is to be called only after ODServer.setServerName(java.lang.String), ODServer.setUserId(java.lang.String) and ODServer.setPassword(java.lang.String) have been called.

Parameters:
newPassword - The user's new password.
Throws:
java.lang.Exception - "Incorrect Logon Parameters" if Server, UserID or Password are not set.

openFolder

public ODFolder openFolder(java.lang.String fldName)
                    throws java.lang.Exception
This method will open the specified folder.

Parameters:
fldName - Name of folder to open.
Returns:
ODFolder This object contains folder criteria information and is the object which searches can be performed against.
Throws:
java.lang.Exception
See Also:
ODFolder

viewerPassthru

public byte[] viewerPassthru(java.lang.String queryStr)
                      throws java.lang.Exception
This method is used to pass ODWEK document viewer requests for data through to the ODWEK code.

Parameters:
queryStr - The query string as sent from the ODWEK document viewer.
Returns:
byte[] A byte array containing data to be sent back to the ODWEK document viewer.
Throws:
java.lang.Exception
See Also:
ODServer#retrieve

getFolders

public java.util.Enumeration getFolders(java.lang.String criteria)
                                 throws java.lang.Exception
Return an Enumeration of all ODFolder objects available to this user/server, limited by the search criteria specified.
Any existing folder lists associated with this ODServer will be replaced with the results of this call.

NOTE: The folders in this enumeration will need to be opened before use.

Parameters:
criteria - The search criteria to be used to limit the folder list. Can include the wildcard '%'. Examples include: 'Credit%', 'C%', etc... A complete folder name may be specified as well which results in only one folder being returned.
Returns:
Enumeration of ODFolder Objects.
Throws:
java.lang.Exception
See Also:
ODFolder.open()

getNumFolders

public int getNumFolders()
                  throws java.lang.Exception
Get the number of folders available, based on the user permissions associated with this ODServer object.

NOTE: Any folder list previously retrieved will be replaced by the result of this call.

Returns:
int The number of folders accessible to the user.
Throws:
java.lang.Exception

getNumFolders

public int getNumFolders(java.lang.String criteria)
                  throws java.lang.Exception
Get the number of folders. This method will query the server for the folders which match the specified criteria.

Parameters:
criteria - Folder search criteria. This can include wild cards. Examples include: 'Credit%', 'C%', etc... A complete folder name may be specified as well which results in only one folder being returned.

NOTE: Any folder list previously retrieve will be replaced by the result of this call.
Returns:
int The number of folders accessible to the user based upon the criteria specified.
Throws:
java.lang.Exception

getFolderNames

public java.util.Enumeration getFolderNames()
                                     throws java.lang.Exception
Get the folder names. This method will query the server for the folders which are accessible to the user.

Returns:
An enumeration of String objects containing the names of all folders accessible to the user.

NOTE: Any folder list previously retrieved will be replaced by the results of this call.
Throws:
java.lang.Exception
See Also:
ODServer.openFolder(java.lang.String)

getFolderNames

public java.util.Enumeration getFolderNames(java.lang.String criteria)
                                     throws java.lang.Exception
Get the list of folder names that match the search criteria.
This method will query the server for the folders which match the specified criteria.

Parameters:
criteria - Folder search criteria. This can include wild cards. Examples include: 'Credit%', 'C%', etc... A complete folder name may be specified as well which results in only one folder name being returned.

NOTE: Any folder list previously retrieved will be replaced by the results of this call.
Returns:
Enumeration An enumeration of String objects containing all folders accessible to the user based upon the criteria specified.
Throws:
java.lang.Exception
See Also:
ODServer.openFolder(java.lang.String)

getFolderDescription

public java.lang.String getFolderDescription(java.lang.String fldName)
                                      throws java.lang.Exception
Get the folder description for the specified folder.

Parameters:
fldName - The name of the folder to retrieve a description for.
Returns:
String The description of the specified folder.
Throws:
java.lang.Exception

isServerTimedOut

public boolean isServerTimedOut()
Get the server timeout status.

Returns:
true if the server is timed out.

getServerTimeoutValue

public long getServerTimeoutValue()
Get the server timeout value.

Returns:
the server timeout value in seconds.

keepServerAlive

public boolean keepServerAlive()
Keep the connection alive by resetting the server timeout timer.

Returns:
true if the operation is successful.

getServerName

public java.lang.String getServerName()
Get the server name.

Returns:
String The name of the server.

setServerName

public void setServerName(java.lang.String server)
Set the name of the OnDemand server to logon with.

Parameters:
server - Name of the OnDemand server.
See Also:
ODServer.logon(java.lang.String, java.lang.String, java.lang.String, char, int, java.lang.String)

getUserId

public java.lang.String getUserId()
Get the name of the user.

Returns:
String The name of the user.

getUserAlias

public java.lang.String getUserAlias()
Get the alias of the user. NOTE:This call must be made after a sucessful Logon to take affect.

Returns:
String The user alias.
See Also:
ODServer.setUserAlias(java.lang.String)

setUserId

public void setUserId(java.lang.String user)
Set the name of the user to log onto OD with.

Parameters:
user - The name of the user.

setUserAlias

public void setUserAlias(java.lang.String user_alias)
Set the name of the user alias to log onto OD with. This alias can be used as a secondary id when a web application is accessing ODWEK via a single OnDemand UserID. This user alias will then be logged in the OnDemand System Log.

For Example: If you only have a single OnDemand user defined for all of your web application users, but you would like to see who is actually issuing a query against a specific Folder, you could set a unique user alias for this ODServer, and the user alias would then be referenced in the OnDemand System log for the query.

Parameters:
user_alias - The alias of the user. KVW - CMVC 69695

setSSL

public void setSSL(boolean useSSL,
                   java.lang.String keyRingFile,
                   java.lang.String keyStashFile)
Set details for SSL usages with this ODServer. These settings will overwrite any settings previously specified in the ODConfig.

Parameters:
boolean - Set to True if SSL port will be used.
String - KeyRingFile Fully qualified path to the SSL Key Ring File.
String - KeyStashFile Fully qualified path to the SSL Key Stash File.

getPassword

public java.lang.String getPassword()
Return the user's password. This will return the user's password in clear text.

Returns:
String The user's password.

setPassword

public void setPassword(java.lang.String password)
Set the password for the user. This method does not change the user's password.

Parameters:
password - The user's password, to be used during logon.
See Also:
ODServer.changePassword(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

getConnectType

public char getConnectType()
Get the connection type used during logon.

Returns:
The connection type used to connect to OD with.
See Also:
ODConstant.CONNECT_TYPE_TCPIP

setConnectType

public void setConnectType(char connectType)
                    throws ODException
This method is used to set the server connection type.

Parameters:
connectType - Connection type to use during logon.
Throws:
ODException
See Also:
ODConstant.CONNECT_TYPE_TCPIP, ODServer.logon(java.lang.String, java.lang.String, java.lang.String, char, int, java.lang.String)

getPort

public int getPort()
Get the port used for logon.

Returns:
The server port number.
See Also:
ODServer.logon(java.lang.String, java.lang.String, java.lang.String, char, int, java.lang.String)

setPort

public void setPort(int port)
Set the OD port number.

Parameters:
port - OD port number

getServerPrinters

public java.lang.String[] getServerPrinters()
                                     throws java.lang.Exception
Return a list of server printers. This method will query the server for defined OnDemand server printers.

Returns:
String[] An array containing the names of all OD server printers.
Throws:
java.lang.Exception

getServerPrinterType

public char getServerPrinterType(java.lang.String printer)
                          throws java.lang.Exception
Return the type of the specified server printer.

Parameters:
printer - The name of the printer
Returns:
char - A constant representing the type of server printer.
Throws:
java.lang.Exception
See Also:
ODServer.getServerPrinters(), ODConstant.OD_PRT_TYPE_PRINT, ODConstant.OD_PRT_TYPE_FAX, ODConstant.OD_PRT_TYPE_PRINT_WITH_INFO

getFolders

public java.util.Enumeration getFolders()
                                 throws java.lang.Exception
Return an Enumeration of all ODFolder objects available to this user/server. Any existing folder lists associated with this ODFolder will be replaced.


NOTE: The folders in this enumeration will need to be opened before use.

Returns:
Enumeration of ODFolder Objects.
Throws:
java.lang.Exception
See Also:
ODFolder.open()

getApplicationGroup

public ODApplicationGroup getApplicationGroup(long id)
                                       throws ODException
Get an ODApplicationGroup object.

Parameters:
id - the numeric Application Group ID
Returns:
ODApplicationGroup object representing an OnDemand application group.
Throws:
ODException
See Also:
ODApplicationGroup

getApplicationGroup

public ODApplicationGroup getApplicationGroup(java.lang.String name)
                                       throws ODException
Get an ODApplicationGroup object.

Parameters:
name - The name of the Application Group
Returns:
ODApplicationGroup object representing an OnDemand application group.
Throws:
ODException
See Also:
ODApplicationGroup

getApplicationGroupNames

public java.lang.String[] getApplicationGroupNames()
                                            throws java.lang.Exception
Get String[] of names for all Application Groups available to this user/server.
Any existing list associated with this ODServer will be replaced.

Returns:
String[] containg Application Group Names
Throws:
java.lang.Exception
See Also:
ODServer#openApplicationGroup(String)

getApplicationGroupNames

public java.lang.String[] getApplicationGroupNames(java.lang.String criteria)
                                            throws java.lang.Exception
Get String[] of Application Group names that match the criteria. This list is limited by current user permissions. Any existing list associated with this ODServer will be replaced.

Returns:
String[] containg Application Group Names
Throws:
java.lang.Exception
See Also:
ODServer#openApplicationGroup(String)

getUser

public ODUser getUser()
               throws java.lang.Exception
Get the ODUser object for the current user. This user object includes all the default user info as set at the OnDemand server, as well as several user parameters that can be set via the ODUser class.

Returns:
ODUser object
Throws:
java.lang.Exception
See Also:
ODUser

getAnnotationAddMask

public long getAnnotationAddMask()
Get the mask to determine which types of annotations can be added, and what the default is set to. This mask is Global in scope and is set in the OnDemand Administrator under Server->System Properties.
For Example:
      System.out.println( " Can Add Public Annotations = " +
             ((ODServer.getAnnotationAddMask() & ODConstant.OD_SYSTEM_ANN_ADD_PUB_NOT_ALLOWED )== 0
                  ? false : true ));
 

NOTE: When going against a OnDemand Server version prior to 7.1.2.8, this functionality is not supported and this mask will always return zero.

See Also:
ODConstant.OD_SYSTEM_ANN_ADD_PUB_NOT_ALLOWED, ODConstant.OD_SYSTEM_ANN_ADD_PRI_NOT_ALLOWED, ODConstant.OD_SYSTEM_ANN_ADD_GRP_NOT_ALLOWED, ODConstant.OD_SYSTEM_ANN_ADD_DEFAULT_PUBLIC, ODConstant.OD_SYSTEM_ANN_ADD_DEFAULT_PRIVATE, ODConstant.OD_SYSTEM_ANN_ADD_DEFAULT_GROUP

getCabinets

public java.util.Enumeration getCabinets()
                                  throws java.lang.Exception
Get the Cabinets defined for this ODServer. The available cabinets will be based on the user permissions associated with the current ODServer.

Returns:
Enumeration of ODCabinet objects. Enumerator will be empty if there are zero cabinets defined to this server.
Throws:
java.lang.Exception
See Also:
ODCabinet

getNumCabinets

public int getNumCabinets()
                   throws java.lang.Exception
Get the number of Cabinets defined for this ODServer.

Returns:
int numCabinets
Throws:
java.lang.Exception
See Also:
ODServer.getCabinets()

getOS

public java.lang.String getOS()
                       throws ODException
Get the OS type that the OnDemand Server is running on. NOTE: OnDemand Server versions prior to 7.1.1.0 will return 'null'

Throws:
ODException
See Also:
ODConstant#SERVER_OS_AIX, ODConstant#SERVER_OS_SUNOS, ODConstant#SERVER_OS_HPUX, ODConstant#SERVER_OS_LINUX, ODConstant#SERVER_OS_WIN32, ODConstant#SERVER_OS_OS400, ODConstant#SERVER_OS_OS390

getHolds

public java.util.Enumeration getHolds()
                               throws java.lang.Exception
Get an enumeration of ODHold objects that are defined for this OnDemand Server/User.

Throws:
java.lang.Exception
See Also:
ODHold

addHold

public ODHold addHold(java.lang.String name,
                      java.lang.String desc)
               throws ODException
Add a new Hold Definition to the OnDemand Server.

Throws:
ODException
See Also:
to check if permissions will allow this user to add a Hold.

xmlParse

public byte[] xmlParse(java.lang.String xml,
                       int action,
                       java.util.Properties xmlProperties,
                       ODCallback odc)
                throws java.lang.Exception
Interface to arsxml batch administration client.

Parameters:
xml - This is data to be parsed by arsxml. It must be fully composed XML.
action - Action to take on input xml.
xmlProperties - - array of keyword/value pairs ContinueOnError Controls error handling. true - Continue processing even if error encountered. false - Stop processing if error encountered. UpdateExisting Controls update handling. true - If an object already exists, then update it instead of add. false - If an object already exists, do not update it ExportFlags Controls child object exporting. Values are additive. 1 -- export applications 2 -- export permissions 4 -- export logical views 8 -- export dependent objects ExportEncoding Codepage of exported data. Must be an Integer. Ignored for non export actions. ExportSchemaLocation Path to include as part of noNamespaceSchemaLocation attribute. Must be a String.
odc - Instance of ODCallback object for processBegin/End calls
Throws:
ODException
java.lang.Exception

xmlParse

public byte[] xmlParse(java.lang.String xml,
                       int action,
                       boolean continueOnError,
                       int exportFlags,
                       int exportEncoding,
                       java.lang.String exportSchemaLocation,
                       ODCallback odc)
                throws java.lang.Exception
Interface to arsxml batch administration client.

Parameters:
xml - This is data to be parsed by arsxml. It must be fully composed XML.
action - Action to take on input xml.
continueOnError - Continue processing even if error encountered.
exportFlags - Controls child object exporting.
exportEncoding - Codepage of exported data. Ignored for non export actions.
exportSchemaLocation - Path to include as part of noNamespaceSchemaLocation attribute.
odc - Instance of ODCallback object for processBegin/End calls
Throws:
ODException
java.lang.Exception

getInternalDate

public long getInternalDate(java.lang.String date,
                            java.lang.String fmt,
                            char qual)
Convert date string to OnDemand Internal date format.

Parameters:
date - String containing user readable date.
fmt - String with date format of input date string. Will use default date format if a date format is not specified.
qual - ODConstant for date type.
Returns:
long representing the internal date value. A value of -1 indicates a failure, usually involving invalid format or etc.
See Also:
ODConstant.ODDATE_DATE, ODConstant.ODDATE_DATETIME, ODConstant.ODDATE_TIME, ODConstant.ODDATE_TZ_DATETIME

getCurrentDate

public long getCurrentDate(char qual)
Return the current date in the OnDemand Internal date format.

Parameters:
qual - ODConstant for date type.
Returns:
long representing the internal date value. A value of -1 indicates a failure, usually involving invalid format.
See Also:
ODConstant.ODDATE_DATE, ODConstant.ODDATE_DATETIME, ODConstant.ODDATE_TIME, ODConstant.ODDATE_TZ_DATETIME

getExternalDate

public java.lang.String getExternalDate(long internalDate,
                                        java.lang.String fmt,
                                        char qual)
Convert an OnDemand Internal date format to a formatted string

Parameters:
long - representing an internal date value.
fmt - String with date format of input date string. Will use default date format if a date format is not specified.
qual - ODConstant for date type.
Returns:
date String containing user readable date. Null if an error occurs.
See Also:
ODConstant.ODDATE_DATE, ODConstant.ODDATE_DATETIME, ODConstant.ODDATE_TIME, ODConstant.ODDATE_TZ_DATETIME

getTransformViewersForDocType

public java.util.Hashtable getTransformViewersForDocType(char doctype)
                                                  throws java.lang.Exception
Get a listing of Transform viewer names that are defined for a specific docType.

Parameters:
doctype -
Returns:
Hashtable of Name and Descriptions. Will return null if not definted.
Throws:
java.lang.Exception
See Also:
ODConstant.FileTypeAFP, ODConstant.FileTypeLINE

getVersion

public java.lang.String getVersion()
Get the ODWEK Version string for this version of the ODApi.jar.

Returns:
String indicating the Release and PTF version of ODWEK.

getMessageOfTheDay

public java.lang.String getMessageOfTheDay()

CM OnDemand V8.5 WEK Java APIs

(c)Copyright International Business Machines Corporation 2001, 2013. IBM Corp. All rights reserved.