oracle.clex.process
Class CreateGenericBinaryPage

java.lang.Object
  |
  +--oracle.cle.process.Process
        |
        +--oracle.cle.process.GenericProcess
              |
              +--oracle.cle.process.ParentProcess
                    |
                    +--oracle.clex.process.CreatePage
                          |
                          +--oracle.clex.process.CreateGenericBinaryPage
All Implemented Interfaces:
Child, java.lang.Cloneable, PageConstants, Parent, ProcessConstants, java.io.Serializable, State
Direct Known Subclasses:
CreatePDFPage

public abstract class CreateGenericBinaryPage
extends CreatePage

This class, together with oracle.clex.process.CreateGenericTextPage, provides an open content type structure for the MVC Framework. All Create...Page processes should extend either this class or CreateGenericTextPage.

Subclasses need to implement:
1) The setContentType() method, returning a String that is the mime type of the end result the process is to display. For example, CreatePDFPage's setContentType() returns "application/pdf", the mime type for a PDF document.
2) The getBinaryInputStream() method, returning an InputStream that is the binary file as a stream. This stream is placed in the infotable for use later.

See Also:
Serialized Form

Fields inherited from class oracle.cle.process.GenericProcess
parent
 
Fields inherited from class oracle.cle.process.Process
condition, DEBUG, endState, FAILURE, name, processes, service, stateMachine, SUCCESS, TRANSITION_CONDITION_FAILURE, TRANSITION_CONDITION_SUCCESS
 
Fields inherited from interface oracle.cle.process.ProcessConstants
ALLINFO, BINARYSIZE, CONNECTION_PROVIDER_DTD_NAME, CONNECTION_PROVIDER_VALIDATION_PROPERTY, CONTENTTYPE, CURRENTPAGEID, CURRENTSERVICE, ERRORMESSAGE, GENERICBINARYRESULT, GENERICTEXTRESULT, GETINFO_CHECK_ALL, GETINFO_CHECK_CONTROLLERONLY, GETINFO_CHECK_SERVICEONLY, HTML, HTMLRESULT, JSPRESULT, LOGOFF, NOMESSAGE, PAGEID, PDF, PDFRESULT, PRE_GROUP_DTD_NAME, PRE_GROUP_VALIDATION_PROPERTY, PROCESS_FEEDBACK, RESTART, RESULTTYPE, RULES_DTD_NAME, SERVICE_DESCRIPTOR, SERVICE_DTD_NAME, SERVICE_VALIDATION_PROPERTY, SERVICEINITIALSTATE, SERVICENAME, SESSIONID, SKIP, STACKTRACE, USER, USERROLE, WML, XML, XMLRESULT
 
Constructor Summary
CreateGenericBinaryPage()
           
 
Method Summary
protected abstract  java.io.InputStream getBinaryInputStream()
          Subclasses need to return the binary file as an input stream in this method.
protected abstract  java.lang.String getContentType()
          Subclasses should return their mime type, application/pdf" for example, in this method.
protected  int getLength()
          GetLength returns the length of the input stream.
protected  void postStart()
          Called at the end of CreatePage.start().
protected  void preStart()
          Called at begining of CreatePage.start().
protected  void printPage(java.io.PrintWriter out)
           
protected  void registerInfo()
          Register the information that the process is interested in and declare any of the results(BINARYSIZE,GENERICBINARYRESULT,CONTENTTYPE) that this Process will produce.
protected  void setCreatePageResult(java.lang.String result)
          Application Should not need to invoke this method
 
Methods inherited from class oracle.clex.process.CreatePage
buildTransitionTable, getPageId, lookupPageLocation, registerProcesses, start
 
Methods inherited from class oracle.cle.process.ParentProcess
addTransition, clone, doSkip, getChildren, getEndStates, getInitialState, getSkipable, isReady, processParameters, processResults, registerProcess, setInitialState, setSkipable, skip
 
Methods inherited from class oracle.cle.process.GenericProcess
getBooleanInfo, getFloatInfo, getInfo, getInfo, getInfo, getInfoValue, getInfoValue, getInfoValueFromController, getInfoValueFromService, getIntegerInfo, getParameterNamed, getParameters, getParent, getParents, getResultNamed, getResults, getSessionId, getStringInfo, processParameters, processResults, registerBooleanParameter, registerBooleanResult, registerIntegerParameter, registerIntegerResult, registerParameter, registerProcessInfo, registerResult, registerStringArrayParameter, registerStringArrayResult, registerStringParameter, registerStringParameter, registerStringResult, registerStringResult, retrieveStringParameter, runTest, setParent, setResult, setResult, setResult
 
Methods inherited from class oracle.cle.process.Process
addCondition, addProcess, cloneProcess, debug, generateFailureCondition, generateSuccessCondition, getClassname, getCondition, getConditions, getIconName, getImageName, getName, getProcesses, getProcessNamed, getStateMachine, hashCode, isEndState, removeCondition, removeCondition, reportException, returnCondition, setCondition, setCondition, setEndState, setName, setService, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.cle.process.Parent
getInfo, getName, getParents
 
Methods inherited from interface oracle.cle.process.Child
getParameters, getParent, getParents, getResults, setParent
 

Constructor Detail

CreateGenericBinaryPage

public CreateGenericBinaryPage()
Method Detail

registerInfo

protected void registerInfo()
Register the information that the process is interested in and declare any of the results(BINARYSIZE,GENERICBINARYRESULT,CONTENTTYPE) that this Process will produce.
Overrides:
registerInfo in class CreatePage

setCreatePageResult

protected void setCreatePageResult(java.lang.String result)
Application Should not need to invoke this method
Overrides:
setCreatePageResult in class CreatePage

getContentType

protected abstract java.lang.String getContentType()
Subclasses should return their mime type, application/pdf" for example, in this method.

getBinaryInputStream

protected abstract java.io.InputStream getBinaryInputStream()
Subclasses need to return the binary file as an input stream in this method. (M. Blok: the return type should be BufferedInputStream instead of InputStream! Should be changed eventually.)

printPage

protected void printPage(java.io.PrintWriter out)
Overrides:
printPage in class CreatePage

getLength

protected int getLength()
GetLength returns the length of the input stream. Override this method if you make use of buffered input streams since the available method only returns the number of bytes that can be read from this input stream without blocking by the next caller of a method for this input stream, and not necessarily the actual input stream length.

preStart

protected void preStart()
Called at begining of CreatePage.start().
Overrides:
preStart in class CreatePage

postStart

protected void postStart()
Called at the end of CreatePage.start().
Overrides:
postStart in class CreatePage


Copyright © 2003 ORACLE Corp. All Rights Reserved.