|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.controller.State
com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd
com.jcorporate.expresso.services.controller.dbmaint.ViewBlob
This state allows for viewing of BLOB data types. It supports standard blob types by sending a mime type of application/x-unknown, and is supports MediaDbObjects be setting MIME type, file name, and size to that of the file that was originally uploaded to the database table.
| Field Summary |
| Fields inherited from class com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd |
countTotalRecords, masterObjKey, showNext, showPrev |
| Fields inherited from class com.jcorporate.expresso.core.controller.State |
NOTEMPTY_MASK, secure |
| Constructor Summary | |
ViewBlob()
Constructor that sets the necessary description and key name. |
|
| Method Summary | |
void |
run(ControllerRequest newRequest,
ControllerResponse newResponse)
Download the BLOB field. |
protected void |
sendBlobField(ControllerRequest newRequest,
ControllerResponse newResponse,
JDBCDataObject dbobj,
String fieldName)
Sends a BLOB field to the client browser. |
protected void |
sendMediaObjectField(ControllerRequest newRequest,
ControllerResponse newResponse,
MediaDBObject dbobj,
String fieldName)
Sends a Media DBObject's BLOB fields to the client. |
protected void |
sendStream(InputStream is,
ServletResponse response)
Sends the given stream to the client servlet output stream. |
| Methods inherited from class com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd |
addParams, decode, getControllerName, getCurrentDBObj, getDataObject, getFieldsParam, getFixedFields, getKeyParameter, getMyDataObject, getPageNumber, getSearchParam, initializeDBObj, isKeyField, retrieveMyDBObject, setFields, setFieldsParam, setMyDataObject, setSearchParam, showBlobViewLink, showEditLink, showEditLink, showOptions, showUserName |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ViewBlob()
| Method Detail |
public void run(ControllerRequest newRequest,
ControllerResponse newResponse)
throws NonHandleableException,
ControllerException
run in class DynamicCmdnewRequest - The ControllerRequest ObjectnewResponse - The ControllerREsponse OBject
NonHandleableException - upon fatal error
ControllerException
protected void sendBlobField(ControllerRequest newRequest,
ControllerResponse newResponse,
JDBCDataObject dbobj,
String fieldName)
throws ControllerException,
NonHandleableException
newRequest - The ControllerRequest objectnewResponse - The ControllerResponse objectdbobj - the DBObject to get the BLOB field from.fieldName - the name of the field in the DBObject to send
ControllerException - upon error
NonHandleableException - upon fatal error
protected void sendMediaObjectField(ControllerRequest newRequest,
ControllerResponse newResponse,
MediaDBObject dbobj,
String fieldName)
throws ControllerException,
NonHandleableException
newRequest - the controller request objectnewResponse - the controller response object (Must be in a Servlet
environment)dbobj - THe Media DBObject derived class to sendfieldName - the field name in the dbobject to send
ControllerException - upon error
NonHandleableException - upon fatal error
protected void sendStream(InputStream is,
ServletResponse response)
throws IOException
is - The InputStream to send to the client.response - The ServletResponse by which to get the OutputStream.
IOException - upon error getting the OutputStream to
the client.
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||