wt.doc
Class WTDocumentServiceFwd

java.lang.Object
  extended bywt.doc.WTDocumentServiceFwd
All Implemented Interfaces:
RemoteAccess, Serializable, WTDocumentService

public class WTDocumentServiceFwd
extends Object
implements RemoteAccess, WTDocumentService, Serializable

Service for WTDocumentMaster and WTDocument objects and their associations.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
WTDocumentServiceFwd()
           
 
Method Summary
 WTDocumentMaster changeWTDocumentMasterIdentity(WTDocumentMaster document_master, String name, String number, WTOrganization org)
          Change the identity of WTDocumentMaster with new name, number and organization.
 FormatContentHolder checkinDocument(FormatContentHolder document, DocumentFormData form_data)
          Uses the DocumentFactory to get the delegate to do the checkin of the document and allows for any post checkin processing.
 FormatContentHolder checkOutDocument(FormatContentHolder document, DocumentFormData form_data)
          Uses the DocumentFactory to get the delegate to do the checkout of the document and allows for any post checkout processing.
 Vector createDependencyLink(WTDocument doc, Vector referenced_docs, Vector comment)
          Convenience method for creating a dependency link between multiple documents.
 WTDocument createDependencyLink(WTDocument doc, Vector referenced_docs, Vector comment, String checkOutNote, String checkInNote)
          Convenience method for creating a dependency link between multiple documents.
 WTDocumentDependencyLink createDependencyLink(WTDocument doc, WTDocument referenced_doc, String comment)
          Convenience method for creating a dependency link between two documents.
 FormatContentHolder createDocument(String doc_type, DocumentFormData form_data)
          Uses the DocumentFactory to get the delegate to create a document object and persist it.
 WTDocument createOrderedUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote)
          Convenience method for creating a usage link between multiple documents.
 Vector createUsageLink(WTDocument parent, Vector child)
          Convenience method for creating a usage link between multiple documents.
 WTDocument createUsageLink(WTDocument parent, Vector child, String checkOutNote, String checkInNote)
          Convenience method for creating a usage link between multiple documents.
 WTDocumentUsageLink createUsageLink(WTDocument parent, WTDocument child)
          Convenience method for creating a usage link between two documents.
 WTDocumentConfigSpec findWTDocumentConfigSpec()
          Returns the WTDocumentConfigSpec for the current principal.
 QueryResult getDependsOnWTDocuments(WTDocument document)
          Return a QueryResult of WTDocuments that the given WTDocument is dependent on.
 QueryResult getDependsOnWTDocuments(WTDocument document, boolean onlyOtherSides)
          Return a QueryResult of WTDocuments that the given WTDocument is dependent on.
 QueryResult getHasDependentWTDocuments(WTDocument document)
          Return a QueryResult of WTDocuments that are dependent on the given WTDocument.
 QueryResult getHasDependentWTDocuments(WTDocument document, boolean onlyOtherSides)
          Return a QueryResult of WTDocuments that are dependent on the given WTDocument.
