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
public abstract class AbstractDocRMIClientCommand extends AbstractFolderRMIClientCommand
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 Constructor Description AbstractDocRMIClientCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SaSaveInfo
cacheDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String xhDoc, java.lang.String dbName, java.lang.String acls)
Stores the actual document to the backend.void
checkoutDocument(java.lang.String hDoc)
Checkout the given document.void
checkoutDocument(java.lang.String hDoc, boolean withCloudShare, int[] shareBaseDocIds)
Checkout the given document with filesystem/ShareBase.SapDocInfo
checkSapUrl(java.lang.String url)
Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC.void
clearContent()
Clears all content of the opened document.void
closeDocument(com.saperion.jni.SaJNIDocHandle handle)
Manually closing of a open document.SaSaveInfo
createDocument(java.lang.String dbName, java.util.List<SaPropertyValue> values)
Creates a new document with the given parameters.void
createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo)
Stores the mapping information about Saperion document and External Storage folderSaSaveInfo
createLink(LinkInfo link)
Creates a SAPERION Link into one Archive for an existing Document.SaSaveInfo
deleteDocument(int mode, java.lang.String hDoc)
Delete a document.int
deleteExternalStorageFolderMapping(java.util.Date expiryTime, java.util.List<ExternalStorageDocUploadStatus> statusList)
Deletes external storage mappings for given status and older than the given timevoid
discardDocument()
Discards the document identified by the tokens handle.void
dsicardCheckout(java.lang.String hDoc)
Discards the checkout of the given document.void
finishTransaction(boolean commit)
Finish the transaction in the backend system.java.lang.String
getACLNames(java.lang.String hDoc)
Reads the ACL's for the given document.SaACLRights
getACLRights(java.lang.String[] acls)
Reads the rights for the given acl's.java.util.List<SaAcl>
getAcls()
Reads all existing ACLs.java.util.List<java.lang.String>
getAllACLs()
Deprecated.java.lang.String
getAnnotations(java.lang.String hDoc, int indexOfContentElement, boolean currentRevision)
Reads the annotations from the given document.java.util.List<SaperionExternalStorageMappingInfo>
getExternalStorageFoldersForUpload()
Fetches all folders of all External Storage services from where documents need to be uploadedjava.util.List<SaperionExternalStorageMappingInfo>
getExternalStorageFoldersForUpload(ExternalStorageType storageType)
Fetches all foldes of External Storage from where documents need to be uploadedSaperionExternalStorageMappingInfo
getExternalStorageMapping(java.lang.String sysRowId)
Fetches the external storage mapping for the provided SysRowIdjava.util.List<java.lang.String>
getInvolvedUsers(java.lang.String hDoc)
Reads all users involved in the set of ACL's.SaLockInfo
getLockInfo(java.lang.String sysRowId)
Gets the lock info for a given node.java.util.List<java.lang.String>
getLocks(java.lang.String ddcName)
Reads all locks from the given DDC.java.util.List<java.lang.String>
getLocks(java.lang.String ddcName, java.lang.String mandant)
Reads all locks from the given DDC.com.saperion.jni.SaJNIDocAccessData
getNodeAccessData(java.lang.String hDoc)
Opens the document identified by hdoc and returns an object containing all access right data information for the session user.byte[]
getThumbnail(java.lang.String hDoc, int widthX, int widthY, boolean color)
Reads the thumbnail of the given document.boolean
lockNode(java.lang.String sysRowId, java.lang.String ddcName, int lockType, boolean sessionScoped)
Locks a node.void
logClientEvent(java.lang.String hdoc, SaConstants.ProtoEvents event, java.lang.String remark)
Adds an audit log event.com.saperion.jni.SaJNIReadBuffer
readDocumentFirst(java.lang.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(java.lang.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.SaVersionData
readVersionMetadata(java.lang.String versionID)
Reads the version meta data of the document with the given ID.SaVersionData
readVersionMetadata(java.lang.String versionID, boolean resolveLinks)
Reads the version meta data of the document with the given ID.void
releaseDocument(java.lang.String hDoc, java.lang.String comment)
Release the given document.void
removeElement(int element)
Removes a existing content element.void
removeElement(java.lang.Integer[] elements)
Removes a series of existing content elements.SaSaveInfo
restoreVersion(java.lang.String versionID)
Restores the given version to the actual version.SaSaveInfo
saveDocument(java.lang.String hexUID, java.lang.String dbName, java.util.List<SaPropertyValue> metadata)
Saves the document paramaters to the document.SaSaveInfo
saveDocument(java.lang.String hexUID, java.lang.String dbName, java.util.List<SaPropertyValue> metadata, boolean resolveLinks)
Saves the document paramaters to the document.SaSaveInfo
setACLName(java.lang.String ddcname, java.lang.String hDoc, java.lang.String acl, int commitMode, java.lang.String versionComment)
Sets the given ACL to the node.void
setAnnotations(java.lang.String hDoc, int indexOfContentElement, java.lang.String annotations)
Sets the given annotations to the document.void
setElementMark(int element)
Mark the content element.void
setVariables(int element, java.util.Map<java.lang.String,java.lang.String> variables)
Method to set the Variables for an Content-Object or the Structure itself.void
startTransaction()
Starts a transaction in the backend system.SaSaveInfo
storeDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String dbName, java.lang.String acls)
Stores the actual document to the backend.SaSaveInfo
storeDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String dbName, java.lang.String acls, boolean checkout)
Stores the actual document to the backend.boolean
unlockNode(java.lang.String sysRowId, java.lang.String ddcName)
Unlocks a node.void
updateExternalStorageUploadStatus(java.lang.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(java.io.InputStream stream)
Writes the content of the document.long
writeContent(java.io.InputStream stream, java.lang.String fileName, int element)
long
writeContent(java.io.InputStream stream, java.lang.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
-
-
-
-
Method Detail
-
discardDocument
public void discardDocument() throws SaSystemException
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, java.util.Map<java.lang.String,java.lang.String> variables) throws SaAuthenticationException, SaSystemException
Description 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(java.io.InputStream stream, java.lang.String fileName, int element) throws SaSystemException, SaAuthenticationException, SaConnectException
-
writeContent
public final long writeContent(java.io.InputStream stream, java.lang.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:
SaRMIClientCommand.writeContent(java.io.InputStream, String, int, boolean)
-
writeContent
public long writeContent(java.io.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:
SaRMIClientCommand.writeContent(com.saperion.bean.ContentStream)
-
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, java.lang.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:
SaRMIClientCommand.deleteDocument(int, String)
-
readDocumentFirst
public com.saperion.jni.SaJNIReadBuffer readDocumentFirst(java.lang.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:
SaRMIClientCommand.readDocumentFirst(String, boolean, int)
-
readDocumentFirst
public com.saperion.jni.SaJNIReadBuffer readDocumentFirst(java.lang.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:
SaRMIClientCommand.readDocumentFirst(String, boolean, int, boolean)
-
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:
SaRMIClientCommand.readDocumentNext(com.saperion.jni.SaJNIDocHandle)
-
getThumbnail
public byte[] getThumbnail(java.lang.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:
SaRMIClientCommand.getThumbnail(java.lang.String, int, int, boolean)
-
readVersionMetadata
public SaVersionData readVersionMetadata(java.lang.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:
SaRMIClientCommand.readVersionMetadata(String)
-
readVersionMetadata
public SaVersionData readVersionMetadata(java.lang.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(java.lang.String dbName, java.util.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:
SaRMIClientCommand.createDocument(String, java.util.List)
-
cacheDocument
public SaSaveInfo cacheDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String xhDoc, java.lang.String dbName, java.lang.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:
SaRMIClientCommand.storeDocument(boolean, int, java.lang.String, java.lang.String, java.lang.String, boolean)
-
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(java.lang.String hexUID, java.lang.String dbName, java.util.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:
SaRMIClientCommand.saveDocument(String, String, java.util.List)
-
saveDocument
public SaSaveInfo saveDocument(java.lang.String hexUID, java.lang.String dbName, java.util.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:
SaRMIClientCommand.saveDocument(String, String, java.util.List, boolean)
-
storeDocument
public SaSaveInfo storeDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String dbName, java.lang.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:
SaRMIClientCommand.storeDocument(boolean, int, String, String, String)
-
storeDocument
public SaSaveInfo storeDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String dbName, java.lang.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:
SaRMIClientCommand.storeDocument(boolean, int, java.lang.String, java.lang.String, java.lang.String, boolean)
-
checkoutDocument
public void checkoutDocument(java.lang.String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException
Checkout the given document.- Parameters:
hDoc
- Document HDOC- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
SaRMIClientCommand.checkoutDocument(java.lang.String)
-
checkoutDocument
public void checkoutDocument(java.lang.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:
SaRMIClientCommand.checkoutDocument(String, boolean, int[])
-
dsicardCheckout
public void dsicardCheckout(java.lang.String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException
Discards the checkout of the given document.- Parameters:
hDoc
- Document HDOC- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
SaRMIClientCommand.dsicardCheckout(java.lang.String)
-
releaseDocument
public void releaseDocument(java.lang.String hDoc, java.lang.String comment) throws SaSystemException, SaAuthenticationException, SaGetNodeException
Release the given document.- Parameters:
hDoc
- Document HDOCcomment
- the revision comment- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException- See Also:
SaRMIClientCommand.releaseDocument(java.lang.String, java.lang.String)
-
restoreVersion
public SaSaveInfo restoreVersion(java.lang.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:
SaRMIClientCommand.restoreVersion(String)
-
clearContent
public void clearContent() throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectException
Clears all content of the opened document.- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetContentException
- SaSetContentExceptionSaConnectException
- SaConnectException- See Also:
SaRMIClientCommand.clearContent()
-
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:
SaRMIClientCommand.setElementMark(int)
-
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:
SaRMIClientCommand.removeElement(int)
-
removeElement
public void removeElement(java.lang.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:
SaRMIClientCommand.removeElement(int)
-
getLockInfo
public SaLockInfo getLockInfo(java.lang.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:
SaRMIClientCommand.getLockInfo(String)
-
lockNode
public boolean lockNode(java.lang.String sysRowId, java.lang.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:
SaRMIClientCommand.lockNode(String, String, int, boolean)
-
unlockNode
public boolean unlockNode(java.lang.String sysRowId, java.lang.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:
SaRMIClientCommand.unlockNode(String, String)
-
getNodeAccessData
public com.saperion.jni.SaJNIDocAccessData getNodeAccessData(java.lang.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:
SaRMIClientCommand.getNodeAccessData(java.lang.String)
-
finishTransaction
public void finishTransaction(boolean commit) throws SaSystemException
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:
SaRMIClientCommand.finishTransaction(boolean)
-
startTransaction
public void startTransaction() throws SaSystemException
Starts a transaction in the backend system.- Throws:
SaSystemException
- SaRMICommandException- See Also:
SaRMIClientCommand.startTransaction()
-
getAnnotations
public final java.lang.String getAnnotations(java.lang.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(java.lang.String hDoc, int indexOfContentElement, java.lang.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
public final java.util.List<java.lang.String> getLocks(java.lang.String ddcName) throws SaSystemException
Reads all locks from the given DDC.- Parameters:
ddcName
- DDC name- Returns:
- Locks as list
- Throws:
SaSystemException
- Remote exception
-
getLocks
public java.util.List<java.lang.String> getLocks(java.lang.String ddcName, java.lang.String mandant) throws SaSystemException
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:
SaRMIClientCommand.getLocks(java.lang.String, java.lang.String)
-
getACLNames
public java.lang.String getACLNames(java.lang.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:
SaRMIClientCommand.getACLNames(String)
-
getInvolvedUsers
public java.util.List<java.lang.String> getInvolvedUsers(java.lang.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:
SaRMIClientCommand.getInvolvedUsers(String)
-
setACLName
public SaSaveInfo setACLName(java.lang.String ddcname, java.lang.String hDoc, java.lang.String acl, int commitMode, java.lang.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:
SaRMIClientCommand.setACLName(String, String, String, int, String)
-
getAcls
public java.util.List<SaAcl> getAcls() throws SaSystemException, SaAuthenticationException
Reads all existing ACLs.- Returns:
- List of ACLs
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException- See Also:
SaRMIClientCommand.getAcls()
-
getACLRights
public SaACLRights getACLRights(java.lang.String[] acls) throws SaSystemException, SaAuthenticationException
Reads the rights for the given acl's.- Parameters:
acls
- ACL's- Returns:
- Rights
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- Authentication exception- See Also:
SaRMIClientCommand.getACLRights(java.lang.String[])
-
getAllACLs
@Deprecated public java.util.List<java.lang.String> getAllACLs() throws SaSystemException, SaAuthenticationException
Deprecated.Reads all existing ACL names.- Returns:
- List of ACL names
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
logClientEvent
public void logClientEvent(java.lang.String hdoc, SaConstants.ProtoEvents event, java.lang.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:
SaRMIClientCommand.logClientEvent(java.lang.String, com.saperion.constants.SaConstants.ProtoEvents, java.lang.String)
-
checkSapUrl
public SapDocInfo checkSapUrl(java.lang.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:
SaRMIClientCommand.checkSapUrl(java.lang.String)
-
getExternalStorageFoldersForUpload
public java.util.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 java.util.List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaSystemException, SaAuthenticationException
Description 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(java.lang.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(java.lang.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(java.util.Date expiryTime, java.util.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.
-
-