Class LoadDoc
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:
-
StandardLoadServicewt.part.loadPart
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddDocumentDependency(Hashtable nv, Hashtable cmd_line, Vector return_objects) Add documents to a dependency link.static booleanaddToDocumentStructure(Hashtable nv, Hashtable cmd_line, Vector return_objects) Add document to a structured document.static booleancreateDocumentRetainContent(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 booleancreateGeneral(Hashtable nv, Hashtable cmd_line, Vector return_objects) Processes the "General" or "Document" directive in the csv load file.
-
Method Details
-
createGeneral
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
IBAValueload 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)
NOTE TO USERS OF THE SOURCE CODE: The ability to load document versions out of order is implemented by using the VersionControlHelper.service.insertNode() method. Calls to this method must not be removed from the code. To turn off this behavior, you should instead set the insert_on_latest_iteration flag to false in the constructDocument() method.
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 bywt.load.StandardLoadServicefor 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
IBAValueload 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)
NOTE TO USERS OF THE SOURCE CODE: The ability to load document versions out of order is implemented by using the VersionControlHelper.service.insertNode() method. Calls to this method must not be removed from the code. To turn off this behavior, you should instead set the insert_on_latest_iteration flag to false in the constructDocument() method.
- 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 bywt.load.StandardLoadServicefor user feedback messages.
Supported API: true
Extendable: false
-
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 bywt.load.StandardLoadServicefor 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 bywt.load.StandardLoadServicefor user feedback messages.
Supported API: true
-