private static Manager getManager()
           
 Enumeration getOrderedUsesWTDocumentMasters(WTDocument document)
          Navigates the WTDocumentUsageLink along the uses role, returning a Enumeration of WTDocumentMaster.
 Enumeration getOrderedUsesWTDocuments(WTDocument document, WTDocumentConfigSpec configSpec)
          Applies the configSpec to the result of navigating the WTDocumentUsageLink along the uses role; returns a Enumeration of Persistable[], in which the WTDocumentUsageLinks are at the 0th position and the corresponding iterations (or master if there is no corresponding iteration) in the 1th position.
 Vector getStructurePrimaryContent(WTDocument document, WTDocumentConfigSpec configSpec, int traversal)
          Recursively walk the structure of the document getting the ApplicationData of the primary content of each document in the node.
 QueryResult getUsedByWTDocuments(WTDocumentMaster documentMaster)
          Navigates the WTDocumentUsageLink along the usedBy role, returning a QueryResult of WTDocuments.
 QueryResult getUsesWTDocumentMasters(WTDocument document)
          Navigates the WTDocumentUsageLink along the uses role, returning a QueryResult of WTDocumentMaster.
 QueryResult getUsesWTDocuments(WTDocument document, WTDocumentConfigSpec configSpec)
          Applies the configSpec to the result of navigating the WTDocumentUsageLink along the uses role; returns a QueryResult of Persistable[], in which the WTDocumentUsageLinks are at the 0th position and the corresponding iterations (or master if there is no corresponding iteration) in the 1th position.
 QueryResult getUsesWTDocumentUsageLinks(WTDocument document)
          Returns the WTDocumentUsageLinks resulting from navigating the WTDocumentUsageLink along the uses role.
 Vector getWTDocumentStructure(WTDocument document, WTDocumentConfigSpec configSpec, int traversal)
          Recursively walk a document structure returning the documents down the structure.
 boolean hasUses(WTDocument document)
          Returns true if the documents has uses relationships to other documents.
 WTDocument orderUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote)
          Order usage links between the parent document and it's children documents.
 FormatContentHolder postCreateDocument(FormatContentHolder document, DocumentFormData form_data)
          Uses the DocumentFactory to get the delegate to allow for extra post processing of the document after it has been persisted.
 FormatContentHolder postUpdateDocument(FormatContentHolder document, DocumentFormData form_data)
          Uses the DocumentFactory to get the delegate to allow for extra post processing of the document after it has been persisted.
 void removeDependencyLink(Vector links)
          Convenience method for removing multiple dependency links.
 void removeDependencyLink(WTDocumentDependencyLink link)
          Convenience method for removing a dependency link between two documents.
 WTDocument removeDependencyLink(WTDocument document, Vector links, String checkOutNote, String checkInNote)
          Convenience method for removing multiple dependency links.
 WTDocument removeOrderedUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote)
          Remove usage links from a parent document.
 void removeUsageLink(WTDocument parent, Vector child)
          Convenience method for removing a usage link between multiple documents.
 void removeUsageLink(WTDocument parent, WTDocumentMaster child)
          Convenience method for removing a usage link between two documents.
 WTDocumentConfigSpec saveWTDocumentConfigSpec(WTDocumentConfigSpec a_WTDocumentConfigSpec)
          Saves the WTDocumentConfigSpec for the current principal.
 Vector updateDependencyLink(Vector links, Vector comments)
          Convenience method for updating a multiple dependency links.
 WTDocument updateDependencyLink(WTDocument document, Vector links, Vector comments, String checkOutNote, String checkInNote)
          Convenience method for updating multiple dependency links.
 FormatContentHolder updateDocument(FormatContentHolder document, DocumentFormData form_data)
          Uses the DocumentFactory to get the delegate to update a document object and persist it.
 boolean validDocTemplateIdentity(String new_name, String new_number, String containerName)
          Checks if there is already an existing Document Template with the same name and number in the same context as the proposed name and number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

WTDocumentServiceFwd

public WTDocumentServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

getUsesWTDocuments

public QueryResult getUsesWTDocuments(WTDocument document,
                                      WTDocumentConfigSpec configSpec)
                               throws WTException
Applies the configSpec to the result of navigating the WTDocumentUsageLink along the uses role; returns a QueryResult of Persistable[], in which the WTDocumentUsageLinks are at the 0th position and the corresponding iterations (or master if there is no corresponding iteration) in the 1th position.

Supported API: false

Specified by:
getUsesWTDocuments in interface WTDocumentService
Parameters:
document - The WTDocument to navigate.
configSpec - The ConfigSpec to use to filter the iterations for the masters used.
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentUsageLink, WTDocument, WTDocumentMaster, Persistable

getUsesWTDocumentUsageLinks

public QueryResult getUsesWTDocumentUsageLinks(WTDocument document)
                                        throws WTException
Returns the WTDocumentUsageLinks resulting from navigating the WTDocumentUsageLink along the uses role.

Supported API: false

Specified by:
getUsesWTDocumentUsageLinks in interface WTDocumentService
Parameters:
document - The WTDocument to navigate.
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentUsageLink, WTDocument, WTDocumentMaster

getUsesWTDocumentMasters

