Package com.dassault_systemes.enovaultclientjava.vdk0vaultclient

   
Interface ENOVIVaultDocument

 
Class Hierarchy
com.dassault_systemes.enovaultclientjava.vdk0vaultclient.ENOVIVaultDocument
Class Location

Framework : ENOVaultClientJAVA

Module : VDK0VaultClient

Class Description

public interface ENOVIVaultDocument

This interfaces supplies methods to manage documents.

Field Summary
int CREATED
int UPDATED
int DELETED
int COMMITTED
int EXCLUSIVELOCK

Constructor Summary

Method Summary
byte[] getOId()
byte[] getEXTOId()
void setEXTOId(byte[] iEXTOId)
byte[] getURL()
ENOVIVaultUserSession getFatherUserSession()
int getStatus()
ENOVIDocMandAttHolder getMandAttr()
String getCreationTimestamp()
VaultDocCreatLastModTimestampHolder getGMTCreatLastModTimestamp()
String getLastModTimestamp()
long getGMTLastModTimestamp()
String getName()
String getDescription()
int getSize()
long getCKSum()
String getMimeType()
void setName(String iName)
void setDescription(String iDescription)
void setMimeType(String iMimetype)
String getOriginalName()
String getOriginalPath()
String getOriginalHost()
void setOriginalName(String iOriginalName)
void setOriginalPath(String iOriginalPath)
void setOriginalHost(String iOriginalHost)
void openRead()
void openRead(boolean ibvNoRefresh)
void openWrite(int iDocSize, boolean iFullDocWritePlanned)
void openWrite(int iDocSize, boolean iFullDocWritePlanned, String isvAliasName, String isvServiceName, String isvHostName, int invListenPort)
void openReadWrite(boolean iFullDocWritePlanned)
int getCurPos()
void setCurPos(int iNewCurPos)
int readBlock(byte[] dataBuffer, int off, int len)
int readBlock(byte[] dataBuffer, int off, int len, boolean ibvNoRefresh)
void copyToLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose)
void copyToLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose, boolean ibvNoRefresh)
int read(byte[] ReadBuffer)
void writeBlock(byte[] iBufferToWrite, int off, int len)
void copyFromLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose)
void copyDocValueFromDoc(ENOVIVaultDocument origin)
void write(byte[] iBufferToWrite)
String getLocationPath()
void close()
void close(boolean ibvNoRefresh)
void close(boolean ibvNoRefresh, boolean ibvResetLockStatus)
void close(int invDocSize)
boolean isCached()
void refresh()
int getBlockSize()


Field Detail

CREATED

    int CREATED


UPDATED

    int UPDATED


DELETED

    int DELETED


COMMITTED

    int COMMITTED


EXCLUSIVELOCK

    int EXCLUSIVELOCK


Constructor Detail

Method Detail

getOId

    byte[] getOId()


getEXTOId

    byte[] getEXTOId()

Supplies the IVaultDocument External Object Identifier.

Returns:
IVaultDocument External Object Identifier.

setEXTOId

    void setEXTOId(byte[] iEXTOId)

Sets the IVaultDocument External Object Identifier.


getURL

    byte[] getURL()

Supplies the IVaultDocument Unique Universal Identifier.

Returns:
IVaultDocument Unique Universal Identifier.

getFatherUserSession

    ENOVIVaultUserSession getFatherUserSession()

Gets the Father ENOVIVaultUserSession.

Returns:
Father ENOVIVaultUserSession.

getStatus

    int getStatus()

Supplies the IVaultDocument status.

Returns:
IVaultDocument status. It can be: CREATED UPDATED DELETED COMMITTED

getMandAttr

    ENOVIDocMandAttHolder getMandAttr()


getCreationTimestamp

    String getCreationTimestamp()

Supplies the IVaultDocument creation Date.

Returns:
IVaultDocument creation Date.

getGMTCreatLastModTimestamp

    VaultDocCreatLastModTimestampHolder getGMTCreatLastModTimestamp()

Supplies the VaultDocument creation Date in milli second GMT time.

Returns:
VaultDocument creation Date.

getLastModTimestamp

    String getLastModTimestamp()

Supplies the IVaultDocument last modification Date.

Returns:
IVaultDocument last modification Date.

getGMTLastModTimestamp

    long getGMTLastModTimestamp()

Supplies the VaultDocument last modification Date in milli second GMT time.

Parameters:
oGMTLastTimestamp
[out] - VaultDocument last modification Date.
Returns:
S_OK, E_FAIL

getName

    String getName()

Supplies the IVaultDocument name.

Returns:
IVaultDocument name.

getDescription

    String getDescription()

Supplies the IVaultDocument description.

Returns:
IVaultDocument description.

getSize

    int getSize()

Supplies the IVaultDocument size.

Returns:
IVaultDocument size.

getCKSum

    long getCKSum()

Supplies the VaultDocument cksum.

Parameters:
oDescription
[out] - VaultDocument CKSum (Cyclic Redundance check).
Returns:
S_OK, E_FAIL

getMimeType

    String getMimeType()

Supplies the IVaultDocument mimetype.

Returns:
IVaultDocument mimetype.

setName

    void setName(String iName)

Sets the IVaultDocument name.

Parameters:
iName
IVaultDocument name.

setDescription

    void setDescription(String iDescription)

Sets the IVaultDocument description.


setMimeType

    void setMimeType(String iMimetype)

Sets the IVaultDocument mimetype.

Parameters:
iMimetype
IVaultDocument mimetype.

getOriginalName

    String getOriginalName()

Supplies the IVaultDocument OriginalName.

Returns:
the IVaultDocument OriginalName.

getOriginalPath

    String getOriginalPath()

