public class ODConfig
extends java.lang.Object
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 Specifies the Language to be used when outputing messages.
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 the OnDemand Web Enablement Kit
Implementation Guide.
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.| Modifier and Type | Field and Description |
|---|---|
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 |
HTML5_L2P_TRANSFORM
Specifies the name of the Generic Transform Viewer to be used to transform
Line data to PDF for the HTML5 Line Viewer when selecting Copy Pages to File.
|
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
The ODWEK install directory for non-default install locations.
|
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 of caching resources in memory.
|
static java.lang.String |
SQL_WILDCARD_ESCAPE
Set a character to be used as a wildcard escape character during sql generation.
|
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 |
VIEWER_EVENT_FUNCTION
Specifies the name of a function the Java Line Data Viewer will call to notify the Web Application that
a change has been made to the Annotation status of a document.
|
static java.lang.String |
VIEWER_EVENT_NOTE_ADD
The arguments passed to the function specified with the
ODConfig.VIEWER_EVENT_FUNCTION property that the
Java Line Data Viewer will call when a Web Application wants to be notified that an Annotation has been added to a document. |
static java.lang.String |
VIEWER_EVENT_NOTE_DELETE
The arguments passed to the function specified with the
ODConfig.VIEWER_EVENT_FUNCTION property that the
Java Line Data Viewer will call when a Web Application wants to be notified that an Annotation has been deleted from a document. |
static java.lang.String |
VIEWER_EVENT_NOTE_UPDATE
The arguments passed to the function specified with the
ODConfig.VIEWER_EVENT_FUNCTION property that the
Java Line Data Viewer will call when a Web Application wants to be notified that an Annotation has been updated for a document. |
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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()
Deprecated.
As of Version 9.0, the Messaging Language can be changed in runtime. This api will only return the original as set in the ODConfig.
|
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
|
void |
setLocale(java.util.Locale loc)
Set the locale using a java.util.Locale object
|
public static final java.lang.String AFP2HTML_INSTALL_DIR
public static final java.lang.String AFP2HTML_CONFIG_FILE
public static final java.lang.String AFP2PDF_INSTALL_DIR
public static final java.lang.String AFP2PDF_CONFIG_FILE
public static final java.lang.String XENOS_INSTALL_DIR
public static final java.lang.String XENOS_CONFIG_FILE
public static final java.lang.String AFP2XML_INSTALL_DIR
public static final java.lang.String AFP2XML_CONFIG_FILE
public static final java.lang.String ODWEK_INSTALL_DIR
for more details. https://www-304.ibm.com/support/docview.wss?uid=swg27019696public static final java.lang.String USE_SSL_DEFAULT
public static final java.lang.String SSL_KEYRINGFILE
public static final java.lang.String SSL_KEYRINGSTASH
public static final java.lang.String DBG_TRACE
public static final java.lang.String IN_OPERATOR_DELIMITER
public static final java.lang.String SQL_WILDCARD_ESCAPE
public static final java.lang.String MAX_TRACELOG_SIZE
public static final java.lang.String RESOURCE_CACHE_DIR
public static final java.lang.String RES_CACHE_MAX
ODConfig.RESOURCE_CACHE_DIRpublic static final java.lang.String TransformXML
public static final java.lang.String HTML5_L2P_TRANSFORM
public static final java.lang.String VIEWER_EVENT_FUNCTION
public static final java.lang.String VIEWER_EVENT_NOTE_ADD
ODConfig.VIEWER_EVENT_FUNCTION property that the
Java Line Data Viewer will call when a Web Application wants to be notified that an Annotation has been added to a document.public static final java.lang.String VIEWER_EVENT_NOTE_DELETE
ODConfig.VIEWER_EVENT_FUNCTION property that the
Java Line Data Viewer will call when a Web Application wants to be notified that an Annotation has been deleted from a document.public static final java.lang.String VIEWER_EVENT_NOTE_UPDATE
ODConfig.VIEWER_EVENT_FUNCTION property that the
Java Line Data Viewer will call when a Web Application wants to be notified that an Annotation has been updated for a document.public 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
afpViewer - Conversion method for AFP data viewinglineViewer - Conversion method for LINE data viewingmetaViewer - Conversion method for META data viewingmaxHits - Maximum number of hits to displayappletDir - Directory where the applets residelanguage - Language in which messages will be outputtempDir - Directory to store temp filestraceDir - Path to write trace filetraceLevel - Sets the amount of trace information that will be gathered
ODException - for invalid valuespublic 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
afpViewer - Conversion method for AFP data viewinglineViewer - Conversion method for LINE data viewingmetaViewer - Conversion method for META data viewingmaxHits - Maximum number of hits to displayappletDir - Directory where the applets residelanguage - Language in which messages will be outputtempDir - Directory to store temp filestraceDir - Path to write trace filetraceLevel - Sets the amount of trace information that will be gatheredprops - a Properties object that includes name, value pairs of ODConstant.xxx and valueODException - for invalid valuespublic java.lang.String getAfpViewerType()
ODConstant.ASCII,
ODConstant.HTML,
ODConstant.NATIVE,
ODConstant.PDF,
ODConstant.PLUGIN,
ODConstant.XENOSpublic java.lang.String getAppletDirectory()
public java.lang.String getMetaViewerType()
ODConstant.NATIVE,
ODConstant.XENOSpublic java.lang.String getLineViewerType()
ODConstant.ASCII,
ODConstant.APPLET,
ODConstant.NATIVE,
ODConstant.XENOSpublic long getMaxNumberOfHitsToDisplay()
public java.lang.String getLanguageForMessages()
ODServer.getMsgsLanguage()public void setLocale(java.util.Locale loc)
throws java.lang.Exception
loc - java.lang.Exceptionpublic java.lang.String getTemporaryWorkingDirectory()
public java.lang.String getTraceDirectory()
public int getTraceLevel()
public boolean hasODTransforms()
public void printConfig()
(c)Copyright International Business Machines Corporation 2001, 2020. IBM Corp. All rights reserved.