Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
12c Release 1 (12.1.2.0.0)
E23185-01


oracle.adf.view.rich.export
Class FormatHandler

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


public abstract class FormatHandler
extends Object

FormatHandler handles the format specific information when export is processed.


Constructor Summary
FormatHandler()
           

 

Method Summary
abstract  void beginWrapDetailItem(ExportContext exportContext, Object label)
          Overridable hook for format handler when we start exporting a component which is inside detail stamp.
protected  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  String getContentType(ExportContext exportContext)
          Retrieves the content type of the content this format handler generates.
 String getDefaultCharset()
          Gets the default charset of this export format.
abstract  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  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, Object text, 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 String getFormatType()
Retrives the export type that this format handler handles.
Returns:
the export type that this format handler handles.

getContentType

public abstract 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 String getDefaultCharset()
Gets the default charset of this export format. The default charset is utf-8.
Returns:
the default charset.

setupExportTarget

public abstract Object setupExportTarget(ExportContext exportContext)
                                  throws 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:
IOException

preContent

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

postContent

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

startTableElement

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

endTableElement

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

startRowElement

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

endRowElement

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

startTableHeaderElement

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

endTableHeaderElement

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

startDataElement

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

endDataElement

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

startDetailStamp

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

endDetailStamp

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

writeColSpan

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

writeRowSpan

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

writeText

public abstract void writeText(ExportContext exportContext,
                               Object text,
                               String property)
                        throws 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:
IOException

beginWrapDetailItem

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

endWrapDetailItem

public abstract void endWrapDetailItem(ExportContext exportContext)
                                throws IOException
Overridable hook for format handler when we end exporting a component which is inside detail stamp.
Throws:
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 Object createExportTarget(ExportContext exportContext)
                             throws IOException
Overridable hook for format handler to create export target. Default implementation is to get a writer.
Throws:
IOException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
12c Release 1 (12.1.2.0.0)
E23185-01


Copyright © 2013 Oracle Corporation. All Rights Reserved.