Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.1)
E10684-09


oracle.adf.view.rich.export
Class FormatHandler

java.lang.Object
  extended by oracle.adf.view.rich.export.FormatHandler


public abstract class FormatHandler
extends java.lang.Object

FormatHandler handles the format specific information when export is processed.


Constructor Summary
FormatHandler()
           

 

Method Summary
abstract  void beginWrapDetailItem(ExportContext exportContext, java.lang.Object label)
          Overridable hook for format handler when we start exporting a component which is inside detail stamp.
protected  java.lang.Object createExportTarget(ExportContext exportContext)
          Overridable hook for format handler to create export target.
abstract  void endDataElement(ExportContext exportContext)
          End a data element.
abstract  void endDetailStamp(ExportContext exportContext)
          End a detail stamp element.
abstract  void endRowElement(ExportContext exportContext)
          End a row element.
abstract  void endTableElement(ExportContext exportContext)
          End a table element.
abstract  void endTableHeaderElement(ExportContext exportContext)
          End a table header element.
abstract  void endWrapDetailItem(ExportContext exportContext)
          Overridable hook for format handler when we end exporting a component which is inside detail stamp.
abstract  java.lang.String getContentType(ExportContext exportContext)
          Retrieves the content type of the content this format handler generates.
 java.lang.String getDefaultCharset()
          Gets the default charset of this export format.
abstract  java.lang.String getFormatType()
          Retrives the export type that this format handler handles.
 int getMaximumRecords(ExportContext exportContext)
          Get the maximum number of rows supported by this format handler.
abstract  void postContent(ExportContext exportContext)
          Overridable hook for each format handler to wrap anything after we end exporting the content.
abstract  void preContent(ExportContext exportContext)
          Overridable hook for each format handler to inject anything before we start exporting the content of the component.
abstract  java.lang.Object setupExportTarget(ExportContext exportContext)
          Sets up the target where the format handler dump the exported content to.
abstract  void startDataElement(ExportContext exportContext)
          Start a data element.
abstract  void startDetailStamp(ExportContext exportContext)
          Start a detail stamp element.
abstract  void startRowElement(ExportContext exportContext)
          Start a row element.
abstract  void startTableElement(ExportContext exportContext)
          Start a table element.
abstract  void startTableHeaderElement(ExportContext exportContext)
          Start a table header element.
abstract  void writeColSpan(ExportContext exportContext, int colspan)
          Handles column span attribute if it is supported.
abstract  void writeRowSpan(ExportContext exportContext, int rowspan)
          Handles row span attribute if it is supoorted.
abstract  void writeText(ExportContext exportContext, java.lang.Object text, java.lang.String property)
          Writes text to the export target.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

FormatHandler

public FormatHandler()

Method Detail

getFormatType

public abstract java.lang.String getFormatType()
Retrives the export type that this format handler handles.
Returns:
the export type that this format handler handles.

getContentType

public abstract java.lang.String getContentType(ExportContext exportContext)
Retrieves the content type of the content this format handler generates.
Returns:
the content type of the content this format handler generates.

getDefaultCharset

public java.lang.String getDefaultCharset()
Gets the default charset of this export format. The default charset is utf-8.
Returns:
the default charset.

setupExportTarget

public abstract java.lang.Object setupExportTarget(ExportContext exportContext)
                                            throws java.io.IOException
Sets up the target where the format handler dump the exported content to. Each diferent format handler will need different target: Writer or OutputStream or other target that is suitable for the export format supported.
Throws:
java.io.IOException

preContent

public abstract void preContent(ExportContext exportContext)
                         throws java.io.IOException
Overridable hook for each format handler to inject anything before we start exporting the content of the component.
Throws:
java.io.IOException

postContent

public abstract void postContent(ExportContext exportContext)
                          throws java.io.IOException
Overridable hook for each format handler to wrap anything after we end exporting the content.
Throws:
java.io.IOException

startTableElement

public abstract void startTableElement(ExportContext exportContext)
                                throws java.io.IOException
Start a table element.
Throws:
java.io.IOException

endTableElement

public abstract void endTableElement(ExportContext exportContext)
                              throws java.io.IOException
End a table element.
Throws:
java.io.IOException

startRowElement

public abstract void startRowElement(ExportContext exportContext)
                              throws java.io.IOException
Start a row element.
Throws:
java.io.IOException

endRowElement

public abstract void endRowElement(ExportContext exportContext)
                            throws java.io.IOException
End a row element.
Throws:
java.io.IOException

startTableHeaderElement

public abstract void startTableHeaderElement(ExportContext exportContext)
                                      throws java.io.IOException
Start a table header element.
Throws:
java.io.IOException

endTableHeaderElement

public abstract void endTableHeaderElement(ExportContext exportContext)
                                    throws java.io.IOException
End a table header element.
Throws:
java.io.IOException

startDataElement

public abstract void startDataElement(ExportContext exportContext)
                               throws java.io.IOException
Start a data element. This is the cell if we are exporting table/tree/treeTable.
Throws:
java.io.IOException

endDataElement

public abstract void endDataElement(ExportContext exportContext)
                             throws java.io.IOException
End a data element.
Throws:
java.io.IOException

startDetailStamp

public abstract void startDetailStamp(ExportContext exportContext)
                               throws java.io.IOException
Start a detail stamp element. Any special handling can be done for each handler before exporting a detail stamp component.
Throws:
java.io.IOException

endDetailStamp

public abstract void endDetailStamp(ExportContext exportContext)
                             throws java.io.IOException
End a detail stamp element. Any wrap-up handling can be done for each handler after exporting a detail stamp component.
Throws:
java.io.IOException

writeColSpan

public abstract void writeColSpan(ExportContext exportContext,
                                  int colspan)
                           throws java.io.IOException
Handles column span attribute if it is supported.
Throws:
java.io.IOException

writeRowSpan

public abstract void writeRowSpan(ExportContext exportContext,
                                  int rowspan)
                           throws java.io.IOException
Handles row span attribute if it is supoorted.
Throws:
java.io.IOException

writeText

public abstract void writeText(ExportContext exportContext,
                               java.lang.Object text,
                               java.lang.String property)
                        throws java.io.IOException
Writes text to the export target.
Parameters:
text - Text to be written
property - Name of the property of attribute (if any) of the component to be associated with
Throws:
java.io.IOException

beginWrapDetailItem

public abstract void beginWrapDetailItem(ExportContext exportContext,
                                         java.lang.Object label)
                                  throws java.io.IOException
Overridable hook for format handler when we start exporting a component which is inside detail stamp.
Throws:
java.io.IOException

endWrapDetailItem

public abstract void endWrapDetailItem(ExportContext exportContext)
                                throws java.io.IOException
Overridable hook for format handler when we end exporting a component which is inside detail stamp.
Throws:
java.io.IOException

getMaximumRecords

public int getMaximumRecords(ExportContext exportContext)
Get the maximum number of rows supported by this format handler. -1 means no limit.
Returns:
maximum number of rows supported by this format handler.

createExportTarget

protected java.lang.Object createExportTarget(ExportContext exportContext)
                                       throws java.io.IOException
Overridable hook for format handler to create export target. Default implementation is to get a writer.
Throws:
java.io.IOException

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.1)
E10684-09


Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.