Skip navigation links

Oracle Outside In Java API Reference
8.5.4

F11002-01


com.oracle.outsidein
Class Callback

java.lang.Object
  extended by com.oracle.outsidein.Callback


public class Callback
extends java.lang.Object

Enables API users to handle certain callbacks from the Outside In technology. For example, a callback is executed during the creation of each new output file. Users who want to handle specific callbacks must extend this class and override the desired methods.

See Also:
OptionsCache.setCallbackHandler(Callback)

Nested Class Summary
static class Callback.AssociationValue
          Describes the relationship of a new file to the original destination file.
 class Callback.CreateNewFileResponse
          Holds response values returned by createNewFile(FileFormat, FileFormat, AssociationValue, String).
 class Callback.CreateTempFileResponse
          Holds response values returned by createTempFile().
static class Callback.FileTypeValue
          Defines the type of file requested to be opened in openFile(Callback.FileTypeValue, String)
 class Callback.NewPageResponse
          Holds response values returned by prepareNewPage(long).
 class Callback.OpenFileResponse
          Holds response values returned by openFile(FileTypeValue, String).

 

Constructor Summary
Callback()
           

 

Method Summary
 Callback.CreateNewFileResponse createNewFile(FileFormat parentOutputId, FileFormat outputId, Callback.AssociationValue association, java.lang.String path)
          This callback is made any time a new output file needs to be generated.
 Callback.CreateTempFileResponse createTempFile()
          This callback is made when a temporary file needs to be generated.
 void newFileInfo(FileFormat parentOutputId, FileFormat outputId, Callback.AssociationValue association, java.lang.String path, java.lang.String url)
          This callback is made just after each new file has been created.
 Callback.OpenFileResponse openFile(Callback.FileTypeValue fileType, java.lang.String fileName)
          This callback is made when a supplementary file needs to be opened.
 void pageInfoSlideNotes(long pageNumber, java.lang.String[] slideNotes)
          This callback is a notification describing any existing slide notes on a page.
 void pageInfoVisibility(long pageNumber, boolean isVisible)
          This callback is a notification describing the visibility of the page indicated.
 Callback.NewPageResponse prepareNewPage(long pageNumber)
          This callback is made when a new page of output is about to be created.

 

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

 

Constructor Detail

Callback

public Callback()

Method Detail

newFileInfo

public void newFileInfo(FileFormat parentOutputId,
                        FileFormat outputId,
                        Callback.AssociationValue association,
                        java.lang.String path,
                        java.lang.String url)
                 throws java.io.IOException
This callback is made just after each new file has been created. If the developer has used createNewFile(FileFormat, FileFormat, AssociationValue, String) to change the location of (or to set up redirected I/O for) the new file, this method will echo back the information set by the developer.
Parameters:
parentOutputId - the FileFormat of the parent file
outputId - the FileFormat of the new file
association - the relationship of the new file with respect to the initial destination file
path - the default path and name of the new file that was created
url - the url as specified in the Callback.CreateNewFileResponse object returned from createNewFile(FileFormat, FileFormat, AssociationValue, String)
Throws:
java.io.IOException

createNewFile

public Callback.CreateNewFileResponse createNewFile(FileFormat parentOutputId,
                                                    FileFormat outputId,
                                                    Callback.AssociationValue association,
                                                    java.lang.String path)
                                             throws java.io.IOException
This callback is made any time a new output file needs to be generated. This gives the developer the chance to execute code before each new file is created and it allows the developer to override the standard naming for a file or to redirect the I/O calls for the file. This callback is made for all output files that are created.
Parameters:
parentOutputId - the FileFormat of the parent file
outputId - the FileFormat of the new file. When this callback occurs as a result of the copy template macro, this is FileFormat.FI_UNKNOWN
association - the relationship of the new file with respect to the initial destination file
path - the default path and name of the new file, if applicable.
Returns:
object containing where to write the destination data
Throws:
java.io.IOException

openFile

public Callback.OpenFileResponse openFile(Callback.FileTypeValue fileType,
                                          java.lang.String fileName)
                                   throws java.io.IOException
This callback is made when a supplementary file needs to be opened. It allows the developer to override the file location of the supplementary file or to redirect the I/O calls for the file. This callback is made when an input file or template file references data from another file.
Parameters:
fileType - the type of file reference that is requested to be opened
fileName - the name of the required file referenced by the template or input file
Returns:
object containing the location or redirected I/O object that will be used to process the data from the supplementary file
Throws:
java.io.IOException

prepareNewPage

public Callback.NewPageResponse prepareNewPage(long pageNumber)
This callback is made when a new page of output is about to be created. It allows the developer to specify margin text that will apply to the newly created page.
Parameters:
pageNumber - the zero-based page number of the new page
Returns:
object containing the margin text to be used for the new page

pageInfoSlideNotes

public void pageInfoSlideNotes(long pageNumber,
                               java.lang.String[] slideNotes)
This callback is a notification describing any existing slide notes on a page.
Parameters:
pageNumber - the zero-based page number of the page containing slide notes
slideNotes - an array containing lines of text in the slide note

pageInfoVisibility

public void pageInfoVisibility(long pageNumber,
                               boolean isVisible)
This callback is a notification describing the visibility of the page indicated.
Parameters:
pageNumber - the zero-based page number of the page
isVisible - whether the page is visible or hidden

createTempFile

public Callback.CreateTempFileResponse createTempFile()
                                               throws java.io.IOException
This callback is made when a temporary file needs to be generated. It allows the developer to override the storage and access of data for temporary files by redirecting the I/O calls.
Returns:
object containing the redirected I/O object that will be used to store and access the data from the temporary file
Throws:
java.io.IOException

Skip navigation links

Oracle Outside In Java API Reference
8.5.4

F11002-01


Copyright © 2010, 2018, Oracle and/or its affiliates. All rights reserved.