Content Manager OnDemand V8.5 WEK APIs

com.ibm.edms.od
Class ODConfig

java.lang.Object
  extended by com.ibm.edms.od.ODConfig

public class ODConfig
extends java.lang.Object

The ODConfig Java object will be the preferred method in which to configure the system parameters and the arswww.ini will be deprecated with version 8.4 of ODWEK. Until then, both the ODConfig Java object and the arswww.ini file will be supported.

There are eight system parameters needed for a working ODServer instance. These can be set to default values through the ODConfig default constructor:

  try{
       ODConfig cfg = new ODConfig();
       ODServer srvr = new ODServer(cfg);
       srvr.initialize(null, "MyCustomApp");
       cfg.printConfig();
   }
   catch(ODException e){
       System.out.println("Exception " + e);
   }
This sample code will configure the following default parameters:
 AfpViewOpt   PLUGIN
 LineViewOpt  APPLET
 MaxHits      200  This is used to set a global maxhits that can be returned from a search. This will not override the Admin settings. Also can be set per folder using ODFolder.setMaxHits
 MetaViewOpt  NATVIE
 AppletDir    /applets
 Language     ENU  
 TempDir      The temp path as defined by the Java System.getProperty("java.io.tmpdir") method.
 TraceDir     The temp path as defined by the Java System.getProperty("java.io.tmpdir") method.
 TraceLevel   0
 
For information on these parameters please refer to Chapter 7: Specifying the arswww.ini file in the OnDemand Web Enablement Kit Implementation Guide.

These eight parameters can also be explicitly set via the following sample code which utilizes a different ODConfig constructor:
  try{
       ODConfig cfg = new ODConfig(ODConstant.PLUGIN, //AfpViewer
                                   ODConstant.APPLET, //LineViewer
                                   null,              //MetaViewer
                                   500,               //MaxHits
                                   "c:\\applets",     //AppletDir
                                   "ENU",             //Language
                                   "c:\\temp",        //TempDir
                                   "c:\\temp\\trace", //TraceDir
                                   1);                //TraceLevel

      ODServer srvr = new ODServer(cfg);
      srvr.initialize("MyCustomApp");
      cfg.printConfig();
   }
   catch(ODException e){
       System.out.println("Exception " + e);
   }
 
This constructor will set parameters with zero or null values to the defaults mentioned above.
NOTE: This object has no methods to set parameters except during construction. The object cannot be modified after it has been constructed.

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


Field Summary
static java.lang.String AFP2HTML_CONFIG_FILE
          The absolute pathname to the afp2html configuration file.
static java.lang.String AFP2HTML_INSTALL_DIR
          The absolute pathname to the directory containing the transform executable.
static java.lang.String AFP2PDF_CONFIG_FILE
          The absolute pathname to the afp2pdf configuration file.
static java.lang.String AFP2PDF_INSTALL_DIR
          The absolute pathname to the directory containing the transform executable.
static java.lang.String AFP2XML_CONFIG_FILE
          The absolute pathname to the afp2xml configuration file.
static java.lang.String AFP2XML_INSTALL_DIR
          The absolute pathname to the directory containing the transform executable.
static java.lang.String DBG_TRACE
           
static java.lang.String IN_OPERATOR_DELIMITER
          Set a character to be used in IN operator queries.
static java.lang.String MAX_TRACELOG_SIZE
          Used to set the maximum size in MB a trace log (arswww.trace) can grow to before it is renamed (arswww.trace.YYYYMMDD.HHMMSS) and a new trace log is created.
static java.lang.String ODWEK_INSTALL_DIR
           
static java.lang.String RES_CACHE_MAX
          Defines the maximum space available for the use of a resource file cache.
static java.lang.String RESOURCE_CACHE_DIR
          This parameter will override the default ODWEK behavior or caching AFP Resources in memory.
static java.lang.String SERVER_ACCESS_LIST
           
static java.lang.String SSL_KEYRINGFILE
           
static java.lang.String SSL_KEYRINGSTASH
           
static java.lang.String TransformXML
          Specifies the fully qualified path to the XML containing ODTransform definitions.
static java.lang.String USE_SSL_DEFAULT
           
static java.lang.String XENOS_CONFIG_FILE
          The absolute pathname to the xenos configuration file.
static java.lang.String XENOS_INSTALL_DIR
          The absolute pathname to the directory containing the transform executable.
 
Constructor Summary
ODConfig()
          The class constructor.
ODConfig(java.lang.String afpViewer, java.lang.String lineViewer, java.lang.String metaViewer, long maxHits, java.lang.String appletDir, java.lang.String language, java.lang.String tempDir, java.lang.String traceDir, int traceLevel)
          ODConfig constructor
