wt.doc
Class LoadDoc

java.lang.Object
  extended bywt.doc.LoadDoc

public class LoadDoc
extends Object

Creates and persists documents objects based on input from a comma seperated value (csv) file. Method names and parameters are defined in csvmapfile.txt.

The load methods use a wt.load.StandardLoadService cache to cache document masters and document version objects to improve performance of creating structures and updating attrbiutes.

Supported API: true

Extendable: false

See Also:
StandardLoadService, wt.part.loadPart

Field Summary
private static String CURRENT_CONTENT_HOLDER
           
private static String CURRENT_DOCUMENT
           
private static String DOCUMENT_CACHE_KEY
           
private static String DOCUMENT_NEW_VERSION
           
private static String DOCUMENT_PREVIOUS_USER
           
private static ResourceBundle rb
          Resource bundle object for localizing message text
private static String RESOURCE
           
static boolean VERBOSE
          Flag to control vervbose debugging output during document loading.
 
Constructor Summary
LoadDoc()
           
 
Method Summary
static boolean addDocumentDependency(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Add documents to a dependency link.
static boolean addToDocumentStructure(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Add document to a structured document.
private static WTDocument applyConstructionTimeAttributes(WTDocument document, Hashtable nv, Hashtable cmd_line)
           
private static WTDocument applyHardAttributes(WTDocument document, Hashtable nv, Hashtable cmd_line)
           
static boolean beginCreateWTDocument(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Processes "BeginWTDocument" lines from a csv load file.
static boolean beginCreateWTDocumentRetainContent(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          WARNING DO NOT USE THIS OPTION UNLESS YOU ARE HANDLING THE ISSUE OF MULTIPLE SECONDARY CONTENT ITEMS ON NEW ITERATIONS/VERSIONS.
private static WTDocument cacheDocument(WTDocument document)
           
private static WTDocument clearContent(WTDocument document)
           
private static WTDocument constructDocument(Hashtable nv, Hashtable cmd_line)
           
private static boolean createDocumentObject(Hashtable nv, Hashtable cmd_line, Vector return_objects)
           
private static boolean createDocumentObject(Hashtable nv, Hashtable cmd_line, Vector return_objects, boolean removeContent)
           
static boolean createDocumentRetainContent(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          WARNING DO NOT USE THIS OPTION UNLESS YOU ARE HANDLING THE ISSUE OF MULTIPLE SECONDARY CONTENT ITEMS ON NEW ITERATIONS/VERSIONS.
static boolean createGeneral(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Processes the "General" or "Document" directive in the csv load file.
static boolean createReq(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Processes the "Requirements" directive in the csv load file.
static boolean createSpec(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Processes the "Specification" directive in the csv load file.
static boolean endCreateWTDocument(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Processes "EndWTDocument" lines from a csv load file.
static boolean endCreateWTDocumentRetainContent(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Processes "EndWTDocumentRetainContent" lines from a csv load file.
private static WTDocument getCachedDocument()
           
private static WTDocument getCachedDocument(String number)
           
private static WTDocument getCachedDocument(String number, String version)
           
private static WTDocument getCachedDocument(String number, String version, String iteration)
           
private static String getDisplayInfo(Hashtable nv, Hashtable cmd_line)
           
static WTDocument getDocument()
          RETRIEVE DOCUMENT MOST RECENTLY ADDED TO THE CACHE

Supported API: false
static WTDocument getDocument(String number)
          RETRIEVE A DOCUMENT BASED ON DOCUMENT NUMBER (CACHED) IF number IS null, RETURNS DOCUMENT MOST RECENTLY ADDED TO THE CACHE
static WTDocument getDocument(String number, String version)
          RETRIEVE A DOCUMENT BASED ON DOCUMENT NUMBER AND VERSION (CACHED) IF number IS null, RETURNS DOCUMENT MOST RECENTLY ADDED TO THE CACHE IF version IS null, RETURNS DOCUMENT BASED ON DOCUMENT NUMBER ONLY
static WTDocument getDocument(String number, String version, String iteration)
          RETRIEVE A DOCUMENT BASED ON DOCUMENT NUMBER, VERSION, AND ITERATION (CACHED) IF number IS null, RETURNS DOCUMENT MOST RECENTLY ADDED TO THE CACHE IF version IS null, RETURNS DOCUMENT BASED ON DOCUMENT NUMBER ONLY IF iteration IS null, RETURNS DOCUMENT BASED ON DOCUMENT NUMBER AND VERSION ONLY
private static String getDocumentCacheKey(String number, String version, String iteration)
           
private static String getValue(String name, Hashtable nv, Hashtable cmd_line, boolean required)
           
private static boolean isNewVersion(WTDocument document, String version)
           
private static void resetUser()
           
private static void setContainer(WTContained the_contained, WTContainerRef containerRef)
           
private static void setDepartment(WTDocument the_document, String department)
           
private static void setDescription(WTDocument the_document, String description)
           
private static void setDocType(WTDocument the_document, String type)
           
private static void setFolder(WTContainerRef containerRef, FolderEntry the_folder_entry, String folderpath)
           
private static void setIteration(Iterated the_iterated, String iteration)
           
private static void setLifeCycle(WTContainerRef containerRef, LifeCycleManaged the_lifecycle_managed, String lctemplate)
           
private static void setName(WTDocument the_document, String name)
           
private static void setNumber(WTDocument the_document, String number)
           
private static WTDocument setPrimaryContent(WTDocument document, Hashtable nv, Hashtable cmd_line, Vector return_objects)
           
private static void setState(LifeCycleManaged the_lifecycle_managed, String state)
           
private static void setTeamTemplate(WTContainerRef containerRef, TeamManaged the_team_managed, String teamTemplate, String domain)
           
private static void setTitle(WTDocument the_document, String title)
           
private static void setType(Typed the_typed, String subtypedef)
           
private static void setUser(Hashtable nv, Hashtable cmd_line)
           
private static void setVersion(Versioned the_versioned, String version)
           
private static boolean updateDocumentObject(Hashtable nv, Hashtable cmd_line, Vector return_objects)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_CONTENT_HOLDER

private static String CURRENT_CONTENT_HOLDER

DOCUMENT_CACHE_KEY

private static final String DOCUMENT_CACHE_KEY
See Also:
Constant Field Values

DOCUMENT_PREVIOUS_USER

private static final String DOCUMENT_PREVIOUS_USER
See Also:
Constant Field Values

DOCUMENT_NEW_VERSION

private static final String DOCUMENT_NEW_VERSION
See Also:
Constant Field Values

CURRENT_DOCUMENT

private static String CURRENT_DOCUMENT

RESOURCE

private static String RESOURCE

rb

private static ResourceBundle rb
Resource bundle object for localizing message text


VERBOSE

public static boolean VERBOSE
Flag to control vervbose debugging output during document loading. This constant is controlled via wt.properties file entry
wt.doc.load.verbose

The default value is false.

Constructor Detail

LoadDoc

public LoadDoc()
Method Detail

createGeneral

public static boolean createGeneral(Hashtable nv,
                                    Hashtable cmd_line,
                                    Vector return_objects)
Processes the "General" or "Document" directive in the csv load file. Creates a General document object, persists it in the database, checks it out, applies the default attribute values associated with the specified type definition, persists the document, checks it back in, and caches it in the loader's memory.

Subsequent IBAValue load file lines may be used to associate soft attribute values with the document. These values will not be persisted until a "EndWTDocument" load file line is processed.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

Supports versioning which allows a document to be created at a specified version and iteration. Multiple document versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.

Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

WARNING: By default on loading iterations/versions of a document all of the content is removed from the document on the new iteration/version creation. This is to stop excess content from accumulating on the document from iteration to iteration. So any new content both primary or secondary will be the only content. The previous iteratin/version is not touched, only the content on the new document that is created. If you want to load documents that retain their secondary content from the previous iteration/version and then replace any of the old files with the new files of the same name use either DocumentRetainContent or BeginWTDocumentRetainContent/EndWTDocumentRetainContent with ReplaceContentFile.

Parameters:
nv - Name/value pairs of meta data to set on the general document. The attributes are as follows: (arguments in <> are optional)
  • <user>
  • name
  • title
  • number
  • type
  • <description>
  • department
  • saveIn
  • <teamTemplate>
  • <domain>
  • <lifecycletemplate>
  • <lifecyclestate>
  • <typedef>
  • <primarycontenttype> (used by wt.load.LoadContent)
  • <path> (used by wt.load.LoadContent)
  • format (used by wt.load.LoadContent)
  • contdesc (used by wt.load.LoadContent)
  • <version>
  • <iteration>
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

Extendable: false

createDocumentRetainContent

public static boolean createDocumentRetainContent(Hashtable nv,
                                                  Hashtable cmd_line,
                                                  Vector return_objects)
WARNING DO NOT USE THIS OPTION UNLESS YOU ARE HANDLING THE ISSUE OF MULTIPLE SECONDARY CONTENT ITEMS ON NEW ITERATIONS/VERSIONS. The content service automatically copies all content forward on a new version/iteration. This is obvious in the UI when the user modifies the new iteration but here during a load situation this is not the most desireable. The load file can have multiple iterations/versions of a document with the content files to be loaded for each. For example if A.1 has file1.doc as secondary content and A.2 has file1.doc, but modified contents, this load will create A.2 with file1.doc and file1-2.doc (new version of file) when used with ContentFile. The other document loads will remove all content and then create A.2 with file1.doc (new version of file1.doc). Use ReplaceContentFile instead of ContentFile with this method to carry forward the content but then replace file1.doc when the filename matches a new file for the new iteration.

Creates a document object, persists it in the database, checks it out, applies the default attribute values associated with the specified type definition, persists the document, checks it back in, and caches it in the loader's memory.

Subsequent IBAValue load file lines may be used to associate soft attribute values with the document. These values will not be persisted until a "EndWTDocument" load file line is processed.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

Supports versioning which allows a document to be created at a specified version and iteration. Multiple document versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.

Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

Parameters:
nv - Name/value pairs of meta data to set on the general document. The attributes are as follows: (arguments in <> are optional)
  • <user>
  • name
  • title
  • number
  • type (set programatically, not in csv)
  • <description>
  • department
  • saveIn
  • <teamTemplate>
  • <domain>
  • <lifecycletemplate>
  • <lifecyclestate>
  • <typedef>
  • <primarycontenttype> (used by wt.load.LoadContent)
  • <path> (used by wt.load.LoadContent)
  • format (used by wt.load.LoadContent)
  • contdesc (used by wt.load.LoadContent)
  • <version>
  • <iteration>
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

Extendable: false

createReq

public static boolean createReq(Hashtable nv,
                                Hashtable cmd_line,
                                Vector return_objects)
Processes the "Requirements" directive in the csv load file. Creates a Requirements document object, persists it in the database, checks it out, applies the default attribute values associated with the specified type definition, persists the document, checks it back in, and caches it in the loader's memory.

Subsequent IBAValue load file lines may be used to associate soft attribute values with the document. These values will not be persisted until a "EndWTDocument" load file line is processed.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

Supports versioning which allows a document to be created at a specified version and iteration. Multiple document versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.

Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

WARNING: By default on loading iterations/versions of a document all of the content is removed from the document on the new iteration/version creation. This is to stop excess content from accumulating on the document from iteration to iteration. So any new content both primary or secondary will be the only content. The previous iteratin/version is not touched, only the content on the new document that is created. If you want to load documents that retain their secondary content from the previous iteration/version and then replace any of the old files with the new files of the same name use either DocumentRetainContent or BeginWTDocumentRetainContent/EndWTDocumentRetainContent with ReplaceContentFile.

Parameters:
nv - Name/value pairs of meta data to set on the general document. The attributes are as follows: (arguments in <> are optional)
  • <user>
  • name
  • title
  • number
  • type (set programatically, not in csv)
  • <description>
  • department
  • saveIn
  • <teamTemplate>
  • <domain>
  • <lifecycletemplate>
  • <lifecyclestate>
  • <typedef>
  • <primarycontenttype> (used by wt.load.LoadContent)
  • <path> (used by wt.load.LoadContent)
  • format (used by wt.load.LoadContent)
  • contdesc (used by wt.load.LoadContent)
  • <version>
  • <iteration>
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

Extendable: false

createSpec

public static boolean createSpec(Hashtable nv,
                                 Hashtable cmd_line,
                                 Vector return_objects)
Processes the "Specification" directive in the csv load file. Creates a Specification document object, persists it in the database, checks it out, applies the default attribute values associated with the specified type definition, persists the document, checks it back in, and caches it in the loader's memory.

Subsequent IBAValue load file lines may be used to associate soft attribute values with the document. These values will not be persisted until a "EndWTDocument" load file line is processed.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

Supports versioning which allows a document to be created at a specified version and iteration. Multiple document versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.

Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

WARNING: By default on loading iterations/versions of a document all of the content is removed from the document on the new iteration/version creation. This is to stop excess content from accumulating on the document from iteration to iteration. So any new content both primary or secondary will be the only content. The previous iteratin/version is not touched, only the content on the new document that is created. If you want to load documents that retain their secondary content from the previous iteration/version and then replace any of the old files with the new files of the same name use either DocumentRetainContent or BeginWTDocumentRetainContent/EndWTDocumentRetainContent with ReplaceContentFile.

Parameters:
nv - Name/value pairs of meta data to set on the general document. The attributes are as follows: (arguments in <> are optional)
  • <user>
  • name
  • title
  • number
  • type (set programatically, not in csv)
  • <description>
  • department
  • saveIn
  • <teamTemplate>
  • <domain>
  • <lifecycletemplate>
  • <lifecyclestate>
  • <typedef>
  • <primarycontenttype> (used by wt.load.LoadContent)
  • <path> (used by wt.load.LoadContent)
  • format (used by wt.load.LoadContent)
  • contdesc (used by wt.load.LoadContent)
  • <version>
  • <iteration>
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

Extendable: false

beginCreateWTDocument

public static boolean beginCreateWTDocument(Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects)
Processes "BeginWTDocument" lines from a csv load file. Creates a document object, persists it in the database, and caches it in the loader's memory.

Subsequent IBAValue load file lines may be used to associate soft attribute values with the document. These values will not be persisted until a "EndWTDocument" load file line is processed.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

A typical sequence using this directive might be

BeginWTDocument,name,number,...
IBAValue,definition1,value1,...
IBAValue,definition2,value2,...
EndWTDocument
ContentFile,...

Supports versioning which allows a document to be created at a specified version and iteration. Multiple document versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.

Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

WARNING: By default on loading iterations/versions of a document all of the content is removed from the document on the new iteration/version creation. This is to stop excess content from accumulating on the document from iteration to iteration. So any new content both primary or secondary will be the only content. The previous iteratin/version is not touched, only the content on the new document that is created. If you want to load documents that retain their secondary content from the previous iteration/version and then replace any of the old files with the new files of the same name use BeginWTDocumentRetainContent/EndWTDocumentRetainContent with ReplaceContentFile.

Parameters:
nv - Name/Value pairs of document attributes. The attributes are as follows: (arguments in <> are optional)
  • <user>
  • name
  • title
  • number
  • type (set programatically, not in csv)
  • <description>
  • department
  • saveIn
  • <teamTemplate>
  • <domain>
  • <lifecycletemplate>
  • <lifecyclestate>
  • <typedef>
  • <version>
  • <iteration>
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.
See Also:
endCreateWTDocument(java.util.Hashtable, java.util.Hashtable, java.util.Vector)

endCreateWTDocument

public static boolean endCreateWTDocument(Hashtable nv,
                                          Hashtable cmd_line,
                                          Vector return_objects)
Processes "EndWTDocument" lines from a csv load file. Causes the cached document to be checked-out, associates soft attribues from preceding IBAValue load file lines with the document, applies the default attribute values associated with the specified type definition, persists the document, checks it back in, and caches it in the loader's memory.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

Parameters:
nv - Name/Value pairs of document attributes. The attributes are as follows: (arguments in <> are optional)
  • <primarycontenttype> (used by wt.load.LoadContent)
  • <path> (used by wt.load.LoadContent)
  • format (used by wt.load.LoadContent)
  • contdesc (used by wt.load.LoadContent)
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.
See Also:
beginCreateWTDocument(java.util.Hashtable, java.util.Hashtable, java.util.Vector)

beginCreateWTDocumentRetainContent

public static boolean beginCreateWTDocumentRetainContent(Hashtable nv,
                                                         Hashtable cmd_line,
                                                         Vector return_objects)
WARNING DO NOT USE THIS OPTION UNLESS YOU ARE HANDLING THE ISSUE OF MULTIPLE SECONDARY CONTENT ITEMS ON NEW ITERATIONS/VERSIONS. The content service automatically copies all content forward on a new version/iteration. This is obvious in the UI when the user modifies the new iteration but here during a load situation this is not the most desireable. The load file can have multiple iterations/versions of a document with the content files to be loaded for each. For example if A.1 has file1.doc as secondary content and A.2 has file1.doc, but modified contents, this load will create A.2 with file1.doc and file1-2.doc (new version of file) when used with ContentFile. The other document loads will remove all content and then create A.2 with file1.doc (new version of file1.doc). Use ReplaceContentFile instead of ContentFile with this method to carry forward the content but then replace file1.doc when the filename matches a new file for the new iteration.

Processes "BeginWTDocumentRetainContent" lines from a csv load file. Creates a document object, persists it in the database, and caches it in the loader's memory.

Subsequent IBAValue load file lines may be used to associate soft attribute values with the document. These values will not be persisted until a "EndWTDocumentRetainContent" load file line is processed.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

A typical sequence using this directive might be

BeginWTDocument,name,number,...
IBAValue,definition1,value1,...
IBAValue,definition2,value2,...
EndWTDocument
ContentFile,...

Supports versioning which allows a document to be created at a specified version and iteration. Multiple document versions imply an "order". I.E. subsequent bulk load runs can not "fill in the gaps". Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

Parameters:
nv - Name/Value pairs of document attributes. The attributes are as follows: (arguments in <> are optional)
  • <user>
  • name
  • title
  • number
  • type (set programatically, not in csv)
  • <description>
  • department
  • saveIn
  • <teamTemplate>
  • <domain>
  • <lifecycletemplate>
  • <lifecyclestate>
  • <typedef>
  • <version>
  • <iteration>
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.
See Also:
endCreateWTDocumentRetainContent(java.util.Hashtable, java.util.Hashtable, java.util.Vector)

endCreateWTDocumentRetainContent

public static boolean endCreateWTDocumentRetainContent(Hashtable nv,
                                                       Hashtable cmd_line,
                                                       Vector return_objects)
Processes "EndWTDocumentRetainContent" lines from a csv load file. Causes the cached document to be checked-out, associates soft attribues from preceding IBAValue load file lines with the document, applies the default attribute values associated with the specified type definition, persists the document, checks it back in, and caches it in the loader's memory.

Establishes the document as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.

Parameters:
nv - Name/Value pairs of document attributes. The attributes are as follows: (arguments in <> are optional)
  • <primarycontenttype> (used by wt.load.LoadContent)
  • <path> (used by wt.load.LoadContent)
  • format (used by wt.load.LoadContent)
  • contdesc (used by wt.load.LoadContent)
cmd_line - command line argument that can contain supplemental load data
return_objects - Vector of the object(s) created by this method. Used by wt.load.StandardLoadService for accurate user feedback messages.
See Also:
beginCreateWTDocumentRetainContent(java.util.Hashtable, java.util.Hashtable, java.util.Vector)

addToDocumentStructure

public static boolean addToDocumentStructure(Hashtable nv,
                                             Hashtable cmd_line,
                                             Vector return_objects)
Add document to a structured document.

Parameters:
nv - Name/value pairs to identify documents for the relationship.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

addDocumentDependency

public static boolean addDocumentDependency(Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects)
Add documents to a dependency link.

Parameters:
nv - Name/value pairs to identify documents for the relationship.
cmd_line - command line argument that can be substituted into the load data.
return_objects - Object(s) created by this method used by wt.load.StandardLoadService for user feedback messages.

Supported API: true

getDocument

public static WTDocument getDocument()
                              throws WTException
RETRIEVE DOCUMENT MOST RECENTLY ADDED TO THE CACHE

Supported API: false

Throws:
WTException

getDocument

public static WTDocument getDocument(String number)
                              throws WTException
RETRIEVE A DOCUMENT BASED ON DOCUMENT NUMBER (CACHED) IF number IS null, RETURNS DOCUMENT MOST RECENTLY ADDED TO THE CACHE

Parameters:
number - Document number.

Supported API: false
Throws:
WTException

getDocument

public static WTDocument getDocument(String number,
                                     String version)
                              throws WTException
RETRIEVE A DOCUMENT BASED ON DOCUMENT NUMBER AND VERSION (CACHED) IF number IS null, RETURNS DOCUMENT MOST RECENTLY ADDED TO THE CACHE IF version IS null, RETURNS DOCUMENT BASED ON DOCUMENT NUMBER ONLY

Parameters:
number - Document number.
version - Document version.

Supported API: false
Throws:
WTException

getDocument

public static WTDocument getDocument(String number,
                                     String version,
                                     String iteration)
                              throws WTException
RETRIEVE A DOCUMENT BASED ON DOCUMENT NUMBER, VERSION, AND ITERATION (CACHED) IF number IS null, RETURNS DOCUMENT MOST RECENTLY ADDED TO THE CACHE IF version IS null, RETURNS DOCUMENT BASED ON DOCUMENT NUMBER ONLY IF iteration IS null, RETURNS DOCUMENT BASED ON DOCUMENT NUMBER AND VERSION ONLY

Parameters:
number - Document number.
version - Document version.
iteration - Document iteration.

Supported API: false
Throws:
WTException

createDocumentObject

private static boolean createDocumentObject(Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects)

createDocumentObject

private static boolean createDocumentObject(Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects,
                                            boolean removeContent)

getDisplayInfo

private static String getDisplayInfo(Hashtable nv,
                                     Hashtable cmd_line)

updateDocumentObject

private static boolean updateDocumentObject(Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects)

constructDocument

private static WTDocument constructDocument(Hashtable nv,
                                            Hashtable cmd_line)
                                     throws WTException
Throws:
WTException

isNewVersion

private static boolean isNewVersion(WTDocument document,
                                    String version)
                             throws WTException
Throws:
WTException

getCachedDocument

private static WTDocument getCachedDocument()
                                     throws WTException
Throws:
WTException

getCachedDocument

private static WTDocument getCachedDocument(String number)
                                     throws WTException
Throws:
WTException

getCachedDocument

private static WTDocument getCachedDocument(String number,
                                            String version)
                                     throws WTException
Throws:
WTException

getCachedDocument

private static WTDocument getCachedDocument(String number,
                                            String version,
                                            String iteration)
                                     throws WTException
Throws:
WTException

getDocumentCacheKey

private static String getDocumentCacheKey(String number,
                                          String version,
                                          String iteration)
                                   throws WTException
Throws:
WTException

cacheDocument

private static WTDocument cacheDocument(WTDocument document)
                                 throws WTException
Throws:
WTException

applyHardAttributes

private static WTDocument applyHardAttributes(WTDocument document,
                                              Hashtable nv,
                                              Hashtable cmd_line)
                                       throws WTException
Throws:
WTException

applyConstructionTimeAttributes

private static WTDocument applyConstructionTimeAttributes(WTDocument document,
                                                          Hashtable nv,
                                                          Hashtable cmd_line)
                                                   throws WTException
Throws:
WTException

setName

private static void setName(WTDocument the_document,
                            String name)
                     throws WTException
Throws:
WTException

setNumber

private static void setNumber(WTDocument the_document,
                              String number)
                       throws WTException
Throws:
WTException

setDocType

private static void setDocType(WTDocument the_document,
                               String type)
                        throws WTException
Throws:
WTException

setTitle

private static void setTitle(WTDocument the_document,
                             String title)
                      throws WTException
Throws:
WTException

setDescription

private static void setDescription(WTDocument the_document,
                                   String description)
                            throws WTException
Throws:
WTException

setDepartment

private static void setDepartment(WTDocument the_document,
                                  String department)
                           throws WTException
Throws:
WTException

setPrimaryContent

private static WTDocument setPrimaryContent(WTDocument document,
                                            Hashtable nv,
                                            Hashtable cmd_line,
                                            Vector return_objects)
                                     throws WTException
Throws:
WTException

setUser

private static void setUser(Hashtable nv,
                            Hashtable cmd_line)
                     throws WTException
Throws:
WTException

resetUser

private static void resetUser()
                       throws WTException
Throws:
WTException

getValue

private static String getValue(String name,
                               Hashtable nv,
                               Hashtable cmd_line,
                               boolean required)
                        throws WTException
Throws:
WTException

setContainer

private static void setContainer(WTContained the_contained,
                                 WTContainerRef containerRef)
                          throws WTException
Throws:
WTException

setType

private static void setType(Typed the_typed,
                            String subtypedef)
                     throws WTException
Throws:
WTException

setVersion

private static void setVersion(Versioned the_versioned,
                               String version)
                        throws WTException
Throws:
WTException

setIteration

private static void setIteration(Iterated the_iterated,
                                 String iteration)
                          throws WTException
Throws:
WTException

setFolder

private static void setFolder(WTContainerRef containerRef,
                              FolderEntry the_folder_entry,
                              String folderpath)
                       throws WTException
Throws:
WTException

setLifeCycle

private static void setLifeCycle(WTContainerRef containerRef,
                                 LifeCycleManaged the_lifecycle_managed,
                                 String lctemplate)
                          throws WTException
Throws:
WTException

setState

private static void setState(LifeCycleManaged the_lifecycle_managed,
                             String state)
                      throws WTException
Throws:
WTException

setTeamTemplate

private static void setTeamTemplate(WTContainerRef containerRef,
                                    TeamManaged the_team_managed,
                                    String teamTemplate,
                                    String domain)
                             throws WTException
Throws:
WTException

clearContent

private static WTDocument clearContent(WTDocument document)
                                throws WTException
Throws:
WTException