wt.content
Class ContentHttp

java.lang.Object
  extended bywt.content.ContentHttp
All Implemented Interfaces:
Externalizable, RemoteAccess, Serializable

public class ContentHttp
extends Object
implements Externalizable, RemoteAccess

This does handling of the HTTP streams and makes appropriate calls to do persisting and querying of the database. This should never need to be directly accessed.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static boolean ATTACHMENT_DOWNLOAD
           
private static String CLASSNAME
           
static String CONTENT_TYPE_HDR
           
private static boolean DEBUG
           
private static String DOWNLOAD_CONTENT_TYPE
           
static long EXTERNALIZATION_VERSION_UID
           
static String FILENAME_HDR
           
private static Vector formatNames
           
private static InputStream is
           
static String NAME_HDR
           
protected static long OLD_FORMAT_VERSION_UID
           
private static HTTPRequest request
           
private static String RESOURCE
           
private static HTTPResponse response
           
(package private) static long serialVersionUID
           
private static boolean SUN_ONE
           
private static String versionID
           
private static String VIEW_CONTENT_TYPE
           
 
Constructor Summary
ContentHttp()
           
 
Method Summary
private static void addCacheStatement(HTTPRequest request, HTTPResponse response)
           
private static void cancelUpload(HttpContentOperation operation, ContentHolder holder)
           
static void downloadContent(HTTPRequest request, HTTPResponse response)
          Deprecated.  
static void downloadContent(HTTPRequest request, HTTPResponse response, String fileName)
          Deprecated.  
static void generateUploadHtml(HTTPRequest request, HTTPResponse response)
          Deprecated.  
private static ApplicationData parseAndSaveInfo(ContentHolder holder, MPInputStream mis, HttpOperationItem opItem)
           