Supplies the IVaultDocument OriginalPath.

Returns:
the IVaultDocument OriginalPath.

getOriginalHost

    String getOriginalHost()

Supplies the IVaultDocument OriginalHost.

Returns:
the IVaultDocument OriginalHost.

setOriginalName

    void setOriginalName(String iOriginalName)

Sets the IVaultDocument OriginalName.

Parameters:
iOriginalName
IVaultDocument OriginalName.

setOriginalPath

    void setOriginalPath(String iOriginalPath)

Sets the IVaultDocument OriginalPath.

Parameters:
iOriginalPath
IVaultDocument OriginalPath.

setOriginalHost

    void setOriginalHost(String iOriginalHost)

Sets the IVaultDocument OriginalHost.

Parameters:
iOriginalHost
IVaultDocument OriginalHost.

openRead

    void openRead()

Initiate a document read operation. It give access to the last committed view. At open time
the current position is set to the document beginning (value zero).


openRead

    void openRead(boolean ibvNoRefresh)


openWrite

    void openWrite(int iDocSize, boolean iFullDocWritePlanned)

Initiate a document write operation. To be successful, it supposes that the IVaultDocument
is not under modification. Put the size of the document to write when it is possible.
It should always be the case, else put the value zero by default. At open time the current
position is set to the document beginning (value zero).
Performance issue: Be carefull that this call trigger a document copy on Vault Server side off when iFullDocWritePlanned parameter is set to false.
Set iFullDocWritePlanned to true each time it is possible.

Parameters:
iDocSize
document size in bytes. Value zero means that you do not know the document size.
iFullDocWritePlanned
if set to true, you are planning to write the whole document.

openWrite

    void openWrite(int iDocSize, boolean iFullDocWritePlanned, String isvAliasName, String isvServiceName, String isvHostName, int invListenPort)


openReadWrite

    void openReadWrite(boolean iFullDocWritePlanned)

Initiate a document read write operation. To be successful, it supposes that the IVault document
is not under modification. It give access to the last committed view.
Performance issue: Be carefull that this call trigger a document copy on Vault Server side off.
Prefer others read or write methods than this one if possible.

Deprecated.

Parameters:
iFullDocWritePlanned
if set to true, you are planning to write the whole document.

getCurPos

    int getCurPos()

Supplies the current position in the document you are accessing. It supposes the document
to be open.

Returns:
current position in the document.

setCurPos

    void setCurPos(int iNewCurPos)

Sets the current position in the document you are accessing. It supposes the document
to be open.

Parameters:
iNewCurPos
new current position in the document.

readBlock

    int readBlock(byte[] dataBuffer, int off, int len)

Reads a data block beginning at the current position from the server document
into a bytes array. The current position is updated after the block read operation.
You are suppose to allocate and release the data buffer ReadBuffer.

Parameters:
byte
array which gives size to read.
Returns:
number of read bytes.

readBlock

    int readBlock(byte[] dataBuffer, int off, int len, boolean ibvNoRefresh)


copyToLocalFile

    void copyToLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose)

Copies the server document into a local file. The local file full path name is not mandatory.
You may give only the file name or even nothing. Then use the getLocationPath method to get
the local file full path name. The current position is set to the document end after this operation.

Parameters:
iLocalFullPathName
full path name under which the consumer application want the document to be copied.
iDeleteLocalFileAtClose
if set ot true, the local file will be deleted at close time.

copyToLocalFile

    void copyToLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose, boolean ibvNoRefresh)


read

    int read(byte[] ReadBuffer)

Reads the whole server document into a bytes array. The current position is set to the document
end after this operation. You are suppose to allocate and release the data buffer ReadBuffer.
This service use the above ReadBlock call to be efficient and performe the whole read sequence by block.

Parameters:
allocated
byte array.
Returns:
real length read.

writeBlock

    void writeBlock(byte[] iBufferToWrite, int off, int len)

Write a data block on server beginning at the current position from a bytes array. The current
position is updated after the block write operation.

Parameters:
iBufferToWrite
data block to write on server.

copyFromLocalFile

    void copyFromLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose)

Copies the local document on server. The local file full path name is mandatory. The current position
is set to the document end after this operation.

Parameters:
iLocalFullPathName
local document to write full path name.
iDeleteLocalFileAtClose
if set ot true, the local file will be deleted at close time.

copyDocValueFromDoc

    void copyDocValueFromDoc(ENOVIVaultDocument origin)


write

    void write(byte[] iBufferToWrite)

Write the whole document on server from a bytes array. The current position is set to the document end.

Parameters:
iBufferToWrite
data buffer to write on server.

getLocationPath

    String getLocationPath()

Supplies when possible and according to transfer protocols, the full path name of the IVault document.
You will have an error if no open has been done on the document. If NFS transfer protocol is switched
on you will have the full path name on server side under which to write or read the document.
After a CopyXXXLocalFile operation, it will return the given LocalFullPathName.

Returns:
full path name of the IVaultDocument on the Vault server

close

    void close()

Ends the Read, Write or ReadWrite sequence. Reset the current position to the document beginning.
Delete local file if needed.


close

    void close(boolean ibvNoRefresh)


close

    void close(boolean ibvNoRefresh, boolean ibvResetLockStatus)


close

    void close(int invDocSize)


isCached

    boolean isCached()

Specifies if the document is cached or not.

Returns:
true if the document is cached, false otherwise.

refresh

    void refresh()

Refresh this document if it is a cached document and it is not up-to-date.


getBlockSize

    int getBlockSize()

Supplies the Block size.

Returns:
S_OK, E_FAIL


Copyright © 2000, Dassault Systèmes. All rights reserved