ODConfig(java.lang.String afpViewer, java.lang.String lineViewer, java.lang.String metaViewer, long maxHits, java.lang.String appletDir, java.lang.String language, java.lang.String tempDir, java.lang.String traceDir, int traceLevel, java.util.Properties props)
          ODConfig constructor.
 
Method Summary
 java.lang.String getAfpViewerType()
          Get the AFP viewer type
 java.lang.String getAppletDirectory()
          Get the full path to where the applet jar files reside
 java.lang.String getLanguageForMessages()
          Get the three character language abbreviation that will be used for displaying messages
 java.lang.String getLineViewerType()
          Get the LINE viewer type
 long getMaxNumberOfHitsToDisplay()
          Get the maximum number of search result hits that will be displayed
 java.lang.String getMetaViewerType()
          Get the META viewer type
 java.lang.String getTemporaryWorkingDirectory()
          Returns the directory where ODWEK will create temporary working files
 java.lang.String getTraceDirectory()
          Get the directory where the arswww.trace file will be written and updated
 int getTraceLevel()
          Get the level at which events will be logged.
 boolean hasODTransforms()
           
 void printConfig()
          Print out the complete configuration settings
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_ACCESS_LIST

public static final java.lang.String SERVER_ACCESS_LIST

AFP2HTML_INSTALL_DIR

public static final java.lang.String AFP2HTML_INSTALL_DIR
The absolute pathname to the directory containing the transform executable.


AFP2HTML_CONFIG_FILE

public static final java.lang.String AFP2HTML_CONFIG_FILE
The absolute pathname to the afp2html configuration file.


AFP2PDF_INSTALL_DIR

public static final java.lang.String AFP2PDF_INSTALL_DIR
The absolute pathname to the directory containing the transform executable.


AFP2PDF_CONFIG_FILE

public static final java.lang.String AFP2PDF_CONFIG_FILE
The absolute pathname to the afp2pdf configuration file.


XENOS_INSTALL_DIR

public static final java.lang.String XENOS_INSTALL_DIR
The absolute pathname to the directory containing the transform executable.


XENOS_CONFIG_FILE

public static final java.lang.String XENOS_CONFIG_FILE
The absolute pathname to the xenos configuration file.


AFP2XML_INSTALL_DIR

public static final java.lang.String AFP2XML_INSTALL_DIR
The absolute pathname to the directory containing the transform executable.


AFP2XML_CONFIG_FILE

public static final java.lang.String AFP2XML_CONFIG_FILE
The absolute pathname to the afp2xml configuration file.


ODWEK_INSTALL_DIR

public static final java.lang.String ODWEK_INSTALL_DIR

USE_SSL_DEFAULT

public static final java.lang.String USE_SSL_DEFAULT

SSL_KEYRINGFILE

public static final java.lang.String SSL_KEYRINGFILE

SSL_KEYRINGSTASH

public static final java.lang.String SSL_KEYRINGSTASH

DBG_TRACE

public static final java.lang.String DBG_TRACE

IN_OPERATOR_DELIMITER

public static final java.lang.String IN_OPERATOR_DELIMITER
Set a character to be used in IN operator queries. The default is a space.


MAX_TRACELOG_SIZE

public static final java.lang.String MAX_TRACELOG_SIZE
Used to set the maximum size in MB a trace log (arswww.trace) can grow to before it is renamed (arswww.trace.YYYYMMDD.HHMMSS) and a new trace log is created. Only valid when a trace level is set. The default is to allow the trace log file to grow until the application is terminated.


RESOURCE_CACHE_DIR

public static final java.lang.String RESOURCE_CACHE_DIR
This parameter will override the default ODWEK behavior or caching AFP Resources in memory. If a ResourceCacheDir is specified, then ODWEK will store AFP Resources in a file cache at that location, instead of memory.


RES_CACHE_MAX

public static final java.lang.String RES_CACHE_MAX
Defines the maximum space available for the use of a resource file cache. WARNING: We will only track the total size of actual resource files. Additional files within the ResourceCacheDir could allow ODWEK to exceed the file system size.

See Also:
ODConfig.RESOURCE_CACHE_DIR

TransformXML

public static final java.lang.String TransformXML
Specifies the fully qualified path to the XML containing ODTransform definitions. This is defined in the Properties object passed into ODConfig().

See Also:
ODConfig.ODConfig(String afpViewer, String lineViewer, String metaViewer, long maxHits, String appletDir, String language, String tempDir, String traceDir, int traceLevel, Properties props)
Constructor Detail

ODConfig

public ODConfig()
The class constructor. Sets all members to working defaults
afpViewer is set to ODConstant.PLUGIN
lineViewer is set to ODConstant.APPLET
metaViewer is set to ODConstant.NATIVE
maxHits is set to 200
appletDir is set to /applets
language is set to ENU
tempDir is set to java.io.tmpdir
traceDir is set to java.io.tmpdir
traceLevel is set to 0 (off)