private static ApplicationData parseAndSaveInfo(ContentHolder holder, MPInputStream mis, HttpOperationItem opItem, boolean mustCreateNewFile)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(ContentHttp thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static void saveContent(HTTPRequest request, HTTPResponse response)
          This is the return method of the method that saves content of a ContentHolder posted up in the specified format via HTTP.
static void saveContent(HTTPRequest request, HTTPResponse response, InputStream is)
          This saves the content of a ContentHolder posted up in the specified format via HTTP.
private static void saveContent(String qStr, MPInputStreamIfc mis)
           
static void saveContent(String qStr, Vector postEntryV)
           
static void uploadContent(HTTPRequest request, HTTPResponse response)
          Deprecated.  
static void uploadContent(HTTPRequest request, HTTPResponse response, InputStream is)
          Deprecated.  
static void uploadContent(HTTPRequest request, HTTPResponse response, InputStream is, boolean mustCreateNewFile)
           
static void viewContent(HTTPRequest request, HTTPResponse response)
          this method is for a simple download.
static void viewContent(HTTPRequest request, HTTPResponse response, String fileName)
          this method is for a simple download.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

versionID

private static final String versionID
See Also:
Constant Field Values

CONTENT_TYPE_HDR

public static final String CONTENT_TYPE_HDR
See Also:
Constant Field Values

FILENAME_HDR

public static final String FILENAME_HDR
See Also:
Constant Field Values

NAME_HDR

public static final String NAME_HDR
See Also:
Constant Field Values

request

private static HTTPRequest request

response

private static HTTPResponse response

is

private static InputStream is

DEBUG

private static boolean DEBUG

ATTACHMENT_DOWNLOAD

private static boolean ATTACHMENT_DOWNLOAD

formatNames

private static Vector formatNames

DOWNLOAD_CONTENT_TYPE

private static final String DOWNLOAD_CONTENT_TYPE

VIEW_CONTENT_TYPE

private static final String VIEW_CONTENT_TYPE

SUN_ONE

private static final boolean SUN_ONE
Constructor Detail

ContentHttp

public ContentHttp()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ContentHttp thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Supported API: false

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

uploadContent

public static void uploadContent(HTTPRequest request,
                                 HTTPResponse response,
                                 InputStream is)
                          throws WTException,
                                 PropertyVetoException,
                                 IOException
Deprecated.  



Supported API: false

Parameters:
request -
response -
is -
Throws:
WTException
PropertyVetoException
IOException

uploadContent

public static void uploadContent(HTTPRequest request,
                                 HTTPResponse response)
                          throws WTException,
                                 PropertyVetoException,
                                 IOException,
                                 InvocationTargetException,
                                 IllegalAccessException
Deprecated.  



Supported API: false

Parameters:
request -
response -
Throws:
WTException
PropertyVetoException
IOException
InvocationTargetException
IllegalAccessException

downloadContent

public static void downloadContent(HTTPRequest request,
                                   HTTPResponse response)
                            throws WTException,
                                   IOException,
                                   PropertyVetoException
Deprecated.  



Supported API: false

Parameters:
request -
response -
Throws:
WTException
IOException
PropertyVetoException

viewContent

public static void viewContent(HTTPRequest request,
                               HTTPResponse response)
                        throws WTException,
                               IOException,
                               PropertyVetoException
this method is for a simple download.

Supported API: false

Parameters:
request -
response -
Throws:
WTException
IOException
PropertyVetoException

generateUploadHtml

public static void generateUploadHtml(HTTPRequest request,
                                      HTTPResponse response)
                               throws WTException,
                                      PropertyVetoException,
                                      IOException,
                                      InvocationTargetException,
                                      IllegalAccessException
Deprecated.  



Supported API: false

Parameters:
request -
response -
Throws:
WTException
PropertyVetoException
IOException
InvocationTargetException
IllegalAccessException

saveContent

public static void saveContent(HTTPRequest request,
                               HTTPResponse response,
                               InputStream is)
                        throws WTException,
                               PropertyVetoException,
                               IOException
This saves the content of a ContentHolder posted up in the specified format via HTTP.

Supported API: false

Parameters:
request -
response -
is -
Throws:
WTException
PropertyVetoException
IOException

saveContent

public static void saveContent(String qStr,
                               Vector postEntryV)
                        throws Exception
Throws:
Exception

saveContent

public static void saveContent(HTTPRequest request,
                               HTTPResponse response)
                        throws WTException,
                               PropertyVetoException,
                               IOException,
                               InvocationTargetException,
                               IllegalAccessException
This is the return method of the method that saves content of a ContentHolder posted up in the specified format via HTTP.

Supported API: false

Parameters:
request -
response -
Throws:
WTException
PropertyVetoException
IOException
InvocationTargetException
IllegalAccessException

cancelUpload

private static void cancelUpload(HttpContentOperation operation,
                                 ContentHolder holder)
                          throws WTException,
                                 PropertyVetoException
Throws:
WTException
PropertyVetoException

parseAndSaveInfo

private static ApplicationData parseAndSaveInfo(ContentHolder holder,
                                                MPInputStream mis,
                                                HttpOperationItem opItem)
                                         throws WTException,
                                                PropertyVetoException,
                                                IOException
Throws:
WTException
PropertyVetoException
IOException

parseAndSaveInfo

private static ApplicationData parseAndSaveInfo(ContentHolder holder,
                                                MPInputStream mis,
                                                HttpOperationItem opItem,
                                                boolean mustCreateNewFile)
                                         throws WTException,
                                                PropertyVetoException,
                                                IOException
Throws:
WTException
PropertyVetoException
IOException

saveContent

private static void saveContent(String qStr,
                                MPInputStreamIfc mis)
                         throws Exception
Throws:
Exception

addCacheStatement

private static void addCacheStatement(HTTPRequest request,
                                      HTTPResponse response)

uploadContent

public static void uploadContent(HTTPRequest request,
                                 HTTPResponse response,
                                 InputStream is,
                                 boolean mustCreateNewFile)
                          throws WTException,
                                 PropertyVetoException,
                                 IOException
Throws:
WTException
PropertyVetoException
IOException

viewContent

public static void viewContent(HTTPRequest request,
                               HTTPResponse response,
                               String fileName)
                        throws WTException,
                               IOException,
                               PropertyVetoException
this method is for a simple download.

Supported API: false

Parameters:
request -
response -
fileName -
Throws:
WTException
IOException
PropertyVetoException

downloadContent

public static void downloadContent(HTTPRequest request,
                                   HTTPResponse response,
                                   String fileName)
                            throws WTException,
                                   IOException,
                                   PropertyVetoException
Deprecated.  



Supported API: false

Parameters:
request -
response -
fileName -
Throws:
WTException
IOException
PropertyVetoException