Storage policy of OmniDocs Engine separates the actual Data
Storage of a document from its Properties and Indexes. This approach results in
a better Performance and Management of the Data in the System.
Importing or adding a document into the System is achieved
using two distinct API calls.
1. Add document into the Image Server.
2. Adding the Storage Information and Property into Document cabinetCabinet.
Step 1: Add document into the Image Server
Function
Name:
AddDocument_MT
Class:
ISPack. CPISDocumentTxn
Description: This function adds a Document into Image Server.
|
Prototype:
public static void
AddDocument_MT |
( |
|
|
|
JtsConnection jtsCon, |
|
|
String jtsAddress, |
|
|
short portId, |
|
|
String cabinetName, |
|
|
short volumeId, |
|
|
String fileName, |
|
|
JPDBRecoverDocData docDBData, |
|
|
String userIndex, |
|
|
JPISIsIndex newIsIndex |
|
) |
|
throws JPISException |
|
|
Name |
Description |
Valid Values |
Default Behaviour |
JtsCon |
This Object holds a connection to the JTS. However, it
can be sent as Null. If it is set to Null, then a new socket connection to
JTS will be created by Image Server
Client using jtsAddress and portId, passed as a parameter to the function. |
Jts
connection object. |
null |
jtsAddress |
IP Address on which JTS Server is running. |
|
N/A |
PortId |
The Port in which, JTS is running. |
short>0 |
N/A |
cabinetName |
Image Server Cabinet name. |
|
N/A |
volumeId |
ImageVolume id at which document is added into the
ImageServer. |
short>0 |
N/A |
fileName |
Full path of the Resource using which, the complete data
for upload can be procured. |
|
N/A |
docDBData |
An Object of type JPDBRecoverDocData is passed in this
parameter. In this object, the following parameters are set: m_cDocumentType (Type of document), m_nDocumentSize (Size of document in bytes),
m_sVolumeId(Volume id where the document will be added) |
|
N/A |
userIndex |
This parameter is reserved and it can be used with the
default value. |
|
null |
newIsIndex |
An Object of type JPISIsIndex is returned by the Image
Server. |
|
N/A |
Later, function adds document to the Image Server. Output
parameter newIsIndex contains:
1. DocIndex (Index of the document into the Image Server).
2. VolumeId (Index of the Volume in which this document is
added).
Step 2: Add document into document cabinetCabinet
Function
Name:
getAddDocumentXml
Class:
com.newgen.dmsapi.DMSInputXml
Description: It is used to add a
document to a folder. Data Definition and Keywords can be associated at the
time of addition of the document. The Data Definition or Keywords of a
particular Group can be associated at the time of addition also.
Prototype:
public String
getAddDocumentXml |
( |
|
|
|
String cabinetName, |
|
|
String userDbId, |
|
|
String groupId, |
|
|
String parentFolderIndex, |
|
|
String noOfPages, |
|
|
String accessType, |
|
|
String documentName, |
|
|
String createdDateTime, |
|
|
String expiryDateTime, |
|
|
String versionFlag, |
|
|
String documentType, |
|
|
String documentSize, |
|
|
String createdByApp, |
|
|
String createdByAppName, |
|
|
String isIndex, |
|
|
String textIsIndex, |
|
|
String ODMADocumentIndex, |
|
|
String comment, |
|
|
String documentAuthor, |
|
|
String ownerIndex, |
|
|
String enableLog, |
|
|
String FTSFlag, |
|
|
String dataDefName, |
|
|
String keywords |
|
) |
|
Name |
Description |
Valid Values |
Default Behaviour |
cabinetName |
Name of the Database Cabinet to which the User wants to connect. |
|
N/A |
userDBId |
UserDatabase ID, which is returned after the execution of
getConnectCabinetXml call. |
|
N/A |
groupId |
This parameter is reserved. Default value can be sent. |
|
0 |
parentFolderIndex |
Specifies the Index of the Parent Folder of the document. |
|
0 |
noOfPages |
Specifies the number of Pages in the document. |
|
0 |
accessType |
Specifies the scope of accessing the document. |
S – Shared P – Private I – Inherited |
S |
documentName |
Name of the document. |
Any String (Valid) |
New Document |
createdDateTime |
Creation Date and Time of the document. |
Valid Date and Time in the format yyyy-mm-dd hh:mm:ss |
Current Date and Time of the Server. |
expiryDateTime |
Date and Time when the document will expire. |
Valid Date and Time in the format yyyy-mm-dd hh:mm:ss |
31-12-2099 |
versionFlag |
Specifies whether Versioning of the document is allowed. |
Y – Versioning is allowed. N – Versioning is not allowed. |
Y |
documentType |
Specifies the Type of the document. |
I – Image N – Non Image A – Reserved |
N |
documentSize |
Size of the document in bytes. |
Integer >= 0 |
0 |
createdByApp |
This parameter is reserved and it can be used with the default value. |
|
0 |
createdByAppName |
Extension of the Document. For example, JPG and GIF. |
|
|
isIndex |
Specifies a unique Combination of Image Index and Volume Index for a
document stored on the Image Server separated by #. For example, 3#79. Note: This parameter is got from the previous Add Document call to Image
Server. |
|
N/A |
textISIndex |
This parameter is reserved and it can be used with the default value. |
|
0#0 |
ODMADocumentIndex |
This parameter is reserved and it can be used with the default value. |
null |
Null |
comment |
Comments added by the User on the document. |
Any String (Valid) |
Null |
documentAuthor |
Name of the Author of the document. |
Any String (Valid) |
Null |
ownerIndex |
Index of the Owner of the document. |
Integer > 0 |
User index of the logged in User. |
enableLog |
Flag, which specifies whether the Log is to be generated for the
document added. |
Y – Log is generated. N – Log not generated. |
Y |
FTSFlag |
This parameter is reserved and it can be used with the default value. |
null |
Null |
dataDefName |
Name of the Data Class associated with the document. |
Any String (Valid) |
|
keywords |
List of Keywords, which are associated with documents. |
|
Null |
Input
Xml of call NGOAddDocument.