|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.object.factory.Webject
com.infoengine.SAK.Webject
This class provides methods to construct and execute webjects of any type in applications and JSP pages. This is the base class for other classes that are used to construct specific types of webjects.
Nested Class Summary | |
private class |
Webject.WebjectRunner
|
Field Summary | |
protected IeMultipartInputStream |
inputStream
|
protected OutputStream |
outputStream
|
private static String |
RESOURCE
|
protected IeService |
service
|
protected Task |
task
|
private static Map |
webjectClassCache
|
protected WebjectProcessor |
webjectProcessor
|
Fields inherited from class com.infoengine.object.factory.Webject |
CLASS, DISPLAY, EXTERNAL, GROUP, GROUP_IN, GROUP_OUT, MESSAGE, OBJECT, OUTPUT, TASK, text, TYPE, UNKNOWN |
Constructor Summary | |
Webject()
Constructs a webject with no name or type. |
|
Webject(String name)
Constructs a webject with a specific name but no type. |
|
Webject(String name,
String type)
Constructs a webject with a specific name and type. |
|
Webject(String name,
String type,
IeService service)
Constructs a webject with a specific name, type, and server context. |
Method Summary | |
void |
addParam(String name,
String value)
Adds a parameter with a specific name and value to the webject. |
protected void |
copyOutputGroups(Task sourceTask)
Copies the groups from a specified task to the service associated with this webject. |
IeMultipartInputStream |
getInputStream()
Returns the input stream currently associated with the webject. |
OutputStream |
getOutputStream()
Returns the output stream currently associated with this webject. |
static Webject |
getProcessor(String type)
Create a webject processor instance of a specified webject type. |
static String |
getProcessorClassName(String type)
Determines the name of the subclass that processes webjects of a specified type. |
IeService |
getService()
Returns the server context currently associated with this webject. |
protected Webject |
getWebjectImpl()
Returns an instance of the class that implements the operation identified by this webject. |
protected void |
initialize(Task task)
Prepares the webject for execution. |
void |
invoke()
Invokes the webject in the server context. |
void |
invoke(Task task)
Invokes the webject in the server context using a specified task object. |
protected void |
logWebject()
Logs the webject name, type, and parameters. |
static void |
run(Vector webjects)
Runs a set of webjects, each in its own thread, and waits for all of them to complete. |
void |
setInputStream(IeMultipartInputStream is)
Sets the input stream from which the webject can read BLOB data. |
void |
setInputStream(InputStream is,
String contentType,
String name,
String filename)
Sets the input stream from which the webject can read BLOB data. |
void |
setInputStream(javax.servlet.ServletRequest request)
Sets the input stream from which the webject can read BLOB data. |
void |
setOutputStream(OutputStream os)
Sets the output stream associated with this webject. |
void |
setOutputStream(Writer writer)
Sets the output stream associated with this webject. |
void |
setParam(String name,
String value)
Sets a new value for a specific parameter of the webject. |
void |
setService(IeService service)
Sets the server context associated with this webject. |
Methods inherited from class com.infoengine.object.factory.Webject |
addKey, addMessage, addMeta, addMetaValue, addOutput, addParam, addUniqueKey, addUniqueValue, addValue, addValue, addWebject, clearParams, clone, deepClone, getClassName, getGroupInName, getGroupInNames, getGroupOutName, getGroupOutNames, getKey, getKeys, getMessages, getMetaValue, getName, getNode, getOutput, getParam, getParam, getParamNames, getParams, getParams, getPassword, getType, getUserName, getValue, getValues, getWebjects, newStructure, paramValue, paramValue, paramValues, printTree, removeAllWebjects, removeParam, removeParams, removeWebject, setClassName, setName, setNode, setParam, setPassword, setType, setUserName, setValue, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static Map webjectClassCache
protected IeMultipartInputStream inputStream
protected OutputStream outputStream
protected IeService service
protected Task task
protected WebjectProcessor webjectProcessor
Constructor Detail |
public Webject()
public Webject(String name)
name
- The name to be assigned to the webject.public Webject(String name, String type)
name
- The name to be assigned to the webject.type
- The type to be assigned to the webject.public Webject(String name, String type, IeService service)
name
- The name to be assigned to the webject.type
- The type to be assigned to the webject.service
- The server context to be assigned to the webject.Method Detail |
public void setService(IeService service)
service
- The new server context.public IeService getService()
public void setInputStream(InputStream is, String contentType, String name, String filename) throws IOException
is
- The input stream.contentType
- The MIME content type associated with the stream.name
- The form variable name, if any, associated with the stream.filename
- The file name, if any, associated with the stream.
IOException
- if the input stream can not be set.public void setInputStream(javax.servlet.ServletRequest request) throws IOException
request
- The servlet request object from which the input
stream will be obtained.
IOException
- if the input stream can not be set.public void setInputStream(IeMultipartInputStream is)
is
- The Info*Engine multipart input stream from which the webject
can read BLOB data.public IeMultipartInputStream getInputStream()
public void setOutputStream(OutputStream os)
os
- The new output stream.public void setOutputStream(Writer writer)
writer
- The writer to be wrapped in an output stream.public OutputStream getOutputStream()
public void addParam(String name, String value)
name
- The name of the parameter.value
- The value of the parameter.public void setParam(String name, String value)
name
- The name of the parameter.value
- The new value of the parameter.protected void initialize(Task task) throws IEException, IOException
task
- The task associated with the webject.
IEException
- if the webject is not initialized successfully
IOException
protected Webject getWebjectImpl() throws IEException
IEException
protected void copyOutputGroups(Task sourceTask) throws IEException
sourceTask
- The task from which to get the groups
IEException
protected void logWebject()
public void invoke() throws IEException, IOException
IEException
- if the webject is not executed successfully.
IOException
public void invoke(Task task) throws IEException, IOException
task
- The task associated with the webject.
IEException
- if the webject is not executed successfully.
IOException
public static String getProcessorClassName(String type)
type
- The webject type
public static Webject getProcessor(String type) throws ClassNotFoundException, InstantiationException, IllegalAccessException
type
- The webject type
ClassNotFoundException
InstantiationException
IllegalAccessException
public static void run(Vector webjects) throws IEException
webjects
- The set of webjects to be run.
IEException
- if the webject is not executed successfully.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |