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.

Version:
V5R8
Field Summary
public static final int COMMITTED
public static final int CREATED
public static final int DELETED
public static final int EXCLUSIVELOCK
public static final int UPDATED

Constructor Summary

Method Summary
public void close()
Ends the Read, Write or ReadWrite sequence.
public void close(boolean ibvNoRefresh)
public void close(boolean ibvNoRefresh, boolean ibvResetLockStatus)
public void close(int invDocSize)
public void copyDocValueFromDoc(ENOVIVaultDocument origin)
public void copyFromLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose)
Copies the local document on server.
public void copyToLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose)
Copies the server document into a local file.
public void copyToLocalFile(String iLocalFullPathName, boolean iDeleteLocalFileAtClose, boolean ibvNoRefresh)
public int getBlockSize()
Supplies the Block size.
public long getCKSum()
Supplies the VaultDocument cksum.
public String getCreationTimestamp()
Supplies the IVaultDocument creation Date.
public int getCurPos()
Supplies the current position in the document you are accessing.
public String getDescription()
Supplies the IVaultDocument description.
public byte[] getEXTOId()
Supplies the IVaultDocument External Object Identifier.
public ENOVIVaultUserSession getFatherUserSession()
Gets the Father ENOVIVaultUserSession.
public VaultDocCreatLastModTimestampHolder getGMTCreatLastModTimestamp()
Supplies the VaultDocument creation Date in milli second GMT time.
public long getGMTLastModTimestamp()
Supplies the VaultDocument last modification Date in milli second GMT time.
public String getLastModTimestamp()
Supplies the IVaultDocument last modification Date.
public 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.
public ENOVIDocMandAttHolder getMandAttr()
public String getMimeType()
Supplies the IVaultDocument mimetype.
public String getName()
Supplies the IVaultDocument name.
public byte[] getOId()
public String getOriginalHost()
Supplies the IVaultDocument OriginalHost.
public String getOriginalName()
Supplies the IVaultDocument OriginalName.
public String getOriginalPath()
Supplies the IVaultDocument OriginalPath.
public int getSize()
Supplies the IVaultDocument size.
public int getStatus()
Supplies the IVaultDocument status.
public byte[] getURL()
Supplies the IVaultDocument Unique Universal Identifier.
public boolean isCached()
Specifies if the document is cached or not.
public void openRead()
Initiate a document read operation.
public void openRead(boolean ibvNoRefresh)
public void openReadWrite(boolean iFullDocWritePlanned)
Initiate a document read write operation.
Deprecated.
public void openWrite(int iDocSize, boolean iFullDocWritePlanned)
Initiate a document write operation.
public void openWrite(int iDocSize, boolean iFullDocWritePlanned, String isvAliasName, String isvServiceName, String isvHostName, int invListenPort)
public int read(byte[] ReadBuffer)
Reads the whole server document into a bytes array.
public 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.
public int readBlock(byte[] dataBuffer, int off, int len, boolean ibvNoRefresh)
public void refresh()
Refresh this document if it is a cached document and it is not up-to-date.
public void setCurPos(int iNewCurPos)
Sets the current position in the document you are accessing.
public void setDescription(String iDescription)
Sets the IVaultDocument description.
public void setEXTOId(byte[] iEXTOId)
Sets the IVaultDocument External Object Identifier.
public void setMimeType(String iMimetype)
Sets the IVaultDocument mimetype.
public void setName(String iName)
Sets the IVaultDocument name.
public void setOriginalHost(String iOriginalHost)
Sets the IVaultDocument OriginalHost.
public void setOriginalName(String iOriginalName)
Sets the IVaultDocument OriginalName.
public void setOriginalPath(String iOriginalPath)
Sets the IVaultDocument OriginalPath.
public void write(byte[] iBufferToWrite)
Write the whole document on server from a bytes array.
public void writeBlock(byte[] iBufferToWrite, int off, int len)
Write a data block on server beginning at the current position from a bytes array.


Field Detail

COMMITTED

    public static final int COMMITTED


CREATED

    public static final int CREATED


DELETED

    public static final int DELETED


EXCLUSIVELOCK

    public static final int EXCLUSIVELOCK


UPDATED

    public static final int UPDATED


Constructor Detail

Method Detail

close

    public void close()

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

Throws:
ENOVIVaultError -
Since:
V5R7

close

    public void close(boolean ibvNoRefresh)


close

    public void close(boolean ibvNoRefresh, boolean ibvResetLockStatus)


close

    public void close(int invDocSize)


copyDocValueFromDoc

    public void copyDocValueFromDoc(ENOVIVaultDocument origin)


copyFromLocalFile

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7

copyToLocalFile

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7

copyToLocalFile

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


getBlockSize

    public int getBlockSize()

Supplies the Block size.

Return:
S_OK, E_FAIL

getCKSum

    public long getCKSum()

Supplies the VaultDocument cksum.

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

getCreationTimestamp

    public String getCreationTimestamp()

Supplies the IVaultDocument creation Date.

Return:
IVaultDocument creation Date.
Throws:
ENOVIVaultError -
Since:
V5R7

getCurPos

    public int getCurPos()

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

Return:
current position in the document.
Throws:
ENOVIVaultError -
Since:
V5R7

getDescription

    public String getDescription()

Supplies the IVaultDocument description.

