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 SummaryFields inherited from class com.saperion.connector.rmi.AbstractRMIClientCommandAPPEND_CONTENT, appl, credentials, LOGGER, props, session, sessionInfo, sysConnector, writeBufferSize
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncacheDocument(boolean isNew, int commitMode, String versionComment, String xhDoc, String dbName, String acls) Stores the actual document to the backend.voidcheckoutDocument(String hDoc) Checkout the given document.voidcheckoutDocument(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.voidClears all content of the opened document.final voidcloseDocument(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.voidStores 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.intdeleteExternalStorageFolderMapping(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) Deletes external storage mappings for given status and older than the given timevoidDiscards the document identified by the tokens handle.voiddsicardCheckout(String hDoc) Discards the checkout of the given document.voidfinishTransaction(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 StringgetAnnotations(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.SaJNIDocAccessDatagetNodeAccessData(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.booleanLocks a node.voidlogClientEvent(String hdoc, SaConstants.ProtoEvents event, String remark) Adds an audit log event.com.saperion.jni.SaJNIReadBufferreadDocumentFirst(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.SaJNIReadBufferreadDocumentFirst(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.SaJNIReadBufferreadDocumentNext(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.voidreleaseDocument(String hDoc, String comment) Release the given document.voidremoveElement(int element) Removes a existing content element.voidremoveElement(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 voidsetAnnotations(String hDoc, int indexOfContentElement, String annotations) Sets the given annotations to the document.voidsetElementMark(int element) Mark the content element.voidsetVariables(int element, Map<String, String> variables) Method to set the Variables for an Content-Object or the Structure itself.voidStarts 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.booleanunlockNode(String sysRowId, String ddcName) Unlocks a node.voidupdateExternalStorageUploadStatus(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) Updates the upload status of External Storage folderlongwriteContent(ContentStream content) Writes the content of the document.longwriteContent(InputStream stream) Writes the content of the document.final longwriteContent(InputStream stream, String fileName, int element) final longwriteContent(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.AbstractFolderRMIClientCommandaddToFolder, copyFolder, createFolder, deleteFolder, getDocumentFolderCount, getDocumentFolders, getFolderChildren, getFolderClass, getFolderFromPath, getFolderInfo, getFolderParent, getFolderRights, getFolderUpdateInfo, moveFolder, moveToFolder, removeFromFolder, searchFolderClass, searchFolderDocuments, setFolderAcl, updateFolderMethods inherited from class com.saperion.connector.rmi.AbstractRMIClientCommandgetRemoteCommand, init, reLogon, reLogonAfterConnectionFailureMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.saperion.connector.rmi.SaRMIClientCommandaddComment, 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- 
AbstractDocRMIClientCommandpublic AbstractDocRMIClientCommand()
 
- 
- 
Method Details- 
discardDocumentDescription copied from interface:SaRMIClientCommandDiscards the document identified by the tokens handle. Cleans up temporary document resources and handles.- Throws:
- SaSystemException
 
- 
setVariablespublic void setVariables(int element, Map<String, String> variables) throws SaAuthenticationException, SaSystemExceptionDescription copied from interface:SaRMIClientCommandMethod 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 rights
- SaSystemException- general error
 
- 
writeContentpublic final long writeContent(InputStream stream, String fileName, int element) throws SaSystemException, SaAuthenticationException, SaConnectException 
- 
writeContentpublic 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 stream
- fileName- the file name
- element-
- 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- SaSystemException
- SaAuthenticationException- SaAuthenticationException
- SaConnectException- SaConnectException
- See Also:
 
- 
writeContentpublic long writeContent(InputStream stream) throws SaSystemException, SaAuthenticationException, SaConnectException Description copied from interface:SaRMIClientCommandWrites the content of the document.- Parameters:
- stream- content stream
- Returns:
- Actual element count
- Throws:
- SaSystemException- SaSystemException
- SaAuthenticationException- SaAuthenticationException
- SaConnectException- SaConnectException
 
- 
writeContentpublic 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- SaSystemException
- SaAuthenticationException- SaAuthenticationException
- SaConnectException- SaConnectException
- StreamVerificationException- if the content stream validation is enabled and the validation failed.
- UploadLimitExceededException
- See Also:
 
- 
closeDocumentpublic 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
 
- 
deleteDocumentpublic 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 system
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaDDCException- SaDDCException
- See Also:
 
- 
readDocumentFirstpublic 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 HDOC
- currentRevision- flag indicating that the current revision of the document should be retrieved by resolving hdoc
- element- Element number, starting with 1
- Returns:
- The document handle and the buffer with the content
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
readDocumentFirstpublic 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 HDOC
- currentRevision- flag indicating that the current revision of the document should be retrieved by resolving hdoc
- element- Element number, starting with 1
- withAnnotations- if true, the annotations will be saved on the document
- Returns:
- The document handle and the buffer with the content
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
readDocumentNextpublic 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaSetNodeException- SaSetNodeException
- SaGetNodeException- SaGetNodeException
- SaConnectException- SaConnectException
- See Also:
 
- 
getThumbnailpublic 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 X
- widthY- Width Y
- color- True for colored
- Returns:
- Thumbnail BMP as byte array
- Throws:
- SaSystemException- System exception
- SaAuthenticationException- SaAuthenticationException
- See Also:
 
- 
readVersionMetadatapublic 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
readVersionMetadatapublic SaVersionData readVersionMetadata(String versionID, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Description copied from interface:SaRMIClientCommandReads the version meta data of the document with the given ID.- Parameters:
- versionID- Version HDOC
- resolveLinks- If false will not resolve the link and show the metadata associated with the link itself.
- Returns:
- Document revision data
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
 
- 
createDocumentpublic 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 name
- values- List of all values
- Returns:
- Node information object
- Throws:
- SaSystemException- Error on the saperion system
- SaAuthenticationException- Error on the saperion system
- SaDDCException- Error on the saperion system
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
cacheDocumentpublic 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 document
- commitMode- Commit mode
- versionComment- Version comment string
- xhDoc- the xh doc
- dbName- DDC name
- acls- ACL name string
- Returns:
- Node information object
- Throws:
- SaSystemException- the system error exception
- SaAuthenticationException- the authentication error exception
- SaGetNodeException- the get node error exception
- SaSetNodeException- the set node error exception
- SaDDCException- the ddc error exception
- See Also:
 
- 
createLinkpublic SaSaveInfo createLink(LinkInfo link) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Description copied from interface:SaRMIClientCommandCreates 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
 
- 
saveDocumentpublic SaSaveInfo saveDocument(String hexUID, String dbName, List<SaPropertyValue> metadata) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaDDCException Saves the document paramaters to the document.- Parameters:
- hexUID- Node HDOC
- dbName- Database table name
- metadata- List of all values
- Returns:
- written node informations
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaDDCException- SaDDCException
- See Also:
 
- 
saveDocumentpublic 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 HDOC
- dbName- Database table name
- metadata- List of all values
- resolveLinks- Resolve links
- Returns:
- written node informations
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaDDCException- SaDDCException
- See Also:
 
- 
storeDocumentpublic 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 document
- commitMode- Commit mode
- versionComment- Version comment string
- dbName- DDC name
- acls- ACL name string
- Returns:
- Node information object
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaSetNodeException- SaSetNodeException
- SaDDCException- SaDDCException
- See Also:
 
- 
storeDocumentpublic 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 document
- commitMode- Commit mode
- versionComment- Version comment string
- dbName- DDC name
- acls- ACL name string (semicolon separated)
- checkout- Checkin document
- Returns:
- Node information object
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaSetNodeException- SaSetNodeException
- SaDDCException- SaDDCException
- See Also:
 
- 
checkoutDocumentpublic void checkoutDocument(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Checkout the given document.- Parameters:
- hDoc- Document HDOC
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
checkoutDocumentpublic void checkoutDocument(String hDoc, boolean withCloudShare, int[] shareBaseDocIds) throws SaSystemException, SaAuthenticationException, SaGetNodeException Checkout the given document with filesystem/ShareBase.- Parameters:
- hDoc- Document HDOC
- withCloudShare- true if open document is checked out with ShareBase else false
- shareBaseDocIds- Array of sharebase doc ids for open checkout docs
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
dsicardCheckoutpublic void dsicardCheckout(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Discards the checkout of the given document.- Parameters:
- hDoc- Document HDOC
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
releaseDocumentpublic void releaseDocument(String hDoc, String comment) throws SaSystemException, SaAuthenticationException, SaGetNodeException Release the given document.- Parameters:
- hDoc- Document HDOC
- comment- the revision comment
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
restoreVersionpublic 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
clearContentpublic void clearContent() throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectExceptionClears all content of the opened document.- Throws:
- SaSystemException- Error on the saperion system
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaSetContentException- SaSetContentException
- SaConnectException- SaConnectException
- See Also:
 
- 
setElementMarkpublic void setElementMark(int element) throws SaSystemException, SaAuthenticationException, SaConnectException Mark the content element.- Parameters:
- element- Element number to mark
- Throws:
- SaSystemException- Error on the saperion system
- SaAuthenticationException- SaAuthenticationException
- SaConnectException- SaConnectException
- See Also:
 
- 
removeElementpublic 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 system
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaSetContentException- SaSetContentException
- SaConnectException- SaConnectException
- See Also:
 
- 
removeElementpublic 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 system
- SaAuthenticationException- SaAuthenticationException
- SaGetNodeException- SaGetNodeException
- SaSetContentException- SaSetContentException
- SaConnectException- SaConnectException
- See Also:
 
- 
getLockInfopublic 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 system
- SaAuthenticationException- Error on the saperion system
- SaLockException- Error on the saperion system
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
lockNodepublic boolean lockNode(String sysRowId, String ddcName, int lockType, boolean sessionScoped) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException, SaPropertyException Locks a node.- Parameters:
- sysRowId- SysRowId
- ddcName- DDC name
- lockType- 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 system
- SaAuthenticationException- Error on the saperion system
- SaLockException- Error on the saperion system
- SaGetNodeException- SaGetNodeException
- SaPropertyException- SaPropertyException
- See Also:
 
- 
unlockNodepublic boolean unlockNode(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException Unlocks a node.- Parameters:
- sysRowId- SysRowId
- ddcName- DDC name
- Returns:
- True, if ok
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaLockException- SaLockException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
getNodeAccessDatapublic 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 system
- SaAuthenticationException- Error on the saperion system
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
finishTransactionFinish 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:
 
- 
startTransactionStarts a transaction in the backend system.- Throws:
- SaSystemException- SaRMICommandException
- See Also:
 
- 
getAnnotationspublic final String getAnnotations(String hDoc, int indexOfContentElement, boolean currentRevision) throws SaAuthenticationException, SaSystemException Reads the annotations from the given document.- Parameters:
- hDoc- Document HDOC
- indexOfContentElement- the index of the chosen context element
- currentRevision- true to get current revision
- Returns:
- Annotation string
- Throws:
- SaAuthenticationException- Authentication error
- SaSystemException- Remote exception
 
- 
setAnnotationspublic 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 HDOC
- indexOfContentElement- the index of the chosen context element
- annotations- Annotation string
- Throws:
- SaAuthenticationException- Authentication error
- SaSystemException- Remote exception
 
- 
getLocksReads all locks from the given DDC.- Parameters:
- ddcName- DDC name
- Returns:
- Locks as list
- Throws:
- SaSystemException- Remote exception
 
- 
getLocksReads all locks from the given DDC.- Parameters:
- ddcName- DDC name
- mandant- internal saperion name of the current mandant
- Returns:
- Locks as list
- Throws:
- SaSystemException- Remote exception
- See Also:
 
- 
getACLNamespublic 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
getInvolvedUserspublic 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- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
- See Also:
 
- 
setACLNamepublic 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 saperion
- hDoc- Document HDOC
- acl- ACL name string
- commitMode- Commit mode
- versionComment- Version comment string
- Returns:
- save info object
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaGetNodeException- SaGetNodeException
- SaSetNodeException- SaSetNodeException
- SaSetACLException- SaSetACLException
- See Also:
 
- 
getAclsReads all existing ACLs.- Returns:
- List of ACLs
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
- See Also:
 
- 
getACLRightsReads the rights for the given acl's.- Parameters:
- acls- ACL's
- Returns:
- Rights
- Throws:
- SaSystemException- System exception
- SaAuthenticationException- Authentication exception
- See Also:
 
- 
getAllACLsDeprecated.Reads all existing ACL names.- Returns:
- List of ACL names
- Throws:
- SaSystemException- SaRMICommandException
- SaAuthenticationException- SaAuthenticationException
 
- 
logClientEventpublic void logClientEvent(String hdoc, SaConstants.ProtoEvents event, String remark) throws SaSystemException, SaAuthenticationException Adds an audit log event.- Parameters:
- hdoc- Document HDOC
- event- Event type
- remark- Remark
- Throws:
- SaSystemException- general error
- SaAuthenticationException- error on the authentification / insufficient rights
- See Also:
 
- 
checkSapUrlpublic 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 occured
- SaSapUrlException- when checking the sap url failed in the RLINK server
- SaAuthenticationException- when the user is not logged in or has insufficient rights
- See Also:
 
- 
getExternalStorageFoldersForUploadpublic List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(ExternalStorageType storageType) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommandFetches all foldes of External Storage from where documents need to be uploaded- Returns:
- list of folders
- Throws:
- SaSystemException- when a system error occured
- SaAuthenticationException- when the user is not logged in or has insufficient rights.
 
- 
getExternalStorageFoldersForUploadpublic List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaSystemException, SaAuthenticationExceptionDescription copied from interface:SaRMIClientCommandFetches all folders of all External Storage services from where documents need to be uploaded- Returns:
- list of folder details
- Throws:
- SaSystemException
- SaAuthenticationException
 
- 
getExternalStorageMappingpublic SaperionExternalStorageMappingInfo getExternalStorageMapping(String sysRowId) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommandFetches the external storage mapping for the provided SysRowId- Returns:
- Throws:
- SaSystemException
- SaAuthenticationException
 
- 
createExternalStorageFolderMappingpublic void createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommandStores the mapping information about Saperion document and External Storage folder- Parameters:
- mappingInfo- mapping information about Saperion document and External Storage folder
- Throws:
- SaSystemException
- SaAuthenticationException
 
- 
updateExternalStorageUploadStatuspublic void updateExternalStorageUploadStatus(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommandUpdates the upload status of External Storage folder- Parameters:
- folderId- folderId whose status needs to be updated
- Throws:
- SaSystemException- when a system error occured
- SaAuthenticationException- when the user is not logged in or has insufficient rights.
 
- 
deleteExternalStorageFolderMappingpublic int deleteExternalStorageFolderMapping(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) throws SaSystemException, SaAuthenticationException Description copied from interface:SaRMIClientCommandDeletes external storage mappings for given status and older than the given time- Parameters:
- expiryTime- defined time before which all mappings are deleted
- statusList- status whose mapping need to be deleted
- Returns:
- Throws:
- SaSystemException- when a system error occured
- SaAuthenticationException- when the user is not logged in or has insufficient rights.
 
 
-