Add Document

This functionality adds a document into to the SMS Server. The Path of the file from where Image ServerImage Server will upload the document has to be specified.

 

Usage in Visual C++/Visual Basic Application

Usage in Java Application

Error

 

Usage in Visual C++/Visual Basic Application

Prototype

int WINAPI NGISAddDocument (  LPTSTR cabinetName, short volumeId,

                                                        LPTSTR fileName,LPRECOVERDOCDB docDBData,

                                                          LPTSTR userUserIndex, LPISINDEX newIsIndex

                        )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

cabinetName

Name of the Image Cabinet to which the User wants to connect.

Not Null

Input Parameter

volumeId

Index of the Volume in which document is to be added into the SMS.

short>0

Input Parameter

fileName

Full path of the rResource through which the Image server Server can get full data to upload.

Not Null

Input Parameter

docDBData

A pointer to a variable of type RECOVERDOCDB.

This information is not used at present.

 

 

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

newIsIndex

A pointer to a variable of type ISINDEX . The structure ISINDEX is returned by the iImage sServer, which that contains information (viz.namely, iIndex of the volume Volume in which document document is to be added and the iIndex of the document in that Vvolume) about the document that has been added.

N/A

Output Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

Prototype

int WINAPI NGISAddDocument_MT (  SOCKET * phSock, LPTSTR siteAddress,        

                                                                    short portId, LPTSTR cabinetName,short volumeId,

                                 LPTSTR fileName, LPRECOVERDOCDB docDBData,

                                 LPTSTR userUserIndex, LPISINDEX newIsIndex

          )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

phSock

A pointer to a variable of type SOCKET, which encapsulates a handle to a socket object to the JTS.

A valid socket connection to JTS

Input Parameter

siteAddress

IP address on which JTS server is running.

IP address where JTS running

Input Parameter

portId

Port on which JTS Server is running.

short>0

Input Parameter

cabinetName

Name of the Image Cabinet to which User wants to connect.

Not Null

Input Parameter

volumeId

Index of Volume in  which document is to be added into the SMS.

short>0

Input Parameter

fileName

Full path of resource through which Image serverImage Server can get full data to upload.

Not Null

Input Parameter

docDBData

A pointer to a variable of type RECOVERDOCDB.

This information is not used at present.

 

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

newIsIndex

A pointer to a variable of type ISINDEX .The structure ISINDEX is returned by the image serverImage Server, which contains information (viz. indexIndex of the Volume in which document added and the indexIndex of the document in that volume) about the document that has been added.

N/A

Output Parameter

 

Output Parameters

This method returns an integer that will be 1 in case of success else an error code will be returned.

 

 

Usage in Java Application

 

Prototype

public int JPISAddDoc (   String cabinetName, short volumeId, String fileName,           

            JPDBRecoverDocData docDBData, JPISIsIndex isIndex,

            JPDBInteger noOfSites, Vector repStatList

        )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

cabinetName

Name of the Image Cabinet to which User wants to connect.

Not Null

Input Parameter

volumeId

Index of Volume in which document is to be added into the SMS.

short>0

Input Parameter

fileName

Full path of resource through which Image serverImage Server can get full data to upload.

Not Null

Input Parameter

docDBData

An object of type JPDBRecoverDocData. This information is not used at present but object returned by the default constructor should be sent.

 

Input Parameter

isIndex

An object of type JPISIsIndex is returned by the image serverImage Server, which contains information (viz. indexIndex of the Volume in which document added and the indexIndex of the document in that volume) about the document, which has been added.

N/A

Output Parameter

noOfSites

Number Indicating   at how many sites Replication was done.

N/A

Output Parameter

repStatList

Vector of JPISDocRepStat objects. Members of JPISDocRepStat indicate the Site Id and a Boolean indicating whether replication of document on that site was done successfully or not.

N/A

Output Parameter

 

Output Parameters

This method returns an integer, which will be 1 in case of success else an error code will be returned.

 

Prototype

public int JPISAddDocument _MT (  JtsConnection jtsCon,String jtsAddress,

short portId,String cabinetName, short volumeId,

String fileName,JPDBRecoverDocData docDBData,

String userUserIndex, JPISIsIndex newIsIndex

                           )

 

Input Parameters description

Name

Description

Valid Values

Type Of Parameter

jtsCon

This object holds a connection to the JTS. However it can be sent as null as a new socket connection to jts using second two parameters (jtsAddress and portId) is created inside the function when the parameter is sent as null.

Object of class JtsConnection having a connection to JTS

Input Parameter

jtsAddress

IP address on which JTS server is running.

IP address where JTS running

Input Parameter

portId

Port on which  JTS Server is running.

short>0

Input Parameter

cabinetName

Name of the Image Cabinet to which User wants to connect.

Not Null

Input Parameter

volumeId

Index of Volume in which document is to be added into the SMS.

short>0

Input Parameter

fileName

Full path of resource through which Image serverImage Server can get full data to upload.

Not null

Input Parameter

docDBData

An object of type JPDBRecoverDocData. This information is not used at present but object returned by the default constructor should be sent.

 

Input Parameter

UserIndex

This parameter is reserved and it can be used with the default value.

null

Input Parameter

newIsIndex

An object of type JPISIsIndex is returned by the image serverImage Server, which contains information (namely, indexIndex of the Volume in which document added and the indexIndex of the document in that volume) about the document that has been added.

N/A

Output Parameter

 

Output Parameters

This method returns an integer, which will be 1 in case of success else an error code will be returned.