|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.SAK.IeService
com.infoengine.jsp.InfoEngine
This class extends the Info*Engine Server Access Kit. It provides additional functionality that facilitates interaction between JSP pages and Info*Engine. For example, this class makes it convenient to execute Info*Engine templates and tasks, access the results, and render them in various ways.
Field Summary | |
private javax.servlet.http.HttpServletRequest |
request
|
Fields inherited from class com.infoengine.SAK.IeService |
|
Constructor Summary | |
InfoEngine()
Create an instance that is not associated with any particular Info*Engine server or servlet request. |
|
InfoEngine(javax.servlet.http.HttpServletRequest request)
Create an instance that is associated with a specified servlet request but no particular Info*Engine server. |
|
InfoEngine(javax.servlet.http.HttpServletRequest request,
String serverUri)
Create an instance that is associated with a specified servlet request and Info*Engine server. |
Method Summary | |
String |
applyXSL(Reader xslReader,
String styleBaseUri)
Internally render the default group as an XML string, then apply a specified XSL stylesheet to produce a string that is returned as a result. |
String |
applyXSL(String groupName,
Reader xslReader,
String styleBaseUri)
Internally render a group as an XML string, then apply a specified XSL stylesheet to produce a string that is returned as a result. |
String |
applyXSL(String stylesheet,
String styleBaseUri)
Internally render the default group as an XML string, then apply a specified XSL stylesheet to produce a string that is returned as a result. |
String |
applyXSL(String groupName,
String stylesheet,
String styleBaseUri)
Internally render a group as an XML string, then apply a specified XSL stylesheet to produce a string that is returned as a result. |
void |
beginRequestWithParameters(String templatePath)
Initiate a request to the Info*Engine server, and send all variables supplied in the query string and/or HTML form of the servlet request as parameters of the template or task. |
void |
executeTask(String uri)
Execute an Info*Engine task and update the internal collection of groups from the result. |
void |
executeTaskWithParameters(String uri)
Execute an Info*Engine task and update the internal collection of groups from the result. |
String |
formatAttributeNames(String prefix,
String suffix,
String separator)
Obtain the names of the attributes contained within each element of the default Info*Engine group, and format the names as a String that can be rendered for display. |
String |
formatAttributeNames(String groupName,
String prefix,
String suffix,
String separator)
Obtain the names of the attributes contained within each element of an Info*Engine group, and format the names as a String that can be rendered for display. |
String |
formatColumn(String attrName,
String prefix,
String suffix,
String separator)
Obtain all of the values contained within all attributes of a specified name of all elements of the default group, and format them as a String that can be rendered for display. |
String |
formatColumn(String groupName,
String attrName,
String prefix,
String suffix,
String separator)
Obtain all of the values contained within all attributes of a specified name of all elements of a specified group, and format them as a String that can be rendered for display. |
String |
formatGroup(String elementPrefix,
String elementSuffix,
String elementSeparator,
String attributePrefix,
String attributeSuffix,
String attributeSeparator,
String valuePrefix,
String valueSuffix,
String valueSeparator)
Traverse the entire set of elements contained within the default Info*Engine group, and format all of their attribute values as a String that can be rendered for display. |
String |
formatGroup(String groupName,
String elementPrefix,
String elementSuffix,
String elementSeparator,
String attributePrefix,
String attributeSuffix,
String attributeSeparator,
String valuePrefix,
String valueSuffix,
String valueSeparator)
Traverse the entire set of elements contained within an Info*Engine group, and format all of their attribute values as a String that can be rendered for display. |
String |
formatRow(int index,
String prefix,
String suffix,
String separator)
Obtain all of the attribute values contained within an element of the default group, and format them as a String that can be rendered for display. |
String |
formatRow(String groupName,
int index,
String prefix,
String suffix,
String separator)
Obtain all of the attribute values contained within an element of a group, and format them as a String that can be rendered for display. |
Vector |
getColumn(String attrName)
Return all of the values of a named attribute of all elements of the default group. |
int |
getElementCount()
Return the number of elements in the default group. |
String |
getMessage()
Return the message string associated with the default group. |
Vector |
getRow(int index)
Return all of the values of an element of the default group. |
int |
getStatus()
Return the status value associated with the default group. |
String |
invokeRequest(String templatePath)
Execute an Info*Engine template or task and return the result as a String. |
String |
invokeRequestWithParameters(String templatePath)
Execute an Info*Engine template or task, and send all variables supplied in the query string and/or HTML form of the servlet request as parameters of the template or task. |
private void |
setAuthorization()
|
void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
Set the servlet request object associated with this object instance. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private javax.servlet.http.HttpServletRequest request
Constructor Detail |
public InfoEngine()
public InfoEngine(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
request
- the servlet request object
javax.servlet.ServletException
- if authentication information provided
in the servlet request can not be validatedpublic InfoEngine(javax.servlet.http.HttpServletRequest request, String serverUri) throws javax.servlet.ServletException
request
- the servlet request objectserverUri
- the base URI of the Info*Engine server
javax.servlet.ServletException
- if authentication information provided
in the servlet request can not be validatedMethod Detail |
public void setServletRequest(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
request
- the servlet request object
javax.servlet.ServletException
- if authentication information provided
in the servlet request can not be validatedpublic void beginRequestWithParameters(String templatePath) throws IeServiceException
templatePath
- the pathname of a template or task.
IeServiceException
- if the request was not initiated
successfullypublic String invokeRequest(String templatePath) throws IeServiceException
templatePath
- the pathname of a template or task.
IeServiceException
- if the request was not initiated
successfullypublic String invokeRequestWithParameters(String templatePath) throws IeServiceException
templatePath
- the pathname of a template or task.
IeServiceException
- if the request was not initiated
successfullypublic void executeTask(String uri) throws IeServiceException
IeServiceException
- if the request was not executed
successfullypublic void executeTaskWithParameters(String uri) throws IeServiceException
IeServiceException
- if the request was not executed
successfullypublic String formatAttributeNames(String groupName, String prefix, String suffix, String separator)
groupName
- the name of the group from which attribute names
will be obtained. The group must exist within the
internal collection.prefix
- the string to insert immediately before each attribute
namesuffix
- the string to insert immediatly after each attribute
nameseparator
- the string to insert between attribute names
public String formatAttributeNames(String prefix, String suffix, String separator)
prefix
- the string to insert immediately before each attribute
namesuffix
- the string to insert immediatly after each attribute
nameseparator
- the string to insert between attribute names
public String formatGroup(String groupName, String elementPrefix, String elementSuffix, String elementSeparator, String attributePrefix, String attributeSuffix, String attributeSeparator, String valuePrefix, String valueSuffix, String valueSeparator)
groupName
- the name of the group to be formatted. The group
must exist within the internal collection.elementPrefix
- the string to insert immediately before each
element of the group. An element can be envisioned
as a row of a table.elementSuffix
- the string to insert immediatly after each
element (row) of the group.elementSeparator
- the string to insert between elements (rows)
of the group.attributePrefix
- the string to insert immediately before each
attribute of an element. An attribute can be envisioned
as a column of a table.attributeSuffix
- the string to insert immediatly after each
attribute (column) of an element.attributeSeparator
- the string to insert between attributes
(columns) of an element.valuePrefix
- the string to insert immediately before each
value of an attribute. Attributes can have more than
one value. In case an attribute is multi-valued, this
parameter specifies a prefix to insert immediately
before each one.valueSuffix
- the string to insert immediatly after each value
of an attribute.valueSeparator
- the string to insert between values of a
multi-valued attribute.
public String formatGroup(String elementPrefix, String elementSuffix, String elementSeparator, String attributePrefix, String attributeSuffix, String attributeSeparator, String valuePrefix, String valueSuffix, String valueSeparator)
elementPrefix
- the string to insert immediately before each
element of the group. An element can be envisioned
as a row of a table.elementSuffix
- the string to insert immediatly after each
element (row) of the group.elementSeparator
- the string to insert between elements (rows)
of the group.attributePrefix
- the string to insert immediately before each
attribute of an element. An attribute can be envisioned
as a column of a table.attributeSuffix
- the string to insert immediatly after each
attribute (column) of an element.attributeSeparator
- the string to insert between attributes
(columns) of an element.valuePrefix
- the string to insert immediately before each
value of an attribute. Attributes can have more than
one value. In case an attribute is multi-valued, this
parameter specifies a prefix to insert immediately
before each one.valueSuffix
- the string to insert immediatly after each value
of an attribute.valueSeparator
- the string to insert between values of a
multi-valued attribute.
public String formatRow(String groupName, int index, String prefix, String suffix, String separator)
groupName
- the name of the group from which the element will
be obtained. The group must exist within the
internal collection.index
- the index of the element within the group. Use
getElementCount to determine how many elements are
contained within the group. Valid indexes range from
0 to the element count - 1.prefix
- the string to insert immediately before each attribute
valuesuffix
- the string to insert immediatly after each attribute
valueseparator
- the string to insert between attribute values
public String formatRow(int index, String prefix, String suffix, String separator)
index
- the index of the element within the group. Use
getElementCount to determine how many elements are
contained within the group. Valid indexes range from
0 to the element count - 1.prefix
- the string to insert immediately before each attribute
valuesuffix
- the string to insert immediatly after each attribute
valueseparator
- the string to insert between attribute values
public String formatColumn(String groupName, String attrName, String prefix, String suffix, String separator)
groupName
- the name of the group from which the attributes will
be obtained. The group must exist within the
internal collection.attrName
- the name of the attribute from which values will
be obtained. This attribute will be extracted from
each element of the group.prefix
- the string to insert immediately before each attribute
valuesuffix
- the string to insert immediatly after each attribute
valueseparator
- the string to insert between attribute values
public String formatColumn(String attrName, String prefix, String suffix, String separator)
attrName
- the name of the attribute from which values will
be obtained. This attribute will be extracted from
each element of the group.prefix
- the string to insert immediately before each attribute
valuesuffix
- the string to insert immediatly after each attribute
valueseparator
- the string to insert between attribute values
public String applyXSL(String groupName, Reader xslReader, String styleBaseUri) throws IeServiceException
groupName
- the name of the group to which the stylesheet will
be applied. The group must exist within the
internal collection.xslReader
- the Reader from which the XSL stylesheet can be readstyleBaseUri
- a URI specifying where to find additional
stylesheets that might be referenced by the main
stylesheet read from xslReader
IeServiceException
- if the XSL stylesheet was not applied
successfully, possible due to a syntax
error in the stylesheet, or a failure
in trying to read the stylesheetpublic String applyXSL(Reader xslReader, String styleBaseUri) throws IeServiceException
xslReader
- the Reader from which the XSL stylesheet can be readstyleBaseUri
- a URI specifying where to find additional
stylesheets that might be referenced by the main
stylesheet read from xslReader
IeServiceException
- if the XSL stylesheet was not applied
successfully, possible due to a syntax
error in the stylesheet, or a failure
in trying to read the stylesheetpublic String applyXSL(String groupName, String stylesheet, String styleBaseUri) throws IeServiceException
groupName
- the name of the group to which the stylesheet will
be applied. The group must exist within the
internal collection.stylesheet
- a String containing the XSL stylesheet to applystyleBaseUri
- a URI specifying where to find additional
stylesheets that might be referenced by the main
stylesheet specified by the stylesheet parameter
IeServiceException
- if the XSL stylesheet was not applied
successfully, possible due to a syntax
error in the stylesheet, or a failure
in trying to read the stylesheetpublic String applyXSL(String stylesheet, String styleBaseUri) throws IeServiceException
stylesheet
- a String containing the XSL stylesheet to applystyleBaseUri
- a URI specifying where to find additional
stylesheets that might be referenced by the main
stylesheet specified by the stylesheet parameter
IeServiceException
- if the XSL stylesheet was not applied
successfully, possible due to a syntax
error in the stylesheet, or a failure
in trying to read the stylesheetpublic int getElementCount()
public Vector getColumn(String attrName)
attrName
- The name of the attribute.
public Vector getRow(int index)
index
- The index of the element.
public int getStatus()
public String getMessage()
private void setAuthorization() throws javax.servlet.ServletException
javax.servlet.ServletException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |