|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.doc.StandardWTDocumentService
Use the newStandardWTDocumentService
static factory method(s),
not the StandardWTDocumentService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Nested Class Summary | |
(package private) class |
StandardWTDocumentService.CheckedOutDocument
|
Field Summary | |
private static String |
CLASSNAME
|
private static String |
RESOURCE
|
private static String |
S_RESOURCE
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardWTDocumentService()
|
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. |
private WTDocument |
createUsageLinks(WTDocument parent,
Vector child,
String checkOutNote,
String checkInNote,
boolean ordered)
|
WTDocumentConfigSpec |
findWTDocumentConfigSpec()
Returns the WTDocumentConfigSpec for the current principal. |
String |
getConceptualClassname()
Deprecated. |
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 WTDocumentDependencyLink |
getLatestDependencyLink(WTDocument work_copy,
WTDocumentDependencyLink link)
Used in updating and removing dependency links. |
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. |
private WTDocumentUsageLink |
getUsageLink(WTDocument parent,
WTDocumentMaster child_master)
|
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. |
static StandardWTDocumentService |
newStandardWTDocumentService()
Default factory for the class. |
private Enumeration |
orderUsageLinks(QueryResult uses)
|
WTDocument |
orderUsageLinks(WTDocument parent,
Vector child,
String checkOutNote,
String checkInNote)
Order usage links between the parent document and it's children documents. |
protected void |
performStartupProcess()
Adds an event listener to copy links when objects are revised or checked out. |
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. |
private WTDocument |
postOperationCheckin(StandardWTDocumentService.CheckedOutDocument ckOutDoc,
String checkInNote)
|
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. |
private StandardWTDocumentService.CheckedOutDocument |
preOperationCheckout(WTDocument document,
String checkOutNote)
|
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. |
private void |
removeUsageLinkWOTransaction(WTDocument parent,
Vector child)
|
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. |
protected void |
validateDocTemplateName(Templateable target)
|
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, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final boolean VERBOSE
private static final String S_RESOURCE
Constructor Detail |
public StandardWTDocumentService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public static StandardWTDocumentService newStandardWTDocumentService() throws WTException
WTException
public QueryResult getUsesWTDocuments(WTDocument document, WTDocumentConfigSpec configSpec) throws WTException
getUsesWTDocuments
in interface WTDocumentService
document
- The WTDocument to navigate.configSpec
- The ConfigSpec to use to filter the iterations for the masters used.
WTException
WTDocumentUsageLink
,
WTDocument
,
WTDocumentMaster
,
Persistable
public QueryResult getUsesWTDocumentUsageLinks(WTDocument document) throws WTException
getUsesWTDocumentUsageLinks
in interface WTDocumentService
document
- The WTDocument to navigate.
WTException
WTDocumentUsageLink
,
WTDocument
,
WTDocumentMaster
public QueryResult getUsesWTDocumentMasters(WTDocument document) throws WTException
getUsesWTDocumentMasters
in interface WTDocumentService
document
- The document to navigate.
WTException
WTDocumentUsageLink
,
WTDocumentMaster
public QueryResult getUsedByWTDocuments(WTDocumentMaster documentMaster) throws WTException
getUsedByWTDocuments
in interface WTDocumentService
documentMaster
- The document master to navigate to find those documents that use it.
WTException
WTDocumentUsageLink
,
WTDocument
public WTDocument createOrderedUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote) throws WTException
createOrderedUsageLinks
in interface WTDocumentService
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.
WTException
public WTDocument orderUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote) throws WTException
orderUsageLinks
in interface WTDocumentService
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.
WTException
public WTDocument removeOrderedUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote) throws WTException
removeOrderedUsageLinks
in interface WTDocumentService
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.
WTException
public Enumeration getOrderedUsesWTDocuments(WTDocument document, WTDocumentConfigSpec configSpec) throws WTException
getOrderedUsesWTDocuments
in interface WTDocumentService
document
- The WTDocument to navigate.configSpec
- The ConfigSpec to use to filter the iterations for the masters used.
WTException
WTDocumentUsageLink
,
WTDocument
,
WTDocumentMaster
,
Persistable
public Enumeration getOrderedUsesWTDocumentMasters(WTDocument document) throws WTException
getOrderedUsesWTDocumentMasters
in interface WTDocumentService
document
- The document to navigate.
WTException
WTDocumentUsageLink
,
WTDocumentMaster
public boolean hasUses(WTDocument document) throws WTException
hasUses
in interface WTDocumentService
document
- Document to test if it has any uses relationships to other documents.
WTException
public QueryResult getDependsOnWTDocuments(WTDocument document) throws WTException
getDependsOnWTDocuments
in interface WTDocumentService
document
-
WTException
WTDocumentDependencyLink
,
WTDocument
public QueryResult getDependsOnWTDocuments(WTDocument document, boolean onlyOtherSides) throws WTException
getDependsOnWTDocuments
in interface WTDocumentService
document
- onlyOtherSides
-
WTException
WTDocumentDependencyLink
,
WTDocument
public QueryResult getHasDependentWTDocuments(WTDocument document) throws WTException
getHasDependentWTDocuments
in interface WTDocumentService
document
-
WTException
WTDocumentDependencyLink
,
WTDocument
public QueryResult getHasDependentWTDocuments(WTDocument document, boolean onlyOtherSides) throws WTException
getHasDependentWTDocuments
in interface WTDocumentService
document
- onlyOtherSides
-
WTException
WTDocumentDependencyLink
,
WTDocument
public WTDocumentDependencyLink createDependencyLink(WTDocument doc, WTDocument referenced_doc, String comment) throws WTException
createDependencyLink
in interface WTDocumentService
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.
WTException
public Vector createDependencyLink(WTDocument doc, Vector referenced_docs, Vector comment) throws WTException
createDependencyLink
in interface WTDocumentService
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.
WTException
public WTDocument createDependencyLink(WTDocument doc, Vector referenced_docs, Vector comment, String checkOutNote, String checkInNote) throws WTException
createDependencyLink
in interface WTDocumentService
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.
WTException
public Vector updateDependencyLink(Vector links, Vector comments) throws WTException
updateDependencyLink
in interface WTDocumentService
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.
WTException
public WTDocument updateDependencyLink(WTDocument document, Vector links, Vector comments, String checkOutNote, String checkInNote) throws WTException
updateDependencyLink
in interface WTDocumentService
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.
WTException
public WTDocumentUsageLink createUsageLink(WTDocument parent, WTDocument child) throws WTException
createUsageLink
in interface WTDocumentService
parent
- WTDocument that uses the other side of the WTDocumentUsageLink.child
- WTDocument that is usedBy the other side of the WTDocumentUsageLink.
WTException
public Vector createUsageLink(WTDocument parent, Vector child) throws WTException
createUsageLink
in interface WTDocumentService
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.
WTException
public WTDocument createUsageLink(WTDocument parent, Vector child, String checkOutNote, String checkInNote) throws WTException
createUsageLink
in interface WTDocumentService
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.
WTException
public Vector getWTDocumentStructure(WTDocument document, WTDocumentConfigSpec configSpec, int traversal) throws WTException
getWTDocumentStructure
in interface WTDocumentService
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.
WTException
public Vector getStructurePrimaryContent(WTDocument document, WTDocumentConfigSpec configSpec, int traversal) throws WTException
getStructurePrimaryContent
in interface WTDocumentService
document
- The WTDocument to navigate.configSpec
- The ConfigSpec to use to filter the iterations for the masters used.traversal
-
WTException
ApplicationData
public void removeDependencyLink(Vector links) throws WTException
removeDependencyLink
in interface WTDocumentService
links
- Remove all of the dependency links in the vector.
WTException
public void removeDependencyLink(WTDocumentDependencyLink link) throws WTException
removeDependencyLink
in interface WTDocumentService
link
- The dependency link to be removed.
WTException
public WTDocument removeDependencyLink(WTDocument document, Vector links, String checkOutNote, String checkInNote) throws WTException
removeDependencyLink
in interface WTDocumentService
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.
WTException
public void removeUsageLink(WTDocument parent, Vector child) throws WTException
removeUsageLink
in interface WTDocumentService
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.
WTException
public void removeUsageLink(WTDocument parent, WTDocumentMaster child) throws WTException
removeUsageLink
in interface WTDocumentService
parent
- WTDocument that uses the other side of the WTDocumentUsageLink.child
- WTDocument that is usedBy the other side of the WTDocumentUsageLink..
WTException
public FormatContentHolder createDocument(String doc_type, DocumentFormData form_data) throws WTException
createDocument
in interface WTDocumentService
doc_type
- The class for the document to be created.form_data
- Name value pairs from the UI.
WTException
public FormatContentHolder postCreateDocument(FormatContentHolder document, DocumentFormData form_data) throws WTException
postCreateDocument
in interface WTDocumentService
document
- The document that will be processed.form_data
- Name value pairs from the UI.
WTException
public FormatContentHolder updateDocument(FormatContentHolder document, DocumentFormData form_data) throws WTException
updateDocument
in interface WTDocumentService
document
- The document that will be processed.form_data
- Name value pairs from the UI.
WTException
public FormatContentHolder postUpdateDocument(FormatContentHolder document, DocumentFormData form_data) throws WTException
postUpdateDocument
in interface WTDocumentService
document
- The document that will be processed.form_data
- Name value pairs from the UI.
WTException
public FormatContentHolder checkinDocument(FormatContentHolder document, DocumentFormData form_data) throws WTException
checkinDocument
in interface WTDocumentService
document
- The document that will be processed.form_data
- Name value pairs from the UI.
WTException
public FormatContentHolder checkOutDocument(FormatContentHolder document, DocumentFormData form_data) throws WTException
checkOutDocument
in interface WTDocumentService
document
- The document that will be processed.form_data
- Name value pairs from the UI.
WTException
public WTDocumentConfigSpec findWTDocumentConfigSpec() throws WTException
findWTDocumentConfigSpec
in interface WTDocumentService
WTException
public WTDocumentConfigSpec saveWTDocumentConfigSpec(WTDocumentConfigSpec a_WTDocumentConfigSpec) throws WTException
saveWTDocumentConfigSpec
in interface WTDocumentService
a_WTDocumentConfigSpec
-
WTException
public WTDocumentMaster changeWTDocumentMasterIdentity(WTDocumentMaster document_master, String name, String number, WTOrganization org) throws WTException, WTPropertyVetoException, UniquenessException
changeWTDocumentMasterIdentity
in interface WTDocumentService
document_master
- name
- number
- org
-
WTException
WTPropertyVetoException
UniquenessException
public boolean validDocTemplateIdentity(String new_name, String new_number, String containerName) throws WTException
validDocTemplateIdentity
in interface WTDocumentService
new_name
- The proposed new name for the Document Template.new_number
- The proposed new number for the Document Template.containerName
-
WTException
private WTDocumentUsageLink getUsageLink(WTDocument parent, WTDocumentMaster child_master) throws WTException
WTException
private Enumeration orderUsageLinks(QueryResult uses)
private StandardWTDocumentService.CheckedOutDocument preOperationCheckout(WTDocument document, String checkOutNote) throws WTException
WTException
private WTDocument postOperationCheckin(StandardWTDocumentService.CheckedOutDocument ckOutDoc, String checkInNote) throws WTException
WTException
private void removeUsageLinkWOTransaction(WTDocument parent, Vector child) throws WTException
WTException
private WTDocumentDependencyLink getLatestDependencyLink(WTDocument work_copy, WTDocumentDependencyLink link) throws WTException
WTException
private WTDocument createUsageLinks(WTDocument parent, Vector child, String checkOutNote, String checkInNote, boolean ordered) throws WTException
WTException
protected void validateDocTemplateName(Templateable target) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |