Package com.saperion.connector.rmi
Class AbstractDocRMIClientCommand
java.lang.Object
com.saperion.connector.rmi.AbstractRMIClientCommand
com.saperion.connector.rmi.AbstractFolderRMIClientCommand
com.saperion.connector.rmi.AbstractDocRMIClientCommand
- All Implemented Interfaces:
SaRMIClientCommand
- Direct Known Subclasses:
AbstractQueryRMIClientCommand
Class representing the methods used for manipulating documents.
-
Field Summary
Fields inherited from class com.saperion.connector.rmi.AbstractRMIClientCommand
APPEND_CONTENT, appl, credentials, LOGGER, props, session, sessionInfo, sysConnector, writeBufferSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncacheDocument
(boolean isNew, int commitMode, String versionComment, String xhDoc, String dbName, String acls) Stores the actual document to the backend.void
checkoutDocument
(String hDoc) Checkout the given document.void
checkoutDocument
(String hDoc, boolean withCloudShare, int[] shareBaseDocIds) Checkout the given document with filesystem/ShareBase.checkSapUrl
(String url) Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC.void
Clears all content of the opened document.final void
closeDocument
(com.saperion.jni.SaJNIDocHandle handle) Manually closing of a open document.createDocument
(String dbName, List<SaPropertyValue> values) Creates a new document with the given parameters.void
Stores the mapping information about Saperion document and External Storage foldercreateLink
(LinkInfo link) Creates a SAPERION Link into one Archive for an existing Document.deleteDocument
(int mode, String hDoc) Delete a document.int
deleteExternalStorageFolderMapping
(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) Deletes external storage mappings for given status and older than the given timevoid
Discards the document identified by the tokens handle.void
dsicardCheckout
(String hDoc) Discards the checkout of the given document.void
finishTransaction
(boolean commit) Finish the transaction in the backend system.getACLNames
(String hDoc) Reads the ACL's for the given document.getACLRights
(String[] acls) Reads the rights for the given acl's.getAcls()
Reads all existing ACLs.Deprecated.final String
getAnnotations
(String hDoc, int indexOfContentElement, boolean currentRevision) Reads the annotations from the given document.Fetches all folders of all External Storage services from where documents need to be uploadedgetExternalStorageFoldersForUpload
(ExternalStorageType storageType) Fetches all foldes of External Storage from where documents need to be uploadedgetExternalStorageMapping
(String sysRowId) Fetches the external storage mapping for the provided SysRowIdgetInvolvedUsers
(String hDoc) Reads all users involved in the set of ACL's.getLockInfo
(String sysRowId) Gets the lock info for a given node.Reads all locks from the given DDC.Reads all locks from the given DDC.com.saperion.jni.SaJNIDocAccessData
getNodeAccessData
(String hDoc) Opens the document identified by hdoc and returns an object containing all access right data information for the session user.byte[]
getThumbnail
(String hDoc, int widthX, int widthY, boolean color) Reads the thumbnail of the given document.boolean
Locks a node.void
logClientEvent
(String hdoc, SaConstants.ProtoEvents event, String remark) Adds an audit log event.com.saperion.jni.SaJNIReadBuffer
readDocumentFirst
(String hdoc, boolean currentRevision, int element) Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element.com.saperion.jni.SaJNIReadBuffer
readDocumentFirst
(String hdoc, boolean currentRevision, int element, boolean withAnnotations) Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element.com.saperion.jni.SaJNIReadBuffer
readDocumentNext
(com.saperion.jni.SaJNIDocHandle handle) Reads the next bytes from the open document, described in the handle.readVersionMetadata
(String versionID) Reads the version meta data of the document with the given ID.readVersionMetadata
(String versionID, boolean resolveLinks) Reads the version meta data of the document with the given ID.void
releaseDocument
(String hDoc, String comment) Release the given document.void
removeElement
(int element) Removes a existing content element.void
removeElement
(Integer[] elements) Removes a series of existing content elements.restoreVersion
(String versionID) Restores the given version to the actual version.saveDocument
(String hexUID, String dbName, List<SaPropertyValue> metadata) Saves the document paramaters to the document.saveDocument
(String hexUID, String dbName, List<SaPropertyValue> metadata, boolean resolveLinks) Saves the document paramaters to the document.setACLName
(String ddcname, String hDoc, String acl, int commitMode, String versionComment) Sets the given ACL to the node.final void
setAnnotations
(String hDoc, int indexOfContentElement, String annotations) Sets the given annotations to the document.void
setElementMark
(int element) Mark the content element.void
setVariables
(int element, Map<String, String> variables) Method to set the Variables for an Content-Object or the Structure itself.void
Starts a transaction in the backend system.storeDocument
(boolean isNew, int commitMode, String versionComment, String dbName, String acls) Stores the actual document to the backend.storeDocument
(boolean isNew, int commitMode, String versionComment, String dbName, String acls, boolean checkout) Stores the actual document to the backend.boolean
unlockNode
(String sysRowId, String ddcName) Unlocks a node.void
updateExternalStorageUploadStatus
(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) Updates the upload status of External Storage folderlong
writeContent
(ContentStream content) Writes the content of the document.long
writeContent
(InputStream stream) Writes the content of the document.final long
writeContent
(InputStream stream, String fileName, int element) final long
writeContent
(InputStream stream, String fileName, int element, boolean doStreaming) Writes the content of the document.
If the document size is less than SaConstants.JNI_BUFFER_SIZE than the default buffer size will be reduced and only one JNI call is initiated.Methods inherited from class com.saperion.connector.rmi.AbstractFolderRMIClientCommand
addToFolder, copyFolder, createFolder, deleteFolder, getDocumentFolderCount, getDocumentFolders, getFolderChildren, getFolderClass, getFolderFromPath, getFolderInfo, getFolderParent, getFolderRights, getFolderUpdateInfo, moveFolder, moveToFolder, removeFromFolder, searchFolderClass, searchFolderDocuments, setFolderAcl, updateFolder
Methods inherited from class com.saperion.connector.rmi.AbstractRMIClientCommand
getRemoteCommand, init, reLogon, reLogonAfterConnectionFailure
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.saperion.connector.rmi.SaRMIClientCommand
addComment, addHistory, changePassword, closeSession, deleteSetting, executeCommand, finishSQLTransaction, getArchivedSize, getAuthorizedUsers, getBoxCount, getBoxDefinitions, getCommandInfos, getCommandInfos, getCommentInfos, getCommitMode, getCompleteHistoryInfos, getCurrentUserRole, getDDC, getDeleteMode, getEventsEnabled, getFeatures, getFieldDescriptions, getFieldDescriptions, getFulltext, getFullTextFields, getHDocForSysRowId, getHistoryInfos, getIdsFromQuery, getLicenseCount, getMandant, getMember, getMembers, getOutOfOffice, getParentTask, getRealDBName, getRMIVersion, getServerInfos, getSession, getSetting, getStringQueryResult, getSubstitute, getSystemConnector, getSystemFiles, getSystemInfo, getSystemSetting, getTask, getTaskAuditList, getTaskList, getToken, getUserIdsForQuery, getUsers, getUserSetting, getVersionList, getWorkflowDefinitions, invoke, isAlive, isRevisionEnabled, listActiveSessions, loadDDCNames, loadFolderDDCNames, loadSettings, loadSystemFile, loadWorkflowDDCName, logoff, logon, logon, logon, newInvoke, readDocumentMetadata, resolveLatestHdoc, searchSettings, sendBarcode, setEventsEnabled, setLocale, setOutOfOffice, setSetting, setSubstitute, setUsedLicense, setUserSetting, startSQLTransaction, storeSystemFile
-
Constructor Details
-
AbstractDocRMIClientCommand
public AbstractDocRMIClientCommand()
-
-
Method Details
-
discardDocument
Description copied from interface:SaRMIClientCommand
Discards the document identified by the tokens handle. Cleans up temporary document resources and handles.- Throws:
SaSystemException
-
setVariables
public void setVariables(int element, Map<String, String> variables) throws SaAuthenticationException, SaSystemExceptionDescription copied from interface:SaRMIClientCommand
Method to set the Variables for an Content-Object or the Structure itself.- Parameters:
element
- Element Number where the Variables should be set to. (0 = Structure)variables
- Map of Key-Value Pairs for setting Variables- Throws:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
writeContent
public final long writeContent(InputStream stream, String fileName, int element) throws SaSystemException, SaAuthenticationException, SaConnectException -
writeContent
public final long writeContent(InputStream stream, String fileName, int element, boolean doStreaming) throws SaSystemException, SaAuthenticationException, SaConnectException Writes the content of the document.
If the document size is less than SaConstants.JNI_BUFFER_SIZE than the default buffer size will be reduced and only one JNI call is initiated. Because of the C# web services only chunks byte arrays with the size of 8192 a special handling is required.- Parameters:
stream
- content streamfileName
- the file nameelement
-- element = -2 : Deletes existing content, leaving an empty document structure
- element = -1 : Deletes existing content, adding given content as first element
- element = 0 : Given content is appended to the last existing content element in the document structure
- element > 0 : Replace the numbered content element with the given content. The overall number of content elements remains the same.
doStreaming
- set to true, if streaming option for the inputstream content should be activated.- Returns:
- Actual element count
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException- See Also:
-
writeContent
public long writeContent(InputStream stream) throws SaSystemException, SaAuthenticationException, SaConnectException Description copied from interface:SaRMIClientCommand
Writes the content of the document.- Parameters:
stream
- content stream- Returns:
- Actual element count
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException
-
writeContent
public long writeContent(ContentStream content) throws SaSystemException, SaAuthenticationException, SaConnectException, StreamVerificationException, UploadLimitExceededException Writes the content of the document.- Parameters:
content
- content stream- Returns:
- Actual element count
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectExceptionStreamVerificationException
- if the content stream validation is enabled and the validation failed.UploadLimitExceededException
- See Also:
-
closeDocument
public final void closeDocument(com.saperion.jni.SaJNIDocHandle handle) throws SaSystemException, SaAuthenticationException, SaGetNodeException Manually closing of a open document.- Parameters:
handle
- Document handle for a document, opend by readDocumentFirst- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException
-
deleteDocument
public SaSaveInfo deleteDocument(int mode, String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaDDCException Delete a document.- Parameters:
mode
- Delete mode may be set to the following values:- SaConstant.JNI_DELETECONTENT_MODE_DBSIMPLE = 0 Set status to 65002
- SaConstant.JNI_DELETECONTENT_MODE_DBCOMPLETE = 1 - remove from DB
- SaConstant.JNI_DELETECONTENT_MODE_PURGEDOCUMENT = 2 -Final delete
- SaConstant.DELETEMODE = "deletemode" -Deletemode entry in archief.ini;
hDoc
- Document HDOC- Returns:
- SaSaveInfo or null
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaDDCException
- SaDDCException- See Also:
-
readDocumentFirst
public com.saperion.jni.SaJNIReadBuffer readDocumentFirst(String hdoc, boolean currentRevision, int element) throws SaSystemException, SaAuthenticationException, SaGetNodeException Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element. If this was the last block, the document is automatically closed.- Parameters:
hdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document should be retrieved by resolving hdocelement
- Element number, starting with 1- Returns:
- The document handle and the buffer with the content
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
readDocumentFirst
public com.saperion.jni.SaJNIReadBuffer readDocumentFirst(String hdoc, boolean currentRevision, int element, boolean withAnnotations) throws SaSystemException, SaAuthenticationException, SaGetNodeException Opens an existing document with the given hdoc and returns a document handle for the specified element (= sub-document) as well as the buffer containing the content data of the element. If this was the last block, the document is automatically closed.- Parameters:
hdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document should be retrieved by resolving hdocelement
- Element number, starting with 1withAnnotations
- if true, the annotations will be saved on the document- Returns:
- The document handle and the buffer with the content
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
readDocumentNext
public com.saperion.jni.SaJNIReadBuffer readDocumentNext(com.saperion.jni.SaJNIDocHandle handle) throws SaSystemException, SaAuthenticationException, SaSetNodeException, SaGetNodeException, SaConnectException Reads the next bytes from the open document, described in the handle. If this was the last block, the document is automatically closed.- Parameters:
handle
- Document handle for a document, opend by readDocumentFirst- Returns:
- The document handle and the buffer with the content
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaSetNodeException
- SaSetNodeExceptionSaGetNodeException
- SaGetNodeExceptionSaConnectException
- SaConnectException- See Also:
-
getThumbnail
public byte[] getThumbnail(String hDoc, int widthX, int widthY, boolean color) throws SaSystemException, SaAuthenticationException Reads the thumbnail of the given document.- Parameters:
hDoc
- HDoc for the document.widthX
- Width XwidthY
- Width Ycolor
- True for colored- Returns:
- Thumbnail BMP as byte array
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- SaAuthenticationException- See Also:
-
readVersionMetadata
public SaVersionData readVersionMetadata(String versionID) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Reads the version meta data of the document with the given ID.- Parameters:
versionID
- Version HDOC- Returns:
- Document revision data
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
readVersionMetadata
public SaVersionData readVersionMetadata(String versionID, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Description copied from interface:SaRMIClientCommand
Reads the version meta data of the document with the given ID.- Parameters:
versionID
- Version HDOCresolveLinks
- If false will not resolve the link and show the metadata associated with the link itself.- Returns:
- Document revision data
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException
-
createDocument
public SaSaveInfo createDocument(String dbName, List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Creates a new document with the given parameters.- Parameters:
dbName
- Node database table namevalues
- List of all values- Returns:
- Node information object
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaDDCException
- Error on the saperion systemSaGetNodeException
- SaGetNodeException- See Also:
-
cacheDocument
public SaSaveInfo cacheDocument(boolean isNew, int commitMode, String versionComment, String xhDoc, String dbName, String acls) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetNodeException, SaDDCException Stores the actual document to the backend.- Parameters:
isNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringxhDoc
- the xh docdbName
- DDC nameacls
- ACL name string- Returns:
- Node information object
- Throws:
SaSystemException
- the system error exceptionSaAuthenticationException
- the authentication error exceptionSaGetNodeException
- the get node error exceptionSaSetNodeException
- the set node error exceptionSaDDCException
- the ddc error exception- See Also:
-
createLink
public SaSaveInfo createLink(LinkInfo link) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Description copied from interface:SaRMIClientCommand
Creates a SAPERION Link into one Archive for an existing Document.- Parameters:
link
- Link for the existing Document- Returns:
- Save Info after the Link was created
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException
-
saveDocument
public SaSaveInfo saveDocument(String hexUID, String dbName, List<SaPropertyValue> metadata) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaDDCException Saves the document paramaters to the document.- Parameters:
hexUID
- Node HDOCdbName
- Database table namemetadata
- List of all values- Returns:
- written node informations
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaDDCException
- SaDDCException- See Also:
-
saveDocument
public SaSaveInfo saveDocument(String hexUID, String dbName, List<SaPropertyValue> metadata, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaDDCException Saves the document paramaters to the document.- Parameters:
hexUID
- Node HDOCdbName
- Database table namemetadata
- List of all valuesresolveLinks
- Resolve links- Returns:
- written node informations
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaDDCException
- SaDDCException- See Also:
-
storeDocument
public SaSaveInfo storeDocument(boolean isNew, int commitMode, String versionComment, String dbName, String acls) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetNodeException, SaDDCException Stores the actual document to the backend.- Parameters:
isNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringdbName
- DDC nameacls
- ACL name string- Returns:
- Node information object
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetNodeException
- SaSetNodeExceptionSaDDCException
- SaDDCException- See Also:
-
storeDocument
public SaSaveInfo storeDocument(boolean isNew, int commitMode, String versionComment, String dbName, String acls, boolean checkout) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetNodeException, SaDDCException Stores the actual document to the backend.- Parameters:
isNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringdbName
- DDC nameacls
- ACL name string (semicolon separated)checkout
- Checkin document- Returns:
- Node information object
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetNodeException
- SaSetNodeExceptionSaDDCException
- SaDDCException- See Also:
-
checkoutDocument
public void checkoutDocument(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Checkout the given document.- Parameters:
hDoc
- Document HDOC- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
checkoutDocument
public void checkoutDocument(String hDoc, boolean withCloudShare, int[] shareBaseDocIds) throws SaSystemException, SaAuthenticationException, SaGetNodeException Checkout the given document with filesystem/ShareBase.- Parameters:
hDoc
- Document HDOCwithCloudShare
- true if open document is checked out with ShareBase else falseshareBaseDocIds
- Array of sharebase doc ids for open checkout docs- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
dsicardCheckout
public void dsicardCheckout(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Discards the checkout of the given document.- Parameters:
hDoc
- Document HDOC- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
releaseDocument
public void releaseDocument(String hDoc, String comment) throws SaSystemException, SaAuthenticationException, SaGetNodeException Release the given document.- Parameters:
hDoc
- Document HDOCcomment
- the revision comment- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
restoreVersion
public SaSaveInfo restoreVersion(String versionID) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Restores the given version to the actual version.- Parameters:
versionID
- Version HDOC- Returns:
- Document save info
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
clearContent
public void clearContent() throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectExceptionClears all content of the opened document.- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetContentException
- SaSetContentExceptionSaConnectException
- SaConnectException- See Also:
-
setElementMark
public void setElementMark(int element) throws SaSystemException, SaAuthenticationException, SaConnectException Mark the content element.- Parameters:
element
- Element number to mark- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException- See Also:
-
removeElement
public void removeElement(int element) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectException Removes a existing content element.- Parameters:
element
- Element number- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetContentException
- SaSetContentExceptionSaConnectException
- SaConnectException- See Also:
-
removeElement
public void removeElement(Integer[] elements) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectException Removes a series of existing content elements.- Parameters:
elements
- Array of element number- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetContentException
- SaSetContentExceptionSaConnectException
- SaConnectException- See Also:
-
getLockInfo
public SaLockInfo getLockInfo(String sysRowId) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException Gets the lock info for a given node.- Parameters:
sysRowId
- SysRowId- Returns:
- Lockinfo
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaLockException
- Error on the saperion systemSaGetNodeException
- SaGetNodeException- See Also:
-
lockNode
public boolean lockNode(String sysRowId, String ddcName, int lockType, boolean sessionScoped) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException, SaPropertyException Locks a node.- Parameters:
sysRowId
- SysRowIdddcName
- DDC namelockType
- locking mode can be one of the following constants:- SaConstant.LOCKING_LOCKTYPE_DEFAULT = 0;
- SaConstant.LOCKING_LOCKTYPE_JSRLOCK = 1;
- SaConstant.LOCKING_LOCKTYPE_JSRCHECKOUT = 2;
sessionScoped
- True, if session scoped- Returns:
- True, if ok
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaLockException
- Error on the saperion systemSaGetNodeException
- SaGetNodeExceptionSaPropertyException
- SaPropertyException- See Also:
-
unlockNode
public boolean unlockNode(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException Unlocks a node.- Parameters:
sysRowId
- SysRowIdddcName
- DDC name- Returns:
- True, if ok
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaLockException
- SaLockExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
getNodeAccessData
public com.saperion.jni.SaJNIDocAccessData getNodeAccessData(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Opens the document identified by hdoc and returns an object containing all access right data information for the session user.- Parameters:
hDoc
- Document HDOC- Returns:
- SaJNIDocAccessData Document access data for session user
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaGetNodeException
- SaGetNodeException- See Also:
-
finishTransaction
Finish the transaction in the backend system.- Parameters:
commit
- True, if commit this transaction, false to rollback- Throws:
SaSystemException
- Error on the saperion system- See Also:
-
startTransaction
Starts a transaction in the backend system.- Throws:
SaSystemException
- SaRMICommandException- See Also:
-
getAnnotations
public final String getAnnotations(String hDoc, int indexOfContentElement, boolean currentRevision) throws SaAuthenticationException, SaSystemException Reads the annotations from the given document.- Parameters:
hDoc
- Document HDOCindexOfContentElement
- the index of the chosen context elementcurrentRevision
- true to get current revision- Returns:
- Annotation string
- Throws:
SaAuthenticationException
- Authentication errorSaSystemException
- Remote exception
-
setAnnotations
public final void setAnnotations(String hDoc, int indexOfContentElement, String annotations) throws SaAuthenticationException, SaSystemException Sets the given annotations to the document. This method creates a new revision.- Parameters:
hDoc
- Document HDOCindexOfContentElement
- the index of the chosen context elementannotations
- Annotation string- Throws:
SaAuthenticationException
- Authentication errorSaSystemException
- Remote exception
-
getLocks
Reads all locks from the given DDC.- Parameters:
ddcName
- DDC name- Returns:
- Locks as list
- Throws:
SaSystemException
- Remote exception
-
getLocks
Reads all locks from the given DDC.- Parameters:
ddcName
- DDC namemandant
- internal saperion name of the current mandant- Returns:
- Locks as list
- Throws:
SaSystemException
- Remote exception- See Also:
-
getACLNames
public String getACLNames(String hDoc) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Reads the ACL's for the given document.- Parameters:
hDoc
- Document HDOC- Returns:
- ACL name string
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
getInvolvedUsers
public List<String> getInvolvedUsers(String hDoc) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Reads all users involved in the set of ACL's.- Parameters:
hDoc
- Document HDOC- Returns:
- List of user names
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException- See Also:
-
setACLName
public SaSaveInfo setACLName(String ddcname, String hDoc, String acl, int commitMode, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException, SaSetNodeException, SaSetACLException Sets the given ACL to the node.- Parameters:
ddcname
- implemented ddc in saperionhDoc
- Document HDOCacl
- ACL name stringcommitMode
- Commit modeversionComment
- Version comment string- Returns:
- save info object
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeExceptionSaSetNodeException
- SaSetNodeExceptionSaSetACLException
- SaSetACLException- See Also:
-
getAcls
Reads all existing ACLs.- Returns:
- List of ACLs
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException- See Also:
-
getACLRights
Reads the rights for the given acl's.- Parameters:
acls
- ACL's- Returns:
- Rights
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- Authentication exception- See Also:
-
getAllACLs
Deprecated.Reads all existing ACL names.- Returns:
- List of ACL names
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
logClientEvent
public void logClientEvent(String hdoc, SaConstants.ProtoEvents event, String remark) throws SaSystemException, SaAuthenticationException Adds an audit log event.- Parameters:
hdoc
- Document HDOCevent
- Event typeremark
- Remark- Throws:
SaSystemException
- general errorSaAuthenticationException
- error on the authentification / insufficient rights- See Also:
-
checkSapUrl
public SapDocInfo checkSapUrl(String url) throws SaSystemException, SaSapUrlException, SaAuthenticationException Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC. If not, null will be returned.- Parameters:
url
- SAP URL- Returns:
- Document Info
- Throws:
SaSystemException
- when a system error occuredSaSapUrlException
- when checking the sap url failed in the RLINK serverSaAuthenticationException
- when the user is not logged in or has insufficient rights- See Also:
-
getExternalStorageFoldersForUpload
public List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(ExternalStorageType storageType) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommand
Fetches all foldes of External Storage from where documents need to be uploaded- Returns:
- list of folders
- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
getExternalStorageFoldersForUpload
public List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaSystemException, SaAuthenticationExceptionDescription copied from interface:SaRMIClientCommand
Fetches all folders of all External Storage services from where documents need to be uploaded- Returns:
- list of folder details
- Throws:
SaSystemException
SaAuthenticationException
-
getExternalStorageMapping
public SaperionExternalStorageMappingInfo getExternalStorageMapping(String sysRowId) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommand
Fetches the external storage mapping for the provided SysRowId- Returns:
- Throws:
SaSystemException
SaAuthenticationException
-
createExternalStorageFolderMapping
public void createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommand
Stores the mapping information about Saperion document and External Storage folder- Parameters:
mappingInfo
- mapping information about Saperion document and External Storage folder- Throws:
SaSystemException
SaAuthenticationException
-
updateExternalStorageUploadStatus
public void updateExternalStorageUploadStatus(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommand
Updates the upload status of External Storage folder- Parameters:
folderId
- folderId whose status needs to be updated- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
deleteExternalStorageFolderMapping
public int deleteExternalStorageFolderMapping(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommand
Deletes external storage mappings for given status and older than the given time- Parameters:
expiryTime
- defined time before which all mappings are deletedstatusList
- status whose mapping need to be deleted- Returns:
- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights.
-