|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.edms.od.ODServer
A class representing a connection to an OnDemand server. From this class you can logon, logoff and change the password. After a successful logon, this object will contain a list of all folders the session has access to. For example:
ODServer od = new ODServer();Note: Access to this server object should be done in a single threaded environment. The only exception is when cancelling a server operation.
cancel()
Constructor Summary | |
ODServer()
The class constructor. |
Method Summary | |
void |
cancel()
Cancel the current search or retrieve operation. |
void |
changePassword(java.lang.String newPassword)
Change the user's password. |
char |
getConnectType()
Get the connection type used during logon. |
java.lang.String |
getFolderDescription(java.lang.String fldName)
Get the folder description for the specified folder. |
java.util.Enumeration |
getFolderNames()
Return a list of folder names accessable to the user. |
java.util.Enumeration |
getFolderNames(java.lang.String criteria)
Return a list of folder names. |
java.lang.String |
getLocalDir()
Get the OD local server directory. |
int |
getNumFolders()
Get the number of folders for which the user associated with this server object has access to. |
int |
getNumFolders(java.lang.String criteria)
Get the number of folders. |
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 |
getUserId()
Get the name of the user. |
void |
initialize(java.lang.String configDir,
java.lang.String applicationName)
Initialize the connection to the OnDemand server. |
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 server. |
void |
logon(java.lang.String server,
java.lang.String user,
java.lang.String password,
char connectType,
int port,
java.lang.String localDir)
This method is used to logon to the server. |
ODFolder |
openFolder(java.lang.String fldName)
This method will open the specified folder. |
byte[] |
retrieve(java.lang.String docid,
java.lang.String fldName,
java.lang.String viewer)
Retrieve document data. |
void |
setApplicationName(java.lang.String applicationName)
Set the web applications path. |
void |
setConnectType(char connectType)
This method is used to set the server connection type. |
void |
setLocalDir(java.lang.String localDir)
Set the OD local server directory. |
void |
setPassword(java.lang.String password)
Set the password for the user. |
void |
setPort(int port)
Set the OD port number. |
void |
setServer(java.lang.String server)
Set the name of the OD server to connect 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. |
byte[] |
viewerPassthru(java.lang.String queryStr)
This method is used to pass ODWEK document viewer requests for data through to the ODWEK code. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ODServer()
Method Detail |
public void initialize(java.lang.String configDir, java.lang.String applicationName) throws ODException
configDir
- The directory where the arswww.ini file exists.applicationName
- The servlet/CGI application name.
This is only used when retrieving a document for viewing
and one of ODWEK's viewers is invoked.setApplicationName(java.lang.String)
public void terminate()
public void cancel()
public void logon(java.lang.String server, java.lang.String user, java.lang.String password, char connectType, int port, java.lang.String localDir) throws java.lang.Exception
server
- The name of the OD server.user
- The name of the user.password
- The user's password.connectType
- The connection protocol to use.port
- The port on which the OD server is listening.
The default is 0.localDir
- This parameter is to be used for local OD servers
only.getFolderNames()
,
ODConstant.CONNECT_TYPE_TCPIP
public void logon(java.lang.String server, java.lang.String user, java.lang.String password) throws java.lang.Exception
server
- The name of the OD server.user
- The name of the user.password
- The user's password.logon(String,String,String,char,int,String)
public void logon() throws java.lang.Exception
This method is to be called only after setServer
,
setUserId
and setPassword
have been called.
public void logoff() throws java.lang.Exception
public void changePassword(java.lang.String newPassword) throws java.lang.Exception
newPassword
- The user's new password.public ODFolder openFolder(java.lang.String fldName) throws java.lang.Exception
fldName
- Name of folder to open.ODFolder
public byte[] retrieve(java.lang.String docid, java.lang.String fldName, java.lang.String viewer) throws java.lang.Exception
docid
- The document identifier as returned from the search method.fldName
- Specifies the folder for the document.viewer
- Specifies if any conversion is to be applied to the data.initialize
method
or the setApplicationName
method.ODConstant
,
viewerPassthru(java.lang.String)
,
initialize(java.lang.String, java.lang.String)
,
setApplicationName(java.lang.String)
public byte[] viewerPassthru(java.lang.String queryStr) throws java.lang.Exception
queryStr
- The query string as sent from the ODWEK document viewer.retrieve(java.lang.String, java.lang.String, java.lang.String)
public int getNumFolders() throws java.lang.Exception
public int getNumFolders(java.lang.String criteria) throws java.lang.Exception
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. Any folder
list previously retrieve will be replaced by the result
of this call.public java.util.Enumeration getFolderNames() throws java.lang.Exception
public java.util.Enumeration getFolderNames(java.lang.String criteria) throws java.lang.Exception
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. Any folder
list previously retrieve will be replaced by the result
of this call.public java.lang.String getFolderDescription(java.lang.String fldName) throws java.lang.Exception
fldName
- The name of the folder to retrieve a description for.public java.lang.String getServerName()
public void setServer(java.lang.String server)
server
- Name of the OnDemand server.public java.lang.String getUserId()
public void setUserId(java.lang.String user)
user
- The name of the user.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The user's password, to be used during logon.changePassword(java.lang.String)
public char getConnectType()
ODConstant.CONNECT_TYPE_TCPIP
public void setConnectType(char connectType) throws ODException
connectType
- Connection type to use during logon.ODConstant.CONNECT_TYPE_TCPIP
public int getPort()
public void setPort(int port)
port
- OD port numberpublic java.lang.String getLocalDir()
public void setLocalDir(java.lang.String localDir)
localDir
- Local directorypublic void setApplicationName(java.lang.String applicationName)
applicationName
- The applications name relative to a web
server, i.e., "/servlets/MyServlet".
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |