wt.doc
Class WTDocumentDelegate

java.lang.Object
  extended bywt.doc.WTDocumentDelegate
All Implemented Interfaces:
DocumentDelegate, Externalizable, Serializable

public class WTDocumentDelegate
extends Object
implements DocumentDelegate, Externalizable

Delegate for the UI to process specifically WTDocuments. Allows customers to substitute site specific processing.

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static String BOUNDARY_DELIM
           
private static String CLASSNAME
           
private static String DELIM
           
static String DEPENDENCYCOMMENT
           
static String DEPENDSON
           
private static String DOCRB_RESOURCE
           
static String DOCUMENTOID
           
static long EXTERNALIZATION_VERSION_UID
           
private static ResourceBundle messagesResource
           
protected static long OLD_FORMAT_VERSION_UID
           
static String PER_DEPENDENCYCOMMENT
           
static String PER_DEPENDSON
           
static String PER_REMOVECOMMENT
           
static String PER_REMOVEDEPENDENCY
           
static String REMOVECOMMENT
           
static String REMOVEDEPENDENCY
           
static String REMOVESTRUCTURE
           
private static String RESOURCE
           
private static ReferenceFactory RF
           
(package private) static long serialVersionUID
           
static String STRUCTURE
           
private static boolean VERBOSE
           
 
Constructor Summary
WTDocumentDelegate()
           
 
Method Summary
 FormatContentHolder checkinDocument(FormatContentHolder document, DocumentFormData form_data)
          Does the checkin of the document and allows for any post checkin processing.
 FormatContentHolder checkOutDocument(FormatContentHolder document, DocumentFormData form_data)
          Does the checkout of the document and allows for any post checkout processing.
protected  WTDocument createDependencyLinks(WTDocument document, DocumentFormData form_data)
           
 FormatContentHolder createDocument(DocumentFormData form_data)
          Create a document object and persist it.
protected  WTDocument createStructureLinks(WTDocument document, DocumentFormData form_data)
           
protected  void persistURLAttachment(FormatContentHolder document, String urlAttachment)
           
 FormatContentHolder postCreateDocument(FormatContentHolder document, DocumentFormData form_data)
          Allow for extra post processing of the document after it has been persisted.
 FormatContentHolder postUpdateDocument(FormatContentHolder document, DocumentFormData form_data)
          Allow for extra post processing of the document after it has been persisted.