public QueryResult getUsesWTDocumentMasters(WTDocument document)
                                     throws WTException
Navigates the WTDocumentUsageLink along the uses role, returning a QueryResult of WTDocumentMaster.

Supported API: false

Specified by:
getUsesWTDocumentMasters in interface WTDocumentService
Parameters:
document - The document to navigate.
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentUsageLink, WTDocumentMaster

getUsedByWTDocuments

public QueryResult getUsedByWTDocuments(WTDocumentMaster documentMaster)
                                 throws WTException
Navigates the WTDocumentUsageLink along the usedBy role, returning a QueryResult of WTDocuments. Note that only the latest iteration for any of the document versions is returned.

Supported API: false

Specified by:
getUsedByWTDocuments in interface WTDocumentService
Parameters:
documentMaster - The document master to navigate to find those documents that use it.
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentUsageLink, WTDocument

createOrderedUsageLinks

public WTDocument createOrderedUsageLinks(WTDocument parent,
                                          Vector child,
                                          String checkOutNote,
                                          String checkInNote)
                                   throws WTException
Convenience method for creating a usage link between multiple documents. This method executes the work within a transaction so if one change fails all will be rolled back. Returns the parent document. It is very important that all of the children documents of this document should be passed into this method both ones with persisted usage links to the parent and ones without persisted links to the parent. This will allow the ordering of all of the children after the new usage links are created. The user must have sufficient access to parent document to allow a checkout of the document. If the parent document is not checked out this method will checkout the document and then on completion of the creating and ordering of links the parent is checked back in. If the document is already checked out to the user then this method will do the creating and reordering and return the parent document still checked out. This method does not honor administrative rights to modify a document that another user has checked out. If the administrator wants to modify the document structure then they should check the document in for the user and then modify the structure.

Supported API: false

Specified by:
createOrderedUsageLinks in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink.. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

orderUsageLinks

public WTDocument orderUsageLinks(WTDocument parent,
                                  Vector child,
                                  String checkOutNote,
                                  String checkInNote)
                           throws WTException
Order usage links between the parent document and it's children documents. The usage links are already created. This method executes the work within a transaction so if one change fails all will be rolled back. Returns the parent document. It is very important that all of the children documents of this document should be passed into this method so that the order on all of the children can be set correctly. The user must have sufficient access to parent document to allow a checkout of the document. If the parent document is not checked out this method will checkout the document and then on completion of the ordering the parent is checked back in. If the document is already checked out to the user then this method will do the reordering and return the parent document still checked out. This method does not honor administrative rights to modify a document that another user has checked out. If the administrator wants to modify the document structure then they should check the document in for the user and then modify the structure.

Supported API: false

Specified by:
orderUsageLinks in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink.. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

removeOrderedUsageLinks

public WTDocument removeOrderedUsageLinks(WTDocument parent,
                                          Vector child,
                                          String checkOutNote,
                                          String checkInNote)
                                   throws WTException
Remove usage links from a parent document. This method executes the work within a transaction so if one change fails all will be rolled back. Returns the parent document. The user must have sufficient access to parent document to allow a checkout of the document. If the parent document is not checked out this method will checkout the document and then on completion of the removals the parent is checked back in. If the document is already checked out to the user then this method will do the removals and return the parent document still checked out. This method does not honor administrative rights to modify a document that another user has checked out. If the administrator wants to modify the document structure then they should check the document in for the user and then modify the structure.

Supported API: false

Specified by:
removeOrderedUsageLinks in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink.. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

getOrderedUsesWTDocuments

public Enumeration getOrderedUsesWTDocuments(WTDocument document,
                                             WTDocumentConfigSpec configSpec)
                                      throws WTException
Applies the configSpec to the result of navigating the WTDocumentUsageLink along the uses role; returns a Enumeration of Persistable[], in which the WTDocumentUsageLinks are at the 0th position and the corresponding iterations (or master if there is no corresponding iteration) in the 1th position. The items returned are ordered by the order attribute on the WTDocumentUsageLink.

Supported API: false