Return:
IVaultDocument description.
Throws:
ENOVIVaultError -
Since:
V5R7

getEXTOId

    public byte[] getEXTOId()

Supplies the IVaultDocument External Object Identifier.

Return:
IVaultDocument External Object Identifier.
Throws:
ENOVIVaultError -
Since:
V5R8

getFatherUserSession

    public ENOVIVaultUserSession getFatherUserSession()

Gets the Father ENOVIVaultUserSession.

Return:
Father ENOVIVaultUserSession.
Since:
V5R7

getGMTCreatLastModTimestamp

    public VaultDocCreatLastModTimestampHolder getGMTCreatLastModTimestamp()

Supplies the VaultDocument creation Date in milli second GMT time.

Return:
VaultDocument creation Date.
Since:
V5R20

getGMTLastModTimestamp

    public long getGMTLastModTimestamp()

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

Parameters:
oGMTLastTimestamp
[out] - VaultDocument last modification Date.
Return:
S_OK, E_FAIL
Since:
V5R13

getLastModTimestamp

    public String getLastModTimestamp()

Supplies the IVaultDocument last modification Date.

Return:
IVaultDocument last modification Date.
Throws:
ENOVIVaultError -
Since:
V5R7

getLocationPath

    public 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.

Return:
full path name of the IVaultDocument on the Vault server
Throws:
ENOVIVaultError -
Since:
V5R7

getMandAttr

    public ENOVIDocMandAttHolder getMandAttr()

Throws:
ENOVIVaultError -

getMimeType

    public String getMimeType()

Supplies the IVaultDocument mimetype.

Return:
IVaultDocument mimetype.
Throws:
ENOVIVaultError -
Since:
V5R7

getName

    public String getName()

Supplies the IVaultDocument name.

Return:
IVaultDocument name.
Throws:
ENOVIVaultError -
Since:
V5R7

getOId

    public byte[] getOId()


getOriginalHost

    public String getOriginalHost()

Supplies the IVaultDocument OriginalHost.

Return:
the IVaultDocument OriginalHost.
Throws:
ENOVIVaultError -
Since:
V5R7

getOriginalName

    public String getOriginalName()

Supplies the IVaultDocument OriginalName.

Return:
the IVaultDocument OriginalName.
Throws:
ENOVIVaultError -
Since:
V5R7

getOriginalPath

    public String getOriginalPath()

Supplies the IVaultDocument OriginalPath.

Return:
the IVaultDocument OriginalPath.
Throws:
ENOVIVaultError -
Since:
V5R7

getSize

    public int getSize()

Supplies the IVaultDocument size.

Return:
IVaultDocument size.
Throws:
ENOVIVaultError -
Since:
V5R7

getStatus

    public int getStatus()

Supplies the IVaultDocument status.

Return:
IVaultDocument status. It can be: CREATED UPDATED DELETED COMMITTED
Throws:
ENOVIVaultError -

getURL

    public byte[] getURL()

Supplies the IVaultDocument Unique Universal Identifier.

Return:
IVaultDocument Unique Universal Identifier.
Since:
V5R7

isCached

    public boolean isCached()

Specifies if the document is cached or not.

Return:
true if the document is cached, false otherwise.
Since:
V5R10

openRead

    public 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).

Throws:
ENOVIVaultError -
Since:
V5R7

openRead

    public void openRead(boolean ibvNoRefresh)


openReadWrite

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7

openWrite

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7

openWrite

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


read

    public 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.
Return:
real length read.
Throws:
ENOVIVaultError -
Since:
V5R7

readBlock

    public 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.
Return:
number of read bytes.
Throws:
ENOVIVaultError -
Since:
V5R7

readBlock

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


refresh

    public void refresh()

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

Since:
V5R10

setCurPos

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7

setDescription

    public void setDescription(String iDescription)

Sets the IVaultDocument description.

Throws:
ENOVIVaultError -
Since:
V5R7

setEXTOId

    public void setEXTOId(byte[] iEXTOId)

Sets the IVaultDocument External Object Identifier.

Throws:
ENOVIVaultError -
Since:
V5R8

setMimeType

    public void setMimeType(String iMimetype)

Sets the IVaultDocument mimetype.

Parameters:
iMimetype
IVaultDocument mimetype.
Throws:
ENOVIVaultError -
Since:
V5R7

setName

    public void setName(String iName)

Sets the IVaultDocument name.

Parameters:
iName
IVaultDocument name.
Throws:
ENOVIVaultError -
Since:
V5R7

setOriginalHost

    public void setOriginalHost(String iOriginalHost)

Sets the IVaultDocument OriginalHost.

Parameters:
iOriginalHost
IVaultDocument OriginalHost.
Throws:
ENOVIVaultError -
Since:
V5R7

setOriginalName

    public void setOriginalName(String iOriginalName)

Sets the IVaultDocument OriginalName.

Parameters:
iOriginalName
IVaultDocument OriginalName.
Throws:
ENOVIVaultError -
Since:
V5R7

setOriginalPath

    public void setOriginalPath(String iOriginalPath)

Sets the IVaultDocument OriginalPath.

Parameters:
iOriginalPath
IVaultDocument OriginalPath.
Throws:
ENOVIVaultError -
Since:
V5R7

write

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7

writeBlock

    public 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.
Throws:
ENOVIVaultError -
Since:
V5R7


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