All Frameworks Class Hierarchy This Framework Next Indexes
ENOVaultClientCPP Class ENOVIVaultDocument
ENOVIVaultDocument
Usage: you must use this class as is. You should never derive it.
public class ENOVIVaultDocument
This class supplies methods to manage documents.
role: This class enables to access properties and content of a document
Method Index
- o
close(ENOVIVaultError&)
- Ends the Read, Write or ReadWrite sequence.
- o
copyFromLocalFile(CATUnicodeString&,CATBoolean,ENOVIVaultError&)
- Copy the local document on server.
- o
copyToLocalFile(CATUnicodeString&,CATBoolean,ENOVIVaultError&)
- Copy the server document into a local file.
- o
getCKSum(unsigned long&,ENOVIVaultError&)
- Supplies the document cksum.
- o
getCreationTimestamp(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document creation date.
- o
getCurPos(unsigned long&,ENOVIVaultError&)
- Supplies the current position in the document you are accessing.
- o
getDescription(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document description.
- o
getEXTOId(SEQUENCE_octet&,ENOVIVaultError&)
- Supplies the document external object identifier.
- o
getFatherUserSession(ENOVIVaultUserSession**)
- Get the Father ENOVIVaultUserSession.
- o
getGMTLastModTimestamp(CATLONG64&,ENOVIVaultError&)
- Supplies the document last modification date in GMT time.
- o
getLastModTimestamp(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document last modification date.
- o
getLocationPath(CATUnicodeString&,ENOVIVaultError&)
- Supplies when possible and according to transfer protocols, the full path name of the ENOVIVault
document.
- o
getMimeType(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document mimetype.
- o
getName(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document name.
- o
getOId(SEQUENCE_octet&)
- Supplies the ENOVIVaultDocument Object Identifier.
- o
getOriginalHost(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document original host.
- o
getOriginalName(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document original name.
- o
getOriginalPath(CATUnicodeString&,ENOVIVaultError&)
- Supplies the document original path.
- o
getSize(unsigned long&,ENOVIVaultError&)
- Supplies the document size.
- o
getStatus(int&,ENOVIVaultError&)
- Supplies the ENOVIVaultDocument status.
- o
getURL(SEQUENCE_octet&)
- Supplies the ENOVIVaultDocument Unique Universal Identifier.
- o
isCached(CATBoolean&,ENOVIVaultError&)
- Specifies if the document is cached or not.
- o
openRead(ENOVIVaultError&)
- Initiates a document read operation.
- o
openReadWrite(CATBoolean,ENOVIVaultError&)
- Initiates a document read write operation.
- o
openWrite(unsigned long,CATBoolean,ENOVIVaultError&)
- Initiates a document write operation.
- o
read(long,SEQUENCE_octet&,ENOVIVaultError&)
- Reads the whole document content into a bytes array.
- o
readBlock(SEQUENCE_octet&,long,long,long&,ENOVIVaultError&)
- Read a data block beginning at the current position from the server document
into a bytes array.
- o
refresh(ENOVIVaultError&)
- Refresh this document if it is a cached document and it is not up-to-date.
- o
setCurPos(unsigned long,ENOVIVaultError&)
- Set the current position in the document you are accessing.
- o
setDescription(CATUnicodeString&,ENOVIVaultError&)
- Set the document description.
- o
setEXTOId(SEQUENCE_octet&,ENOVIVaultError&)
- Sets the document external object identifier.
- o
setMimeType(CATUnicodeString&,ENOVIVaultError&)
- Set the ENOVIVaultDocument mimetype.
- o
setName(CATUnicodeString&,ENOVIVaultError&)
- Sets the document name.
- o
setOriginalHost(CATUnicodeString&,ENOVIVaultError&)
- Sets the document original host.
- o
setOriginalName(CATUnicodeString&,ENOVIVaultError&)
- Sets the document original name.
- o
setOriginalPath(CATUnicodeString&,ENOVIVaultError&)
- Sets the document original path.
- o
write(long,SEQUENCE_octet&,ENOVIVaultError&)
- Write the whole document on server from a bytes array.
- o
writeBlock(SEQUENCE_octet&,long,long,ENOVIVaultError&)
- Write a data block on server beginning at the current position from a bytes array.
Methods
o close
-
Ends the Read, Write or ReadWrite sequence. Reset the current position to the document
beginning.
Delete local file if needed.
- Returns:
- S_OK, S_ALREADY_CLOSE, S_NOT_OPEN, E_FAIL
o copyFromLocalFile
-
Copy 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
- [in] - local document to write full path name.
- iDeleteLocalFileAtClose
- [in] - if set ot true, the local file will be deleted at close time.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN_WRITE, VAULT_E_NO_LOCALFILEFULLPATHNAME, VAULT_E_MEDIUM_FULL
o copyToLocalFile
-
Copy 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
- [in] - full path name under which the consumer application want the document to be copied.
- iDeleteLocalFileAtClose
- [in] - if set ot true, the local file will be deleted at close time.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN_READ, VAULT_E_MEDIUM_FULL
o getCKSum
-
Supplies the document cksum.
- Parameters:
-
- oDocumentCKSum
- [out] - ENOVIVaultDocument size.
- oVaultError
- [out] - Details about the error.
o getCreationTimestamp
-
Supplies the document creation date.
- Parameters:
-
- oCreationTimestamp
- [out] - ENOVIVaultDocument creation date.
- oVaultError
- [out] - Details about the error.
o getCurPos
-
Supplies the current position in the document you are accessing.
Precondition: The document must have been openned
- Parameters:
-
- oCurPos
- [out] - current position in the document.
- oVaultError
- [out] - Details about the error.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN
o getDescription
-
Supplies the document description.
- Parameters:
-
- oDescription
- [out] - ENOVIVaultDocument description.
- oVaultError
- [out] - Details about the error.
o getEXTOId
-
Supplies the document external object identifier.
- Parameters:
-
- oEXTOId
- [out] - ENOVIVaultDocument external object identifier.
- oVaultError
- [out] - Details about the error.
o getFatherUserSession
-
Get the Father ENOVIVaultUserSession.
- Parameters:
-
- oFatherUserSession
- [out] - Father ENOVIVaultUserSession.
o getGMTLastModTimestamp
-
Supplies the document last modification date in GMT time.
- Parameters:
-
- onvLastTimestamp
- [out] - ENOVIVaultDocument last modification date.
- oVaultError
- [out] - Details about the error.
o getLastModTimestamp
-
Supplies the document last modification date.
- Parameters:
-
- oLastTimestamp
- [out] - ENOVIVaultDocument last modification date.
- oVaultError
- [out] - Details about the error.
o getLocationPath
-
Supplies when possible and according to transfer protocols, the full path name of the ENOVIVault
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.
- Parameters:
-
- oFullPath
- [out] - full path name of the vault document on the ENOVIVault server
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN, VAULT_E_NO_LOCATION_AVAILABLE
o getMimeType
-
Supplies the document mimetype.
- Parameters:
-
- oMimetype
- [out] - ENOVIVaultDocument mimetype.
- oVaultError
- [out] - Details about the error.
o getName
-
Supplies the document name.
- Parameters:
-
- oName
- [out] - ENOVIVaultDocument name.
- oVaultError
- [out] - Details about the error.
o getOId
public HRESULT getOId( | SEQUENCE_octet& | oOId) const |
-
Supplies the ENOVIVaultDocument Object Identifier.
- Parameters:
-
- oOId
- [out] - ENOVIVaultDocument Object Identifier.
- Returns:
- S_OK, E_FAIL
o getOriginalHost
-
Supplies the document original host.
- Parameters:
-
- oOriginalHost
- [out] - ENOVIVaultDocument original host.
- oVaultError
- [out] - Details about the error.
o getOriginalName
-
Supplies the document original name.
- Parameters:
-
- oOriginalName
- [out] - ENOVIVaultDocument original name.
- oVaultError
- [out] - Details about the error.
o getOriginalPath
-
Supplies the document original path.
- Parameters:
-
- oOriginalPath
- [out] - ENOVIVaultDocument original path.
- oVaultError
- [out] - Details about the error.
o getSize
-
Supplies the document size.
- Parameters:
-
- oDocumentSize
- [out] - ENOVIVaultDocument size.
- oVaultError
- [out] - Details about the error.
o getStatus
-
Supplies the ENOVIVaultDocument status.
- Parameters:
-
- oStatus
- [out] - ENOVIVaultDocument status. It can be:
Legal Values: iAction may be set to:
- CREATED
- To indicate that the document have been created.
- UPDATED
- To indicate that the document has been updated.
- DELETED
- To indicate that the document has been deleted.
- COMMITTED
- To indicate that there is no ongoing modification on the document.
o getURL
public HRESULT getURL( | SEQUENCE_octet& | oURL) const |
-
Supplies the ENOVIVaultDocument Unique Universal Identifier.
- Parameters:
-
- oURL
- [out] - ENOVIVaultDocument Unique Universal Identifier.
o isCached
-
Specifies if the document is cached or not.
- Parameters:
-
- oIsDocCached
- [out] - true if the document is cached, false otherwise.
- Returns:
- S_OK, E_FAIL
o openRead
-
Initiates a document read operation.
It gives access to the last committed view. At open time
the current position is set to the document beginning (value zero).
- Parameters:
-
- oVaultError
- [out] - Details about the error.
- Returns:
- S_OK, E_FAIL, VAULT_E_LOCKED, VAULT_E_ALREADY_OPEN
o openReadWrite
-
Initiates a document read write operation.
To be successful, it supposes that the 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 server side
off.
Prefer others read or write methods than this one if possible.
- Parameters:
-
- iFullDocWritePlanned
- [in] - indicates if you are planning to write the whole document.
Legal Values:
- CATTrue
- To indicate that the whole document will be written.
- CATFalse
- To indicate that only part of the document will be written.
- oVaultError
- [out] - Details about the error.
- Returns:
- S_OK, E_FAIL, VAULT_E_LOCKED, VAULT_E_ALREADY_OPEN
o openWrite
-
Initiates a document write operation.
To be successful, it supposes that the document
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 ENOVIVault server side
off when the iFullDocWritePlanned parameter is set to false.
Set iFullDocWritePlanned to true each time it is possible.
- Parameters:
-
- iDocSize
- [in] - document size in bytes.
Legal Values: iDocSize setted to zero means that you do not know the document size.
- iFullDocWritePlanned
- [in] - indicates if you are planning to write the whole document.
Legal Values:
- CATTrue
- To indicate that the whole document will be written.
- CATFalse
- To indicate that only part of the document will be written.
- oVaultError
- [out] - Details about the error.
- Returns:
- S_OK, E_FAIL, VAULT_E_LOCKED, VAULT_E_MEDIUM_FULL, VAULT_E_ALREADY_OPEN
o read
-
Reads the whole document content into a bytes array.
The current position is set to the document end after this operation.
You are supposed to allocate and release the data buffer oReadBuffer.
This service uses the above
ReadBlock method to be efficient and performe the whole read sequence by block.
- Parameters:
-
- iSizeToRead
- [in] - data buffer to read size
- oReadBuffer
- [out] - data buffer read from server.
- oVaultError
- [out] - Details about the error.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN_READ
o readBlock
public HRESULT readBlock( | SEQUENCE_octet& | ioReadBuffer, |
| const long | iOffset, |
| const long | iSizeToRead, |
| long& | oLengthRead, |
| ENOVIVaultError& | oVaultError) |
-
Read 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 oReadBuffer.
- Parameters:
-
- ioReadBuffer
- [inout] - data buffer read from server.
- iOffset
- [in] - offset in the input/output buffer.
- iSizeToRead
- [in] - data buffer to read size.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN
o refresh
-
Refresh this document if it is a cached document and it is not up-to-date.
o setCurPos
-
Set the current position in the document you are accessing.
Precondition: The document must have been openned
- Parameters:
-
- iNewCurPos
- [in] - new current position in the document.
- oVaultError
- [out] - Details about the error.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN
o setDescription
-
Set the document description.
- Parameters:
-
- iDescription
- [in] - ENOVIVaultDocument description.
- oVaultError
- [out] - Details about the error.
o setEXTOId
-
Sets the document external object identifier.
- Parameters:
-
- iEXTOId
- [in] - ENOVIVaultDocument external object identifier.
- oVaultError
- [out] - Details about the error.
o setMimeType
-
Set the ENOVIVaultDocument mimetype.
- Parameters:
-
- iMimetype
- [in] - ENOVIVaultDocument mimetype.
- oVaultError
- [out] - Details about the error.
o setName
-
Sets the document name.
- Parameters:
-
- iName
- [in] - ENOVIVaultDocument name.
- oVaultError
- [out] - Details about the error.
o setOriginalHost
-
Sets the document original host.
- Parameters:
-
- iOriginalHost
- [out] - ENOVIVaultDocument original host.
- oVaultError
- [out] - Details about the error.
o setOriginalName
-
Sets the document original name.
- Parameters:
-
- iOriginalName
- [in] - ENOVIVaultDocument original name.
- oVaultError
- [out] - Details about the error.
o setOriginalPath
-
Sets the document original path.
- Parameters:
-
- iOriginalPath
- [in] - ENOVIVaultDocument original path.
- oVaultError
- [out] - Details about the error.
o write
-
Write the whole document on server from 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 iBufferToWrite.
This service use the above WriteBlock call to be efficient and performe the whole write sequence
by block.
- Parameters:
-
- iSizeToWrite
- [in] - number of bytes to write on server.
- iBufferToWrite
- [in] - data buffer to write on server.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN_WRITE, VAULT_E_MEDIUM_FULL
o writeBlock
public HRESULT writeBlock( | const SEQUENCE_octet& | iBufferToWrite, |
| const long | iOffset, |
| const long | iSizeToWrite, |
| ENOVIVaultError& | oVaultError) |
-
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. You are suppose to allocate and release
the
data buffer iBufferToWrite.
- Parameters:
-
- iBufferToWrite
- [in] - data block to write on server.
- iOffset
- [in] - offset in the input buffer.
- iSizeToWrite
- [in] - number of bytes to write on server.
- Returns:
- S_OK, E_FAIL, VAULT_E_NOT_OPEN_WRITE, VAULT_E_MEDIUM_FULL
This object is included in the file: ENOVIVaultDocument.h
If needed, your Imakefile.mk should include the module: ENOVIVaultClientAPP