Specified by:
getOrderedUsesWTDocuments in interface WTDocumentService
Parameters:
document - The WTDocument to navigate.
configSpec - The ConfigSpec to use to filter the iterations for the masters used.
Returns:
Enumeration
Throws:
WTException
See Also:
WTDocumentUsageLink, WTDocument, WTDocumentMaster, Persistable

getOrderedUsesWTDocumentMasters

public Enumeration getOrderedUsesWTDocumentMasters(WTDocument document)
                                            throws WTException
Navigates the WTDocumentUsageLink along the uses role, returning a Enumeration of WTDocumentMaster. The items returned are ordered by the order attribute on the WTDocumentUsageLink.

Supported API: false

Specified by:
getOrderedUsesWTDocumentMasters in interface WTDocumentService
Parameters:
document - The document to navigate.
Returns:
Enumeration
Throws:
WTException
See Also:
WTDocumentUsageLink, WTDocumentMaster

hasUses

public boolean hasUses(WTDocument document)
                throws WTException
Returns true if the documents has uses relationships to other documents. Used mainly to test whether certain structure document actions should be enabled for this document.

Supported API: false

Specified by:
hasUses in interface WTDocumentService
Parameters:
document - Document to test if it has any uses relationships to other documents.
Returns:
boolean
Throws:
WTException

getDependsOnWTDocuments

public QueryResult getDependsOnWTDocuments(WTDocument document)
                                    throws WTException
Return a QueryResult of WTDocuments that the given WTDocument is dependent on.

Supported API: false

Specified by:
getDependsOnWTDocuments in interface WTDocumentService
Parameters:
document -
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentDependencyLink, WTDocument

getDependsOnWTDocuments

public QueryResult getDependsOnWTDocuments(WTDocument document,
                                           boolean onlyOtherSides)
                                    throws WTException
Return a QueryResult of WTDocuments that the given WTDocument is dependent on. If the onlyOtherSides parameter is false, the QueryResult includes a set of WTDocumentDependencyLinks that have references to the WTDocuments.

Supported API: false

Specified by:
getDependsOnWTDocuments in interface WTDocumentService
Parameters:
document -
onlyOtherSides -
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentDependencyLink, WTDocument

getHasDependentWTDocuments

public QueryResult getHasDependentWTDocuments(WTDocument document)
                                       throws WTException
Return a QueryResult of WTDocuments that are dependent on the given WTDocument.

Supported API: false

Specified by:
getHasDependentWTDocuments in interface WTDocumentService
Parameters:
document -
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentDependencyLink, WTDocument

getHasDependentWTDocuments

public QueryResult getHasDependentWTDocuments(WTDocument document,
                                              boolean onlyOtherSides)
                                       throws WTException
Return a QueryResult of WTDocuments that are dependent on the given WTDocument. If the onlyOtherSides parameter is false, the QueryResult includes a set of WTDocumentDependencyLinks that have references to the WTDocuments.

Supported API: false

Specified by:
getHasDependentWTDocuments in interface WTDocumentService
Parameters:
document -
onlyOtherSides -
Returns:
QueryResult
Throws:
WTException
See Also:
WTDocumentDependencyLink, WTDocument

createDependencyLink

public WTDocumentDependencyLink createDependencyLink(WTDocument doc,
                                                     WTDocument referenced_doc,
                                                     String comment)
                                              throws WTException
Convenience method for creating a dependency link between two documents. Sets the comment field and persists the link.

Supported API: false

Specified by:
createDependencyLink in interface WTDocumentService
Parameters:
doc - The document that depends on the other document or the one that references other documents.
referenced_doc - The document that is referenced by the other document.
comment - Some explanation of why one document is dependent on the other document.
Returns:
WTDocumentDependencyLink
Throws:
WTException

createDependencyLink

public Vector createDependencyLink(WTDocument doc,
                                   Vector referenced_docs,
                                   Vector comment)
                            throws WTException
Convenience method for creating a dependency link between multiple documents. Sets the comment field and persists the link. Is executed inside of a transactions so if one fails all will be rolled back. Returns a vector of all of the dependency links that were created. The referenced_doc vector and the comments vector must be in the same order. This method depends on the document being in an updateable state, it does not check.