protected  DocumentFormData processURLAttachments(FormatContentHolder document, DocumentFormData form_data)
           
 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(WTDocumentDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected  void removeDependencyLinks(DocumentFormData form_data)
           
protected  void removeStructureLinks(WTDocument document, DocumentFormData form_data)
           
protected  Vector stringToVector(String s, Vector v, String delimiter)
           
protected  Vector stringToVector(String s, Vector v, String delimiter, String default_string)
           
 String stripBoundaryDelim(String s, String delim)
           
protected  void updateDependencyLinks(WTDocument document, DocumentFormData form_data)
           
 FormatContentHolder updateDocument(FormatContentHolder document, DocumentFormData form_data)
          Update a document object and persist it.
 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

messagesResource

private static ResourceBundle messagesResource

DOCRB_RESOURCE

private static final String DOCRB_RESOURCE
See Also:
Constant Field Values

DEPENDSON

public static final String DEPENDSON
See Also:
Constant Field Values

DEPENDENCYCOMMENT

public static final String DEPENDENCYCOMMENT
See Also:
Constant Field Values

REMOVEDEPENDENCY

public static final String REMOVEDEPENDENCY
See Also:
Constant Field Values

REMOVECOMMENT

public static final String REMOVECOMMENT
See Also:
Constant Field Values

PER_DEPENDSON

public static final String PER_DEPENDSON
See Also:
Constant Field Values

PER_DEPENDENCYCOMMENT

public static final String PER_DEPENDENCYCOMMENT
See Also:
Constant Field Values

PER_REMOVEDEPENDENCY

public static final String PER_REMOVEDEPENDENCY
See Also:
Constant Field Values

PER_REMOVECOMMENT

public static final String PER_REMOVECOMMENT
See Also:
Constant Field Values

STRUCTURE

public static final String STRUCTURE
See Also:
Constant Field Values

REMOVESTRUCTURE

public static final String REMOVESTRUCTURE
See Also:
Constant Field Values

DOCUMENTOID

public static final String DOCUMENTOID
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

DELIM

private static String DELIM

BOUNDARY_DELIM

private static String BOUNDARY_DELIM

RF

private static final ReferenceFactory RF
Constructor Detail

WTDocumentDelegate

public WTDocumentDelegate()
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(WTDocumentDelegate 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

createDocument

public FormatContentHolder createDocument(DocumentFormData form_data)
                                   throws WTException
Create a document object and persist it.

Supported API: true

Specified by:
createDocument in interface DocumentDelegate
Parameters:
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

postCreateDocument

public FormatContentHolder postCreateDocument(FormatContentHolder document,
                                              DocumentFormData form_data)
                                       throws WTException
Allow for extra post processing of the document after it has been persisted. For example this will handle the creation and persistance of relationships.

Supported API: true

Specified by:
postCreateDocument in interface DocumentDelegate
Parameters:
document - The document that will be processed.
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

updateDocument

public FormatContentHolder updateDocument(FormatContentHolder document,
                                          DocumentFormData form_data)
                                   throws WTException
Update a document object and persist it.

Supported API: true

Specified by:
updateDocument in interface DocumentDelegate
Parameters:
document - The document that will be processed.
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

postUpdateDocument

public FormatContentHolder postUpdateDocument(FormatContentHolder document,
                                              DocumentFormData form_data)
                                       throws WTException
Allow for extra post processing of the document after it has been persisted. For example this will handle the creation and persistance of relationships or the removal of relationships.

Supported API: true

Specified by:
postUpdateDocument in interface DocumentDelegate
Parameters:
document - The document that will be processed.
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

checkinDocument

public FormatContentHolder checkinDocument(FormatContentHolder document,
                                           DocumentFormData form_data)
                                    throws WTException
Does the checkin of the document and allows for any post checkin processing.

Supported API: true

Specified by:
checkinDocument in interface DocumentDelegate
Parameters:
document - The document that will be processed.
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

checkOutDocument

public FormatContentHolder checkOutDocument(FormatContentHolder document,
                                            DocumentFormData form_data)
                                     throws WTException
Does the checkout of the document and allows for any post checkout processing.

Supported API: true

Specified by:
checkOutDocument in interface DocumentDelegate
Parameters:
document - The document that will be processed.
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

createDependencyLinks

protected WTDocument createDependencyLinks(WTDocument document,
                                           DocumentFormData form_data)
                                    throws WTException
Throws:
WTException

updateDependencyLinks

protected void updateDependencyLinks(WTDocument document,
                                     DocumentFormData form_data)
                              throws WTException
Throws:
WTException

removeDependencyLinks

protected void removeDependencyLinks(DocumentFormData form_data)
                              throws WTException
Throws:
WTException

stripBoundaryDelim

public String stripBoundaryDelim(String s,
                                 String delim)

createStructureLinks

protected WTDocument createStructureLinks(WTDocument document,
                                          DocumentFormData form_data)
                                   throws WTException
Throws:
WTException

removeStructureLinks

protected void removeStructureLinks(WTDocument document,
                                    DocumentFormData form_data)
                             throws WTException
Throws:
WTException

stringToVector

protected Vector stringToVector(String s,
                                Vector v,
                                String delimiter)

stringToVector

protected Vector stringToVector(String s,
                                Vector v,
                                String delimiter,
                                String default_string)

processURLAttachments

protected DocumentFormData processURLAttachments(FormatContentHolder document,
                                                 DocumentFormData form_data)

persistURLAttachment

protected void persistURLAttachment(FormatContentHolder document,
                                    String urlAttachment)
                             throws WTException,
                                    WTPropertyVetoException,
                                    PropertyVetoException
Throws:
WTException
WTPropertyVetoException
PropertyVetoException