Package com.saperion.connector.rmi
Interface SaRMIClientCommand
-
- All Known Implementing Classes:
AbstractDocRMIClientCommand,AbstractFolderRMIClientCommand,AbstractQueryRMIClientCommand,AbstractRMIClientCommand,AbstractWfRMIClientCommand,SaRMIClientCommandImpl
public interface SaRMIClientCommandThe interface for the RMI Client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddComment(java.lang.String comment, java.lang.String taskUID, int level)voidaddHistory(java.lang.String description, java.lang.String taskUID)voidaddToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId)Adds the document to a given folder.SaSaveInfocacheDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String xhDoc, java.lang.String ddcName, java.lang.String acls)Stores the actual document to the backend.voidchangePassword(java.lang.String user, java.lang.String oldPassword, java.lang.String client, java.lang.String newPassword)Changes the password of an existing user.voidcheckoutDocument(java.lang.String hDoc)Checkout the given document.SapDocInfocheckSapUrl(java.lang.String url)Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC.voidclearContent()Clears all content of the opened document.voidcloseDocument(com.saperion.jni.SaJNIDocHandle handle)Manually closing of a open document.booleancloseSession(com.saperion.connector.authentication.Session session)Close the givenSessionjava.lang.StringcopyFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild, boolean withDocuments)Copies the given node and all it’s children to the destination.SaSaveInfocreateDocument(java.lang.String ddcName, java.util.List<SaPropertyValue> values)Creates a new document with the given parameters.java.lang.StringcreateFolder(SaFolderSaveInfo info)Creates a new node below a given node.SaSaveInfocreateLink(LinkInfo link)Creates a SAPERION Link into one Archive for an existing Document.SaSaveInfodeleteDocument(int mode, java.lang.String hdoc)Delete a document.voiddeleteFolder(java.lang.String folderTableDDC, java.lang.String folderId)Deletes a given node.booleandeleteSetting(java.lang.String name, java.lang.String section, boolean isLong)Deletes a setting in the database.voiddiscardDocument()Discards the document identified by the tokens handle.voiddsicardCheckout(java.lang.String hDoc)Discards the checkout of the given document.java.lang.StringexecuteCommand(ContextInfo contextInfo)Performs the given command.voidfinishSQLTransaction(boolean commit, java.lang.String ddcName)Finish SQL transaction.voidfinishTransaction(boolean commit)Finish the transaction in the backend system.java.lang.StringgetACLNames(java.lang.String hDoc)Reads the ACL's for the given document.SaACLRightsgetACLRights(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.StringgetAnnotations(java.lang.String hDoc, int indexOfContentElement, boolean currentRevision)Reads the annotations from the given document.intgetArchivedSize(java.lang.String hDoc)Returns the total document size in archive.java.util.List<UsersRights>getAuthorizedUsers(java.lang.String hDoc, java.lang.String rights, MatchKind match)Returns the users, that have specific rights on a document.BoxCountgetBoxCount(int boxId, BoxCountType type, java.util.Map<java.lang.String,java.lang.Object> parameters)Returns the number of all elements and of all unread elements of the inbox identified by the given id.java.util.List<BoxDefinition>getBoxDefinitions()Reads the box definitions.java.util.Collection<CommandInfo>getCommandInfos(java.lang.String taskUID)Reads all possible transitions for this task.java.util.Collection<CommandInfo>getCommandInfos(java.lang.String taskUID, boolean transitionsOnly)Reads all possible transitions and optional other possible commands for this task.java.util.List<CommentInfo>getCommentInfos(java.lang.String taskUID)Reads the comments for the given task.intgetCommitMode()java.util.List<java.util.List<HistoryInfo>>getCompleteHistoryInfos(java.lang.String docUID)Reads the history for the given task.com.lexmark.saperion.administration.RoleTypegetCurrentUserRole()DDCgetDDC(java.lang.String ddcName)Returns information about the specified DDC.intgetDeleteMode()longgetDocumentFolderCount(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId)Returns the total count over all folders from all users in which the specified document is countained in.java.util.List<SaDocumentInfo>getDocumentFolders(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId)Returns a list of folder properties which contains all nodes the document is contained in.booleangetEventsEnabled()Returns whether events (e.g.SaFeaturegetFeatures()Read the features.SaFieldDescription[]getFieldDescriptions(java.lang.String ddcName)Reads the field descriptions for a given DDC.SaFieldDescription[]getFieldDescriptions(java.lang.String ddcName, java.lang.String mandant)Reads the field descriptions for a given DDC.java.util.List<SaDocumentInfo>getFolderChildren(java.lang.String folderTableDDC, java.lang.String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders)Returns a cursor with the children of the given node.SaFolderClassgetFolderClass(java.lang.String className)Reads the folder class with the given name.java.util.List<SaDocumentInfo>getFolderFromPath(java.lang.String folderTableDDC, java.lang.String startNodeId, java.lang.String folderPath, boolean exact)Returns the node(s) which match to the given path.SaDocumentInfogetFolderInfo(java.lang.String folderTableDDC, java.lang.String folderId, boolean forceLoadVariables)Reads the folder info object for the given folder.SaDocumentInfogetFolderParent(java.lang.String folderTableDDC, java.lang.String folderId)Returns the parent of the given node.SaDocAccessDatagetFolderRights(java.lang.String folderTableDDC, java.lang.String folderId)Returns the rights mask for the given folder and user.java.util.Set<FolderUpdateInfo>getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds)Get the Set of folders that shall be refreshed.java.lang.StringgetFulltext(java.lang.String ddcName, java.lang.String sysRowId, java.lang.String hdoc, java.lang.String fieldName, long length)Reads the fulltext information for the given document with the given SYSROWID in the given DDC.java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>getFullTextFields(java.lang.String ddcName, java.util.List<java.lang.String> fullTextFields, java.lang.String hdoc)Fetches values of Full text columnsjava.lang.StringgetHDocForSysRowId(java.lang.String sysRowId, java.lang.String ddcName)Searchs the HDOC for the given SysRowId.java.util.List<HistoryInfo>getHistoryInfos(java.lang.String taskUID)Reads the history for the given task.java.util.List<java.lang.String>getIdsFromQuery(java.lang.String query)Executes a HQL query and returns the results as a string list.java.util.List<java.lang.String>getInvolvedUsers(java.lang.String hDoc)Reads all users involved in the set of ACL's.intgetLicenseCount(int type)Read the licence count for the given user.SaLockInfogetLockInfo(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.java.lang.StringgetMandant()WorkflowMembergetMember(WorkflowMember member, int depth, java.lang.String filter)Reads the member.WorkflowMembergetMembers()Reads the member.com.saperion.jni.SaJNIDocAccessDatagetNodeAccessData(java.lang.String hdoc)Opens the document identified by hdoc and returns an object containing all access right data information for the session user.booleangetOutOfOffice()Get the out of office status for the logged on user.TaskInfogetParentTask(java.lang.String taskID)Reads the parent task info for the given ID.java.lang.StringgetRealDBName(java.lang.String ddcName, java.lang.String field, java.lang.String mandant)returns the real database table name for a given DDC.java.lang.StringgetRMIVersion()Get the RMI interface version from java core server.java.util.List<SaRMIServerInfo>getServerInfos()Returns a list of objects describing the servers this connector is connected to.com.saperion.connector.authentication.SessiongetSession()SettinggetSetting(java.lang.String name, java.lang.String section, boolean isLong)Retrieves a setting from the database.java.util.List<SaDocumentInfo>getStringQueryResult(SaQueryInfo queryInfo)Executes a given HQL string and returns the results as list.java.lang.StringgetSubstitute()Get the substitute for the logged on user.SaRMISystemConnectorgetSystemConnector()java.util.List<java.lang.String>getSystemFiles(SystemFileKind kind, java.lang.String filter)Gets the system files of a specific kind.SaSystemInfogetSystemInfo()Reads system info.SaSystemSettinggetSystemSetting(java.lang.String accessKey)Retrieves a system setting object.TaskInfogetTask(java.lang.String taskID)Reads the task info for the given ID.java.util.List<TaskAuditInfo>getTaskAuditList(int[] ids, java.lang.String filter, java.util.Map<java.lang.String,java.lang.Object> parameter)Reads the task audit for this user.java.util.List<TaskInfo>getTaskList(int[] ids, java.lang.String filter, java.util.Map<java.lang.String,java.lang.Object> parameter)Reads the task for this user.byte[]getThumbnail(java.lang.String hDoc, int widthX, int widthY, boolean color)Reads the thumbnail of the given document.intgetToken()int[]getUserIdsForQuery()Read the userids.java.util.List<java.lang.String>getUsers(java.lang.String filter)Reads a list of filtered users.SaUserSettinggetUserSetting(java.lang.String accessKey)Retrieves a user setting object.java.util.List<java.lang.String>getVersionList(java.lang.String ddcName, java.lang.String sysrowID)Reads the versionlist for the given document.java.util.List<java.lang.String>getWorkflowDefinitions()Reads all available workflow definitions.<T extends java.io.Serializable>
Tinvoke(com.lexmark.saperion.remote.common.operations.Operation<T,SaBasicException,LegacyConnection> operation)This method invokes aOperationon the backend.booleanisAlive()Test the lifetime of this token.booleanisRevisionEnabled(int mandant, java.lang.String ddcName)Gets the information whether the provided ddc table contains the fields required for revisions.java.util.List<com.saperion.connector.authentication.Session>listActiveSessions()List the active sessions of the logged in user.java.lang.String[]loadDDCNames()Retrieves the available DDC names.java.lang.String[]loadFolderDDCNames()Retrieves the available folder DDC names.java.util.PropertiesloadSettings(java.lang.String section)Load settings from backend.java.io.InputStreamloadSystemFile(SystemFileKind kind, java.lang.String name)Loads a system file of a specific kind.java.lang.StringloadWorkflowDDCName()Retrieves the workflow DDC name.booleanlockNode(java.lang.String sysRowId, java.lang.String ddcName, int lockType, boolean sessionScoped)Locks a node.voidlogClientEvent(java.lang.String hdoc, SaConstants.ProtoEvents event, java.lang.String remark)Adds an audit log event.booleanlogoff()Log off the user from the server instance.default com.saperion.connector.authentication.Sessionlogon(int rmiToken)Deprecated.com.saperion.connector.authentication.Sessionlogon(com.lexmark.saperion.remote.common.authentication.Credentials credentials)Logon with the passed credentials.com.saperion.connector.authentication.Sessionlogon(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.voidmoveFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild)Moves the given node to a new destination.voidmoveToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId, java.lang.String destinationId)Moves the document’s filing to the given node.<ResultType extends java.io.Serializable,ExceptionType extends com.lexmark.saperion.exceptions.EcmException>
ResultTypenewInvoke(com.lexmark.saperion.remote.common.operations.EcmOperation<ResultType,ExceptionType> operation)This method invokes aEcmOperationin the backend.com.saperion.jni.SaJNIReadBufferreadDocumentFirst(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.SaJNIReadBufferreadDocumentFirst(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.SaPropertyValue[]readDocumentMetadata(java.lang.String sysRowId, java.lang.String ddcName, java.lang.String[] fields)Reads the meta data of the document with the given ID.com.saperion.jni.SaJNIReadBufferreadDocumentNext(com.saperion.jni.SaJNIDocHandle handle)Reads the next bytes from the open document, described in the handle.SaVersionDatareadVersionMetadata(java.lang.String versionID)Reads the version meta data of the document with the given ID.SaVersionDatareadVersionMetadata(java.lang.String versionID, boolean resolveLinks)Reads the version meta data of the document with the given ID.voidreleaseDocument(java.lang.String hDoc, java.lang.String comment)Release the given document.voidremoveElement(int element)Removes a existing content element.voidremoveElement(java.lang.Integer[] elements)Removes a series of existing content elements.voidremoveFromFolder(java.lang.String folderTableDDC, java.lang.String documentSysRowId, java.lang.String documentDDC, java.lang.String folderId)Remove the document filing from the given node.java.lang.StringresolveLatestHdoc(java.lang.String oldHdoc)Resolves the hdoc of the latest version of the document identified by the given hdoc.SaSaveInforestoreVersion(java.lang.String versionID)Restores the given version to the actual version.SaSaveInfosaveDocument(java.lang.String nodeHdoc, java.lang.String ddcName, java.util.List<SaPropertyValue> values)Saves the document paramaters to the document.SaSaveInfosaveDocument(java.lang.String nodeHdoc, java.lang.String ddcName, java.util.List<SaPropertyValue> values, boolean resolveLinks)Saves the document paramaters to the document.java.util.Set<SaFolderClass>searchFolderClass(SaFolderClassSearchInfo searchInfo)Searches for folder classes with the specified properties.java.util.List<SaDocumentInfo>searchFolderDocuments(java.lang.String folderTableDDC, java.lang.String folderId, SaQueryInfo hqlFilter)HQL search extended with additional folder informations and depth.SettingSearchResultsearchSettings(SettingSearchInfo searchInfo)Searches for settings.voidsendBarcode(java.lang.String indexMask, java.lang.String docUid, java.lang.String contentRep, java.lang.String sid, java.lang.String docType, java.lang.String value, int mandant)Send barcode to SAP.SaSaveInfosetACLName(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.voidsetAnnotations(java.lang.String hDoc, int indexOfContentElement, java.lang.String annotations)Sets the given annotations to the document.voidsetElementMark(int element)Mark the content element.voidsetEventsEnabled(boolean enabled)Sets whether events (e.g.voidsetFolderAcl(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String aclName)Sets an ACL for the given folder.voidsetLocale(java.util.Locale local)Set the locale for localization.voidsetOutOfOffice(boolean isOutOfOffice)Set the out of office status for the logged on user.voidsetSetting(Setting setting)Persists a setting in the database.voidsetSubstitute(java.lang.String name)Set the substitute for the logged on user.booleansetUsedLicense(int type, int count)Set the count of used licenses.voidsetUserSetting(SaUserSetting setting)Persists a user setting object.voidsetVariables(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.voidstartSQLTransaction(java.lang.String ddcName)Start SQL transaction.voidstartTransaction()Starts a transaction in the backend system.SaSaveInfostoreDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String ddcName, java.lang.String acls)Stores the actual document to the backend.SaSaveInfostoreDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String ddcName, java.lang.String acls, boolean checkin)Stores the actual document to the backend.voidstoreSystemFile(SystemFileKind kind, java.lang.String name, java.io.InputStream data)Stores a system file of a specific kind.booleanunlockNode(java.lang.String sysRowId, java.lang.String ddcName)Unlocks a node.voidupdateFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.util.List<SaPropertyValue> values)Updates a given node with the given properties.longwriteContent(ContentStream contentStream)Writes the content of the document.longwriteContent(java.io.InputStream stream)Writes the content of the document.longwriteContent(java.io.InputStream stream, java.lang.String fileName, int element)longwriteContent(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.
-
-
-
Method Detail
-
logon
com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials) throws SaSystemException, SaAuthenticationExceptionLogon 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, SaAuthenticationExceptionLogon 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
java.util.List<com.saperion.connector.authentication.Session> listActiveSessions() throws SaSystemExceptionList 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 SaSystemExceptionClose the givenSession- Parameters:
session-- Returns:
- true if successful, false otherwise
- Throws:
SaSystemException
-
logon
@Deprecated default com.saperion.connector.authentication.Session logon(int rmiToken) throws SaSystemExceptionDeprecated.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
boolean logoff() throws SaSystemException, SaAuthenticationExceptionLog off the user from the server instance.- Returns:
- True, if done. False if session is not alive.
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaRMICommandException
-
getLicenseCount
int getLicenseCount(int type) throws SaSystemExceptionRead the licence count for the given user.- Parameters:
type- Client type- Returns:
- License count
- Throws:
SaSystemException- Error on the saperion system
-
setUsedLicense
boolean setUsedLicense(int type, int count) throws SaSystemExceptionSet the count of used licenses.- Parameters:
type- Client typecount- Number of licenses- Returns:
- True, if success
- Throws:
SaSystemException- Error on the saperion system
-
setLocale
void setLocale(java.util.Locale local) throws SaSystemException, SaAuthenticationExceptionSet the locale for localization.- Parameters:
local- Locale- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaRMICommandException
-
getMembers
WorkflowMember getMembers() throws SaSystemException, SaAuthenticationException
Reads the member.- Returns:
- Member tree
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaRMICommandException
-
getMember
WorkflowMember getMember(WorkflowMember member, int depth, java.lang.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
java.lang.String getMandant()
- Returns:
- Mandant name
-
getUserIdsForQuery
int[] getUserIdsForQuery() throws SaSystemExceptionRead the userids.- Returns:
- User ids
- Throws:
SaSystemException- SaRMICommandException
-
loadDDCNames
java.lang.String[] loadDDCNames() throws SaSystemException, SaAuthenticationExceptionRetrieves the available DDC names.- Returns:
- Array of DDC names
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationException
-
loadFolderDDCNames
java.lang.String[] loadFolderDDCNames() throws SaSystemException, SaAuthenticationExceptionRetrieves the available folder DDC names.- Returns:
- Array of folder DDC names
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationException
-
loadWorkflowDDCName
java.lang.String loadWorkflowDDCName() throws SaSystemExceptionRetrieves the workflow DDC name.- Returns:
- workflow DDC name
- Throws:
SaSystemException- SaRMICommandException
-
getSystemSetting
SaSystemSetting getSystemSetting(java.lang.String accessKey) throws SaSystemException
Retrieves a system setting object.- Parameters:
accessKey- key to get associated system setting- Returns:
SaSystemSetting- Throws:
SaSystemException- System exception
-
getSystemInfo
SaSystemInfo getSystemInfo() throws SaSystemException
Reads system info.- Returns:
- System info
- Throws:
SaSystemException- System exception
-
getFeatures
SaFeature getFeatures() throws SaSystemException
Read the features.- Returns:
- Features
- Throws:
SaSystemException- System exception
-
getUserSetting
SaUserSetting getUserSetting(java.lang.String accessKey) throws SaSystemException, SaAuthenticationException
Retrieves a user setting object.- Parameters:
accessKey- key to get associated user setting- Returns:
SaUserSetting- Throws:
SaSystemException- System exceptionSaAuthenticationException- authentication exception
-
setUserSetting
void setUserSetting(SaUserSetting setting) throws SaSystemException, SaAuthenticationException
Persists a user setting object.- Parameters:
setting- theSaUserSettingobject to be stored- Throws:
SaSystemException- System exceptionSaAuthenticationException- authentication exception
-
getSetting
Setting getSetting(java.lang.String name, java.lang.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-SettingSearchInfocontaining information about what to search- Returns:
- a
SettingSearchResult - Throws:
SaSystemException- system error when searchingSaAuthenticationException- authentication error
-
setSetting
void setSetting(Setting setting) throws SaSystemException, SaAuthenticationException
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(java.lang.String name, java.lang.String section, boolean isLong) throws SaSystemException, SaAuthenticationExceptionDeletes 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(java.lang.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
java.lang.String getRealDBName(java.lang.String ddcName, java.lang.String field, java.lang.String mandant) throws SaSystemExceptionreturns 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
SaFieldDescription[] getFieldDescriptions(java.lang.String ddcName, java.lang.String mandant) throws SaSystemException
Reads the field descriptions for a given DDC.- Parameters:
ddcName- DDC namemandant- Mandant- Returns:
- Array of field description objects
- Throws:
SaSystemException- SaRMICommandException
-
getDDC
DDC getDDC(java.lang.String ddcName) throws SaSystemException, SaAuthenticationException
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, java.lang.String ddcName) throws SaSystemException, SaAuthenticationExceptionGets 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(java.lang.String sysRowId, java.lang.String ddcName, java.lang.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
SaPropertyValueinstances. - Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaGetNodeException- SaGetNodeException
-
getFulltext
java.lang.String getFulltext(java.lang.String ddcName, java.lang.String sysRowId, java.lang.String hdoc, java.lang.String fieldName, long length) throws SaSystemException, SaAuthenticationExceptionReads 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(java.lang.String hDoc, int widthX, int widthY, boolean color) throws SaSystemException, SaAuthenticationExceptionReads 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
java.util.List<java.lang.String> getIdsFromQuery(java.lang.String query) throws SaSystemException, SaAuthenticationExceptionExecutes 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
java.util.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
java.util.List<java.lang.String> getVersionList(java.lang.String ddcName, java.lang.String sysrowID) throws SaSystemException, SaAuthenticationExceptionReads the versionlist for the given document.- Parameters:
ddcName- DDC namesysrowID- SYSROWID- Returns:
- List of HDOC's
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationException
-
getHDocForSysRowId
java.lang.String getHDocForSysRowId(java.lang.String sysRowId, java.lang.String ddcName) throws SaSystemException, SaAuthenticationException, SaDDCExceptionSearchs the HDOC for the given SysRowId.- Parameters:
sysRowId- SysRowIdddcName- DDC name- Returns:
- Resultset for HDOC's
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaDDCException- SaDDCException
-
isAlive
boolean isAlive() throws SaSystemExceptionTest the lifetime of this token.- Returns:
- True if alive
- Throws:
SaSystemException- System exception
-
getTaskList
java.util.List<TaskInfo> getTaskList(int[] ids, java.lang.String filter, java.util.Map<java.lang.String,java.lang.Object> parameter) throws SaAuthenticationException, SaSystemException
Reads 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
java.util.List<TaskAuditInfo> getTaskAuditList(int[] ids, java.lang.String filter, java.util.Map<java.lang.String,java.lang.Object> parameter) throws SaAuthenticationException, SaSystemException
Reads the task audit for this user.- Parameters:
ids- Array of ID'sfilter- HQL filterparameter- Filter parameter- Returns:
- List of
TaskAuditInfoobjects - Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getTask
TaskInfo getTask(java.lang.String taskID) throws SaAuthenticationException, SaSystemException
Reads the task info for the given ID.- Parameters:
taskID- Task SysRowId- Returns:
- Task info
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getParentTask
TaskInfo getParentTask(java.lang.String taskID) throws SaAuthenticationException, SaSystemException
Reads the parent task info for the given ID.- Parameters:
taskID- Task SysRowId- Returns:
- Task info
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getCommandInfos
java.util.Collection<CommandInfo> getCommandInfos(java.lang.String taskUID) throws SaAuthenticationException, SaSystemException
Reads all possible transitions for this task.- Parameters:
taskUID- Task UID- Returns:
- Command list
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getCommandInfos
java.util.Collection<CommandInfo> getCommandInfos(java.lang.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
java.util.List<BoxDefinition> getBoxDefinitions() throws SaAuthenticationException, SaSystemException
Reads the box definitions.- Returns:
- Box definitions
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getBoxCount
BoxCount getBoxCount(int boxId, BoxCountType type, java.util.Map<java.lang.String,java.lang.Object> parameters) throws SaAuthenticationException, SaSystemException
Returns 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
java.lang.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
java.util.List<CommentInfo> getCommentInfos(java.lang.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
java.util.List<HistoryInfo> getHistoryInfos(java.lang.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
java.util.List<java.util.List<HistoryInfo>> getCompleteHistoryInfos(java.lang.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
java.util.List<java.lang.String> getWorkflowDefinitions() throws SaAuthenticationException, SaSystemException, SaWorkflowExceptionReads all available workflow definitions.- Returns:
- Workflowdefinition list
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemExceptionSaWorkflowException- Workflow exception
-
addComment
void addComment(java.lang.String comment, java.lang.String taskUID, int level) throws SaAuthenticationException, SaSystemException, SaWorkflowException- Parameters:
comment- CommenttaskUID- Task UIDlevel- Level- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemExceptionSaWorkflowException- Workflow exception
-
addHistory
void addHistory(java.lang.String description, java.lang.String taskUID) throws SaAuthenticationException, SaSystemException, SaWorkflowException- Parameters:
description- CommenttaskUID- Task UID- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemExceptionSaWorkflowException- Workflow exception
-
getSubstitute
java.lang.String getSubstitute() throws SaAuthenticationException, SaSystemExceptionGet the substitute for the logged on user.- Returns:
- Substitute name
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
setSubstitute
void setSubstitute(java.lang.String name) throws SaAuthenticationException, SaSystemExceptionSet the substitute for the logged on user.- Parameters:
name- Substitute name- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getOutOfOffice
boolean getOutOfOffice() throws SaAuthenticationException, SaSystemExceptionGet the out of office status for the logged on user.- Returns:
- is OutOfOffice
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
setOutOfOffice
void setOutOfOffice(boolean isOutOfOffice) throws SaAuthenticationException, SaSystemExceptionSet the out of office status for the logged on user.- Parameters:
isOutOfOffice- True, if is OutOfOffice- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
getUsers
java.util.List<java.lang.String> getUsers(java.lang.String filter) throws SaAuthenticationException, SaSystemExceptionReads a list of filtered users.- Parameters:
filter- Filter- Returns:
- List of users
- Throws:
SaAuthenticationException- SaAuthenticationExceptionSaSystemException- SaSystemException
-
loadSettings
java.util.Properties loadSettings(java.lang.String section) throws SaSystemExceptionLoad 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(java.io.InputStream stream, java.lang.String fileName, int element, boolean doStreaming) throws SaSystemException, SaAuthenticationException, SaConnectExceptionWrites 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(java.io.InputStream stream, java.lang.String fileName, int element) throws SaSystemException, SaAuthenticationException, SaConnectException
-
writeContent
long writeContent(java.io.InputStream stream) throws SaSystemException, SaAuthenticationException, SaConnectExceptionWrites 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, SaGetNodeExceptionManually 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, 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
-
readDocumentFirst
com.saperion.jni.SaJNIReadBuffer readDocumentFirst(java.lang.String hdoc, boolean currentRevision, int element) throws SaSystemException, SaAuthenticationException, SaGetNodeExceptionOpens 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(java.lang.String hdoc, boolean currentRevision, int element, boolean withAnnotations) throws SaSystemException, SaAuthenticationException, SaGetNodeExceptionOpens 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, SaConnectExceptionReads 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(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
-
readVersionMetadata
SaVersionData readVersionMetadata(java.lang.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(java.lang.String ddcName, java.util.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
void discardDocument() throws SaSystemExceptionDiscards the document identified by the tokens handle. Cleans up temporary document resources and handles.- Throws:
SaSystemException
-
cacheDocument
SaSaveInfo cacheDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String xhDoc, java.lang.String ddcName, 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 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(java.lang.String nodeHdoc, java.lang.String ddcName, java.util.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(java.lang.String nodeHdoc, java.lang.String ddcName, java.util.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, java.lang.String versionComment, java.lang.String ddcName, 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 stringddcName- DDC nameacls- ACL name string- Returns:
- Node information object
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaGetNodeException- SaGetNodeExceptionSaSetNodeException- SaSetNodeExceptionSaDDCException- SaDDCException
-
storeDocument
SaSaveInfo storeDocument(boolean isNew, int commitMode, java.lang.String versionComment, java.lang.String ddcName, java.lang.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(java.lang.String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeExceptionCheckout the given document.- Parameters:
hDoc- Document HDOC- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaGetNodeException- SaGetNodeException
-
dsicardCheckout
void dsicardCheckout(java.lang.String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeExceptionDiscards the checkout of the given document.- Parameters:
hDoc- Document HDOC- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaGetNodeException- SaGetNodeException
-
releaseDocument
void releaseDocument(java.lang.String hDoc, java.lang.String comment) throws SaSystemException, SaAuthenticationException, SaGetNodeExceptionRelease the given document.- Parameters:
hDoc- Document HDOCcomment- the revision comment- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaGetNodeException- SaGetNodeException
-
restoreVersion
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
-
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, SaConnectExceptionMark 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, SaConnectExceptionRemoves a existing content element.- Parameters:
element- Element number- Throws:
SaSystemException- Error on the saperion systemSaSetContentException- SaSetContentExceptionSaGetNodeException- SaGetNodeExceptionSaAuthenticationException- SaAuthenticationExceptionSaConnectException- SaConnectException
-
removeElement
void removeElement(java.lang.Integer[] elements) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetContentException, SaConnectExceptionRemoves 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(java.lang.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(java.lang.String sysRowId, java.lang.String ddcName, int lockType, boolean sessionScoped) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeException, SaPropertyExceptionLocks 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(java.lang.String sysRowId, java.lang.String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException, SaGetNodeExceptionUnlocks a node.- Parameters:
sysRowId- SysRowIdddcName- DDC name- Returns:
- True, if ok
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaLockException- SaLockExceptionSaGetNodeException- SaGetNodeException
-
getNodeAccessData
com.saperion.jni.SaJNIDocAccessData getNodeAccessData(java.lang.String hdoc) throws SaSystemException, SaAuthenticationException, SaGetNodeExceptionOpens 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
void finishTransaction(boolean commit) throws SaSystemExceptionFinish the transaction in the backend system.- Parameters:
commit- True, if commit this transaction, false to rollback- Throws:
SaSystemException- Error on the saperion system
-
startTransaction
void startTransaction() throws SaSystemExceptionStarts a transaction in the backend system.- Throws:
SaSystemException- SaRMICommandException
-
getAnnotations
java.lang.String getAnnotations(java.lang.String hDoc, int indexOfContentElement, boolean currentRevision) throws SaAuthenticationException, SaSystemExceptionReads 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(java.lang.String hDoc, int indexOfContentElement, java.lang.String annotations) throws SaAuthenticationException, SaSystemExceptionSets 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
java.util.List<java.lang.String> getLocks(java.lang.String ddcName) throws SaSystemExceptionReads all locks from the given DDC.- Parameters:
ddcName- DDC name- Returns:
- Locks as list
- Throws:
SaSystemException- Remote exception
-
getLocks
java.util.List<java.lang.String> getLocks(java.lang.String ddcName, java.lang.String mandant) throws SaSystemExceptionReads 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
java.lang.String getACLNames(java.lang.String hDoc) throws SaSystemException, SaGetNodeException, SaAuthenticationException, SaDDCExceptionReads the ACL's for the given document.- Parameters:
hDoc- Document HDOC- Returns:
- ACL name string
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationExceptionSaDDCException- SaDDCExceptionSaGetNodeException- SaGetNodeException
-
getInvolvedUsers
java.util.List<java.lang.String> getInvolvedUsers(java.lang.String hDoc) throws SaSystemException, SaAuthenticationException, SaDDCException, SaGetNodeExceptionReads 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(java.lang.String ddcname, java.lang.String hDoc, java.lang.String acl, int commitMode, java.lang.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 java.util.List<java.lang.String> getAllACLs() throws SaSystemException, SaAuthenticationExceptionDeprecated.Reads all existing ACL names.- Returns:
- List of ACL names
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationException
-
getACLRights
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
-
startSQLTransaction
void startSQLTransaction(java.lang.String ddcName) throws SaSystemExceptionStart SQL transaction.- Parameters:
ddcName- the name of the ddc- Throws:
SaSystemException- Error on the saperion system
-
finishSQLTransaction
void finishSQLTransaction(boolean commit, java.lang.String ddcName) throws SaSystemExceptionFinish SQL transaction.- Parameters:
commit- True, if commit, else rollbackddcName- the name of the ddc- Throws:
SaSystemException- Error on the saperion system
-
getFolderChildren
java.util.List<SaDocumentInfo> getFolderChildren(java.lang.String folderTableDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.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
java.util.List<SaDocumentInfo> getFolderFromPath(java.lang.String folderTableDDC, java.lang.String startNodeId, java.lang.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
java.lang.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(java.lang.String folderTableDDC, java.lang.String folderId, java.util.List<SaPropertyValue> values) throws SaSystemException, SaAuthenticationException, SaDDCExceptionUpdates a given node with the given properties.- Parameters:
folderTableDDC- Folder tablefolderId- Folder IDvalues- Values- Throws:
SaSystemException- Remote exceptionSaAuthenticationException- Authentication errorSaDDCException- Database exception
-
searchFolderDocuments
java.util.List<SaDocumentInfo> searchFolderDocuments(java.lang.String folderTableDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.String folderId) throws SaSystemException, SaAuthenticationException, SaDDCExceptionDeletes 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
java.lang.String copyFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild, boolean withDocuments) throws SaSystemException, SaAuthenticationException, SaDDCExceptionCopies 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(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild) throws SaSystemException, SaAuthenticationException, SaDDCExceptionMoves 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(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeExceptionAdds 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(java.lang.String folderTableDDC, java.lang.String documentSysRowId, java.lang.String documentDDC, java.lang.String folderId) throws SaSystemException, SaAuthenticationException, SaDDCExceptionRemove 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(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId, java.lang.String destinationId) throws SaSystemException, SaAuthenticationException, SaDDCExceptionMoves 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
java.util.List<SaDocumentInfo> getDocumentFolders(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeExceptionReturns 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(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String aclName) throws SaSystemException, SaAuthenticationException, SaDDCExceptionSets 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(java.lang.String folderTableDDC, java.lang.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(java.lang.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
java.util.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
java.lang.String resolveLatestHdoc(java.lang.String oldHdoc) throws SaSystemException, SaAuthenticationExceptionResolves 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
java.util.List<java.lang.String> getSystemFiles(SystemFileKind kind, java.lang.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(java.lang.String hdoc, SaConstants.ProtoEvents event, java.lang.String remark) throws SaSystemException, SaAuthenticationExceptionAdds an audit log event.- Parameters:
hdoc- Document HDOCevent- Event typeremark- Remark- Throws:
SaAuthenticationException- error on the authentification / insufficient rightsSaSystemException- general error
-
getAcls
java.util.List<SaAcl> getAcls() throws SaSystemException, SaAuthenticationException
Reads all existing ACLs.- Returns:
- List of ACLs
- Throws:
SaSystemException- SaRMICommandExceptionSaAuthenticationException- SaAuthenticationException
-
changePassword
void changePassword(java.lang.String user, java.lang.String oldPassword, java.lang.String client, java.lang.String newPassword) throws SaAuthenticationException, SaSystemExceptionChanges 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:
SaSystemExceptionSaAuthenticationException
-
getAuthorizedUsers
java.util.List<UsersRights> getAuthorizedUsers(java.lang.String hDoc, java.lang.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:
SaSystemExceptionSaAuthenticationException
-
getArchivedSize
int getArchivedSize(java.lang.String hDoc) throws SaAuthenticationException, SaSystemExceptionReturns the total document size in archive.- Parameters:
hDoc- The document whichs size is wanted.- Returns:
- The total document size in archive.
- Throws:
SaSystemExceptionSaAuthenticationException
-
storeSystemFile
void storeSystemFile(SystemFileKind kind, java.lang.String name, java.io.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
java.io.InputStream loadSystemFile(SystemFileKind kind, java.lang.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
java.lang.String getRMIVersion() throws SaSystemExceptionGet the RMI interface version from java core server.- Throws:
SaSystemException
-
getFolderUpdateInfo
java.util.Set<FolderUpdateInfo> getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds) throws SaSystemException, SaAuthenticationException
Get 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, java.util.Map<java.lang.String,java.lang.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(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
-
invoke
<T extends java.io.Serializable> T invoke(com.lexmark.saperion.remote.common.operations.Operation<T,SaBasicException,LegacyConnection> operation) throws SaSystemException, SaAuthenticationException
This method invokes aOperationon the backend.- Type Parameters:
T- The return type- Parameters:
operation- The operation to invoke- Returns:
- The result of the invocation
- Throws:
SaSystemExceptionSaAuthenticationException
-
newInvoke
<ResultType extends java.io.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 aEcmOperationin the backend.- Parameters:
operation- the operation to invoke- Returns:
- the result of the operation
- Throws:
SaSystemExceptionSaAuthenticationException
-
sendBarcode
void sendBarcode(java.lang.String indexMask, java.lang.String docUid, java.lang.String contentRep, java.lang.String sid, java.lang.String docType, java.lang.String value, int mandant) throws SaSystemException, SaAuthenticationExceptionSend 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
java.util.List<SaRMIServerInfo> getServerInfos()
Returns a list of objects describing the servers this connector is connected to.- Returns:
- set of
SaRMIServerInfo
-
setEventsEnabled
void setEventsEnabled(boolean enabled) throws SaSystemException, SaAuthenticationExceptionSets 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
boolean getEventsEnabled() throws SaSystemException, SaAuthenticationExceptionReturns 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
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getFullTextFields(java.lang.String ddcName, java.util.List<java.lang.String> fullTextFields, java.lang.String hdoc) throws SaSystemExceptionFetches 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_PREFIXhdoc- hdoc of the document- Returns:
- Set of entries containing full text coulmn and corresponding value
- Throws:
SaSystemException
-
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:
SaSystemExceptionSaAuthenticationException
-
-