Supported API: false

Specified by:
createDependencyLink in interface WTDocumentService
Parameters:
doc - The document that depends on the other document or the one that references other documents.
referenced_docs - The documents that are referenced the other document. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
comment - Some explanation of why one document is dependent on the other document. In the same order as the child vector.
Returns:
Vector
Throws:
WTException

createDependencyLink

public WTDocument createDependencyLink(WTDocument doc,
                                       Vector referenced_docs,
                                       Vector comment,
                                       String checkOutNote,
                                       String checkInNote)
                                throws WTException
Convenience method for creating a dependency link between multiple documents. Sets the comment field and persists the link. Is executed inside of a transactions so if one fails all will be rolled back. The referenced_doc vector and the comments vector must be in the same order. Does a checkout of the document if required and will check it back in on completion, if this method checked it out. Returns the up to date iteration of the document that was passed in.

Supported API: false

Specified by:
createDependencyLink in interface WTDocumentService
Parameters:
doc - The document that depends on the other document or the one that references other documents.
referenced_docs - The documents that are referenced the other document. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
comment - Some explanation of why one document is dependent on the other document. In the same order as the child vector.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

updateDependencyLink

public Vector updateDependencyLink(Vector links,
                                   Vector comments)
                            throws WTException
Convenience method for updating a multiple dependency links. Sets the comment field and persists the link. Is executed inside of a transactions so if one fails all will be rolled back. Returns a vector of all of the dependency links that were updated. The child vector and the comments vector must be in the same order.

Supported API: false

Specified by:
updateDependencyLink in interface WTDocumentService
Parameters:
links - The dependency links that are to be updated.
comments - Some explanation of why one document is dependent on the other document. In the same order as the child vector.
Returns:
Vector
Throws:
WTException

updateDependencyLink

public WTDocument updateDependencyLink(WTDocument document,
                                       Vector links,
                                       Vector comments,
                                       String checkOutNote,
                                       String checkInNote)
                                throws WTException
Convenience method for updating multiple dependency links. Sets the comment field and persists the link. Is executed inside of a transactions so if one fails all will be rolled back. Does a checkout of the document if required and will check it back in on completion, if this method checked it out. Returns the up to date iteration of the document that was passed in. The links vector and the comments vector must be in the same order.

Supported API: false

Specified by:
updateDependencyLink in interface WTDocumentService
Parameters:
document - The document that depends on the other document or the one that references other documents.
links - The dependency links that are to be updated.
comments - Some explanation of why one document is dependent on the other document. In the same order as the child vector.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

createUsageLink

public WTDocumentUsageLink createUsageLink(WTDocument parent,
                                           WTDocument child)
                                    throws WTException
Convenience method for creating a usage link between two documents. This API will start to create a document structure. Persists the link. The logic that it uses is: If the document is persisted. If document is checked out to current user Get the correct copy of the document. Create and persist the link. Else if in current user's personal cabinet Create and persist the link. Else Throw WTException. Else document is not persisted. Persist the document and create and persist the link.

Supported API: false

Specified by:
createUsageLink in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink.
Returns:
WTDocumentUsageLink
Throws:
WTException

createUsageLink

public Vector createUsageLink(WTDocument parent,
                              Vector child)
                       throws WTException
Convenience method for creating a usage link between multiple documents. Creating the usage link depends on the parent document being in an updateable state, which is the document was just created during this user interaction, the document is in the personal cabinet or the checked out folder of the person who is creating the usage link. This method assumes that the document is in an updateable state, it does not check. This method should never be called if the document is not in an updateable state. Is executed inside of a transactions so if one fails all will be rolled back. Returns a vector of all of the usage links that were created.

Supported API: false

Specified by:
createUsageLink in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink.. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
Returns:
Vector
Throws:
WTException

createUsageLink

public WTDocument createUsageLink(WTDocument parent,
                                  Vector child,
                                  String checkOutNote,
                                  String checkInNote)
                           throws WTException