NOTE: If a security manager exists, a "read" PropertyPermission for file.separator must be configured
i.e. java.util.PropertyPermission pm = new java.util.PropertyPermission("file.separator", "read");

NOTE: Only a single language can be used in any one WebApplication. Subsequent requests with different settings for Language are ignored.


ODConfig

public ODConfig(java.lang.String afpViewer,
                java.lang.String lineViewer,
                java.lang.String metaViewer,
                long maxHits,
                java.lang.String appletDir,
                java.lang.String language,
                java.lang.String tempDir,
                java.lang.String traceDir,
                int traceLevel)
         throws ODException
ODConfig constructor

Parameters:
afpViewer - Conversion method for AFP data viewing
lineViewer - Conversion method for LINE data viewing
metaViewer - Conversion method for META data viewing
maxHits - Maximum number of hits to display
appletDir - Directory where the applets reside
language - Language in which messages will be output
tempDir - Directory to store temp files
traceDir - Path to write trace file
traceLevel - Sets the amount of trace information that will be gathered

NOTE: Only a single language can be used in any one WebApplication. Subsequent requests with different settings for Language are ignored.
Throws:
ODException - for invalid values

ODConfig

public ODConfig(java.lang.String afpViewer,
                java.lang.String lineViewer,
                java.lang.String metaViewer,
                long maxHits,
                java.lang.String appletDir,
                java.lang.String language,
                java.lang.String tempDir,
                java.lang.String traceDir,
                int traceLevel,
                java.util.Properties props)
         throws ODException
ODConfig constructor. This Constructor can be used to specify semi-custom configuration options passed via the Java Properties Object. For more details and an example of the usage of this constructor, please review the associated TechDoc at http://www-1.ibm.com/support/docview.wss?uid=swg21273746


NOTE: If a security manager exists, a "read" PropertyPermission for file.separator must be configured
i.e. java.util.PropertyPermission pm = new java.util.PropertyPermission("file.separator", "read");
NOTE: Only a single language can be used in any one WebApplication. Subsequent requests with different settings for Language are ignored.

Parameters:
afpViewer - Conversion method for AFP data viewing
lineViewer - Conversion method for LINE data viewing
metaViewer - Conversion method for META data viewing
maxHits - Maximum number of hits to display
appletDir - Directory where the applets reside
language - Language in which messages will be output
tempDir - Directory to store temp files
traceDir - Path to write trace file
traceLevel - Sets the amount of trace information that will be gathered
props - a Properties object that includes name, value pairs of ODConstant.xxx and value
Throws:
ODException - for invalid values
Method Detail

getAfpViewerType

public java.lang.String getAfpViewerType()
Get the AFP viewer type

Returns:
Conversion type
See Also:
ODConstant.ASCII, ODConstant.HTML, ODConstant.NATIVE, ODConstant.PDF, ODConstant.PLUGIN, ODConstant.XENOS

getAppletDirectory

public java.lang.String getAppletDirectory()
Get the full path to where the applet jar files reside

Returns:
The full path to where the applet jar files reside

getMetaViewerType

public java.lang.String getMetaViewerType()
Get the META viewer type

Returns:
Conversion type
See Also:
ODConstant.NATIVE, ODConstant.XENOS

getLineViewerType

public java.lang.String getLineViewerType()
Get the LINE viewer type

Returns:
Conversion type
See Also:
ODConstant.ASCII, ODConstant.APPLET, ODConstant.NATIVE, ODConstant.XENOS

getMaxNumberOfHitsToDisplay

public long getMaxNumberOfHitsToDisplay()
Get the maximum number of search result hits that will be displayed

Returns:
The maximum number of search result hits that will be displayed

getLanguageForMessages

public java.lang.String getLanguageForMessages()
Get the three character language abbreviation that will be used for displaying messages

Returns:
The three character language abbreviation

getTemporaryWorkingDirectory

public java.lang.String getTemporaryWorkingDirectory()
Returns the directory where ODWEK will create temporary working files

Returns:
Directory where ODWEK will create temporary working files

getTraceDirectory

public java.lang.String getTraceDirectory()
Get the directory where the arswww.trace file will be written and updated

Returns:
The directory where the arswww.trace file will be

getTraceLevel

public int getTraceLevel()
Get the level at which events will be logged.
0: No logging enabled
1: Log only ERROR events
2: Log only ERROR and WARNING events
3: Log ERROR, WARNING, and INFO events
4: Log ALL events

Returns:
Log level 0 - 4

hasODTransforms

public boolean hasODTransforms()

printConfig

public void printConfig()
Print out the complete configuration settings


CM OnDemand V8.5 WEK Java APIs

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