Package com.saperion.connector.rmi
Interface SaRMIClientCommand
- All Known Implementing Classes:
AbstractDocRMIClientCommand
,AbstractFolderRMIClientCommand
,AbstractQueryRMIClientCommand
,AbstractRMIClientCommand
,AbstractWfRMIClientCommand
,SaRMIClientCommandImpl
public interface SaRMIClientCommand
The interface for the RMI Client.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComment
(String comment, String taskUID, int level) void
addHistory
(String description, String taskUID) void
addToFolder
(String folderTableDDC, String documentId, String documentDDC, String folderId) Adds the document to a given folder.cacheDocument
(boolean isNew, int commitMode, String versionComment, String xhDoc, String ddcName, String acls) Stores the actual document to the backend.void
changePassword
(String user, String oldPassword, String client, String newPassword) Changes the password of an existing user.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.void
closeDocument
(com.saperion.jni.SaJNIDocHandle handle) Manually closing of a open document.boolean
closeSession
(com.saperion.connector.authentication.Session session) Close the givenSession
copyFolder
(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) Copies the given node and all it’s children to the destination.createDocument
(String ddcName, List<SaPropertyValue> values) Creates a new document with the given parameters.void
Stores the mapping information about Saperion document and External Storage foldercreateFolder
(SaFolderSaveInfo info) Creates a new node below a given node.createLink
(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
deleteFolder
(String folderTableDDC, String folderId) Deletes a given node.boolean
deleteSetting
(String name, String section, boolean isLong) Deletes a setting in the database.void
Discards the document identified by the tokens handle.void
dsicardCheckout
(String hDoc) Discards the checkout of the given document.executeCommand
(ContextInfo contextInfo) Performs the given command.void
finishSQLTransaction
(boolean commit, String ddcName) Finish SQL transaction.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.getAnnotations
(String hDoc, int indexOfContentElement, boolean currentRevision) Reads the annotations from the given document.int
getArchivedSize
(String hDoc) Returns the total document size in archive.getAuthorizedUsers
(String hDoc, String rights, MatchKind match) Returns the users, that have specific rights on a document.getBoxCount
(int boxId, BoxCountType type, Map<String, Object> parameters) Returns the number of all elements and of all unread elements of the inbox identified by the given id.Reads the box definitions.getCommandInfos
(String taskUID) Reads all possible transitions for this task.getCommandInfos
(String taskUID, boolean transitionsOnly) Reads all possible transitions and optional other possible commands for this task.getCommentInfos
(String taskUID) Reads the comments for the given task.int
getCompleteHistoryInfos
(String docUID) Reads the history for the given task.com.lexmark.saperion.administration.RoleType
Returns information about the specified DDC.int
long
getDocumentFolderCount
(String folderTableDDC, String documentDDC, String sysRowId) Returns the total count over all folders from all users in which the specified document is countained in.getDocumentFolders
(String folderTableDDC, String documentDDC, String sysRowId) Returns a list of folder properties which contains all nodes the document is contained in.boolean
Returns whether events (e.g.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 SysRowIdRead the features.getFieldDescriptions
(String ddcName) Reads the field descriptions for a given DDC.getFieldDescriptions
(String ddcName, String mandant) Reads the field descriptions for a given DDC.getFolderChildren
(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) Returns a cursor with the children of the given node.getFolderClass
(String className) Reads the folder class with the given name.getFolderFromPath
(String folderTableDDC, String startNodeId, String folderPath, boolean exact) Returns the node(s) which match to the given path.getFolderInfo
(String folderTableDDC, String folderId, boolean forceLoadVariables) Reads the folder info object for the given folder.getFolderParent
(String folderTableDDC, String folderId) Returns the parent of the given node.getFolderRights
(String folderTableDDC, String folderId) Returns the rights mask for the given folder and user.getFolderUpdateInfo
(Map<String, Long> folderIds) Get the Set of folders that shall be refreshed.getFulltext
(String ddcName, String sysRowId, String hdoc, String fieldName, long length) Reads the fulltext information for the given document with the given SYSROWID in the given DDC.getFullTextFields
(String ddcName, List<String> fullTextFields, String hdoc) Fetches values of Full text columnsgetHDocForSysRowId
(String sysRowId, String ddcName) Searchs the HDOC for the given SysRowId.getHistoryInfos
(String taskUID) Reads the history for the given task.getIdsFromQuery
(String query) Executes a HQL query and returns the results as a string list.getInvolvedUsers
(String hDoc) Reads all users involved in the set of ACL's.int
getLicenseCount
(int type) Read the licence count for the given user.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.getMember
(WorkflowMember member, int depth, String filter) Reads the member.Reads the member.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.boolean
Get the out of office status for the logged on user.getParentTask
(String taskID) Reads the parent task info for the given ID.getRealDBName
(String ddcName, String field, String mandant) returns the real database table name for a given DDC.Get the RMI interface version from java core server.Returns a list of objects describing the servers this connector is connected to.com.saperion.connector.authentication.Session
getSetting
(String name, String section, boolean isLong) Retrieves a setting from the database.getStringQueryResult
(SaQueryInfo queryInfo) Executes a given HQL string and returns the results as list.Get the substitute for the logged on user.getSystemFiles
(SystemFileKind kind, String filter) Gets the system files of a specific kind.Reads system info.getSystemSetting
(String accessKey) Retrieves a system setting object.Reads the task info for the given ID.getTaskAuditList
(int[] ids, String filter, Map<String, Object> parameter) Reads the task audit for this user.getTaskList
(int[] ids, String filter, Map<String, Object> parameter) Reads the task for this user.byte[]
getThumbnail
(String hDoc, int widthX, int widthY, boolean color) Reads the thumbnail of the given document.int
getToken()
int[]
Read the userids.Reads a list of filtered users.getUserSetting
(String accessKey) Retrieves a user setting object.getVersionList
(String ddcName, String sysrowID) Reads the versionlist for the given document.Reads all available workflow definitions.<T extends Serializable>
Tinvoke
(com.lexmark.saperion.remote.common.operations.Operation<T, SaBasicException, LegacyConnection> operation) This method invokes aOperation
on the backend.boolean
isAlive()
Test the lifetime of this token.boolean
isRevisionEnabled
(int mandant, String ddcName) Gets the information whether the provided ddc table contains the fields required for revisions.List<com.saperion.connector.authentication.Session>
List the active sessions of the logged in user.String[]
Retrieves the available DDC names.String[]
Retrieves the available folder DDC names.loadSettings
(String section) Load settings from backend.loadSystemFile
(SystemFileKind kind, String name) Loads a system file of a specific kind.Retrieves the workflow DDC name.boolean
Locks a node.void
logClientEvent
(String hdoc, SaConstants.ProtoEvents event, String remark) Adds an audit log event.boolean
logoff()
Log off the user from the server instance.default com.saperion.connector.authentication.Session
logon
(int rmiToken) Deprecated.com.saperion.connector.authentication.Session
logon
(com.lexmark.saperion.remote.common.authentication.Credentials credentials) Logon with the passed credentials.com.saperion.connector.authentication.Session
logon
(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) Logon with the passed credentials and associate the given session information.void
moveFolder
(String folderTableDDC, String folderId, String destinationId, String beforeChild) Moves the given node to a new destination.void
moveToFolder
(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) Moves the document’s filing to the given node.<ResultType extends Serializable,
ExceptionType extends com.lexmark.saperion.exceptions.EcmException>
ResultTypenewInvoke
(com.lexmark.saperion.remote.common.operations.EcmOperation<ResultType, ExceptionType> operation) This method invokes aEcmOperation
in the backend.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.readDocumentMetadata
(String sysRowId, String ddcName, String[] fields) Reads the meta data of the document with the given ID.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.void
removeFromFolder
(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) Remove the document filing from the given node.resolveLatestHdoc
(String oldHdoc) Resolves the hdoc of the latest version of the document identified by the given hdoc.restoreVersion
(String versionID) Restores the given version to the actual version.saveDocument
(String nodeHdoc, String ddcName, List<SaPropertyValue> values) Saves the document paramaters to the document.saveDocument
(String nodeHdoc, String ddcName, List<SaPropertyValue> values, boolean resolveLinks) Saves the document paramaters to the document.searchFolderClass
(SaFolderClassSearchInfo searchInfo) Searches for folder classes with the specified properties.searchFolderDocuments
(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) HQL search extended with additional folder informations and depth.searchSettings
(SettingSearchInfo searchInfo) Searches for settings.void
sendBarcode
(String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) Send barcode to SAP.setACLName
(String ddcname, String hDoc, String acl, int commitMode, String versionComment) Sets the given ACL to the node.void
setAnnotations
(String hDoc, int indexOfContentElement, String annotations) Sets the given annotations to the document.void
setElementMark
(int element) Mark the content element.void
setEventsEnabled
(boolean enabled) Sets whether events (e.g.void
setFolderAcl
(String folderTableDDC, String folderId, String aclName) Sets an ACL for the given folder.void
Set the locale for localization.void
setOutOfOffice
(boolean isOutOfOffice) Set the out of office status for the logged on user.void
setSetting
(Setting setting) Persists a setting in the database.void
setSubstitute
(String name) Set the substitute for the logged on user.boolean
setUsedLicense
(int type, int count) Set the count of used licenses.void
setUserSetting
(SaUserSetting setting) Persists a user setting object.void
setVariables
(int element, Map<String, String> variables) Method to set the Variables for an Content-Object or the Structure itself.void
startSQLTransaction
(String ddcName) Start SQL transaction.void
Starts a transaction in the backend system.storeDocument
(boolean isNew, int commitMode, String versionComment, String ddcName, String acls) Stores the actual document to the backend.storeDocument
(boolean isNew, int commitMode, String versionComment, String ddcName, String acls, boolean checkin) Stores the actual document to the backend.void
storeSystemFile
(SystemFileKind kind, String name, InputStream data) Stores a system file of a specific kind.boolean
unlockNode
(String sysRowId, String ddcName) Unlocks a node.void
updateExternalStorageUploadStatus
(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) Updates the upload status of External Storage foldervoid
updateFolder
(String folderTableDDC, String folderId, List<SaPropertyValue> values) Updates a given node with the given properties.long
writeContent
(ContentStream contentStream) Writes the content of the document.long
writeContent
(InputStream stream) Writes the content of the document.long
writeContent
(InputStream stream, String fileName, int element) 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.
-
Method Details
-
logon
com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials) throws SaSystemException, SaAuthenticationException Logon with the passed credentials.- Parameters:
credentials
- credentials which should be used for logon- Returns:
- Session which holds all information about the created session
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
logon
com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) throws SaSystemException, SaAuthenticationException Logon with the passed credentials and associate the given session information.- Parameters:
credentials
- credentials which should be used for logonsessionInfo
- The session information like user agent, remote address etc.- Returns:
- Session which holds all information about the created session
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
listActiveSessions
List the active sessions of the logged in user.- Returns:
- A list of
Session
- Throws:
SaSystemException
-
closeSession
boolean closeSession(com.saperion.connector.authentication.Session session) throws SaSystemException Close the givenSession
- Parameters:
session
-- Returns:
- true if successful, false otherwise
- Throws:
SaSystemException
-
logon
@Deprecated default com.saperion.connector.authentication.Session logon(int rmiToken) throws SaSystemException Deprecated.Logon with given rmi token.- Parameters:
rmiToken
- The rmi token obtained from already logged in session- Returns:
- the session information associated with given token
- Throws:
SaSystemException
- error on user login
-
logoff
Log off the user from the server instance.- Returns:
- True, if done. False if session is not alive.
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaRMICommandException
-
getLicenseCount
Read the licence count for the given user.- Parameters:
type
- Client type- Returns:
- License count
- Throws:
SaSystemException
- Error on the saperion system
-
setUsedLicense
Set the count of used licenses.- Parameters:
type
- Client typecount
- Number of licenses- Returns:
- True, if success
- Throws:
SaSystemException
- Error on the saperion system
-
setLocale
Set the locale for localization.- Parameters:
local
- Locale- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaRMICommandException
-
getMembers
Reads the member.- Returns:
- Member tree
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaRMICommandException
-
getMember
WorkflowMember getMember(WorkflowMember member, int depth, String filter) throws SaSystemException, SaAuthenticationException Reads the member.- Parameters:
member
- workflow member, which direct children have to be returned.depth
- depth of the returned children.filter
- filter for search, only matching members will be found, leave empty to get all members.- Returns:
- Member tree
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaRMICommandException
-
getMandant
String getMandant()- Returns:
- Mandant name
-
getUserIdsForQuery
Read the userids.- Returns:
- User ids
- Throws:
SaSystemException
- SaRMICommandException
-
loadDDCNames
Retrieves the available DDC names.- Returns:
- Array of DDC names
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
loadFolderDDCNames
Retrieves the available folder DDC names.- Returns:
- Array of folder DDC names
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
loadWorkflowDDCName
Retrieves the workflow DDC name.- Returns:
- workflow DDC name
- Throws:
SaSystemException
- SaRMICommandException
-
getSystemSetting
Retrieves a system setting object.- Parameters:
accessKey
- key to get associated system setting- Returns:
SaSystemSetting
- Throws:
SaSystemException
- System exception
-
getSystemInfo
Reads system info.- Returns:
- System info
- Throws:
SaSystemException
- System exception
-
getFeatures
Read the features.- Returns:
- Features
- Throws:
SaSystemException
- System exception
-
getUserSetting
Retrieves a user setting object.- Parameters:
accessKey
- key to get associated user setting- Returns:
SaUserSetting
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- authentication exception
-
setUserSetting
Persists a user setting object.- Parameters:
setting
- theSaUserSetting
object to be stored- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- authentication exception
-
getSetting
Setting getSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException Retrieves a setting from the database.- Parameters:
name
- the setting's namesection
- the setting's sectionisLong
- whether this is a setting with a long (>2KB) value or not- Returns:
- the setting or null if no setting with the given key and section was found
- Throws:
SaSystemException
- system error when retrieving the settingSaAuthenticationException
- authentication error
-
searchSettings
SettingSearchResult searchSettings(SettingSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException Searches for settings.- Parameters:
searchInfo
-SettingSearchInfo
containing information about what to search- Returns:
- a
SettingSearchResult
- Throws:
SaSystemException
- system error when searchingSaAuthenticationException
- authentication error
-
setSetting
Persists a setting in the database.- Parameters:
setting
- the setting to persist- Throws:
SaSystemException
- system error when persisting the settingSaAuthenticationException
- authenticatin error when persisting the setting
-
deleteSetting
boolean deleteSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException Deletes a setting in the database.- Parameters:
name
- the name of the setting to deletesection
- the section of the setting to deleteisLong
- whether this is a setting with a long (>2KB) value or not- Returns:
- true if setting was deleted, false if there was no such setting
- Throws:
SaSystemException
- system error when deleting the settingSaAuthenticationException
- authentication error when deleting the setting
-
getFieldDescriptions
SaFieldDescription[] getFieldDescriptions(String ddcName) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the field descriptions for a given DDC.- Parameters:
ddcName
- DDC name- Returns:
- Array of field description objects
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException
-
getRealDBName
returns the real database table name for a given DDC.- Parameters:
ddcName
- DDC namefield
- field namemandant
- Mandant- Returns:
- Array of field description objects
- Throws:
SaSystemException
- SaRMICommandException
-
getFieldDescriptions
Reads the field descriptions for a given DDC.- Parameters:
ddcName
- DDC namemandant
- Mandant- Returns:
- Array of field description objects
- Throws:
SaSystemException
- SaRMICommandException
-
getDDC
Returns information about the specified DDC.- Parameters:
ddcName
- the name of the DDC- Returns:
- DDC information
- Throws:
SaSystemException
- system error when retrieving information about requested DDCSaAuthenticationException
- authentication exception when retrieving information about requested DDC
-
isRevisionEnabled
boolean isRevisionEnabled(int mandant, String ddcName) throws SaSystemException, SaAuthenticationException Gets the information whether the provided ddc table contains the fields required for revisions.- Parameters:
mandant
- mandant numberddcName
- table/jcr workspace name- Returns:
- true, if the revision fields are present. False otherwise.
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
readDocumentMetadata
SaPropertyValue[] readDocumentMetadata(String sysRowId, String ddcName, String[] fields) throws SaSystemException, SaAuthenticationException, SaGetNodeException Reads the meta data of the document with the given ID.- Parameters:
sysRowId
- The ID of the document (SYSROWID)ddcName
- The name of the database definitionfields
- Field names to be read. If empty or null, all fields will be read.- Returns:
- The Meta data of the document represented as an array of
SaPropertyValue
instances. - Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException
-
getFulltext
String getFulltext(String ddcName, String sysRowId, String hdoc, String fieldName, long length) throws SaSystemException, SaAuthenticationException Reads the fulltext information for the given document with the given SYSROWID in the given DDC.- Parameters:
ddcName
- DDC name of the documentsysRowId
- SYSROWID of the document. Can be null if hdoc is set. If both hdoc and sysRowId are set, hdoc will be used.hdoc
- HDOC of the document. Can be null if sysRowId is set. If both hdoc and sysRowId are set, hdoc will be used.fieldName
- name of the fulltext field to retrieve content from. If not set, the first fulltext field of the DDC will be usedlength
- maximum length of content to retrieve. If -1, the complete content will be returned.- Returns:
- Content of the fulltext for this document
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
getThumbnail
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
-
getIdsFromQuery
Executes a HQL query and returns the results as a string list. Currently are only two queries in focus:
- search for hDocs
- search for sysRowIds
- Parameters:
query
- HQL query- Returns:
- String result list
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationException
-
getStringQueryResult
List<SaDocumentInfo> getStringQueryResult(SaQueryInfo queryInfo) throws SaSystemException, SaAuthenticationException, SaDBException Executes a given HQL string and returns the results as list.- Parameters:
queryInfo
- HQL query info- Returns:
- Result list
- Throws:
SaSystemException
- Error on the saperion systemSaAuthenticationException
- SaAuthenticationExceptionSaDBException
- query execution exception
-
getVersionList
List<String> getVersionList(String ddcName, String sysrowID) throws SaSystemException, SaAuthenticationException Reads the versionlist for the given document.- Parameters:
ddcName
- DDC namesysrowID
- SYSROWID- Returns:
- List of HDOC's
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
getHDocForSysRowId
String getHDocForSysRowId(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaDDCException Searchs the HDOC for the given SysRowId.- Parameters:
sysRowId
- SysRowIdddcName
- DDC name- Returns:
- Resultset for HDOC's
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException
-
isAlive
Test the lifetime of this token.- Returns:
- True if alive
- Throws:
SaSystemException
- System exception
-
getTaskList
List<TaskInfo> getTaskList(int[] ids, String filter, Map<String, Object> parameter) throws SaAuthenticationException, SaSystemExceptionReads the task for this user.- Parameters:
ids
- Array of ID'sfilter
- HQL filterparameter
- Filter parameter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTaskAuditList
List<TaskAuditInfo> getTaskAuditList(int[] ids, String filter, Map<String, Object> parameter) throws SaAuthenticationException, SaSystemExceptionReads the task audit for this user.- Parameters:
ids
- Array of ID'sfilter
- HQL filterparameter
- Filter parameter- Returns:
- List of
TaskAuditInfo
objects - Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTask
Reads the task info for the given ID.- Parameters:
taskID
- Task SysRowId- Returns:
- Task info
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getParentTask
Reads the parent task info for the given ID.- Parameters:
taskID
- Task SysRowId- Returns:
- Task info
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getCommandInfos
Collection<CommandInfo> getCommandInfos(String taskUID) throws SaAuthenticationException, SaSystemException Reads all possible transitions for this task.- Parameters:
taskUID
- Task UID- Returns:
- Command list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getCommandInfos
Collection<CommandInfo> getCommandInfos(String taskUID, boolean transitionsOnly) throws SaAuthenticationException, SaSystemException Reads all possible transitions and optional other possible commands for this task.- Parameters:
taskUID
- Task UIDtransitionsOnly
- if true, only transition commands will be returned- Returns:
- Command list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getBoxDefinitions
Reads the box definitions.- Returns:
- Box definitions
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getBoxCount
BoxCount getBoxCount(int boxId, BoxCountType type, Map<String, Object> parameters) throws SaAuthenticationException, SaSystemExceptionReturns the number of all elements and of all unread elements of the inbox identified by the given id.- Parameters:
boxId
- the workflow box idtype
- type of tasks to search forparameters
- parameters needed for searching- Returns:
- number of all elements and of all unread elements
- Throws:
SaAuthenticationException
- if an error occurs.SaSystemException
- if an error occurs.
-
executeCommand
String executeCommand(ContextInfo contextInfo) throws SaAuthenticationException, SaSystemException, SaWorkflowException Performs the given command. The parameters must fit to the given parameter. Unneeded parameters can be set to null.- Parameters:
contextInfo
- Context info- Returns:
- New TaskID
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getCommentInfos
List<CommentInfo> getCommentInfos(String taskUID) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads the comments for the given task.- Parameters:
taskUID
- Task UID- Returns:
- List of comments
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getHistoryInfos
List<HistoryInfo> getHistoryInfos(String taskUID) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads the history for the given task.- Parameters:
taskUID
- Task UID- Returns:
- History list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getCompleteHistoryInfos
List<List<HistoryInfo>> getCompleteHistoryInfos(String docUID) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads the history for the given task.- Parameters:
docUID
- Document UID- Returns:
- CompleteHistoryInfo
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getWorkflowDefinitions
List<String> getWorkflowDefinitions() throws SaAuthenticationException, SaSystemException, SaWorkflowExceptionReads all available workflow definitions.- Returns:
- Workflowdefinition list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
addComment
void addComment(String comment, String taskUID, int level) throws SaAuthenticationException, SaSystemException, SaWorkflowException - Parameters:
comment
- CommenttaskUID
- Task UIDlevel
- Level- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
addHistory
void addHistory(String description, String taskUID) throws SaAuthenticationException, SaSystemException, SaWorkflowException - Parameters:
description
- CommenttaskUID
- Task UID- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getSubstitute
Get the substitute for the logged on user.- Returns:
- Substitute name
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
setSubstitute
Set the substitute for the logged on user.- Parameters:
name
- Substitute name- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getOutOfOffice
Get the out of office status for the logged on user.- Returns:
- is OutOfOffice
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
setOutOfOffice
Set the out of office status for the logged on user.- Parameters:
isOutOfOffice
- True, if is OutOfOffice- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getUsers
Reads a list of filtered users.- Parameters:
filter
- Filter- Returns:
- List of users
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
loadSettings
Load settings from backend.- Parameters:
section
- Section- Returns:
- Settings
- Throws:
SaSystemException
- Exception
-
getToken
int getToken()- Returns:
- Token
-
getSession
com.saperion.connector.authentication.Session getSession()- Returns:
- the actual valid session
-
getSystemConnector
SaRMISystemConnector getSystemConnector()- Returns:
- System connector
-
getCommitMode
int getCommitMode()- Returns:
- Commitmode from the configuration.
-
getDeleteMode
int getDeleteMode()- Returns:
- Deletemode from the configuration.
-
writeContent
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
-
writeContent
long writeContent(InputStream stream, String fileName, int element) throws SaSystemException, SaAuthenticationException, SaConnectException -
writeContent
long writeContent(InputStream stream) throws SaSystemException, SaAuthenticationException, SaConnectException Writes the content of the document.- Parameters:
stream
- content stream- Returns:
- Actual element count
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException
-
writeContent
long writeContent(ContentStream contentStream) throws SaSystemException, SaAuthenticationException, SaConnectException, StreamVerificationException, UploadLimitExceededException Writes the content of the document.- Parameters:
contentStream
- content stream- Returns:
- Actual element count
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectExceptionStreamVerificationException
- if the content stream validation is enabled and the validation failed.UploadLimitExceededException
-
closeDocument
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:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaRMICommandExceptionSaGetNodeException
- SaGetNodeException
-
deleteDocument
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
-
readDocumentFirst
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
-
readDocumentFirst
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
-
readDocumentNext
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
-
readVersionMetadata
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
-
readVersionMetadata
SaVersionData readVersionMetadata(String versionID, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException 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
SaSaveInfo createDocument(String ddcName, List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException Creates a new document with the given parameters.- Parameters:
ddcName
- Node database table namevalues
- List of all values- Returns:
- Node information object
- Throws:
SaDDCException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaSystemException
- Error on the saperion systemSaGetNodeException
- SaGetNodeException
-
discardDocument
Discards the document identified by the tokens handle. Cleans up temporary document resources and handles.- Throws:
SaSystemException
-
cacheDocument
SaSaveInfo cacheDocument(boolean isNew, int commitMode, String versionComment, String xhDoc, String ddcName, 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 docddcName
- 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
-
createLink
SaSaveInfo createLink(LinkInfo link) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeException 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
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaDDCException
- SaDDCException
-
saveDocument
SaSaveInfo saveDocument(String nodeHdoc, String ddcName, List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaDDCException Saves the document paramaters to the document.- Parameters:
nodeHdoc
- Node HDOCddcName
- Database table namevalues
- List of all values- Returns:
- written node informations
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaDDCException
- SaDDCException
-
saveDocument
SaSaveInfo saveDocument(String nodeHdoc, String ddcName, List<SaPropertyValue> values, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaDDCException Saves the document paramaters to the document.- Parameters:
nodeHdoc
- Node HDOCddcName
- Database table namevalues
- List of all valuesresolveLinks
- Resolve links- Returns:
- written node informations
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaDDCException
- SaDDCException
-
storeDocument
SaSaveInfo storeDocument(boolean isNew, int commitMode, String versionComment, String ddcName, 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 stringddcName
- DDC nameacls
- ACL name string- Returns:
- Node information object
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetNodeException
- SaSetNodeExceptionSaDDCException
- SaDDCException
-
storeDocument
SaSaveInfo storeDocument(boolean isNew, int commitMode, String versionComment, String ddcName, String acls, boolean checkin) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetNodeException, SaDDCException Stores the actual document to the backend.- Parameters:
isNew
- Is a new documentcommitMode
- Commit modeversionComment
- Version comment stringddcName
- DDC nameacls
- ACL name string (semicolon separated)checkin
- Checkin document- Returns:
- Node information object
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeExceptionSaSetNodeException
- SaSetNodeExceptionSaDDCException
- SaDDCException
-
checkoutDocument
void checkoutDocument(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Checkout the given document.- Parameters:
hDoc
- Document HDOC- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException
-
checkoutDocument
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
-
dsicardCheckout
void dsicardCheckout(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Discards the checkout of the given document.- Parameters:
hDoc
- Document HDOC- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaGetNodeException
- SaGetNodeException
-
releaseDocument
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
-
restoreVersion
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
-
clearContent
void clearContent() throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectExceptionClears all content of the opened document.- Throws:
SaSystemException
- Error on the saperion systemSaSetContentException
- SaSetContentExceptionSaGetNodeException
- SaGetNodeExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException
-
setElementMark
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
-
removeElement
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 systemSaSetContentException
- SaSetContentExceptionSaGetNodeException
- SaGetNodeExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException
-
removeElement
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 systemSaSetContentException
- SaSetContentExceptionSaGetNodeException
- SaGetNodeExceptionSaAuthenticationException
- SaAuthenticationExceptionSaConnectException
- SaConnectException
-
getLockInfo
SaLockInfo getLockInfo(String sysRowId) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException Gets the lock info for a given node.- Parameters:
sysRowId
- SysRowId- Returns:
- Lockinfo
- Throws:
SaLockException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaSystemException
- Error on the saperion systemSaGetNodeException
- SaGetNodeException
-
lockNode
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:
SaLockException
- Error on the saperion systemSaAuthenticationException
- Error on the saperion systemSaSystemException
- Error on the saperion systemSaGetNodeException
- SaGetNodeExceptionSaPropertyException
- SaPropertyException
-
unlockNode
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
-
getNodeAccessData
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:
SaAuthenticationException
- Error on the saperion systemSaSystemException
- Error on the saperion systemSaGetNodeException
- SaGetNodeException
-
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
-
startTransaction
Starts a transaction in the backend system.- Throws:
SaSystemException
- SaRMICommandException
-
getAnnotations
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:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication error
-
setAnnotations
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 HDOCannotations
- Annotation stringindexOfContentElement
- the index of the chosen context element- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication error
-
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
-
getACLNames
String getACLNames(String hDoc) throws SaSystemException, SaGetNodeException, SaAuthenticationException, SaDDCException Reads the ACL's for the given document.- Parameters:
hDoc
- Document HDOC- Returns:
- ACL name string
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaGetNodeException
- SaGetNodeException
-
getInvolvedUsers
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
-
setACLName
SaSaveInfo setACLName(String ddcname, String hDoc, String acl, int commitMode, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetACLException, SaSetNodeException, SaGetNodeException 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
- SaDDCExceptionSaSetACLException
- SaSetACLExceptionSaSetNodeException
- SaSetNodeExceptionSaGetNodeException
- SaGetNodeException
-
getAllACLs
Deprecated.Reads all existing ACL names.- Returns:
- List of ACL names
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
getACLRights
Reads the rights for the given acl's.- Parameters:
acls
- ACL's- Returns:
- Rights
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- Authentication exception
-
startSQLTransaction
Start SQL transaction.- Parameters:
ddcName
- the name of the ddc- Throws:
SaSystemException
- Error on the saperion system
-
finishSQLTransaction
Finish SQL transaction.- Parameters:
commit
- True, if commit, else rollbackddcName
- the name of the ddc- Throws:
SaSystemException
- Error on the saperion system
-
getFolderChildren
List<SaDocumentInfo> getFolderChildren(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Returns a cursor with the children of the given node. The function accepts a depth parameter. In case of a depth greater than one, the returned nodes are ordered in a depth-first order, and the caller must detect parent-child relationship with the appropriate fields (SysParentID, SysRowID). Note that searching with a depth greater than one is not a fast operation. It is recommended to use depth = 1 and only load further levels on demand if required. The allowedMaxNrOfChildFolders parameter is used to restrict the absolute number of hits loaded from the database. It is intended to be used to protect the system from overload problems caused by very large query-results. The depth-filtering is done after the query has returned from the database. So keep in mind that children found on deeper levels than specified in the depth-parameter are relevant for the total number of children found.
The default value for allowedMaxNrOfChildFolders can be configured with the setting rmi.getfolderchildren.maxresults in saperion.properties of JavaCoreServer. When this setting is set to a value > 0, it is not possible to search for an unlimited number of child nodes by passing a value of -1 for this parameter.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDdepth
- Depthfilter
- Additional HQL filter criteriaallowedMaxNrOfChildFolders
- allowed maximum number of results- Returns:
- List of folder information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder Exception
-
getFolderInfo
SaDocumentInfo getFolderInfo(String folderTableDDC, String folderId, boolean forceLoadVariables) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Reads the folder info object for the given folder.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder idforceLoadVariables
- if true, variables will be loaded from medium if the DDC does not contain the SYSPROPERTIES field.- Returns:
- Folder info object
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder Exception
-
getFolderParent
SaDocumentInfo getFolderParent(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDBException Returns the parent of the given node. Please note that in case of a node to which another node links, the real parent is returned, not the parent of the link.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Properties of the folder or null, if not found
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception
-
getFolderFromPath
List<SaDocumentInfo> getFolderFromPath(String folderTableDDC, String startNodeId, String folderPath, boolean exact) throws SaSystemException, SaAuthenticationException, SaDBException Returns the node(s) which match to the given path. Path names are built using the SysFolderName field of each node. As path separator, the backslash ('\') is used. The path can be searched relative to a given node, to allow for searching within Personal folders and the like. If exact is set to false, the folderPath can contain wildcards (%). Searching with wildcards can be slow depending on the number of entries in the folder-table and the database in use.- Parameters:
folderTableDDC
- Folder tablestartNodeId
- Startnode ID or null/empty if no relative search is requiredfolderPath
- Search pathexact
- if true, the path will be matched using '='. If false, LIKE will be used.- Returns:
- Folder list
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception
-
createFolder
String createFolder(SaFolderSaveInfo info) throws SaSystemException, SaAuthenticationException, SaDDCException Creates a new node below a given node. The parent node can be the root node (empty id).- Parameters:
info
- Folder save info- Returns:
- Folder ID
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
updateFolder
void updateFolder(String folderTableDDC, String folderId, List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaDDCException Updates a given node with the given properties.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDvalues
- Values- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
searchFolderDocuments
List<SaDocumentInfo> searchFolderDocuments(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) throws SaSystemException, SaAuthenticationException, SaDDCException HQL search extended with additional folder informations and depth.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDhqlFilter
- HQL query for document tables. The DDC name must be defined as $DDC$.- Returns:
- List of documents from each involved DDC's
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
deleteFolder
void deleteFolder(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Deletes a given node. It must not have children or filed document, i.e. the user must delete/remove all these before deleting the node.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
copyFolder
String copyFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) throws SaSystemException, SaAuthenticationException, SaDDCException Copies the given node and all it’s children to the destination. Note that only real children are copied, so links are not followed. Document filings can optionally be copied too, however this is an expensive operation, as each document has to be updated.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for appendwithDocuments
- True, if documents should be copied- Returns:
- new folder id
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
moveFolder
void moveFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild) throws SaSystemException, SaAuthenticationException, SaDDCException Moves the given node to a new destination. Document filings are always moved with the node. This is not a quick operation, as path and security information must be updated.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for append- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
addToFolder
void addToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Adds the document to a given folder. A document can be filed in multiple folders, but each filing operation must be called separately.- Parameters:
folderTableDDC
- Folder tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- Document is not fileable
-
removeFromFolder
void removeFromFolder(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Remove the document filing from the given node.- Parameters:
folderTableDDC
- Folder tabledocumentSysRowId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
moveToFolder
void moveToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) throws SaSystemException, SaAuthenticationException, SaDDCException Moves the document’s filing to the given node. It is removed from the original folder. Both source node and destination node must exist.- Parameters:
folderTableDDC
- Folder tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Source folder IDdestinationId
- Destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getDocumentFolders
List<SaDocumentInfo> getDocumentFolders(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Returns a list of folder properties which contains all nodes the document is contained in. The list is returned only for one node table, so if the document is filed in multiple node tables, this must be queried separately.- Parameters:
folderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document sysrowid- Returns:
- List of folder properties
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- Document is not fileable
-
getDocumentFolderCount
long getDocumentFolderCount(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Returns the total count over all folders from all users in which the specified document is countained in.- Parameters:
folderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document sysrowid- Returns:
- folder count
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- Document is not fileable
-
setFolderAcl
void setFolderAcl(String folderTableDDC, String folderId, String aclName) throws SaSystemException, SaAuthenticationException, SaDDCException Sets an ACL for the given folder. The node’s SysACLUserList is recalculated, and if the node has children, the same is true for all the node’s children.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDaclName
- ACL name- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getFolderRights
SaDocAccessData getFolderRights(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Returns the rights mask for the given folder and user. The effective rights are calculated by using ACL inheritance.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder access data
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getFolderClass
SaFolderClass getFolderClass(String className) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the folder class with the given name.- Parameters:
className
- Class name in dotted notation- Returns:
- Folder classs
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- authentication errorSaDDCException
- Database exception
-
searchFolderClass
Set<SaFolderClass> searchFolderClass(SaFolderClassSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException Searches for folder classes with the specified properties.- Parameters:
searchInfo
- bean with properties to search for- Returns:
- set of classes that match the specified properties
- Throws:
SaSystemException
- system exceptionSaAuthenticationException
- authentication error
-
resolveLatestHdoc
Resolves the hdoc of the latest version of the document identified by the given hdoc.- Parameters:
oldHdoc
- the old hdoc- Returns:
- the hdoc of the latest version of the document identified by the given hdoc.
- Throws:
SaSystemException
- the system error exceptionSaAuthenticationException
- the authentication error exception
-
getSystemFiles
List<String> getSystemFiles(SystemFileKind kind, String filter) throws SaSystemException, SaAuthenticationException Gets the system files of a specific kind.- Parameters:
kind
- the kind of systemfiles to read.filter
- A filter string. Only files will be returned, that match the filter. To get all systemfiles of a kind set filter to the empty string.- Returns:
- The system files of a specific kind.
- Throws:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
logClientEvent
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:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
getAcls
Reads all existing ACLs.- Returns:
- List of ACLs
- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationException
-
changePassword
void changePassword(String user, String oldPassword, String client, String newPassword) throws SaAuthenticationException, SaSystemException Changes the password of an existing user. This has to be done before a call tologon(Credentials)
was successfully invoked.- Parameters:
user
- The name of the user.oldPassword
- The old password. This parameter is required, since the password should only be changed by the user himselfclient
- The client of the actionsnewPassword
- The new password- Throws:
SaSystemException
SaAuthenticationException
-
getAuthorizedUsers
List<UsersRights> getAuthorizedUsers(String hDoc, String rights, MatchKind match) throws SaAuthenticationException, SaSystemException Returns the users, that have specific rights on a document.- Parameters:
hDoc
- The id of the document.rights
- The rights the requested users should have.match
- How the rights are matched: MKONEOF - find all users that have one of the specified rights MKEXACT - find all users that have exactly the specified rights MKATLEAST - find all users that have at least the specified rights- Returns:
- The users, that have specific rights on the document or null if the document has no acl set. In this case everyone has every right on the document.
- Throws:
SaSystemException
SaAuthenticationException
-
getArchivedSize
Returns the total document size in archive.- Parameters:
hDoc
- The document whichs size is wanted.- Returns:
- The total document size in archive.
- Throws:
SaSystemException
SaAuthenticationException
-
storeSystemFile
void storeSystemFile(SystemFileKind kind, String name, InputStream data) throws SaSystemException, SaAuthenticationException Stores a system file of a specific kind.- Parameters:
kind
- The kind of systemfile to store.name
- The name of the file. This has to be a filename without path and extension.data
- The content of the file to save.- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication error
-
loadSystemFile
InputStream loadSystemFile(SystemFileKind kind, String name) throws SaSystemException, SaAuthenticationException Loads a system file of a specific kind.- Parameters:
kind
- The kind of system file to loadname
- The name of the file to load.- Returns:
- an InputStream that holds the content of the file.
- Throws:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
getRMIVersion
Get the RMI interface version from java core server.- Throws:
SaSystemException
-
getFolderUpdateInfo
Set<FolderUpdateInfo> getFolderUpdateInfo(Map<String, Long> folderIds) throws SaSystemException, SaAuthenticationExceptionGet the Set of folders that shall be refreshed.- Parameters:
folderIds
- Map of SYSROWIDs with time stamps of last refresh to check.- Returns:
- Set of folders that shall be refreshed.
- Throws:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
setVariables
void setVariables(int element, Map<String, String> variables) throws SaAuthenticationException, SaSystemExceptionMethod 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
-
checkSapUrl
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
-
invoke
<T extends Serializable> T invoke(com.lexmark.saperion.remote.common.operations.Operation<T, SaBasicException, throws SaSystemException, SaAuthenticationExceptionLegacyConnection> operation) This method invokes aOperation
on the backend.- Type Parameters:
T
- The return type- Parameters:
operation
- The operation to invoke- Returns:
- The result of the invocation
- Throws:
SaSystemException
SaAuthenticationException
-
newInvoke
<ResultType extends Serializable,ExceptionType extends com.lexmark.saperion.exceptions.EcmException> ResultType newInvoke(com.lexmark.saperion.remote.common.operations.EcmOperation<ResultType, ExceptionType> operation) throws SaSystemException, SaAuthenticationExceptionThis method invokes aEcmOperation
in the backend.- Parameters:
operation
- the operation to invoke- Returns:
- the result of the operation
- Throws:
SaSystemException
SaAuthenticationException
-
sendBarcode
void sendBarcode(String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) throws SaSystemException, SaAuthenticationException Send barcode to SAP.- Parameters:
indexMask
- Index mask namedocUid
- Document UIDcontentRep
- SAP Content repositorysid
- SAP IDdocType
- Document typevalue
- Valuemandant
- Mandant name- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
getServerInfos
List<SaRMIServerInfo> getServerInfos()Returns a list of objects describing the servers this connector is connected to.- Returns:
- set of
SaRMIServerInfo
-
setEventsEnabled
Sets whether events (e.g. for the IS) should be enabled for the current session.- Parameters:
enabled
- true, if events should be enabled, otherwise false.- Throws:
SaSystemException
- when a system error occured.SaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
getEventsEnabled
Returns whether events (e.g. for the IS) are enabled for the current session.- Returns:
- true, if events are enabled, otherwise false.
- Throws:
SaSystemException
- when a system error occured.SaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
getFullTextFields
Set<Map.Entry<String,String>> getFullTextFields(String ddcName, List<String> fullTextFields, String hdoc) throws SaSystemException Fetches values of Full text columns- Parameters:
ddcName
- name of the DDCfullTextFields
- List of Fields which are of Text retrieval type. Make sure to prefixSaConstants.FULL_TEXT_COLUMN_PREFIX
hdoc
- hdoc of the document- Returns:
- Set of entries containing full text coulmn and corresponding value
- Throws:
SaSystemException
-
getExternalStorageFoldersForUpload
List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(ExternalStorageType storageType) throws SaSystemException, SaAuthenticationException Fetches all foldes of External Storage from where documents need to be uploaded- Parameters:
storageType
-- Returns:
- list of folders
- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
getExternalStorageFoldersForUpload
List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaSystemException, SaAuthenticationExceptionFetches all folders of all External Storage services from where documents need to be uploaded- Returns:
- list of folder details
- Throws:
RemoteException
SaSystemException
SaAuthenticationException
-
getExternalStorageMapping
SaperionExternalStorageMappingInfo getExternalStorageMapping(String sysRowId) throws SaSystemException, SaAuthenticationException Fetches the external storage mapping for the provided SysRowId- Parameters:
sysRowId
-- Returns:
- Throws:
SaSystemException
SaAuthenticationException
-
createExternalStorageFolderMapping
void createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo) throws SaSystemException, SaAuthenticationException 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
void updateExternalStorageUploadStatus(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) throws SaSystemException, SaAuthenticationException Updates the upload status of External Storage folder- Parameters:
folderId
- folderId whose status needs to be updatedstatus
-storageType
-- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
deleteExternalStorageFolderMapping
int deleteExternalStorageFolderMapping(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) throws SaSystemException, SaAuthenticationException 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.
-
getCurrentUserRole
com.lexmark.saperion.administration.RoleType getCurrentUserRole() throws SaSystemException, SaAuthenticationException- Returns:
- the effective role (combined rights of all roles / profiles) of the current logged-in user
- Throws:
SaSystemException
SaAuthenticationException
-