Convenience method for creating a usage link between multiple documents. This method executes the work within a transaction so if one change fails all will be rolled back. Returns the parent document. This method sets the order of the usage links to 0. The user must have sufficient access to parent document to allow a checkout of the document. If the parent document is not checked out this method will checkout the document and then on completion of the creating and ordering of links the parent is checked back in. If the document is already checked out to the user then this method will do the creating and reordering and return the parent document still checked out. This method does not honor administrative rights to modify a document that another user has checked out. If the administrator wants to modify the document structure then they should check the document in for the user and then modify the structure.

Supported API: false

Specified by:
createUsageLink in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink.. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

getWTDocumentStructure

public Vector getWTDocumentStructure(WTDocument document,
                                     WTDocumentConfigSpec configSpec,
                                     int traversal)
                              throws WTException
Recursively walk a document structure returning the documents down the structure. Use a configuration specification to walk the structure. The selected document to walk is included in the structure.

Supported API: false

Specified by:
getWTDocumentStructure in interface WTDocumentService
Parameters:
document - The WTDocument to navigate.
configSpec - The ConfigSpec to use to filter the iterations for the masters used.
traversal - DocumentStructureNavigatorFactory.DEPTH_FIRST_NAVIGATOR or DocumentStructureNavigatorFactory.BREADTH_FIRST_NAVIGATOR.
Returns:
Vector
Throws:
WTException

getStructurePrimaryContent

public Vector getStructurePrimaryContent(WTDocument document,
                                         WTDocumentConfigSpec configSpec,
                                         int traversal)
                                  throws WTException
Recursively walk the structure of the document getting the ApplicationData of the primary content of each document in the node. If there is no primary content that node is skipped for the content but still expanded. Use a configuration specification to retrieve the documents. The document passed in is included in the return Vector.

Supported API: false

Specified by:
getStructurePrimaryContent in interface WTDocumentService
Parameters:
document - The WTDocument to navigate.
configSpec - The ConfigSpec to use to filter the iterations for the masters used.
traversal -
Returns:
Vector
Throws:
WTException
See Also:
ApplicationData

removeDependencyLink

public void removeDependencyLink(Vector links)
                          throws WTException
Convenience method for removing multiple dependency links. Is executed inside of a transactions so if one fails all will be rolled back.

Supported API: false

Specified by:
removeDependencyLink in interface WTDocumentService
Parameters:
links - Remove all of the dependency links in the vector.
Throws:
WTException

removeDependencyLink

public void removeDependencyLink(WTDocumentDependencyLink link)
                          throws WTException
Convenience method for removing a dependency link between two documents.

Supported API: false

Specified by:
removeDependencyLink in interface WTDocumentService
Parameters:
link - The dependency link to be removed.
Throws:
WTException

removeDependencyLink

public WTDocument removeDependencyLink(WTDocument document,
                                       Vector links,
                                       String checkOutNote,
                                       String checkInNote)
                                throws WTException
Convenience method for removing multiple dependency links. Is executed inside of a transactions so if one fails all will be rolled back. Does a checkout of the document if required and will check it back in on completion, if this method checked it out. Returns the up to date iteration of the document that was passed in.

Supported API: false

Specified by:
removeDependencyLink in interface WTDocumentService
Parameters:
document - The document that depends on the other document or the one that references other documents.
links - The link oids for the dependency links.
checkOutNote - Used if the parent document is checked out. If null is passed in the note is set to empty string.
checkInNote - Used if the parent document is checked in. If null is passed in the note is set to empty string.
Returns:
WTDocument
Throws:
WTException

removeUsageLink

public void removeUsageLink(WTDocument parent,
                            Vector child)
                     throws WTException
Convenience method for removing a usage link between multiple documents. Removing the usage link depends on the parent document being in an updateable state, which is the document is in the personal cabinet or the checked out folder of the person who is removing the usage link. This method assumes that the document is in an updateable state, it does not check. This method should never be called if the document is not in an updateable state. Is executed inside of a transactions so if one fails all will be rolled back.

Supported API: false

Specified by:
removeUsageLink in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument or WTDocumentMaster that is usedBy the other side of the WTDocumentUsageLink. Should not be the actual document but the reference string used in the client like VR:wt.doc.WTDocumet:oid.
Throws:
WTException

