wt.inf.template.upload
Class AbstractTemplateRequestFactory

java.lang.Object
  extended bywt.inf.template.upload.AbstractTemplateRequestFactory
All Implemented Interfaces:
Externalizable, Serializable, TemplateRequestFactory
Direct Known Subclasses:
DefaultTemplateRequestFactory

public abstract class AbstractTemplateRequestFactory
extends Object
implements TemplateRequestFactory, Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private static short FIRST_FLAG
           
private static short FOURTH_FLAG
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
private static short SECOND_FLAG
           
(package private) static long serialVersionUID
           
(package private)  GZIPInputStream stream
           
private static short THIRD_FLAG
           
 
Constructor Summary
AbstractTemplateRequestFactory()
           
 
Method Summary
private  String analyzeFileContents(File f)
           
private  boolean checkBytes(byte[] buff)
           
private  String getFileType(File f)
           
 ImportTemplateRequest getImportTemplateRequest(File f)
          

Supported API: false
 UploadTemplateRequest getUploadTemplateRequest(File f)
          

Supported API: false
 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(AbstractTemplateRequestFactory thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  void validateFile(File f)
           
 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

stream

GZIPInputStream stream

FOURTH_FLAG

private static final short FOURTH_FLAG
See Also:
Constant Field Values

THIRD_FLAG

private static final short THIRD_FLAG
See Also:
Constant Field Values

SECOND_FLAG

private static final short SECOND_FLAG
See Also:
Constant Field Values

FIRST_FLAG

private static final short FIRST_FLAG
See Also:
Constant Field Values
Constructor Detail

AbstractTemplateRequestFactory

public AbstractTemplateRequestFactory()
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(AbstractTemplateRequestFactory 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.

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

getUploadTemplateRequest

public UploadTemplateRequest getUploadTemplateRequest(File f)
                                               throws WTException


Supported API: false

Specified by:
getUploadTemplateRequest in interface TemplateRequestFactory
Parameters:
f -
Returns:
UploadTemplateRequest
Throws:
WTException

getImportTemplateRequest

public ImportTemplateRequest getImportTemplateRequest(File f)
                                               throws WTException


Supported API: false

Specified by:
getImportTemplateRequest in interface TemplateRequestFactory
Parameters:
f -
Returns:
ImportTemplateRequest
Throws:
WTException

getFileType

private String getFileType(File f)
                    throws WTException
Throws:
WTException

analyzeFileContents

private String analyzeFileContents(File f)
                            throws WTException
Throws:
WTException

checkBytes

private boolean checkBytes(byte[] buff)

validateFile

private void validateFile(File f)
                   throws WTException
Throws:
WTException