|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cle.process.Process | +--oracle.cle.process.GenericProcess | +--oracle.cle.process.ParentProcess | +--oracle.clex.process.CreatePage | +--oracle.clex.process.CreateGenericTextPage | +--oracle.clex.process.CreateTagReplacementPage
This class constructs a bytestream by parsing through the contents of a
file. During parsing all tags of the following general form
<CLE_INC>tagName</CLE_INC>
are replaced by the actual dynamic data using the following lookup strategy:
1) The tagName is used to determine if there is a ProcessInfo in the
InfoTable with a matching tag. If so that value is substituted.
2) If a value provided is specified in the constructor then the word
'get' will be prepended to the 'tagName' and reflection will be used
to call the method. The result of the method call will be substituted
in place of the
About CLE_INC Tag: The only restrictions that currently exist for
the CLE_INC tags are:
1) The entire tag must be on a line. You can not currently split
the tag across lines.
Field Summary | |
protected java.lang.String |
className
|
protected java.lang.String |
filename
|
protected HTMLString |
htmlDynamicLine
|
protected java.lang.String |
htmlInputBufferLine
HTML line read from input buffer |
protected java.lang.String |
htmlInputBufferNextLine
// Next HTML Line |
protected boolean |
lookupPage
|
protected static java.lang.String |
matchString
|
protected java.lang.String |
pageLocationKey
|
protected java.net.URL |
url
|
protected java.lang.Class |
valueProvider
|
protected GenericProcess |
valueProviderInstance
|
protected java.lang.String |
valueStr
Actual getXXX - valueStr contains XXX |
protected java.lang.String |
wrbStr
Sub string between beginning from WRB_INC to ">" |
protected java.lang.String |
wrbSubStr
Sub string of HTML line beginning from WRB_INC |
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 |
Constructor Summary | |
CreateTagReplacementPage()
Default constructor |
|
CreateTagReplacementPage(java.lang.String aFileURLString)
Constructor with aFileURLString parameter. |
|
CreateTagReplacementPage(java.lang.String aPageLocationKey,
boolean lookup)
Constructor with aPageLocationKey parameter. |
|
CreateTagReplacementPage(java.lang.String aFilename,
java.lang.String aClassName)
|
|
CreateTagReplacementPage(java.lang.String aPageLocationOrKey,
java.lang.String aClassName,
boolean lookup)
Constructor with aPageLocationKey and aClassName parameters. |
Method Summary | |
protected java.io.InputStream |
getInputStream(java.lang.String aFilename)
Returns the InputStream for the specified file. |
HTMLString |
handleTag(java.lang.String tag)
Resolves the value of the tag either from the infoTable or the valueProvider Object |
protected void |
init(java.lang.String aFilename,
java.lang.String aClassName)
Common code for all constructors. |
static void |
main(java.lang.String[] args)
Main method for testing this class. |
protected abstract java.lang.String |
postProcessLine(java.lang.String aString)
|
protected void |
postStart()
Processes the result for the valueProvider(Child) Object. |
protected void |
preStart()
Invokes super.preStart() before processing the parameters
in the valueProvider(Child) Object. |
void |
printPage(java.io.PrintWriter out)
This method takes a PrintWriter as an argument. |
protected void |
registerInfo()
Register all ProcessParameters(CURRENTSERVICE,GroupName) and potential ProcessResults(CURRENTPAGEID). |
void |
setService(Service aService)
Overload this setter to set the valueProvider's service |
Methods inherited from class oracle.clex.process.CreateGenericTextPage |
setContentType |
Methods inherited from class oracle.clex.process.CreatePage |
buildTransitionTable, getPageId, lookupPageLocation, registerProcesses, setCreatePageResult, 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.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, 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 |
Field Detail |
protected java.lang.String filename
protected java.lang.String className
protected java.lang.Class valueProvider
protected GenericProcess valueProviderInstance
protected HTMLString htmlDynamicLine
protected java.net.URL url
protected boolean lookupPage
protected java.lang.String pageLocationKey
protected java.lang.String htmlInputBufferLine
protected java.lang.String htmlInputBufferNextLine
protected java.lang.String wrbSubStr
protected java.lang.String wrbStr
protected java.lang.String valueStr
protected static final java.lang.String matchString
Constructor Detail |
public CreateTagReplacementPage()
public CreateTagReplacementPage(java.lang.String aFileURLString)
aFileURLString
- URL string containing the HTML file namepublic CreateTagReplacementPage(java.lang.String aFilename, java.lang.String aClassName)
public CreateTagReplacementPage(java.lang.String aPageLocationOrKey, java.lang.String aClassName, boolean lookup)
aPageLocationKey
- properties key to use for lookup of the HTML pageaClassName
- Name of the child classlookup
- lookup HTML location if this is truepublic CreateTagReplacementPage(java.lang.String aPageLocationKey, boolean lookup)
aPageLocationKey
- properties key to use for lookup of the HTML pagelookup
- lookup HTML location if this is trueMethod Detail |
protected void init(java.lang.String aFilename, java.lang.String aClassName) throws java.lang.Exception
java.lang.Exception
- public void setService(Service aService)
setService
in class Process
public HTMLString handleTag(java.lang.String tag)
public void printPage(java.io.PrintWriter out)
The File to be parsed for CLE_INC tags is specified in the constructor. You can specify the location of the file in one of two ways:
1) Pass the a filensme or URL to the constructor
(ie. if URL: file://c:/tmp/file.html, if in WEB-INF/classes
[root of classpath]: file.html)
2) Pass in the key of the file name. The key will then be used to lookup
the exact file name from a properties file.
During parsing all tags of the following general form
1) The tagName is used to determine if there is a ProcessInfo in the
InfoTable with a matching tag. If so that value is substituted.
2) If a value provided is specified in the constructor then the word
'get' will be prepended to the 'tagName' and reflection will be used
to call the method. The result of the method call will be substituted
in place of the
printPage
in class CreatePage
protected void registerInfo()
registerInfo
in class CreateGenericTextPage
protected void preStart()
super.preStart()
before processing the parameters
in the valueProvider(Child) Object.preStart
in class CreateGenericTextPage
protected void postStart()
postStart
in class CreatePage
protected abstract java.lang.String postProcessLine(java.lang.String aString)
protected final java.io.InputStream getInputStream(java.lang.String aFilename) throws java.lang.Exception
CLEUtil.getInputStream(String, Class)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |