|
Oracle BI Publisher Java API Reference Release 5.6.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
oracle.apps.xdo.template.FormProcessor
The class FormProcessor is the entry class to merge data with an original template. Also, you can use this class from the command line. The following is a basic usage of FormProcessor.
FormProcessor formProcessor = new FormProcessor(); formProcessor.setTemplate(original_pdf_file_path); // or formProcessor.setTemplate(inputStream); formProcessor.setData(xfdf_file_path); // or formProcessor.setData(inputStream); formProcessor.setOutput(new_pdf_file_path); // or formProcessor.setOutput(outputStream); formProcessor.process();
The command line usage is following.
java oracle.apps.xdo.template.FormProcessor <Template PDF file> <Data file> <Output file>
Please see XML Publisher Developer's Guide for more information.
| Field Summary | |
static int |
FIELDTYPE_BUTTON |
static int |
FIELDTYPE_CHECKBOX |
static int |
FIELDTYPE_COMBOBOX |
static int |
FIELDTYPE_LISTBOX |
static int |
FIELDTYPE_RADIOBUTTON |
static int |
FIELDTYPE_SIGNATURE |
static int |
FIELDTYPE_TEXT |
static int |
FIELDTYPE_UNKNOWN |
static java.lang.String |
RCS_ID |
static boolean |
RCS_ID_RECORDED |
| Constructor Summary | |
FormProcessor()Initializes a newly created FormProcessor object. |
|
FormProcessor(java.io.InputStream systemConfigInputStream)Takes a system configuration InputStream. |
|
| Method Summary | |
java.util.Hashtable |
getFieldInfo()Returns Hashtable which stores fields information. |
java.util.Enumeration |
getFieldNames()Returns field names. |
java.util.Enumeration |
getFieldNames(boolean includeReservedNames)Returns field names. |
int |
getFieldType(java.lang.String fieldName)Returns field type. |
java.lang.String |
getFieldValue(java.lang.String fieldName)Returns a field value for each field name. |
java.lang.Object |
getFieldValues(java.lang.String fieldName) |
int |
getPageNumber()Returns a number of pages of input PDF document. |
static void |
main(java.lang.String[] args)Users can use this class from the command line like following. |
void |
makeOutputFlat(boolean flag)Deprecated. since 5.6 |
boolean |
process()Generates a new document with data. |
void |
setAliases(java.util.Hashtable aliasTable)Sets fieldName aliases. |
void |
setConfig(java.io.InputStream docLevelInputStream)Sets a configuration for each document or template. |
void |
setConfig(java.util.Properties properties)Sets a configuration for each document or template. |
void |
setConfig(java.lang.String docLevelConfigPath)Sets a configuration for each document or template. |
void |
setData(java.util.Hashtable nameValuePair)Allows you to pass the data as Hashtable type. |
void |
setData(java.io.InputStream inputStream)Allows you to pass the data InputStream itself. |
void |
setData(java.io.Reader xmlDataReader)Allows you to pass a Reader instance. |
void |
setData(java.lang.String path)Allows you to pass the data file path itself. |
void |
setDataString(java.lang.String contents)Allows you to pass data as a String type. |
void |
setLocale(java.util.Locale locale)Sets the locale. |
void |
setLocale(java.lang.String locale)Sets a locale for each document or template. |
void |
setLOV(java.lang.String fieldName, java.util.Hashtable values)Sets the lov values for a combo box or list box field. |
void |
setLOV(java.lang.String fieldName, java.util.Vector internalValues, java.util.Vector labels)Sets the lov values for a combo box or list box. |
void |
setLOV(java.lang.String fieldName, java.util.Vector internalValues, java.util.Vector labels, java.lang.Object selectedValue)Sets the lov values for a combo box or list box. |
void |
setMetaInfo(java.io.InputStream xtmInputStream)Allows you to pass meta information as an InputStream. |
void |
setMetaInfo(java.lang.String path)Allows you to pass the file path to meta information(XTM). |
void |
setOutput(java.io.OutputStream os)Allows you to pass the new document OutputStream instead of the path. |
void |
setOutput(java.lang.String path)Allows you to pass the new document file name. |
void |
setTemplate(java.io.InputStream inputStream)Allows you to pass a template as an InputStream. |
void |
setTemplate(java.lang.String path)Allows you to pass the template as a path. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String RCS_ID
public static final boolean RCS_ID_RECORDED
public static final int FIELDTYPE_TEXT
public static final int FIELDTYPE_CHECKBOX
public static final int FIELDTYPE_RADIOBUTTON
public static final int FIELDTYPE_SIGNATURE
public static final int FIELDTYPE_COMBOBOX
public static final int FIELDTYPE_LISTBOX
public static final int FIELDTYPE_BUTTON
public static final int FIELDTYPE_UNKNOWN
| Constructor Detail |
public FormProcessor()
public FormProcessor(java.io.InputStream systemConfigInputStream)
| Method Detail |
public java.util.Hashtable getFieldInfo()
throws FatalException
FatalExceptionpublic java.util.Enumeration getFieldNames()
return getFieldInfo().keys();
public java.util.Enumeration getFieldNames(boolean includeReservedNames)
includeReservedNames - returns all of field names if it's true, otherwise, special field names won't be returned.
public int getFieldType(java.lang.String fieldName)
throws FatalException
FatalException
public java.lang.String getFieldValue(java.lang.String fieldName)
throws FatalException
fieldName - one field name.FatalException
public java.lang.Object getFieldValues(java.lang.String fieldName)
throws FatalException
fieldName -FatalException
public int getPageNumber()
throws java.lang.Exception
java.lang.Exceptionpublic void setAliases(java.util.Hashtable aliasTable)
aliasTable - the Hashtable instance which contains "fieldName, alias" pairs.public void setConfig(java.io.InputStream docLevelInputStream)
public void setConfig(java.lang.String docLevelConfigPath)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic void setConfig(java.util.Properties properties)
public void setData(java.lang.String path)
path - this path specifies data file's absolute path.setDataString(String)public void setData(java.io.InputStream inputStream)
inputStream - the inputStream which includes data.setData(String), setDataString(String)public void setData(java.io.Reader xmlDataReader)
setData(String), setDataString(String)public void setData(java.util.Hashtable nameValuePair)
nameValuePair - this Hashtable instance includes name and value pair.setData(String), setDataString(String)public void setDataString(java.lang.String contents)
contents - this contents specifies data contents as a String type.setData(String)public void setLocale(java.lang.String locale)
public void setLocale(java.util.Locale locale)
locale - java localepublic void setMetaInfo(java.lang.String path)
path - the path which indicates XTM file.setMetaInfo(InputStream)public void setMetaInfo(java.io.InputStream xtmInputStream)
setMetaInfo(String)public void setOutput(java.lang.String path)
path - this specifies a new document file path which will be generated.setOutput(OutputStream os)public void setOutput(java.io.OutputStream os)
ServletOutputStream outputStream = response.getOutputStream(); formProcessor.setOutput(outputStream);
os - this specifies a new document OutputStream.setOutput(String)public void setTemplate(java.lang.String path)
path - the absolute template path.setTemplate(InputStream)public void setTemplate(java.io.InputStream inputStream)
FileInputStream fis = new FileInputStream(filePath); formProcessor.setTemplate(fis);
public void makeOutputFlat(boolean flag)
flag - true if output is required to be flat, false otherwise.
public void setLOV(java.lang.String fieldName,
java.util.Hashtable values)
throws java.lang.Exception
fieldName - the name of the combo box or list box fieldvalues - hashtable string mapping of internal value to labeljava.lang.Exception
public void setLOV(java.lang.String fieldName,
java.util.Vector internalValues,
java.util.Vector labels)
throws java.lang.Exception
fieldName - the name of the combo box or list box fieldinternalValues - an ordered vector of Strings consisting of the internal valueslabels - an ordered vector of Strings consisting of the labelsjava.lang.Exception
public void setLOV(java.lang.String fieldName,
java.util.Vector internalValues,
java.util.Vector labels,
java.lang.Object selectedValue)
throws java.lang.Exception
fieldName - the name of the combo box or list box fieldinternalValues - an ordered vector of Strings consisting of the internal valueslabels - an ordered vector of Strings consisting of the labelsselectedValue - this can be either a Vector of internal values or a single String instance indicating the selected valuejava.lang.Exceptionpublic boolean process()
public static void main(java.lang.String[] args)
java oracle.apps.xdo.template.FormProcessor <Template PDF file> <Data file> <Output file>
|
Oracle BI Publisher Java API Reference Release 5.6.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||