Content Manager OnDemand V7 WEK APIs

com.ibm.edms.od
Class ODHit

java.lang.Object
  |
  +--com.ibm.edms.od.ODHit
All Implemented Interfaces:
java.io.Serializable

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

A class representing a document within OnDemand.

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

See Also:
Serialized Form

Constructor Summary
protected ODHit(com.ibm.edms.od.ODServer server, com.ibm.edms.od.ODFolder folder, java.lang.String id, char type, int hit_location, java.lang.String[] values)
           
protected ODHit(com.ibm.edms.od.ODServer server, com.ibm.edms.od.ODFolder folder, java.lang.String id, char type, java.lang.String[] values)
           
 
Method Summary
 void addNote(com.ibm.edms.od.ODNote note)
          Add a note to this document.
 java.lang.String getDisplayValue(java.lang.String name)
          Get the documents display value for the specified folder criteria name.
 java.util.Enumeration getDisplayValues()
          Get the documents display values.
 java.lang.String getDocId()
          Get a persistent id for this document.
 int getDocLocation()
          Get the document location.
 char getDocType()
          Get the document type.
 java.lang.String getMimeType()
          Get the mimetype of the data returned by a call to retrieve.
 java.util.Vector getNotes()
          Get the notes associated with this document.
 int getNoteStatus(boolean allow_unknown)
          Get the status of notes associated with this document.
 byte[] retrieve(java.lang.String viewer)
          Retrieve document data.
 void update(java.util.Hashtable newValues)
          Update this documents criteria values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODHit

protected ODHit(com.ibm.edms.od.ODServer server,
                com.ibm.edms.od.ODFolder folder,
                java.lang.String id,
                char type,
                java.lang.String[] values)
         throws java.lang.Exception

ODHit

protected ODHit(com.ibm.edms.od.ODServer server,
                com.ibm.edms.od.ODFolder folder,
                java.lang.String id,
                char type,
                int hit_location,
                java.lang.String[] values)
         throws java.lang.Exception
Method Detail

retrieve

public byte[] retrieve(java.lang.String viewer)
                throws java.lang.Exception
Retrieve document data.

Parameters:
viewer - Specifies if any conversion is to be applied to the data.
Returns:
A byte array containing the document data. Note: If using ODWEK applets to view documents the data returned from this call is an html page containing a reference to the ODWEK applet. You should return this data without modification to the browser. Once the applet is loaded it will call back to your servlet/cgi to request the data. Make sure you have specified the proper applicationName in the ODServer object.
Throws:
java.lang.Exception
See Also:
ODConstant.APPLET, ODConstant.ASCII, ODConstant.HTML, ODConstant.NATIVE, ODConstant.PDF, ODConstant.PLUGIN, ODConstant.XENOS, ODServer.viewerPassthru(java.lang.String)

getNoteStatus

public int getNoteStatus(boolean allow_unknown)
Get the status of notes associated with this document.

Parameters:
allow_unknown - If true, and the server must be accessed to determine the status, ODConstant.NoteStatusUnknown will be returned. If false, the server will be accessed to determine the status if necessary.
Returns:
The status of notes associated with this document.
See Also:
ODConstant.NoteStatusUnknown, ODConstant.NoteStatusYes, ODConstant.NoteStatusNo, ODConstant.NoteStatusError

getNotes

public java.util.Vector getNotes()
                          throws java.lang.Exception
Get the notes associated with this document.

Note: This requires the proper permissions to be set within the OnDemand administrator.

Returns:
A vector containing ODNote objects. This vector will be empty if hit contains no notes.
Throws:
java.lang.Exception

addNote

public void addNote(com.ibm.edms.od.ODNote note)
             throws java.lang.Exception
Add a note to this document.

Note: This requires the proper permissions to be set within the OnDemand administrator.

Parameters:
note - An ODNote object.
Throws:
java.lang.Exception

update

public void update(java.util.Hashtable newValues)
            throws java.lang.Exception
Update this documents criteria values.

Note: This requires the proper permissions to be set within the OnDemand administrator.

Parameters:
newValues - This hashtable contains the criteria names to update along with the new values.
Throws:
java.lang.Exception

getDocId

public java.lang.String getDocId()
Get a persistent id for this document.

Returns:
A document id.

getDocType

public char getDocType()
Get the document type.

Returns:
document type
See Also:
ODConstant.FileTypeAFP, ODConstant.FileTypeBMP, ODConstant.FileTypeEMAIL, ODConstant.FileTypeGIF, ODConstant.FileTypeJFIF, ODConstant.FileTypeLINE, ODConstant.FileTypeMETA, ODConstant.FileTypeNONE, ODConstant.FileTypePCX, ODConstant.FileTypePDF, ODConstant.FileTypePNG, ODConstant.FileTypeTIFF, ODConstant.FileTypeUSRDEF

getDocLocation

public int getDocLocation()
Get the document location.

Returns:
The document location.
See Also:
ODConstant.DocLocationUnknown, ODConstant.DocLocationCache, ODConstant.DocLocationArchive, ODConstant.DocLocationExternal

getMimeType

public java.lang.String getMimeType()
Get the mimetype of the data returned by a call to retrieve. Note: This will only be the mimetype of the document if NATIVE was specified for the retrieve.

Returns:
The mimetype.

getDisplayValues

public java.util.Enumeration getDisplayValues()
Get the documents display values.

Returns:
Enumeration containing folder criteria names

getDisplayValue

public java.lang.String getDisplayValue(java.lang.String name)
Get the documents display value for the specified folder criteria name.

Returns:
criteria value

CM OnDemand V7 WEK Java APIs

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