sferyx.administration.htmlgenerator
Class HTMLGeneratorOracleBean

java.lang.Object
  java.awt.Component
      java.awt.Container
          sferyx.administration.htmlgenerator.HTMLGeneratorOracleBean
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class HTMLGeneratorOracleBean
extends java.awt.Container

This class has been optimized to deliver correct generation of Rich Text content for Oracle Reports and provide general HTML generation capabilities for OracleForms. Oracle Forms Extended support wrapper - this class is intended for integration with Oracle Forms/ Oracle Forms Builder and provides better compatibility with the Oracle Runtime System.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static boolean isOracleBean
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HTMLGeneratorOracleBean()
          Creates a new instance of HTMLGeneratorOracleBean
 
Method Summary
 void addPageBreakToContentBuffer()
          Adds a HTML page break to the content buffer and all the content appended after that will be on the next page when printed
 void addReportParameter(java.lang.String name, java.lang.String value)
          Adds parameters to be used for generation of the report - this method can be used multiple times to add multiple parameters.
 void appendDocxToContentBuffer(java.lang.String docxURL)
          Appends the MS Word Docx content to the content buffer.
 void appendHTMLContentToContentBuffer(java.lang.String content)
          Appends new HTML string to existing content buffer.
 void appendPlainTextContentToContentBuffer(java.lang.String content)
          Appends the Plain Text string content to the content buffer.
 void appendRTFFileToContentBuffer(java.lang.String rtfURL)
          Appends the Rich Text Format RTF content to the content buffer.
 void clearReportParameters()
          Clears all the report parameters set previously using addReportParameter .
 void closeBufferAndGenerateHTML(java.lang.String destinationFile)
          Closes the existing content buffer and inserts its content inside the HTMLGenerator.
 java.lang.String closeBufferAndGenerateHTMLSynchronously(java.lang.String destinationFile)
          Closes the existing content buffer and inserts its content inside the HTMLGenerator.
 java.lang.String closeBufferAndGenerateTempHTMLFile()
          Closes the existing content buffer and inserts its content inside the HTMLGenerator and generates a temporary file where the HTML file is saved - the name of the temp file is returned as a result from the method.
 void generateHTML(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates a html file from given URL and saves it to a given filename using default paper size and orientation
 void generateHTMLFromContent(java.lang.String content, java.lang.String destinationFile)
          Generates a html file from given html/text content and saves it to a given filename, using paper size and paper orientation such as LANDSCAPE or PORTRAIT
 void generateHTMLFromDocxURL(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates html automatically for given URL source containing a MS Word Docx file.
 void generateHTMLFromReport(java.lang.String sourceURL)
          Generates a html file from given URL and saves it to temporary file showing the ready HTML document into the available HTML viewer
 void generateHTMLFromRTFURL(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates html automatically for given URL source containing Rich Text Format RTF file.
 void generateHTMLFromURL(java.lang.String sourceURL, java.lang.String destinationFile)
          Generates a html file from given URL and saves it to a given filename using paper size and orientation
 void openContentBuffer()
          Opens the new content buffer for inserting content inside the HTMLGenerator.
 void setOpenGeneratedFileInHTMLViewer(boolean show)
          Indicates whether to automatically open the default HTML Viewer and show the generated file or not.
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isOracleBean

public static boolean isOracleBean
Constructor Detail

HTMLGeneratorOracleBean

public HTMLGeneratorOracleBean()
Creates a new instance of HTMLGeneratorOracleBean

Method Detail

addReportParameter

public void addReportParameter(java.lang.String name,
                               java.lang.String value)
Adds parameters to be used for generation of the report - this method can be used multiple times to add multiple parameters. Please note that this is persistent and once added the parameters will be used until cleared. See clearReportParameters method.


clearReportParameters

public void clearReportParameters()
Clears all the report parameters set previously using addReportParameter .


generateHTMLFromReport

public void generateHTMLFromReport(java.lang.String sourceURL)
Generates a html file from given URL and saves it to temporary file showing the ready HTML document into the available HTML viewer


generateHTMLFromURL

public void generateHTMLFromURL(java.lang.String sourceURL,
                                java.lang.String destinationFile)
Generates a html file from given URL and saves it to a given filename using paper size and orientation


generateHTMLFromRTFURL

public void generateHTMLFromRTFURL(java.lang.String sourceURL,
                                   java.lang.String destinationFile)
Generates html automatically for given URL source containing Rich Text Format RTF file. It will generate the file using the given standard page format string such as "A4", "Letter" etc. and and save the file to the given File and page oriantation such as "Portrait" or "Landscape". You can also set the page margins using the method setMarginsForStandardPageFormat


generateHTMLFromDocxURL

public void generateHTMLFromDocxURL(java.lang.String sourceURL,
                                    java.lang.String destinationFile)
Generates html automatically for given URL source containing a MS Word Docx file. It will generate the file using the given standard page format string such as "A4", "Letter" etc. and and save the file to the given File and page oriantation such as "Portrait" or "Landscape". You can also set the page margins using the method setMarginsForStandardPageFormat


generateHTMLFromContent

public void generateHTMLFromContent(java.lang.String content,
                                    java.lang.String destinationFile)
Generates a html file from given html/text content and saves it to a given filename, using paper size and paper orientation such as LANDSCAPE or PORTRAIT


openContentBuffer

public void openContentBuffer()
Opens the new content buffer for inserting content inside the HTMLGenerator. This should be used in conjunction with closeBufferAndGenerateHTML() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


appendHTMLContentToContentBuffer

public void appendHTMLContentToContentBuffer(java.lang.String content)
Appends new HTML string to existing content buffer. This should be used in conjunction with openContentBuffer() and closeBufferAndGenerateHTML(). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


appendPlainTextContentToContentBuffer

public void appendPlainTextContentToContentBuffer(java.lang.String content)
Appends the Plain Text string content to the content buffer. The Plain Text content will be appended to existing content previously appended for example from HTML, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.


appendDocxToContentBuffer

public void appendDocxToContentBuffer(java.lang.String docxURL)
                               throws java.net.MalformedURLException
Appends the MS Word Docx content to the content buffer. The Docx content will be appended to existing content previously appended for example from HTML, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.

Throws:
java.net.MalformedURLException

appendRTFFileToContentBuffer

public void appendRTFFileToContentBuffer(java.lang.String rtfURL)
                                  throws java.net.MalformedURLException
Appends the Rich Text Format RTF content to the content buffer. The Rich Text Format RTF content will be appended to existing content previously appended for example from HTML, Docx or RTF files. See closeBufferAndGenerateHTML for how to create the resaulting HTML content.

Throws:
java.net.MalformedURLException

closeBufferAndGenerateHTMLSynchronously

public java.lang.String closeBufferAndGenerateHTMLSynchronously(java.lang.String destinationFile)
Closes the existing content buffer and inserts its content inside the HTMLGenerator. This should be used in conjunction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


closeBufferAndGenerateHTML

public void closeBufferAndGenerateHTML(java.lang.String destinationFile)
Closes the existing content buffer and inserts its content inside the HTMLGenerator. This should be used in conjunction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


closeBufferAndGenerateTempHTMLFile

public java.lang.String closeBufferAndGenerateTempHTMLFile()
Closes the existing content buffer and inserts its content inside the HTMLGenerator and generates a temporary file where the HTML file is saved - the name of the temp file is returned as a result from the method. This should be used in conjunction with openContentBuffer() and appendContentToContentBuffer(String content). This methods are very useful in environments where long content strings cannot be inserted at once due to some limitations as happens for example in Oracle Forms. See supplied examples in the users manual.


addPageBreakToContentBuffer

public void addPageBreakToContentBuffer()
Adds a HTML page break to the content buffer and all the content appended after that will be on the next page when printed


generateHTML

public void generateHTML(java.lang.String sourceURL,
                         java.lang.String destinationFile)
Generates a html file from given URL and saves it to a given filename using default paper size and orientation


setOpenGeneratedFileInHTMLViewer

public void setOpenGeneratedFileInHTMLViewer(boolean show)
Indicates whether to automatically open the default HTML Viewer and show the generated file or not. The default is true