removeUsageLink

public void removeUsageLink(WTDocument parent,
                            WTDocumentMaster child)
                     throws WTException
Convenience method for removing a usage link between two documents. Removing the usage link depends on the parent document being in an updateable state, which is the document is in the personal cabinet or the checked out folder of the person who is removing the usage link. This method assumes that the document is in an updateable state, it does not check. This method should never be called if the document is not in an updateable state.

Supported API: false

Specified by:
removeUsageLink in interface WTDocumentService
Parameters:
parent - WTDocument that uses the other side of the WTDocumentUsageLink.
child - WTDocument that is usedBy the other side of the WTDocumentUsageLink..
Throws:
WTException

createDocument

public FormatContentHolder createDocument(String doc_type,
                                          DocumentFormData form_data)
                                   throws WTException
Uses the DocumentFactory to get the delegate to create a document object and persist it.

Supported API: false

Specified by:
createDocument in interface WTDocumentService
Parameters:
doc_type - The class for the document to be created.
form_data - Name value pairs from the UI.
Returns:
FormatContentHolder
Throws:
WTException

postCreateDocument

public FormatContentHolder postCreateDocument(FormatContentHolder document,
                                              DocumentFormData form_data)
                                       throws WTException
Uses the DocumentFactory to get the delegate to 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: false

Specified by:
postCreateDocument in interface WTDocumentService
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
Uses the DocumentFactory to get the delegate to update a document object and persist it.

Supported API: false

Specified by:
updateDocument in interface WTDocumentService
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
Uses the DocumentFactory to get the delegate to 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: false

Specified by:
postUpdateDocument in interface WTDocumentService
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
Uses the DocumentFactory to get the delegate to do the checkin of the document and allows for any post checkin processing.

Supported API: false

Specified by:
checkinDocument in interface WTDocumentService
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
Uses the DocumentFactory to get the delegate to do the checkout of the document and allows for any post checkout processing.

Supported API: false

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

findWTDocumentConfigSpec

public WTDocumentConfigSpec findWTDocumentConfigSpec()
                                              throws WTException
Returns the WTDocumentConfigSpec for the current principal. If one does not exist, a null value is returned.

Supported API: false

Specified by:
findWTDocumentConfigSpec in interface WTDocumentService
Returns:
WTDocumentConfigSpec
Throws:
WTException

saveWTDocumentConfigSpec

public WTDocumentConfigSpec saveWTDocumentConfigSpec(WTDocumentConfigSpec a_WTDocumentConfigSpec)
                                              throws WTException
Saves the WTDocumentConfigSpec for the current principal. If one already exists, it is modified by applying the current values. If the supplied value is null and the current principal has a stored config spec, it is deleted.

Supported API: false

Specified by:
saveWTDocumentConfigSpec in interface WTDocumentService
Parameters:
a_WTDocumentConfigSpec -
Returns:
WTDocumentConfigSpec
Throws:
WTException

changeWTDocumentMasterIdentity

public WTDocumentMaster changeWTDocumentMasterIdentity(WTDocumentMaster document_master,
                                                       String name,
                                                       String number,
                                                       WTOrganization org)
                                                throws WTException,
                                                       WTPropertyVetoException,
                                                       UniquenessException
Change the identity of WTDocumentMaster with new name, number and organization.

Supported API: false

Specified by:
changeWTDocumentMasterIdentity in interface WTDocumentService
Parameters:
document_master -
name -
number -
org -
Returns:
WTDocumentMaster
Throws:
WTException
WTPropertyVetoException
UniquenessException

validDocTemplateIdentity

public boolean validDocTemplateIdentity(String new_name,
                                        String new_number,
                                        String containerName)
                                 throws WTException
Checks if there is already an existing Document Template with the same name and number in the same context as the proposed name and number.

Supported API: false

Specified by:
validDocTemplateIdentity in interface WTDocumentService
Parameters:
new_name - The proposed new name for the Document Template.
new_number - The proposed new number for the Document Template.
containerName -
Returns:
boolean
Throws:
WTException