Class SaClassicConnectorImpl
- All Implemented Interfaces:
LegacyConnection
,SaClassicConnector
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs theSaClassicConnectorImpl
instance which provides DMS functionality.SaClassicConnectorImpl
(String configPath) Constructs theSaClassicConnectorImpl
instance which provides DMS functionality.SaClassicConnectorImpl
(Properties configuration) Constructs theSaClassicConnectorImpl
instance which provides DMS functionality.SaClassicConnectorImpl
(Properties configuration, com.saperion.cache.CacheManager cacheManager) Constructs theSaClassicConnectorImpl
instance which provides DMS functionality. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComment
(String comment, String taskUID, int level) Adds a comment to the task.void
addHistory
(String description, String taskUID) Adds a history entry to the task.void
addListener
(SaEventListener listener) Deprecated.void
addListener
(SaStatusEventListener listener) Deprecated.void
addToFolder
(String folderTableDDC, String documentId, String documentDDC, String folderId) Adds the document with given documentId to a given folder with given folderId.cacheDocument
(String xhDoc, DocumentInfo document) Caches a new document in the backend system with the given metadata and content.cacheDocument
(String xhDoc, String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String strAcl) Caches a new document in the backend system with the given metadata and content.void
changePassword
(String user, String oldPassword, String tenant, String newPassword) Changes the password of an existing user.void
checkoutDocument
(String hDoc) Checks out a document for the given document id (hdoc).void
checkoutDocument
(String hDoc, boolean withCloudShare, int[] shareBaseDocIds) Checks out a document with filesystem/ShareBase for the given document id (hdoc).checkSapUrl
(String url) Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC.boolean
closeSession
(com.saperion.connector.authentication.Session session) Close the givenSession
of logged in usercopyFolder
(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) Copies the given folder and all it's children to the destination.createDocument
(DocumentInfo document) Creates a new document on the backend system with the givenDocumentInfo
.createDocument
(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment) Deprecated.createDocument
(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) Deprecated.void
Stores the mapping information about Saperion document and External Storage foldercreateFolder
(SaFolderSaveInfo info, Properties namevaluePairs) Creates a new folder below a given folder.createFolder
(String folderTableDDC, String parentId, String beforeChild, String folderName, SaFolderConstants.FOLDER_TYPE folderType, Properties namevaluePairs) Deprecated.createLink
(LinkInfo link) Creates a link to a document for givenLinkInfo
.void
deleteDocument
(String documentHDOC, int deleteType) Deletes a document from the backend system with the given delete type strategy.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 an existing folder.boolean
deleteSetting
(String name, String section, boolean isLong) This method deletes a setting in the database.void
discardCheckout
(String hDoc) Discards a checkout of a document which was performed via the methodSaClassicConnector.checkoutDocument(String)
.executeCommand
(ContextInfo contextInfo) Performs the given command.getACLNames
(String documentHDOC) This method returns the names of the Access Control Lists that are assigned to this document.getACLRights
(String[] acls) This method returns the access rights the current user has when in the context of the Access Controll Lists given by name.getAcls()
This method returns all Access Control Lists in the current tenant.Deprecated.getAnnotations
(String hDoc, int indexOfContentElement) Deprecated.getAnnotations
(String hDoc, int indexOfContentElement, boolean currentRevision) Reads the annotations of the document with the specified ID.int
getArchivedSize
(String hDoc) Returns the total document size in the archive in bytes.getAuthorizedUsers
(String hDoc, String rights, MatchKind match) This method returns the users that have specific rights on a document.getBoxCount
(int boxId) Reads the count (number of workflow item) of the inbox identified by the given id.Reads the box definitions.getCommandInfos
(String docUID) Reads all possible transitions for this task.getCommandInfos
(String docUID, boolean transitionsOnly) Reads all possible transitions and optional other possible commands for this task.getCommentInfos
(String taskId) Reads the comments for the given task.getCompleteHistoryInfos
(String docId) Reads the history and comments for the given document.getConfiguration
(String section) This method reads the application configuration properties from the backend system.This method returns detailed info about the current user.This method returns the name of teh user currently logged in.com.lexmark.saperion.administration.RoleType
getDBDefinition
(String name) This method reads the field definitions of the database definition (DDC) with the given name.This method returns a document definition given by its name.String[]
This method returns the names of all DDCs registered in the Saperion system.getDocumentAccessData
(String documentHDOC) This method reads the access rights the current user has on a given document.long
getDocumentFolderCount
(String folderTableDDC, String documentDDC, String sysRowId) Returns the total count over all folders from all users in which the specified document is contained in.getDocumentFolders
(String folderTableDDC, String documentDDC, String sysRowId) Returns a list of folder properties which contains all folders the document is contained in.getDocumentInfo
(String hDoc, boolean currentRevision, boolean resolveLinks) Reads information like the document-structure and variables for the given document.getDocumentInfo
(String hDoc, boolean currentRevision, boolean resolveLinks, boolean forceSizeDetermination) Reads information like the document-structure and variables for the given document.boolean
This method returns whether events (e.g.Fetches all folders of all types of External Storage services from where documents need to be uploadedgetExternalStorageFoldersForUpload
(ExternalStorageType storageType) Fetches all folders of External Storage from where documents need to be uploadedgetExternalStorageMapping
(String sysRowId) Fetches the external storage mapping for the provided SysRowIdThis method returns the features enabled in the Saperion system.getFolderByPath
(String folderTableDDC, String startFolderId, String folderPath) Returns the folder which matches to the given path.getFolderChildren
(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) Returns a list with the children of the given node.getFolderClass
(String className) Reads the folder class with the given name.String[]
Reads the registered folder DDC names from the repository.getFolderFromPath
(String folderTableDDC, String startNodeId, String folderPath) Returns the folders which match to the given path.getFolderInfo
(String folderTableDDC, String folderId) Deprecated.getFolderInfo
(String folderTableDDC, String folderId, boolean forceLoadVariables) Returns the folder information object for the given folder.getFolderParent
(String folderTableDDC, String folderId) Returns the parent of the given folder.getFolderRights
(String folderTableDDC, String folderId) Returns the rights mask for the given folder and user.getFolderUpdateInfo
(Map<String, Long> folderIds) Deprecated.getFulltext
(String ddcName, String sysRowId) Deprecated.getFulltext
(String ddcName, String hdoc, String fieldName, long length) Reads the fulltext information for the given document with the given HDOC in the given DDC from the specified field.getFullTextFields
(String ddcName, List<String> fullTextFields, String hdoc) getHistoryInfos
(String taskId) Reads the history for the given task.getInvolvedUsers
(String documentHDOC) Lists the names of all users that are contained in all Access Control Lists set on the given document.int
getLicenseCount
(int type) This method returns the overall count of Licenses of the given type in the system.getLockInfo
(String sysRowId) This method returns the locking information for a given document.getMember
(WorkflowMember member, int depth, String filter) Returns the workflow members by the given parameters.
This method is considered as a search-method.Reads the workflow members in a full structured tree.boolean
Get the substitute for the logged on user.getParentTask
(String taskID) Reads the parent task info for the given ID.Gets the release ACL name, configured in the program.ini in section [Release].getReleasedHdoc
(String oldHdoc) Gets the released hdoc for given hdoc if release feature is on and release tag is set, otherwise returns the given hDoc.List<com.saperion.connector.renditions.Rendition>
getRendition
(Element element, com.saperion.connector.options.Options options) Returns the rendition object from a rendered document.This method returns the configuration concerning the classic connector that is set on the server side.com.saperion.connector.authentication.Session
Returns the session of the logged in user.getSetting
(String name, String section, boolean isLong) This method retrieves aSetting
identified by it's key and section from the database.Get the substitute for the logged on user.Set<com.saperion.connector.formats.SourceFormat>
Gets the supported source formats from the render engine.Set<com.saperion.connector.formats.TargetFormat>
Gets the supported target formats from the render engine.getSystemFiles
(SystemFileKind kind, String filter) This method returns the names of all system files of a specific kind.This method returns general information about the connected system.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 audits for this user.getTaskList
(int[] ids, String filter, Map<String, Object> parameter) Reads the tasks for this user.byte[]
getThumbnail
(String hDoc, int widthX, int widthY, boolean color) Reads the thumbnail of the given document.int
getToken()
Reads a list of filtered users.getUserSetting
(String accessKey) Retrieves a user-specific setting object.getVersionIDs
(String ddcName, String sysrowID) Reads the version IDs of the given document.Returns a workflow connector based on this classic connector.Gets the workflow ddc name.Reads all available workflow definitions.getWorkflowDefinitions
(String ddcName) Returns the workflow definitions that are allowed to be used for documents contained in the specified DDC.int
hashCode()
boolean
Checks wether this classic connector has a render engine.<T extends Serializable>
Tinvoke
(LegacyOperation<T> operation) Invokes the givenOperation
on the server side.boolean
isActive()
Checks, if the connector is logged on.boolean
isAlive()
Tests the lifetime of this connector.boolean
Checks if is release feature in the program.ini in section [Release] is active.List<com.saperion.connector.authentication.Session>
List active sessions of the logged in userloadLocalize
(String language) Load localize.loadSystemFile
(SystemFileKind kind, String name) This method loads a system file of a specific kind.boolean
lockDocument
(String sysRowId, String ddcName) Locks a document.void
logClientEvent
(String hdoc, SaConstants.ProtoEvents event, String remark) Adds an audit log event.boolean
logoff()
This method logs the current user off from the system.int
Deprecated.com.saperion.connector.authentication.Session
logon
(com.lexmark.saperion.remote.common.authentication.Credentials credentials) This method authenticates the givenCredentials
and returns the information about the open session.com.saperion.connector.authentication.Session
logon
(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) This method authenticates the givenCredentials
, associate the givenSessionInfo
and returns the information about the open session.int
This method authenticates the given user and returns the token of the newly created session.int
Deprecated.void
moveFolder
(String folderTableDDC, String folderId, String destinationId, String beforeChild) Moves the given folder to a new destination.void
moveToFolder
(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) Removes the document from the source folder and adds it to the source folder.readDocument
(String docHdoc, boolean currentRevision, int elementNumber) Loads a document's content from the backend system.readDocument
(String docHdoc, boolean currentRevision, int elementNumber, boolean withAnnotations) Loads a document's content from the backend system.readDocumentFilename
(String docHdoc, boolean currentRevision, int elementNumber) Reads the filenames of the application data of the document with the given ID.readDocumentMetadata
(String documentSysRowID, String ddcName, String[] fields) Reads the metadata of the document with the given ID.readReleasedDocument
(String docHdoc, boolean currentRevision, int elementNumber) Read released document if the release feature is active.readVersionDocument
(String docHdoc, int elementNumber) Loads a document version from the backend system.readVersionDocumentFilename
(String docHdoc, int elementNumber) Reads the filenames of the application data of the document with the given ID.readVersionMetadata
(String versionID) Reads the version metadata of the document with the given ID.readVersionMetadata
(String versionID, boolean resolveLinks) Reads the version metadata of the document with the given ID.void
releaseDocument
(String ddcName, String hDoc, String versionComment) Release the given document.boolean
removeEvent
(SaEvent event) Deprecated.void
removeFromFolder
(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) Removes the document from the given folder.void
removeListener
(SaEventListener listener) Deprecated.void
removeListener
(SaStatusEventListener listener) Deprecated.resolveLatestHDoc
(String oldHdoc) Resolves and returns the XHDOC of the latest version of the document identified by the given HDOC.restoreVersion
(String versionID) Restores the version with the given HDOC.Deprecated.searchFolderClass
(SaFolderClassSearchInfo searchInfo) Searches for folder classes that match the specified propertied.searchFolderDocuments
(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) HQL search extended with additional folder informations and depth.searchHQL
(SaQueryInfo hqlQuery) Performs a search with the given hql query (hibernate query language).searchSettings
(SettingSearchInfo searchInfo) This method searches settings in the database.void
sendBarcode
(String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) Sends the Document UID with the barcode to SAP R/3.setACLName
(String ddcname, String documentHDOC, String acl, String versionComment) This method specifies the Access Control Lists that secure the document given by its id.void
setAnnotations
(String hDoc, int indexOfContentElement, String annotations) Sets the given annotations to the document.void
setCurrentUserPresent
(boolean present) Sets whether the current user is present.void
setEventsEnabled
(boolean enabled) This method sets whether events (e.g.void
setFolderAcl
(String folderTableDDC, String folderId, String aclName) Sets an ACL for the given folder.void
This methods sets the localization information for the current user.void
setOutOfOffice
(boolean isOutOfOffice) set the out of office status for the logged on user.void
setSetting
(Setting setting) This method stores aSetting
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-specific setting object.void
Deprecated.void
storeSystemFile
(SystemFileKind kind, String name, InputStream data) This method stores a system file of a specific kind.toString()
boolean
unlockDocument
(String sysRowId, String ddcName) Unlocks a document.void
Changes information about the current user.updateDocument
(UpdateDocumentInfo updateInfo) Updates a document in the backend system with the given metadata, acls and content.updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment) Deprecated.updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) Deprecated.updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks) Deprecated.updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks, boolean checkin) Deprecated.void
updateExternalStorageUploadStatus
(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) Updates the upload status of External Storage foldervoid
updateFolder
(String folderTableDDC, String folderId, Properties namevaluePairs) Updates an existing folder with the given properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.saperion.connector.SaClassicConnector
logon
-
Constructor Details
-
SaClassicConnectorImpl
public SaClassicConnectorImpl()Constructs theSaClassicConnectorImpl
instance which provides DMS functionality. -
SaClassicConnectorImpl
Constructs theSaClassicConnectorImpl
instance which provides DMS functionality.- Parameters:
configPath
- Configuration path
-
SaClassicConnectorImpl
Constructs theSaClassicConnectorImpl
instance which provides DMS functionality.- Parameters:
configuration
- Configuration properties
-
SaClassicConnectorImpl
public SaClassicConnectorImpl(Properties configuration, com.saperion.cache.CacheManager cacheManager) Constructs theSaClassicConnectorImpl
instance which provides DMS functionality.- Parameters:
configuration
- Configuration propertiescacheManager
- an instance ofCacheManager
-
-
Method Details
-
getConfiguration
public Properties getConfiguration(String section) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method reads the application configuration properties from the backend system.- Specified by:
getConfiguration
in interfaceSaClassicConnector
- Parameters:
section
- the name of the section in the archief.ini to load configuration properties from- Returns:
- Configuration properties as key-value pairs
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
stopServer
Deprecated.Description copied from interface:SaClassicConnector
Stops the remote server.- Specified by:
stopServer
in interfaceSaClassicConnector
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
getDefinitions
Description copied from interface:SaClassicConnector
This method returns the names of all DDCs registered in the Saperion system.- Specified by:
getDefinitions
in interfaceSaClassicConnector
- Returns:
- Array of DDC names
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
getFolderDefinitions
Description copied from interface:SaClassicConnector
Reads the registered folder DDC names from the repository.- Specified by:
getFolderDefinitions
in interfaceSaClassicConnector
- Returns:
- Array of folder DDC names
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
getDBDefinition
public SaFieldDescription[] getDBDefinition(String name) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method reads the field definitions of the database definition (DDC) with the given name.- Specified by:
getDBDefinition
in interfaceSaClassicConnector
- Parameters:
name
- the name of the database definition (DDC) to get the fields of- Returns:
- an array of all field definitions
SaFieldDescription
in the definition - Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
logon
public int logon(String username, String password, int type, String client) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
This method authenticates the given user and returns the token of the newly created session.- Specified by:
logon
in interfaceSaClassicConnector
- Parameters:
username
- User's full namepassword
- Passwordtype
- User type that means client license type. There are possible the following integer values:- 1 = index
- 2 = query
- 3 = univeral administrator
- 4 = web query
- 7 = web index
- 12 = workflow
- 13 = scan
- 14 = highend scan
- 15 = API query
- 16 = API index
- 17 = API scan
- 20 = basic administrator
- 29 = web workflow
client
- client/mandant name, used in multi-client systems- Returns:
- User token for the current session.
- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- SaSystemException
-
logon
@Deprecated public int logon(jcifs.smb.NtlmPasswordAuthentication auth, int type, String client) throws SaAuthenticationException, SaSystemException Deprecated.Description copied from interface:SaClassicConnector
Performs a logon with NTLM authentication.- Specified by:
logon
in interfaceSaClassicConnector
- Parameters:
auth
- Ntlm authentication objecttype
- User type that means client license type. There are possible the following integer values:- 1 = index
- 2 = query
- 3 = univeral administrator
- 4 = web query
- 7 = web index
- 12 = workflow
- 13 = scan
- 14 = highend scan
- 15 = API query
- 16 = API index
- 17 = API scan
- 20 = basic administrator
- 29 = web workflow
client
- client/mandant name, used in multi-client systems- Returns:
- User token for the current session.
- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- SaSystemException
-
logon
@Deprecated public int logon(byte[] token, int type, String client) throws SaAuthenticationException, SaSystemException Deprecated.- Specified by:
logon
in interfaceSaClassicConnector
- Throws:
SaSystemException
- because it is not supported anymore.SaAuthenticationException
-
logon
public com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials) throws SaAuthenticationException, SaSystemException This method authenticates the givenCredentials
and returns the information about the open session.- Specified by:
logon
in interfaceSaClassicConnector
- Parameters:
credentials
- credentials that authorize and authenticate the session returned- Returns:
- information about the created session
- Throws:
SaAuthenticationException
- thrown if logon was not possible with the given credentialsSaSystemException
- thrown if the system is not reachable- See Also:
-
logon
public com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) throws SaAuthenticationException, SaSystemException This method authenticates the givenCredentials
, associate the givenSessionInfo
and returns the information about the open session.- Specified by:
logon
in interfaceSaClassicConnector
- Parameters:
credentials
- credentials that authorize and authenticate the session returnedsessionInfo
- The session information like user agent, remote address etc.- Returns:
- information about the created session
- Throws:
SaAuthenticationException
- thrown if logon was not possible with the given credentialsSaSystemException
- thrown if the system is not reachable- See Also:
-
listActiveSessions
public List<com.saperion.connector.authentication.Session> listActiveSessions() throws SaAuthenticationException, SaSystemExceptionList active sessions of the logged in user- Specified by:
listActiveSessions
in interfaceSaClassicConnector
- Returns:
- A list of
Session
- Throws:
SaSystemException
SaAuthenticationException
- See Also:
-
closeSession
public boolean closeSession(com.saperion.connector.authentication.Session session) throws SaAuthenticationException, SaSystemException Close the givenSession
of logged in user- Specified by:
closeSession
in interfaceSaClassicConnector
- Returns:
- true if successful, false otherwise
- Throws:
SaAuthenticationException
SaSystemException
- See Also:
-
logoff
Description copied from interface:SaClassicConnector
This method logs the current user off from the system. The connector can be reused by callingSaClassicConnector.logon(Credentials)
.- Specified by:
logoff
in interfaceSaClassicConnector
- Returns:
- whether the connector was authenticated before
- Throws:
SaAuthenticationException
- user was not logged inSaSystemException
- remote exception
-
readReleasedDocument
public InputStream readReleasedDocument(String docHdoc, boolean currentRevision, int elementNumber) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Read released document if the release feature is active.- Specified by:
readReleasedDocument
in interfaceSaClassicConnector
- Parameters:
docHdoc
- the doc hdoccurrentRevision
- the current revisionelementNumber
- the element number- Returns:
- the input stream
- Throws:
SaSystemException
- the sa system exceptionSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
readDocument
public InputStream readDocument(String docHdoc, boolean currentRevision, int elementNumber) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Loads a document's content from the backend system.
This method creates a document'sInputStream
instance from the appropriate document in the backend system. This document is specified by its UID (XHDOC).
The actual content of the document can be read by usingInputStream.read()
- Specified by:
readDocument
in interfaceSaClassicConnector
- Parameters:
docHdoc
- The ID of the document (XHDOC)currentRevision
- flag indicating that the current revision of the document should be retrieved by resolving the XHDOC.elementNumber
- position in the document structure; 0 if the document is unstructured, -1 returns a single multi-page tif containing all content elements, but only for COLD and multi-page tif documents- Returns:
InputStream
containing the document content- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
readDocument
public InputStream readDocument(String docHdoc, boolean currentRevision, int elementNumber, boolean withAnnotations) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Loads a document's content from the backend system.
This method creates a document'sInputStream
instance from the appropriate document in the backend system. This document is specified by its UID (XHDOC).
The actual content of the document can be read by usingInputStream.read()
- Specified by:
readDocument
in interfaceSaClassicConnector
- Parameters:
docHdoc
- The ID of the document (XHDOC)currentRevision
- flag indicating that the current revision of the document should be retrieved by resolving the XHDOC.elementNumber
- position in the document structure; 0 if the document is unstructured, -1 returns a single multi-page tif containing all content elements, but only for COLD and multi-page tif documentswithAnnotations
- if true, annotations will be saved on the document stream- Returns:
- Input stream containing the document content
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
readDocumentMetadata
public SaPropertyValue[] readDocumentMetadata(String documentSysRowID, String ddcName, String[] fields) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Reads the metadata of the document with the given ID.The returned metadata fields depend on the corresponding document definition table (DDC).
- Specified by:
readDocumentMetadata
in interfaceSaClassicConnector
- Parameters:
documentSysRowID
- The ID of the document (SYSROWID)ddcName
- The name of the database definitionfields
- Fieldnames to be read. If empty or null, all fields will be read.- Returns:
- The Metadata of the document represented as an array of
SaPropertyValue
instances. - Throws:
SaSystemException
- if a backend system error occurs during the document creationSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
getFulltext
@Deprecated public String getFulltext(String ddcName, String sysRowId) throws SaSystemException, SaAuthenticationException Deprecated.Description copied from interface:SaClassicConnector
Reads the fulltext information for the given document with the given SYSROWID in the given DDC.- Specified by:
getFulltext
in interfaceSaClassicConnector
- Parameters:
ddcName
- DDC name of the documentsysRowId
- SYSROWID of the document- Returns:
- Content of the fulltext for this document
- Throws:
SaSystemException
- if a backend system error occurs during the fulltext get operationSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
getFulltext
public String getFulltext(String ddcName, String hdoc, String fieldName, long length) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Reads the fulltext information for the given document with the given HDOC in the given DDC from the specified field.- Specified by:
getFulltext
in interfaceSaClassicConnector
- Parameters:
ddcName
- DDC name of the documenthdoc
- HDOC of the documentfieldName
- name of the fulltext field to read fromlength
- length of the content to return. If -1, the complete content will be returned.- Returns:
- Content of the fulltext for this document as string.
- Throws:
SaSystemException
- if a backend system error occurs during the fulltext get operationSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
getThumbnail
public byte[] getThumbnail(String hDoc, int widthX, int widthY, boolean color) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Reads the thumbnail of the given document. It is possible to set either widthX or widthY to -1 to auto-calculate the value. An empty array is returned, when no thumbnail is available.- Specified by:
getThumbnail
in interfaceSaClassicConnector
- Parameters:
hDoc
- HDoc for the document.widthX
- Width X or -1 to auto-calculatewidthY
- Width Y or -1 to auto-calculatecolor
- True for colored- Returns:
- Thumbnail BMP as byte array
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
createDocument
@Deprecated public SaSaveInfo createDocument(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.Description copied from interface:SaClassicConnector
Creates a new document on the backend system with the given metadata and content.- Specified by:
createDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitionnamevaluePairs
- A properties object containing the metadata of the document (e.g index fields and their values)content
- Multiple content data (an array ofInputStream
instances)versionComment
- The comment for the version- Returns:
SaSaveInfo
object describing the document- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
createDocument
@Deprecated public SaSaveInfo createDocument(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.Description copied from interface:SaClassicConnector
Creates a new document on the backend system with the given metadata, acl's and content.- Specified by:
createDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitionnamevaluePairs
- A properties object containing the metadata of the document (e.g index fields and their values)content
- Multiple content data (an array ofInputStream
instances)versionComment
- The comment for the versionacls
- ACL name string (semicolon separated)- Returns:
- SaSaveInfo SaSaveInfo object describing the new created document
- Throws:
SaSystemException
- if a backend system error occurs during the document creationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
createDocument
public SaSaveInfo createDocument(DocumentInfo document) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Creates a new document on the backend system with the givenDocumentInfo
.The document with indexes, contents, variables etc. given in the
DocumentInfo
will be stored in the backend repository.- Specified by:
createDocument
in interfaceSaClassicConnector
- Parameters:
document
- theDocumentInfo
object containing the document data to create- Returns:
- SaSaveInfo
SaSaveInfo
object describing the new created document - Throws:
SaSystemException
- if a backend system error occurs during the document creationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
createLink
public SaSaveInfo createLink(LinkInfo link) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Creates a link to a document for givenLinkInfo
.
A link represents a reference to another document.- Specified by:
createLink
in interfaceSaClassicConnector
- Parameters:
link
- infoLinkInfo
to create a link- Returns:
SaSaveInfo
of new created link- Throws:
SaSystemException
- if a backend system error occurs during the link creationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
updateDocument
@Deprecated public SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.Description copied from interface:SaClassicConnector
Updates a document in the backend system with the given metadata and content. Only the attached metadata and elements are changed. If the document was checked out, it will be automatically checked in.- Specified by:
updateDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitiondocumentHDOC
- The ID of the document (HDOC)namevaluePairs
- A properties object containing the metadatacontent
- Multiple content dataversionComment
- The comment for the version- Returns:
- SaSaveInfo SaSaveInfo object describing the document
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
lockDocument
public boolean lockDocument(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException Description copied from interface:SaClassicConnector
Locks a document.To ensure that the user has exclusive access to the document, the methods
SaClassicConnector.lockDocument(String, String)
andSaClassicConnector.unlockDocument(String, String)
for the document object must be used.All locked documents with a reference to the locking user are listed in the XLOCKS system table.
- Specified by:
lockDocument
in interfaceSaClassicConnector
- Parameters:
sysRowId
- SysRowId of document to lockddcName
- DDC name- Returns:
- True, if document was locked succesfully, otherwise false
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if when the user is not logged in or has insufficient rightsSaLockException
- if a lock operation related error occors
-
unlockDocument
public boolean unlockDocument(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException Description copied from interface:SaClassicConnector
Unlocks a document.Releases the lock that was created by the
SaClassicConnector.lockDocument(String, String)
method.- Specified by:
unlockDocument
in interfaceSaClassicConnector
- Parameters:
sysRowId
- SysRowId of document to unlockddcName
- DDC name- Returns:
- True, if document was unlocked successlully, otherwise false
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaLockException
- if a lock operation related error occors
-
getDocumentInfo
public SaDocInfo getDocumentInfo(String hDoc, boolean currentRevision, boolean resolveLinks) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Reads information like the document-structure and variables for the given document. Metadata stored in the database is not contained. UseSaClassicConnector.readDocumentMetadata(String, String, String[])
orSaClassicConnector.searchHQL(SaQueryInfo)
to load metadata from the database.
The backend is not forced to determine the size of each element, so sizes might not be available. ATTENTION! This method is slow because of full load of the document.- Specified by:
getDocumentInfo
in interfaceSaClassicConnector
- Parameters:
hDoc
- Document HDOCcurrentRevision
- True for current revisionresolveLinks
- True for resolve links- Returns:
SaDocInfo
object containing the requested document information- Throws:
SaSystemException
- if a backend system error occurs during the get operationSaAuthenticationException
- if the user is not logged in or has insufficient rights- See Also:
-
getDocumentInfo
public SaDocInfo getDocumentInfo(String hDoc, boolean currentRevision, boolean resolveLinks, boolean forceSizeDetermination) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Reads information like the document-structure and variables for the given document. Metadata stored in the database is not contained. UseSaClassicConnector.readDocumentMetadata(String, String, String[])
orSaClassicConnector.searchHQL(SaQueryInfo)
to load metadata from the database.- Specified by:
getDocumentInfo
in interfaceSaClassicConnector
- Parameters:
hDoc
- Document HDOCcurrentRevision
- True for current revisionresolveLinks
- True for resolve linksforceSizeDetermination
- Forces the backend to determine the size of each element, even if it is not already available. Reqiures loading the document, so use only if really required.- Returns:
- Document information
- Throws:
SaSystemException
- if a backend system error occurs during the discard operationSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
updateDocument
@Deprecated public SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.Description copied from interface:SaClassicConnector
Updates a document in the backend system with the given metadata, acls and content. Only the attached metadata and elements are changed. If the document was checked out, it will be automatically checked in. NOTE: With this method it is possible to update documents that are locked or checked out by other users. If this behaviour is not desired one has to implement the according checks oneself usingSaClassicConnector.searchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- Specified by:
updateDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitiondocumentHDOC
- The ID of the document (HDOC)namevaluePairs
- A properties object containing the metadatacontent
- Multiple content dataversionComment
- The comment for the versionacls
- ACL name string, ifnull
it will be ignored, to delete existing ACLs set an empty string- Returns:
- SaSaveInfo SaSaveInfo object describing the document
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
updateDocument
@Deprecated public SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.Description copied from interface:SaClassicConnector
Updates a document in the backend system with the given metadata, acls and content. Only the attached metadata and elements are changed. If the document was checked out, it will be automatically checked in. NOTE: With this method it is possible to update documents that are locked or checked out by other users. If this behaviour is not desired one has to implement the according checks oneself usingSaClassicConnector.searchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- Specified by:
updateDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitiondocumentHDOC
- The ID of the document (HDOC)namevaluePairs
- A properties object containing the metadatacontent
- Multiple content dataversionComment
- The comment for the versionacls
- ACL name string, ifnull
it will be ignored, to delete existing ACLs set an empty stringresolveLinks
- Resolve links- Returns:
- SaSaveInfo SaSaveInfo object describing the document
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
updateDocument
@Deprecated public SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks, boolean checkin) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.Description copied from interface:SaClassicConnector
Updates a document in the backend system with the given metadata, acls and content. Only the attached metadata and elements are changed. If the document was checked out, it will be automatically checked in. NOTE: With this method it is possible to update documents that are locked or checked out by other users. If this behaviour is not desired one has to implement the according checks oneself usingSaClassicConnector.searchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- Specified by:
updateDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitiondocumentHDOC
- The ID of the document (HDOC)namevaluePairs
- A properties object containing the metadatacontent
- Multiple content dataversionComment
- The comment for the versionacls
- ACL name string, ifnull
it will be ignored, to delete existing ACLs set an empty stringresolveLinks
- Resolve linkscheckin
- Checkin document- Returns:
- SaSaveInfo SaSaveInfo object describing the document
- Throws:
SaSystemException
- if a system error occuredSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a database definition was invalid or not found
-
updateDocument
public SaSaveInfo updateDocument(UpdateDocumentInfo updateInfo) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Updates a document in the backend system with the given metadata, acls and content. Only the attached metadata and elements are changed.If the document was checked out, this method can be used to checkin the document. Set
UpdateDocumentInfo.setCheckin(Boolean)
to true to checkin the document when updating.If only metadata should be modified, the ContentStream[] in the
UpdateDocumentInfo
should be set to null when updating.To control the update/remove behavior of the content streams during this update operation, please take a look into the
ContentStream(Integer)
documentation. NOTE: With this method it is possible to update documents that are locked or checked out by other users. If this behaviour is not desired one has to implement the according checks oneself usingSaClassicConnector.searchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- Specified by:
updateDocument
in interfaceSaClassicConnector
- Parameters:
updateInfo
-UpdateDocumentInfo
object containing the data to change- Returns:
SaSaveInfo
information about the saved document- Throws:
SaSystemException
- if a system error occuredSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a database definition was invalid or not found
-
checkoutDocument
public void checkoutDocument(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Description copied from interface:SaClassicConnector
Checks out a document for the given document id (hdoc).This call should be performed before a document is edited to protect the document from conflicting changes. The checkin-operation is performed when the document is saved using
SaClassicConnector.updateDocument(UpdateDocumentInfo)
.Note:
While the document is checked out, other users are able to access a read-only version of the latest revision, but they are not able to modify the document until the check out is discarded viaSaClassicConnector.discardCheckout(String)
or persisted viaSaClassicConnector.updateDocument(UpdateDocumentInfo)
.- Specified by:
checkoutDocument
in interfaceSaClassicConnector
- Parameters:
hDoc
- id (HDOC) of document to checkout- Throws:
SaSystemException
- if a backend system error occurs during the check out operationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaGetNodeException
- if an error occurs while getting the document node or content
-
checkoutDocument
public void checkoutDocument(String hDoc, boolean withCloudShare, int[] shareBaseDocIds) throws SaSystemException, SaAuthenticationException, SaGetNodeException Description copied from interface:SaClassicConnector
Checks out a document with filesystem/ShareBase for the given document id (hdoc).This call should be performed before a document is edited to protect the document from conflicting changes. The checkin-operation is performed when the document is saved using
SaClassicConnector.updateDocument(UpdateDocumentInfo)
.Note:
While the document is checked out, other users are able to access a read-only version of the latest revision, but they are not able to modify the document until the check out is discarded viaSaClassicConnector.discardCheckout(String)
or persisted viaSaClassicConnector.updateDocument(UpdateDocumentInfo)
.- Specified by:
checkoutDocument
in interfaceSaClassicConnector
- Parameters:
hDoc
- id (HDOC) of document to checkoutwithCloudShare
- true if open document is checked out with ShareBase else falseshareBaseDocIds
- Array of sharebase doc ids for open checkout docs- Throws:
SaSystemException
- if a backend system error occurs during the check out operationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaGetNodeException
- if an error occurs while getting the document node or content
-
discardCheckout
public void discardCheckout(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Description copied from interface:SaClassicConnector
Discards a checkout of a document which was performed via the methodSaClassicConnector.checkoutDocument(String)
. After discarding the checkout, other users a able to modify the document again.- Specified by:
discardCheckout
in interfaceSaClassicConnector
- Parameters:
hDoc
- id (HDOC) of document to discard a checkout for- Throws:
SaSystemException
- if a backend system error occurs during the discard operationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaGetNodeException
- if an error occurs while getting the document node or content
-
releaseDocument
public void releaseDocument(String ddcName, String hDoc, String versionComment) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetNodeException, SaDDCException Description copied from interface:SaClassicConnector
Release the given document.- Specified by:
releaseDocument
in interfaceSaClassicConnector
- Parameters:
ddcName
- the ddc namehDoc
- Document HDOCversionComment
- the version comment- Throws:
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- when the user is not logged in or has insufficient rightsSaGetNodeException
- SaGetNodeExceptionSaSetNodeException
- the sa set node exceptionSaDDCException
- the sa ddc exception
-
isReleaseActive
Description copied from interface:SaClassicConnector
Checks if is release feature in the program.ini in section [Release] is active.- Specified by:
isReleaseActive
in interfaceSaClassicConnector
- Returns:
- true, if is release active
- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- the sa system exception
-
getReleasedHdoc
Description copied from interface:SaClassicConnector
Gets the released hdoc for given hdoc if release feature is on and release tag is set, otherwise returns the given hDoc.- Specified by:
getReleasedHdoc
in interfaceSaClassicConnector
- Parameters:
oldHdoc
- the hdoc to lookup released hdoc- Returns:
- the released hdoc
- Throws:
SaAuthenticationException
- if authentication failsSaSystemException
- the sa system exception
-
getReleaseAclName
Gets the release ACL name, configured in the program.ini in section [Release].- Returns:
- the release ACL name which can see released documents.
- Throws:
SaSystemException
- the sa system exceptionSaAuthenticationException
- the sa authentication exception
-
restoreVersion
public SaSaveInfo restoreVersion(String versionID) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Restores the version with the given HDOC.- Specified by:
restoreVersion
in interfaceSaClassicConnector
- Parameters:
versionID
- Version HDOC- Returns:
- SaSaveInfo object describing the new document
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- when the user is not logged in or has insufficient rightsSaDDCException
- SaDDCException
-
deleteDocument
public void deleteDocument(String documentHDOC, int deleteType) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Deletes a document from the backend system with the given delete type strategy.- Specified by:
deleteDocument
in interfaceSaClassicConnector
- Parameters:
documentHDOC
- The HDoc of the document to delete.deleteType
- Deletion strategy. Possible values are:SaConstants.JNI_DELETECONTENT_MODE_DBSIMPLE
(0): mark the document as deleted on the databaseSaConstants.JNI_DELETECONTENT_MODE_DBCOMPLETE
(1): delete the document from the databaseSaConstants.JNI_DELETECONTENT_MODE_PURGEDOCUMENT
(2): delete the document from the database and from the medium. Note: Some storage-systems do not support deletion.- Throws:
SaSystemException
- if a backend system error occurs during the document deletionSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
getVersionIDs
public List<String> getVersionIDs(String ddcName, String sysrowID) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Reads the version IDs of the given document. The versions (XHDOCs) are sorted descending (the most current version is the first element in the list).- Specified by:
getVersionIDs
in interfaceSaClassicConnector
- Parameters:
ddcName
- The name of the database definitionsysrowID
- The ID of the document- Returns:
- Set of version IDs
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
readVersionDocument
public InputStream readVersionDocument(String docHdoc, int elementNumber) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Loads a document version from the backend system.- Specified by:
readVersionDocument
in interfaceSaClassicConnector
- Parameters:
docHdoc
- Version ID (XHDOC is the revision number of the document)elementNumber
- Element number- Returns:
- Input stream with the document content
- Throws:
SaSystemException
- if a backend system error occurs during the document creationSaAuthenticationException
- when the user of this session is not logged in (anymore) or has insufficient rights
-
readVersionMetadata
public SaVersionData readVersionMetadata(String versionID) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Reads the version metadata of the document with the given ID.- Specified by:
readVersionMetadata
in interfaceSaClassicConnector
- Parameters:
versionID
- Version ID (XHDOC is the revision number of the document)- Returns:
- Metadata of the document
- Throws:
SaSystemException
- if a backend system error occurs during the read operationSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException
-
readVersionMetadata
public SaVersionData readVersionMetadata(String versionID, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Reads the version metadata of the document with the given ID.- Specified by:
readVersionMetadata
in interfaceSaClassicConnector
- Parameters:
versionID
- Version ID (XHDOC is the revision number of the document)resolveLinks
- If false will not resolve the link and show the metadata associated with the link itself.- Returns:
- Metadata of the document
- Throws:
SaSystemException
- if a backend system error occurs during the read operationSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException
-
readVersionDocumentFilename
public String readVersionDocumentFilename(String docHdoc, int elementNumber) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Reads the filenames of the application data of the document with the given ID.- Specified by:
readVersionDocumentFilename
in interfaceSaClassicConnector
- Parameters:
docHdoc
- The ID of the document (XHDOC)elementNumber
- position in the document structure; 0 if the document is unstructured.- Returns:
- Filenames of the application data
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException
-
search
@Deprecated public List<SaPropertyValue[]> search(String hqlQuery) throws SaSystemException, SaAuthenticationException, SaDBException Deprecated.Description copied from interface:SaClassicConnector
Performs a search with the given hql query (hibernate query language).- Specified by:
search
in interfaceSaClassicConnector
- Parameters:
hqlQuery
- the Hibernate query - hql.- Returns:
- a result list of values which are returned by the Hibernate. Each returned value
represented as
SaPropertyValue
object. - Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- when the user is not logged in or has insufficient rightsSaDBException
- exception thrown during query execution
-
searchHQL
public List<SaDocumentInfo> searchHQL(SaQueryInfo hqlQuery) throws SaSystemException, SaAuthenticationException, SaDBException Description copied from interface:SaClassicConnector
Performs a search with the given hql query (hibernate query language).- Specified by:
searchHQL
in interfaceSaClassicConnector
- Parameters:
hqlQuery
- the Hibernate query info.- Returns:
- a result list of document information objects
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- when the user is not logged in or has insufficient rightsSaDBException
- exception thrown during query execution
-
removeEvent
Deprecated.Description copied from interface:SaClassicConnector
Deletes the row from XEvents for the given event.- Specified by:
removeEvent
in interfaceSaClassicConnector
- Parameters:
event
- Event object- Returns:
- boolean true deleted
- Throws:
SaSystemException
- if a backend system error occurs
-
addListener
@Deprecated public void addListener(SaEventListener listener) throws SaSystemException, SaAuthenticationException Deprecated.Description copied from interface:SaClassicConnector
Adds a new listener to the handler.- Specified by:
addListener
in interfaceSaClassicConnector
- Parameters:
listener
- Event listener- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
removeListener
Deprecated.Description copied from interface:SaClassicConnector
Removes a listener from the handler.- Specified by:
removeListener
in interfaceSaClassicConnector
- Parameters:
listener
- Event listener- Throws:
SaSystemException
- SaSystemException
-
addListener
@Deprecated public void addListener(SaStatusEventListener listener) throws SaAuthenticationException, SaSystemException Deprecated.Description copied from interface:SaClassicConnector
Adds a new listener to the handler.- Specified by:
addListener
in interfaceSaClassicConnector
- Parameters:
listener
- Event listener- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
removeListener
Deprecated.Description copied from interface:SaClassicConnector
Removes a listener from the handler.- Specified by:
removeListener
in interfaceSaClassicConnector
- Parameters:
listener
- Event listener- Throws:
SaSystemException
- SaSystemException
-
readDocumentFilename
public String readDocumentFilename(String docHdoc, boolean currentRevision, int elementNumber) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Reads the filenames of the application data of the document with the given ID.- Specified by:
readDocumentFilename
in interfaceSaClassicConnector
- Parameters:
docHdoc
- The ID of the document (XHDOC)currentRevision
- flag indicating that the current revision of the document should be retrieved by resolving the HDoc.elementNumber
- position in the document structure; 0 if the document is unstructured.- Returns:
- Filenames of the application data
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCException
-
getACLNames
public String getACLNames(String documentHDOC) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
This method returns the names of the Access Control Lists that are assigned to this document. UseSaClassicConnector.getACLRights(String[])
to evaluate the rights of the current user on the given ACLs.- Specified by:
getACLNames
in interfaceSaClassicConnector
- Parameters:
documentHDOC
- The ID of the document revision (XHDOC)- Returns:
- a ';'-separated list of names of the acls set on the given document
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaDDCException
- on functional failures concerning the given document
-
getAllACLs
Deprecated.Description copied from interface:SaClassicConnector
Reads all existing ACL names.- Specified by:
getAllACLs
in interfaceSaClassicConnector
- Returns:
- List of ACL names
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- SaAuthenticationException
-
getInvolvedUsers
public List<String> getInvolvedUsers(String documentHDOC) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Lists the names of all users that are contained in all Access Control Lists set on the given document. Groups contained in the acls are evaluated to the users contained in the group.- Specified by:
getInvolvedUsers
in interfaceSaClassicConnector
- Parameters:
documentHDOC
- The ID of the document (XHDOC)- Returns:
- the names of all users that are contained in all Access Control Lists set on the given document
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaDDCException
-
setACLName
public SaSaveInfo setACLName(String ddcname, String documentHDOC, String acl, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetACLException Description copied from interface:SaClassicConnector
This method specifies the Access Control Lists that secure the document given by its id. Note that this will create a new revision of the document.- Specified by:
setACLName
in interfaceSaClassicConnector
- Parameters:
ddcname
- the name of the ddc in saperiondocumentHDOC
- The ID of the document (XHDOC)acl
- a ';' separated String of acl names that identify the Access Control Lists are requested to secure the given documentversionComment
- since changing a documents security creates a new revision, a revision comment must be given.- Returns:
- the save information of the newly created revision
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaDDCException
- when the definition name given was invalidSaSetACLException
- on functional failures concerning the given document or acls
-
getDocumentAccessData
public SaDocAccessData getDocumentAccessData(String documentHDOC) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method reads the access rights the current user has on a given document.- Specified by:
getDocumentAccessData
in interfaceSaClassicConnector
- Parameters:
documentHDOC
- The ID of the document (XHDOC)- Returns:
- the access rights the current user has on a given document
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
getLockInfo
public SaLockInfo getLockInfo(String sysRowId) throws SaSystemException, SaAuthenticationException, SaLockException Description copied from interface:SaClassicConnector
This method returns the locking information for a given document.- Specified by:
getLockInfo
in interfaceSaClassicConnector
- Parameters:
sysRowId
- Document SysRowId- Returns:
- the locking information for a given document
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaLockException
- Locking error
-
isActive
public boolean isActive()Checks, if the connector is logged on.- Returns:
- True, if active
-
getCurrentUserName
Description copied from interface:SaClassicConnector
This method returns the name of teh user currently logged in.- Specified by:
getCurrentUserName
in interfaceSaClassicConnector
- Returns:
- the name of the user currently logged in
-
getWorkflowConnector
Description copied from interface:SaClassicConnector
Returns a workflow connector based on this classic connector.- Specified by:
getWorkflowConnector
in interfaceSaClassicConnector
- Returns:
- Workflow connector
- Throws:
SaAuthenticationException
- Authentification errorSaSystemException
- Remote exception
-
getTaskList
public List<TaskInfo> getTaskList(int[] ids, String filter, Map<String, Object> parameter) throws SaAuthenticationException, SaSystemExceptionReads the tasks for this user.- Parameters:
ids
- Box ID'sfilter
- HQL filterparameter
- Filter parameter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTaskAuditList
public List<TaskAuditInfo> getTaskAuditList(int[] ids, String filter, Map<String, Object> parameter) throws SaAuthenticationException, SaSystemExceptionReads the task audits for this user.- Parameters:
ids
- Box ID'sfilter
- HQL filterparameter
- Filter parameter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTask
Reads the task info for the given ID.- Parameters:
taskID
- Task ID- Returns:
- Task info
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getParentTask
Reads the parent task info for the given ID.- Parameters:
taskID
- Task ID- Returns:
- Task info
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getCommandInfos
public Collection<CommandInfo> getCommandInfos(String docUID) throws SaAuthenticationException, SaSystemException Reads all possible transitions for this task.- Parameters:
docUID
- Document UID of task- Returns:
- Command list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getCommandInfos
public Collection<CommandInfo> getCommandInfos(String docUID, boolean transitionsOnly) throws SaAuthenticationException, SaSystemException Reads all possible transitions and optional other possible commands for this task.- Parameters:
docUID
- Document UID of tasktransitionsOnly
- 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
Reads the count (number of workflow item) of the inbox identified by the given id.- Parameters:
boxId
- the workflow box id- Returns:
- the count of the inbox as Long.
- Throws:
SaAuthenticationException
- if an error occurs.SaSystemException
- if an error occurs.
-
executeCommand
public 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
public List<CommentInfo> getCommentInfos(String taskId) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads the comments for the given task.- Parameters:
taskId
- Task ID- Returns:
- List of comments
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getHistoryInfos
public List<HistoryInfo> getHistoryInfos(String taskId) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads the history for the given task.- Parameters:
taskId
- Task ID- Returns:
- History list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getCompleteHistoryInfos
public List<List<HistoryInfo>> getCompleteHistoryInfos(String docId) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads the history and comments for the given document.- Parameters:
docId
- Document ID- Returns:
- CompleteHistoryInfo
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getWorkflowDefinitions
public List<String> getWorkflowDefinitions() throws SaAuthenticationException, SaSystemException, SaWorkflowExceptionReads all available workflow definitions.- Returns:
- Workflowdefinition list
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getWorkflowDefinitions
public List<ProcessDefinitionDescriptor> getWorkflowDefinitions(String ddcName) throws SaAuthenticationException, SaSystemException, SaWorkflowException Returns the workflow definitions that are allowed to be used for documents contained in the specified DDC. If no restrictions are configured, all workflow definitions will be returned.- Parameters:
ddcName
- name of the DDC- Returns:
- Workflowdefinition list
- Throws:
SaAuthenticationException
- authentication error when loading definitionsSaSystemException
- system error when loading definitionsSaWorkflowException
- workflow error when loading definitions
-
getWorkflowDdcName
Gets the workflow ddc name.- Returns:
- the name of the workflow ddc
- Throws:
SaSystemException
- SaSystemException
-
addComment
public void addComment(String comment, String taskUID, int level) throws SaAuthenticationException, SaSystemException, SaWorkflowException Adds a comment to the task.- Parameters:
comment
- CommenttaskUID
- Task UIDlevel
- Level- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
addHistory
public void addHistory(String description, String taskUID) throws SaAuthenticationException, SaSystemException, SaWorkflowException Adds a history entry to the task.- Parameters:
description
- CommenttaskUID
- Task UID- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getOutOfOffice
Get the substitute for the logged on user.- Returns:
- Substitute name
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getSubstitute
Get the substitute for the logged on user.- Returns:
- Substitute name
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
setOutOfOffice
public void setOutOfOffice(boolean isOutOfOffice) throws SaAuthenticationException, SaSystemException set the out of office status for the logged on user.- Parameters:
isOutOfOffice
- is OutOfOffice- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
setSubstitute
Set the substitute for the logged on user.- Parameters:
name
- Substitute name- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getMembers
Reads the workflow members in a full structured tree.- Returns:
- Member
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getMember
public WorkflowMember getMember(WorkflowMember member, int depth, String filter) throws SaAuthenticationException, SaSystemException Returns the workflow members by the given parameters.
This method is considered as a search-method. Thus, the result is a flat list of search results. The real SAPERION group, org unit, roles and user structure is not returned. The depth parameter of the given options has a special meaning: depth = 1 will return the same result as depth = 0. A negative depth will result in a full-depth search. A positive depth parameter will cause the search to be performed on the structure tree until the given tree-depth.
The resulting members always include the user specific workflow favorites. An empty User marks the border between favorites and real search results.- Parameters:
member
- Starting memberdepth
- Depth to readfilter
- filter string- Returns:
- Member Filled starting member
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
isAlive
Description copied from interface:SaClassicConnector
Tests the lifetime of this connector. If the connector is alive the expiration timeout will be reset (the connection will be kept alive until the next timeout).- Specified by:
isAlive
in interfaceSaClassicConnector
- Returns:
- true if alive
- Throws:
SaSystemException
- System exception
-
getUsers
Reads a list of filtered users.- Parameters:
filter
- Filter- Returns:
- List of users
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
getAnnotations
@Deprecated public String getAnnotations(String hDoc, int indexOfContentElement) throws SaAuthenticationException, SaSystemException Deprecated.Description copied from interface:SaClassicConnector
Reads the annotations from the given document.- Specified by:
getAnnotations
in interfaceSaClassicConnector
- Parameters:
hDoc
- Document HDOCindexOfContentElement
- the index of the chosen context element- Returns:
- Annotation string
- Throws:
SaAuthenticationException
- if the user is not logged in or has insufficient rightsSaSystemException
- if a backend system error occurs
-
getAnnotations
public String getAnnotations(String hDoc, int indexOfContentElement, boolean currentRevision) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Reads the annotations of the document with the specified ID.The returned annotation string contains a list of annotation using an INI format. 5 diffrent annotations types are available. Each annotation starts with its type description and a list of properties describing the annotation format.
Annotation types:
- [ARROW]
- [BLACKMARKER]
- [CUSTOM]
- [TEXT]
- [HIGHLIGHT]
Example for a text marker:
[HIGHLIGHT] X = <x> Y = <y> WIDTH = <width> HEIGHT = <height> LINEWIDTH = 0 FILLCOLOR = 255, 128, 0 TRANSPARENT = 1 PAGE =
EDIT = 1 LABEL = Highlight1 BORDER = 1 SEMITRANSPARENT = 1 Example for a sticky node:
[TEXT] X = <x> Y = <y> WIDTH = <width> HEIGHT = <height> PAGE = <page> EDIT = 1 LABEL = text1 TEXT = <text> FONT_HEIGHT = 67 BORDER = 1 COLOR = 255, 0, 0 FILLCOLOR = 255, 255, 255 TRANSPARENT = 0 SEMITRANSPARENT = 0 FONT_NAME = Arial FONT_BOLD = 0 FONT_ITALIC = 0 FONT_UNDERLINE = 0 FONT_STRIKETHROUGH = 0 BORDER = 1 SEMITRANSPARENT = 1
Example for a black marker:
[BLACKMARKER] X = <x> Y = <y> WIDTH = <width> HEIGHT = <height> LINEWIDTH = 0 FILLCOLOR = 0, 0, 0 TRANSPARENT = 0 PAGE = <page> EDIT = 1 LABEL = Highlight1 BORDER = 1 SEMITRANSPARENT = 1
Example for a arrow annotation:
[ARROW] X1 = <x1> Y1 = <y1> X2 = <x2> Y2 = <y2> PAGE = <page> EDIT = 1 LABEL = Arrow1 COLOR = 255, 0, 0 LINEWIDTH = 10
A custom-section is contained in the INI that contains information for the client about how to handle annotations. See online documentation for more information about the custom-section.- Specified by:
getAnnotations
in interfaceSaClassicConnector
- Parameters:
hDoc
- Document HDOCindexOfContentElement
- the index of the chosen context elementcurrentRevision
- true to get current revision- Returns:
- Annotation string as describe above
- Throws:
SaAuthenticationException
- if the user is not logged in or has insufficient rightsSaSystemException
- if a backend system error occurs
-
setAnnotations
public void setAnnotations(String hDoc, int indexOfContentElement, String annotations) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Sets the given annotations to the document. This method creates a new revision.For the annotation string definition to set, please take a look into the
SaClassicConnector.getAnnotations(String, int, boolean)
documentation and the online documentation for more information about the custom-section.- Specified by:
setAnnotations
in interfaceSaClassicConnector
- Parameters:
hDoc
- Document HDOCindexOfContentElement
- the index of the chosen context elementannotations
- Annotation string, definition described hereSaClassicConnector.getAnnotations(String, int, boolean)
- Throws:
SaAuthenticationException
- Authentication errorSaSystemException
- Remote exception
-
getSystemSetting
public SaSystemSetting getSystemSetting(String accessKey) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Retrieves a system setting object.- Specified by:
getSystemSetting
in interfaceSaClassicConnector
- Parameters:
accessKey
- key to get associated system setting- Returns:
SaSystemSetting
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
getSystemInfo
Description copied from interface:SaClassicConnector
This method returns general information about the connected system.- Specified by:
getSystemInfo
in interfaceSaClassicConnector
- Returns:
- general information about the connected system
- Throws:
SaSystemException
- on general system failures
-
getFeatures
Description copied from interface:SaClassicConnector
This method returns the features enabled in the Saperion system.- Specified by:
getFeatures
in interfaceSaClassicConnector
- Returns:
- the features enabled in the Saperion system
- Throws:
SaSystemException
- on general system failures
-
getUserSetting
public SaUserSetting getUserSetting(String accessKey) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Retrieves a user-specific setting object. User-specific settings are stored in the system's ini-files.- Specified by:
getUserSetting
in interfaceSaClassicConnector
- Parameters:
accessKey
- The key to get associated user setting. The key consists of the type of the setting and a key to identify the setting separated by '|'.
Example: How to read a section from Saperion's ini-files:
PROPERTIES|TheNameOfTheSection
If the section's name contains a tenant-specific hex-id, you can use the placeholders$my_tenant$
, which will be replaced by the current tenant's ID and$all_tenants$
, which will be replaced by the ID representing all tenants.- Returns:
SaUserSetting
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
setUserSetting
public void setUserSetting(SaUserSetting setting) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Persists a user-specific setting object. User-specific settings are stored in the system's ini-files.- Specified by:
setUserSetting
in interfaceSaClassicConnector
- Parameters:
setting
- theSaUserSetting
object to be stored- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
getSetting
public Setting getSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method retrieves aSetting
identified by it's key and section from the database.- Specified by:
getSetting
in interfaceSaClassicConnector
- 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 specified key and section was found
- Throws:
SaSystemException
- system error when retrieving the settingSaAuthenticationException
- authentication error when retrieving the setting
-
searchSettings
public SettingSearchResult searchSettings(SettingSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method searches settings in the database.- Specified by:
searchSettings
in interfaceSaClassicConnector
- Parameters:
searchInfo
-SettingSearchInfo
containing information about what to search- Returns:
- a
SettingSearchResult
- Throws:
SaSystemException
- system error when searchingSaAuthenticationException
- authentication error
-
setSetting
Description copied from interface:SaClassicConnector
This method stores aSetting
in the database.- Specified by:
setSetting
in interfaceSaClassicConnector
- Parameters:
setting
- the setting to store- Throws:
SaSystemException
- system error when storing the settingSaAuthenticationException
- authentication error when storing the setting
-
deleteSetting
public boolean deleteSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method deletes a setting in the database.- Specified by:
deleteSetting
in interfaceSaClassicConnector
- 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 the setting was deleted, false if there was no such setting
- Throws:
SaSystemException
- system exception when deleting the settingSaAuthenticationException
- when the user is not logged in or has insufficient rights when deleting the setting
-
loadLocalize
Load localize.- Parameters:
language
- Langage- Returns:
- Localisation map
- Throws:
SaWorkflowException
- Workflow exception
-
setLocale
Description copied from interface:SaClassicConnector
This methods sets the localization information for the current user.- Specified by:
setLocale
in interfaceSaClassicConnector
- Parameters:
locale
- Localization information- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- SaSystemException
-
addToFolder
public void addToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Description copied from interface:SaClassicConnector
Adds the document with given documentId to a given folder with given folderId.A document can be filed in multiple folders, but each filing operation must be called separately. - Specified by:
addToFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- name of the folder table to add documentdocumentId
- SysRowId of the document to add to folderdocumentDDC
- DDC name of the document located infolderId
- destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- DDC not fileable
-
copyFolder
public String copyFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Copies the given folder 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.- Specified by:
copyFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- folder table namefolderId
- tolder ID to copydestinationId
- destination folder IDbeforeChild
- ID of the child to insert the folder before or empty for appendwithDocuments
- True, if documents should be copied- Returns:
- new folder id
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
createFolder
@Deprecated public String createFolder(String folderTableDDC, String parentId, String beforeChild, String folderName, SaFolderConstants.FOLDER_TYPE folderType, Properties namevaluePairs) throws SaSystemException, SaAuthenticationException, SaDDCException, SaFolderNameException Deprecated.Description copied from interface:SaClassicConnector
Creates a new folder below a given folder. The parent folder can be the root node (empty id).- Specified by:
createFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tableparentId
- Parent folder ID or emptybeforeChild
- ID of the child to add the new folder before or empty for appendfolderName
- Folder namefolderType
- Type of the foldernamevaluePairs
- Folder properties- Returns:
- Folder ID (SysRowId)
- Throws:
SaSystemException
- Remote exceptionSaFolderNameException
- when the folder name contained an invalid characterSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
createFolder
public String createFolder(SaFolderSaveInfo info, Properties namevaluePairs) throws SaSystemException, SaAuthenticationException, SaDDCException, SaFolderNameException Description copied from interface:SaClassicConnector
Creates a new folder below a given folder. The parent folder can be the root node (empty id).- Specified by:
createFolder
in interfaceSaClassicConnector
- Parameters:
info
-SaFolderSaveInfo
of folder to createnamevaluePairs
- Folder properties (Attention: These properties will replace the property values in theSaFolderSaveInfo
info above!)- Returns:
- Folder ID (SysRowId)
- Throws:
SaSystemException
- Remote exceptionSaFolderNameException
- when the folder name contained an invalid characterSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
deleteFolder
public void deleteFolder(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Deletes an existing folder. It must not have children or filed documents, i.e. the user must delete/remove all these before deleting the node.- Specified by:
deleteFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID to delete- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getDocumentFolders
public List<SaDocumentInfo> getDocumentFolders(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Description copied from interface:SaClassicConnector
Returns a list of folder properties which contains all folders the document is contained in. The list is returned only for one folder table, so if the document is filed in multiple folder tables, this must be queried separately.- Specified by:
getDocumentFolders
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document SysRowId- Returns:
- List of folder properties
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- DDC not fileable
-
getDocumentFolderCount
public long getDocumentFolderCount(String folderTableDDC, String documentDDC, String sysRowId) throws SaAuthenticationException, SaSetNodeException, SaSystemException, SaDDCException Description copied from interface:SaClassicConnector
Returns the total count over all folders from all users in which the specified document is contained in.- Specified by:
getDocumentFolderCount
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document SysRowId- Returns:
- folder count
- Throws:
SaAuthenticationException
- Authentication errorSaSetNodeException
- DDC not fileableSaSystemException
- Remote exceptionSaDDCException
- Database exception
-
getFolderChildren
public List<SaDocumentInfo> getFolderChildren(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Description copied from interface:SaClassicConnector
Returns a list 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.- Specified by:
getFolderChildren
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDdepth
- Depth to get children for. Needs to be gte 1.filter
- Additional HQL filter criteriaallowedMaxNrOfChildFolders
- allowed maximum number of child folders per level or -1 for no limit- Returns:
- List of folder information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder exception
-
getFolderInfo
@Deprecated public SaDocumentInfo getFolderInfo(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Deprecated.Description copied from interface:SaClassicConnector
Returns the folder information object for the given folder.- Specified by:
getFolderInfo
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder exception
-
getFolderInfo
public SaDocumentInfo getFolderInfo(String folderTableDDC, String folderId, boolean forceLoadVariables) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Description copied from interface:SaClassicConnector
Returns the folder information object for the given folder.- Specified by:
getFolderInfo
in interfaceSaClassicConnector
- 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 information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder exception
-
getFolderFromPath
public List<SaDocumentInfo> getFolderFromPath(String folderTableDDC, String startNodeId, String folderPath) throws SaSystemException, SaAuthenticationException, SaDBException Description copied from interface:SaClassicConnector
Returns the folders which match to the given path. Path names are built using the SysFolderName field of each folder. Either the slash ('/') or the backslash ('\') can be used as path separator. A path can be searched relative to a given folder, to allow for searching within Personal folders and the like. 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. UseSaClassicConnector.getFolderByPath(String, String, String)
to retrieve a single folder.- Specified by:
getFolderFromPath
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablestartNodeId
- ID of folder to start with or null/empty if no relative search is requiredfolderPath
- Search path- Returns:
- Folder list
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception
-
getFolderByPath
public SaDocumentInfo getFolderByPath(String folderTableDDC, String startFolderId, String folderPath) throws SaSystemException, SaAuthenticationException, SaDBException Description copied from interface:SaClassicConnector
Returns the folder which matches to the given path. Path names are built using the SysFolderName field of each folder. Either the slash ('/') or the backslash ('\') can be used as path separator. A path can be searched relative to a given folder, to allow for searching within Personal folders and the like. If no folder with the specified path is found, null is returned.- Specified by:
getFolderByPath
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablestartFolderId
- ID of folder to start with or null/empty if no relative search is requiredfolderPath
- Search path- Returns:
- Folder list
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception
-
getFolderParent
public SaDocumentInfo getFolderParent(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDBException Description copied from interface:SaClassicConnector
Returns the parent of the given folder. Please note that in case of a folder to which another folder links, the real parent is returned, not the parent of the link.- Specified by:
getFolderParent
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Properties of the folder or null, if not found
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception
-
getFolderRights
public SaDocAccessData getFolderRights(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Returns the rights mask for the given folder and user. The effective rights are calculated by using ACL inheritance.- Specified by:
getFolderRights
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder access data
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
moveFolder
public void moveFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Moves the given folder to a new destination. Document filings are always moved with the folder. This is not a quick operation, as path and security information must be updated.- Specified by:
moveFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for append- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
moveToFolder
public void moveToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Removes the document from the source folder and adds it to the source folder. Both source- and destination folder have to exist.- Specified by:
moveToFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Source folder IDdestinationId
- Destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
removeFromFolder
public void removeFromFolder(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Removes the document from the given folder.- Specified by:
removeFromFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tabledocumentSysRowId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
searchFolderDocuments
public List<SaDocumentInfo> searchFolderDocuments(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
HQL search extended with additional folder informations and depth.- Specified by:
searchFolderDocuments
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDhqlFilter
- HQL query for document tables. The query text must be only the "where" filter. The main DDC is defined as "d".- Returns:
- List of documents from each involved DDC's
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
setFolderAcl
public void setFolderAcl(String folderTableDDC, String folderId, String aclName) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Sets an ACL for the given folder. The folder’s SysACLUserList is recalculated, and if the folder has children, the same is true for all the folder’s children.- Specified by:
setFolderAcl
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDaclName
- ACL name- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
updateFolder
public void updateFolder(String folderTableDDC, String folderId, Properties namevaluePairs) throws SaSystemException, SaAuthenticationException, SaDDCException, SaFolderNameException Description copied from interface:SaClassicConnector
Updates an existing folder with the given properties. Be sure to set the node-type property in the folder's properties to enable special handling for certain types like registers.- Specified by:
updateFolder
in interfaceSaClassicConnector
- Parameters:
folderTableDDC
- name of folder table (DDC)folderId
- id of folder to updatenamevaluePairs
- Folder properties to update- Throws:
SaSystemException
- Remote exceptionSaFolderNameException
- when the folder name contained an invalid characterSaAuthenticationException
- Authentication errorSaDDCException
- Database exception- See Also:
-
getFolderClass
public SaFolderClass getFolderClass(String className) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Reads the folder class with the given name.- Specified by:
getFolderClass
in interfaceSaClassicConnector
- Parameters:
className
- Class name in dotted notation- Returns:
- Folder class
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- authentication errorSaDDCException
- Database exception
-
searchFolderClass
public Set<SaFolderClass> searchFolderClass(SaFolderClassSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Searches for folder classes that match the specified propertied.- Specified by:
searchFolderClass
in interfaceSaClassicConnector
- Parameters:
searchInfo
- bean that contains the properties to search for- Returns:
- set of folder classes that match the properties or an empty set, if no class was found
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- authentication error
-
getSystemFiles
public List<String> getSystemFiles(SystemFileKind kind, String filter) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
This method returns the names of all system files of a specific kind.- Specified by:
getSystemFiles
in interfaceSaClassicConnector
- Parameters:
kind
- the kind of system files to read.filter
- A filter string. Only files will be returned, that match the filter. To get all system files 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
public void logClientEvent(String hdoc, SaConstants.ProtoEvents event, String remark) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Adds an audit log event.- Specified by:
logClientEvent
in interfaceSaClassicConnector
- Parameters:
hdoc
- Document HDOCevent
- Event typeremark
- Remark- Throws:
SaSystemException
- general errorSaAuthenticationException
- error on the authentification / insufficient rights
-
getAcls
Description copied from interface:SaClassicConnector
This method returns all Access Control Lists in the current tenant.- Specified by:
getAcls
in interfaceSaClassicConnector
- Returns:
- all Access Control Lists in the current tenant
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
getACLRights
Description copied from interface:SaClassicConnector
This method returns the access rights the current user has when in the context of the Access Controll Lists given by name.- Specified by:
getACLRights
in interfaceSaClassicConnector
- Parameters:
acls
- an array of names referencing the ACLs to evaluate- Returns:
- the rights the current user has in the context of the given ACLs
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
changePassword
public void changePassword(String user, String oldPassword, String tenant, String newPassword) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Changes the password of an existing user.- Specified by:
changePassword
in interfaceSaClassicConnector
- Parameters:
user
- The login name of the existing user.oldPassword
- The old password. This parameter is required, since the password should only be changed by the user himself.tenant
- The tenant the user is defined innewPassword
- The new password- Throws:
SaSystemException
- when a system error occurredSaAuthenticationException
- when the user is not logged in or has insufficient rightsSaClassicConnector.logon(String, String, int, String)
was successfully invoked.
-
getAuthorizedUsers
public List<UsersRights> getAuthorizedUsers(String hDoc, String rights, MatchKind match) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
This method returns the users that have specific rights on a document.- Specified by:
getAuthorizedUsers
in interfaceSaClassicConnector
- Parameters:
hDoc
- The id of the document (XHDOC).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
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
getArchivedSize
Description copied from interface:SaClassicConnector
Returns the total document size in the archive in bytes.The actual size that the archived document takes up on the storage medium. It may be compressed, and include additional data such as fulltext and other metadata.
- Specified by:
getArchivedSize
in interfaceSaClassicConnector
- Parameters:
hDoc
- The document id whichs size is wanted.- Returns:
- The total document size in archive in bytes.
- Throws:
SaSystemException
- if a system error occuredSaAuthenticationException
- if the user is not logged in or has insufficient rights
-
storeSystemFile
public void storeSystemFile(SystemFileKind kind, String name, InputStream data) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
This method stores a system file of a specific kind.- Specified by:
storeSystemFile
in interfaceSaClassicConnector
- Parameters:
kind
- The kind of systemfile to store.name
- The name of the file.data
- The content of the file to save.- Throws:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
loadSystemFile
public InputStream loadSystemFile(SystemFileKind kind, String name) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
This method loads a system file of a specific kind.- Specified by:
loadSystemFile
in interfaceSaClassicConnector
- 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
-
getFolderUpdateInfo
@Deprecated public Set<FolderUpdateInfo> getFolderUpdateInfo(Map<String, Long> folderIds) throws SaAuthenticationException, SaSystemExceptionDeprecated.Description copied from interface:SaClassicConnector
Generates the cut set of folders that are open on ngclient side and changed on rich client side over a specified period of time like the last 10 minutes.- Specified by:
getFolderUpdateInfo
in interfaceSaClassicConnector
- Parameters:
folderIds
- Map of folderIds (simple, workflow, ..) with the time stamps of the last refresh to build the cut set of.- Returns:
- List of FolderUpdateInfo objects that are changed during the last x minutes.
- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- when a system error occured
-
checkSapUrl
public SapDocInfo checkSapUrl(String url) throws SaSystemException, SaSapUrlException, SaAuthenticationException Description copied from interface:SaClassicConnector
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.- Specified by:
checkSapUrl
in interfaceSaClassicConnector
- Parameters:
url
- the SAP URL to check- Returns:
SaSaveInfo
object with hdoc und ddc name describing the found document- Throws:
SaSystemException
- if a system error occuredSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaSapUrlException
-
cacheDocument
public SaSaveInfo cacheDocument(String xhDoc, DocumentInfo document) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Caches a new document in the backend system with the given metadata and content.The document will not be persisted to a storage or medium.
To persist a document in the backend system please use the methodSaClassicConnector.createDocument(DocumentInfo)
.
The given xhdoc should already exist on the named DDC. This method should only used by cosolidation services like the IXOS connetor.- Specified by:
cacheDocument
in interfaceSaClassicConnector
- Parameters:
xhDoc
- The xhdoc of the Document to cachedocument
- theDocumentInfo
about the document to cache- Returns:
- the
SaSaveInfo
of the cached document - Throws:
SaSystemException
- if a backend system error occurrs during the cache operationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error occurs
-
resolveLatestHDoc
Description copied from interface:SaClassicConnector
Resolves and returns the XHDOC of the latest version of the document identified by the given HDOC.- Specified by:
resolveLatestHDoc
in interfaceSaClassicConnector
- Parameters:
oldHdoc
- the HDOC to identify the document- Returns:
- The XHDOC of the latest version of the document identified by the given HDOC.
- Throws:
SaSystemException
- if a backend system error occursSaAuthenticationException
- SaAuthenticationException
-
cacheDocument
public SaSaveInfo cacheDocument(String xhDoc, String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String strAcl) throws SaSystemException, SaAuthenticationException, SaDDCException Description copied from interface:SaClassicConnector
Caches a new document in the backend system with the given metadata and content.The document will not be persisted to a storage or medium.
To persist a document in the backend system please use the methodSaClassicConnector.createDocument(DocumentInfo)
.
The given xhdoc should already exist on the named DDC. This method should only used by cosolidation services like the IXOS connetor.- Specified by:
cacheDocument
in interfaceSaClassicConnector
- Parameters:
xhDoc
- The xhdoc of the document to cacheddcName
- The name of the database definition (DDC) to cache the documentnamevaluePairs
- A properties object containing the metadata of the document (e.g index fields and their values)content
- Multiple content data (an array ofInputStream
instances)versionComment
- The comment for the versionstrAcl
- the names of acls (comma sessparated list)- Returns:
SaSaveInfo
object describing the cached document- Throws:
SaSystemException
- if a backend system error occurrs during the cache operationSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaDDCException
- if a DDC related error orrurs
-
getCurrentUserInfo
Description copied from interface:SaClassicConnector
This method returns detailed info about the current user.- Specified by:
getCurrentUserInfo
in interfaceSaClassicConnector
- Returns:
- detailed info about the current user.
- Throws:
SaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
setCurrentUserPresent
public void setCurrentUserPresent(boolean present) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Sets whether the current user is present.- Specified by:
setCurrentUserPresent
in interfaceSaClassicConnector
- Parameters:
present
- whether the current user is present- Throws:
SaAuthenticationException
- authentication errorSaSystemException
- system error
-
updateCurrentUserInformation
public void updateCurrentUserInformation(MutableUserInformation user) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Changes information about the current user. Since not every information about a user is possible to change it takes aMutableUserInformation
instance instead of an SaUserInfo instance as parameter.- Specified by:
updateCurrentUserInformation
in interfaceSaClassicConnector
- Parameters:
user
- - the information to change- Throws:
SaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
invoke
public <T extends Serializable> T invoke(LegacyOperation<T> operation) throws SaAuthenticationException, SaSystemException Description copied from interface:LegacyConnection
Invokes the givenOperation
on the server side.- Specified by:
invoke
in interfaceLegacyConnection
- Type Parameters:
T
- The return type of the given operation- Parameters:
operation
- The operation to invoke. After invocation calling operation.getResult() will yield the same as the return of this call.- Returns:
- The result of the server side call of Operation.invoke()
- Throws:
SaAuthenticationException
- When the user is not correctly logged on, this may result from a session time outSaSystemException
- When an error occurred in the operation.
-
getRendition
public List<com.saperion.connector.renditions.Rendition> getRendition(Element element, com.saperion.connector.options.Options options) throws com.saperion.connector.renditions.exceptions.FormatNotSupportedException, com.saperion.connector.renditions.exceptions.PreconditionFailedException, TimeoutException, com.saperion.connector.renditions.exceptions.RenderingException, SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Returns the rendition object from a rendered document.- Specified by:
getRendition
in interfaceSaClassicConnector
- Parameters:
element
- anElement
object that represents an object in the archived document.options
- anOptions
object that defines the options required to generate the rendition- Returns:
- list of
Rendition
instances. - Throws:
com.saperion.connector.renditions.exceptions.FormatNotSupportedException
- if the input or output format is not supportedcom.saperion.connector.renditions.exceptions.PreconditionFailedException
- if parts of the options are missingTimeoutException
- if a timeout was specified and it was reachedcom.saperion.connector.renditions.exceptions.RenderingException
- if engine is not available or internal initialization failuresSaAuthenticationException
- If not properly logged inSaSystemException
-
sendBarcode
public void sendBarcode(String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) throws SaBarcodeException Description copied from interface:SaClassicConnector
Sends the Document UID with the barcode to SAP R/3. This method call can be used for the subsequent transfer of documents that are already present in SAPERION.- Specified by:
sendBarcode
in interfaceSaClassicConnector
- Parameters:
indexMask
- Index mask namedocUid
- SAPERION Document UIDcontentRep
- SAP Content repositorysid
- SAP ID It is possible to set this value to 0, then SAPERION will generate a SAP ID.docType
- Document typevalue
- barcode as stringmandant
- Mandant name- Throws:
SaBarcodeException
- BarcodeException
-
getToken
public int getToken()- Returns:
- the token used to identify this connector instance in the backend
-
getSession
Returns the session of the logged in user. In other case aSaAuthenticationException
will be thrown;- Returns:
- a session if connector was successfully logged in.
- Throws:
SaAuthenticationException
- if no successful login was done
-
getServerInfos
- Returns:
- list of SaRMIServerInfo instances describing the servers configured in saperion.properties
- Throws:
SaAuthenticationException
- user is not logged inSaSystemException
- system exception
-
getLicenseCount
Description copied from interface:SaClassicConnector
This method returns the overall count of Licenses of the given type in the system.- Specified by:
getLicenseCount
in interfaceSaClassicConnector
- Parameters:
type
- the license type seeLicenseType
for values- Returns:
- the overall count of Licenses of the given type in the system
- Throws:
SaSystemException
- Error on the saperion system
-
setUsedLicense
Description copied from interface:SaClassicConnector
Set the count of used licenses.- Specified by:
setUsedLicense
in interfaceSaClassicConnector
- Parameters:
type
- Client typecount
- Number of licenses- Returns:
- True, if success
- Throws:
SaSystemException
- Error on the saperion system
-
hasRenderEngine
public boolean hasRenderEngine()Description copied from interface:SaClassicConnector
Checks wether this classic connector has a render engine.- Specified by:
hasRenderEngine
in interfaceSaClassicConnector
- Returns:
- if there is a render engine
true
, otherwisefalse
-
getSupportedRenderSourceFormats
Description copied from interface:SaClassicConnector
Gets the supported source formats from the render engine.- Specified by:
getSupportedRenderSourceFormats
in interfaceSaClassicConnector
- Returns:
- set of supported source formats (empty if there is no render engine)
-
getSupportedRenderTargetFormats
Description copied from interface:SaClassicConnector
Gets the supported target formats from the render engine.- Specified by:
getSupportedRenderTargetFormats
in interfaceSaClassicConnector
- Returns:
- set of supported target formats (empty if there is no render engine)
-
toString
-
hashCode
public int hashCode() -
setEventsEnabled
Description copied from interface:SaClassicConnector
This method sets whether events (e.g. for the Integration Server) should be enabled for the current session.- Specified by:
setEventsEnabled
in interfaceSaClassicConnector
- Parameters:
enabled
- true, to enable events, otherwise false.- Throws:
SaSystemException
- system errorSaAuthenticationException
- authentication error
-
getEventsEnabled
Description copied from interface:SaClassicConnector
This method returns whether events (e.g. for the Integration Server) are enabled for the current session.- Specified by:
getEventsEnabled
in interfaceSaClassicConnector
- Returns:
- true, if events are enabled for the current session, otherwise false.
- Throws:
SaSystemException
- on general system failuresSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operation
-
getDDC
Description copied from interface:SaClassicConnector
This method returns a document definition given by its name.- Specified by:
getDDC
in interfaceSaClassicConnector
- Parameters:
ddcName
- name of the DDC- Returns:
- information about the requested DDC. See
DDC
. - Throws:
SaSystemException
- system error when retrieving information about the DDCSaAuthenticationException
- not logged in
-
getClientConnector
-
getServerSideClientConfiguration
Description copied from interface:SaClassicConnector
This method returns the configuration concerning the classic connector that is set on the server side. It is only valid after a login.- Specified by:
getServerSideClientConfiguration
in interfaceSaClassicConnector
- Returns:
- the configuration concerning the classic connector that is set on the server side
-
getFullTextFields
public Set<Map.Entry<String,String>> getFullTextFields(String ddcName, List<String> fullTextFields, String hdoc) throws SaSystemException - Specified by:
getFullTextFields
in interfaceSaClassicConnector
- 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
public List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(ExternalStorageType storageType) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Fetches all folders of External Storage from where documents need to be uploaded- Specified by:
getExternalStorageFoldersForUpload
in interfaceSaClassicConnector
- Returns:
- list of folder mappings
- Throws:
SaAuthenticationException
SaSystemException
-
getExternalStorageFoldersForUpload
public List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaAuthenticationException, SaSystemExceptionDescription copied from interface:SaClassicConnector
Fetches all folders of all types of External Storage services from where documents need to be uploaded- Specified by:
getExternalStorageFoldersForUpload
in interfaceSaClassicConnector
- Returns:
- list of folder mappings
- Throws:
SaAuthenticationException
SaSystemException
-
getExternalStorageMapping
public SaperionExternalStorageMappingInfo getExternalStorageMapping(String sysRowId) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Fetches the external storage mapping for the provided SysRowId- Specified by:
getExternalStorageMapping
in interfaceSaClassicConnector
- Returns:
- mapping object
- Throws:
SaAuthenticationException
SaSystemException
-
createExternalStorageFolderMapping
public void createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Stores the mapping information about Saperion document and External Storage folder- Specified by:
createExternalStorageFolderMapping
in interfaceSaClassicConnector
- Parameters:
mappingInfo
- mapping information about Saperion document and External Storage folder- Throws:
SaAuthenticationException
SaSystemException
-
updateExternalStorageUploadStatus
public void updateExternalStorageUploadStatus(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) throws SaAuthenticationException, SaSystemException Description copied from interface:SaClassicConnector
Updates the upload status of External Storage folder- Specified by:
updateExternalStorageUploadStatus
in interfaceSaClassicConnector
- Parameters:
folderId
- folderid whose status needs to be updated- Throws:
SaAuthenticationException
SaSystemException
-
deleteExternalStorageFolderMapping
public int deleteExternalStorageFolderMapping(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) throws SaSystemException, SaAuthenticationException Description copied from interface:SaClassicConnector
Deletes external storage mappings for given status and older than the given time- Specified by:
deleteExternalStorageFolderMapping
in interfaceSaClassicConnector
- 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
public com.lexmark.saperion.administration.RoleType getCurrentUserRole() throws SaSystemException, SaAuthenticationException- Specified by:
getCurrentUserRole
in interfaceSaClassicConnector
- Returns:
- the effective role (combined rights of all roles / profiles) of the current logged-in user
- Throws:
SaSystemException
SaAuthenticationException
- See Also:
-