Interface SaClassicConnector
- All Superinterfaces:
LegacyConnection
- All Known Implementing Classes:
SaClassicConnectorImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(SaEventListener listener) Deprecated.will be removed with version 8.1void
addListener
(SaStatusEventListener listener) Deprecated.will be removed with version 8.1void
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.will be removed with version 8.1, usecreateDocument(DocumentInfo)
instead.createDocument
(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) Deprecated.will be removed with version 8.1, usecreateDocument(DocumentInfo)
instead.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.usecreateFolder(SaFolderSaveInfo, Properties)
instead.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 methodcheckoutDocument(String)
.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.usegetAcls()
instead.getAnnotations
(String hDoc, int indexOfContentElement) Deprecated.usegetAnnotations(String, int, boolean)
instead.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.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) Deprecated.usegetDDC(String)
instead.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 startFolderId, String folderPath) Returns the folders which match to the given path.getFolderInfo
(String folderTableDDC, String folderId) Deprecated.usegetFolderInfo(String, String, boolean)
instead.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.No longer supported.getFulltext
(String ddcName, String sysRowId) Deprecated.Will be removed in 8.1.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) Fetches values of Full text columnsgetInvolvedUsers
(String documentHDOC) Deprecated.usegetAuthorizedUsers(String, String, MatchKind)
instead.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.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.getSetting
(String name, String section, boolean isLong) This method retrieves aSetting
identified by it's key and section from the database.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.byte[]
getThumbnail
(String hDoc, int widthX, int widthY, boolean color) Reads the thumbnail of the given document.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.boolean
Checks wether this classic connector has a render engine.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 userloadSystemFile
(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.will be removed with version 8.1default com.saperion.connector.authentication.Session
logon
(int rmiToken) 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
Deprecated.uselogon(Credentials)
withUsernamePasswordKey
instead.int
Deprecated.will be removed with version 8.1void
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 documentHDOC, 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 documentHDOC, boolean currentRevision, int elementNumber) Deprecated.will be removed with version 8.1readDocumentMetadata
(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 versionID, int elementNumber) Loads a document version from the backend system.readVersionDocumentFilename
(String documentHDOC, int elementNumber) Deprecated.use getDocumentInfo.getFullName() instead.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.no longer supported.void
removeFromFolder
(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) Removes the document from the given folder.void
removeListener
(SaEventListener listener) Deprecated.will be removed with version 8.1void
removeListener
(SaStatusEventListener listener) Deprecated.will be removed with version 8.1resolveLatestHDoc
(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.Use searchHQL() instead.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) Deprecated.UseupdateCurrentUserInformation(MutableUserInformation)
instead.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
setSetting
(Setting setting) This method stores aSetting
in the database.boolean
setUsedLicense
(int type, int count) Set the count of used licenses.void
setUserSetting
(SaUserSetting setting) Persists a user-specific setting object.void
Deprecated.Functionality removed because of security-concerns.void
storeSystemFile
(SystemFileKind kind, String name, InputStream data) This method stores a system file of a specific kind.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.will be removed with version 8.1, useupdateDocument(UpdateDocumentInfo)
instead.updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) Deprecated.will be removed with version 8.1updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks) Deprecated.will be removed with version 8.1updateDocument
(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks, boolean checkin) Deprecated.will be removed with version 8.1void
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 interface com.saperion.connector.LegacyConnection
invoke
-
Method Details
-
getConfiguration
This method reads the application configuration properties from the backend system.- 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.Functionality removed because of security-concerns. Method contained for compatibility only. Use windows service management tool or SAPERION MMC to stop the server. Will be removed with version 8.1.Stops the remote server.- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
addListener
@Deprecated void addListener(SaEventListener listener) throws SaAuthenticationException, SaSystemException Deprecated.will be removed with version 8.1Adds a new listener to the handler.- Parameters:
listener
- Event listener- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
removeListener
Deprecated.will be removed with version 8.1Removes a listener from the handler.- Parameters:
listener
- Event listener- Throws:
SaSystemException
- SaSystemException
-
addListener
@Deprecated void addListener(SaStatusEventListener listener) throws SaAuthenticationException, SaSystemException Deprecated.will be removed with version 8.1Adds a new listener to the handler.- Parameters:
listener
- Event listener- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
removeListener
Deprecated.will be removed with version 8.1Removes a listener from the handler.- Parameters:
listener
- Event listener- Throws:
SaSystemException
- SaSystemException
-
getDefinitions
This method returns the names of all DDCs registered in the Saperion system.- Returns:
- Array of DDC names
- 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
-
getFolderDefinitions
Reads the registered folder DDC names from the repository.- Returns:
- Array of folder DDC names
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
getDBDefinition
@Deprecated SaFieldDescription[] getDBDefinition(String name) throws SaSystemException, SaAuthenticationException Deprecated.usegetDDC(String)
instead. Will be removed in version 8.1This method reads the field definitions of the database definition (DDC) with the given name.- 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:
SaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
getSystemSetting
SaSystemSetting getSystemSetting(String accessKey) throws SaSystemException, SaAuthenticationException Retrieves a system setting object.- 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
This method returns general information about the connected system.- Returns:
- general information about the connected system
- Throws:
SaSystemException
- on general system failures
-
getFeatures
This method returns the features enabled in the Saperion system.- Returns:
- the features enabled in the Saperion system
- Throws:
SaSystemException
- on general system failures
-
getUserSetting
Retrieves a user-specific setting object. User-specific settings are stored in the system's ini-files.- 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
Persists a user-specific setting object. User-specific settings are stored in the system's ini-files.- Parameters:
setting
- theSaUserSetting
object to be stored- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
getSetting
Setting getSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException This method retrieves aSetting
identified by it's key and section from the database.- Parameters:
name
- the setting's namesection
- the setting's sectionisLong
- whether this is a setting with a long (>2KB) value or not- Returns:
- the setting or null if no setting with the specified key and section was found
- Throws:
SaSystemException
- system error when retrieving the settingSaAuthenticationException
- authentication error when retrieving the setting
-
searchSettings
SettingSearchResult searchSettings(SettingSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException This method searches settings in the database.- Parameters:
searchInfo
-SettingSearchInfo
containing information about what to search- Returns:
- a
SettingSearchResult
- Throws:
SaSystemException
- system error when searchingSaAuthenticationException
- authentication error
-
setSetting
This method stores aSetting
in the database.- Parameters:
setting
- the setting to store- Throws:
SaSystemException
- system error when storing the settingSaAuthenticationException
- authentication error when storing the setting
-
deleteSetting
boolean deleteSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException This method deletes a setting in the database.- Parameters:
name
- the name of the setting to deletesection
- the section of the setting to deleteisLong
- whether this is a setting with a long (>2KB) value or not- Returns:
- true if 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
-
logon
@Deprecated int logon(String username, String password, int type, String client) throws SaAuthenticationException, SaSystemException Deprecated.uselogon(Credentials)
withUsernamePasswordKey
instead. Will be removed in version 8.1.This method authenticates the given user and returns the token of the newly created session.- 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 int logon(jcifs.smb.NtlmPasswordAuthentication auth, int type, String client) throws SaAuthenticationException, SaSystemException Deprecated.will be removed with version 8.1Performs a logon with NTLM authentication.- 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 int logon(byte[] token, int type, String client) throws SaAuthenticationException, SaSystemException Deprecated.will be removed with version 8.1- Throws:
SaSystemException
- because it is not supported anymore.SaAuthenticationException
-
logon
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.- 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
-
logon
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.- 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
-
listActiveSessions
List<com.saperion.connector.authentication.Session> listActiveSessions() throws SaAuthenticationException, SaSystemExceptionList active sessions of the logged in user- Returns:
- A list of
Session
- Throws:
SaSystemException
SaAuthenticationException
-
closeSession
boolean closeSession(com.saperion.connector.authentication.Session session) throws SaAuthenticationException, SaSystemException Close the givenSession
of logged in user- Parameters:
session
-- Returns:
- true if successful, false otherwise
- Throws:
SaAuthenticationException
SaSystemException
-
logon
@Deprecated default com.saperion.connector.authentication.Session logon(int rmiToken) throws SaSystemException Deprecated.This method returns the information about the open session associated with given token- Parameters:
rmiToken
- The rmi token associated with already created session- Returns:
- information about the created session
- Throws:
SaSystemException
- thrown if the system is not reachable
-
logoff
This method logs the current user off from the system. The connector can be reused by callinglogon(Credentials)
.- Returns:
- whether the connector was authenticated before
- Throws:
SaAuthenticationException
- user was not logged inSaSystemException
- remote exception
-
getLicenseCount
This method returns the overall count of Licenses of the given type in the system.- 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
Set the count of used licenses.- Parameters:
type
- Client typecount
- Number of licenses- Returns:
- True, if success
- Throws:
SaSystemException
- Error on the saperion system
-
setLocale
This methods sets the localization information for the current user.- Parameters:
locale
- Localization information- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- SaSystemException
-
readDocument
InputStream readDocument(String documentHDOC, boolean currentRevision, int elementNumber) throws SaSystemException, SaAuthenticationException 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()
- Parameters:
documentHDOC
- 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
InputStream readDocument(String docHdoc, boolean currentRevision, int elementNumber, boolean withAnnotations) throws SaSystemException, SaAuthenticationException 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()
- 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
-
readReleasedDocument
InputStream readReleasedDocument(String docHdoc, boolean currentRevision, int elementNumber) throws SaSystemException, SaAuthenticationException Read released document if the release feature is active.- 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
-
readDocumentMetadata
SaPropertyValue[] readDocumentMetadata(String documentSysRowID, String ddcName, String[] fields) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the metadata of the document with the given ID.The returned metadata fields depend on the corresponding document definition table (DDC).
- 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 rightsSaDDCException
- if a DDC related error occurs
-
getFulltext
@Deprecated String getFulltext(String ddcName, String sysRowId) throws SaSystemException, SaAuthenticationException Deprecated.Will be removed in 8.1. UsegetFulltext(String, String, String, long)
instead.Reads the fulltext information for the given document with the given SYSROWID in the given DDC.- Parameters:
ddcName
- DDC name of the documentsysRowId
- SYSROWID of the document- 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
String getFulltext(String ddcName, String hdoc, String fieldName, long length) throws SaSystemException, SaAuthenticationException Reads the fulltext information for the given document with the given HDOC in the given DDC from the specified field.- 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
byte[] getThumbnail(String hDoc, int widthX, int widthY, boolean color) throws SaSystemException, SaAuthenticationException 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.- 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 SaSaveInfo createDocument(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1, usecreateDocument(DocumentInfo)
instead.Creates a new document on the backend system with the given metadata and content.- 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
-
updateDocument
@Deprecated SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1, useupdateDocument(UpdateDocumentInfo)
instead.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.- 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
-
createDocument
@Deprecated SaSaveInfo createDocument(String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1, usecreateDocument(DocumentInfo)
instead.Creates a new document on the backend system with the given metadata, acl's and content.- 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
SaSaveInfo createDocument(DocumentInfo document) throws SaSystemException, SaAuthenticationException, SaDDCException 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.- 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
SaSaveInfo createLink(LinkInfo link) throws SaSystemException, SaAuthenticationException, SaDDCException Creates a link to a document for givenLinkInfo
.
A link represents a reference to another document.- 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 SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1Updates 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 usingsearchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- 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 SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1Updates 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 usingsearchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- 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 SaSaveInfo updateDocument(String ddcName, String documentHDOC, Properties namevaluePairs, InputStream[] content, String versionComment, String acls, boolean resolveLinks, boolean checkin) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1Updates 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 usingsearchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- 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
SaSaveInfo updateDocument(UpdateDocumentInfo updateInfo) throws SaSystemException, SaAuthenticationException, SaDDCException 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 usingsearchHQL(SaQueryInfo)
,SaDocumentInfo.isCheckedout()
andSaDocumentInfo.isLocked()
.- 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
void checkoutDocument(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException 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
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 viadiscardCheckout(String)
or persisted viaupdateDocument(UpdateDocumentInfo)
.- 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
void checkoutDocument(String hDoc, boolean withCloudShare, int[] shareBaseDocIds) throws SaSystemException, SaAuthenticationException, SaGetNodeException 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
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 viadiscardCheckout(String)
or persisted viaupdateDocument(UpdateDocumentInfo)
.- 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
void discardCheckout(String hDoc) throws SaSystemException, SaAuthenticationException, SaGetNodeException Discards a checkout of a document which was performed via the methodcheckoutDocument(String)
. After discarding the checkout, other users a able to modify the document again.- 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
void releaseDocument(String ddcName, String hDoc, String versionComment) throws SaSystemException, SaAuthenticationException, SaGetNodeException, SaSetNodeException, SaDDCException Release the given document.- 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
Checks if is release feature in the program.ini in section [Release] is active.- Returns:
- true, if is release active
- Throws:
SaAuthenticationException
- when the user is not logged in or has insufficient rightsSaSystemException
- the sa system exception
-
getReleasedHdoc
Gets the released hdoc for given hdoc if release feature is on and release tag is set, otherwise returns the given hDoc.- Parameters:
oldHdoc
- the hdoc to lookup released hdoc- Returns:
- the released hdoc
- Throws:
SaAuthenticationException
- if authentication failsSaSystemException
- the sa system exception
-
lockDocument
boolean lockDocument(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException Locks a document.To ensure that the user has exclusive access to the document, the methods
lockDocument(String, String)
andunlockDocument(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.
- 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
boolean unlockDocument(String sysRowId, String ddcName) throws SaSystemException, SaAuthenticationException, SaLockException Unlocks a document.Releases the lock that was created by the
lockDocument(String, String)
method.- 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
SaDocInfo getDocumentInfo(String hDoc, boolean currentRevision, boolean resolveLinks) throws SaSystemException, SaAuthenticationException Reads information like the document-structure and variables for the given document. Metadata stored in the database is not contained. UsereadDocumentMetadata(String, String, String[])
orsearchHQL(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.- 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
SaDocInfo getDocumentInfo(String hDoc, boolean currentRevision, boolean resolveLinks, boolean forceSizeDetermination) throws SaSystemException, SaAuthenticationException Reads information like the document-structure and variables for the given document. Metadata stored in the database is not contained. UsereadDocumentMetadata(String, String, String[])
orsearchHQL(SaQueryInfo)
to load metadata from the database.- 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
-
restoreVersion
SaSaveInfo restoreVersion(String versionID) throws SaSystemException, SaAuthenticationException, SaDDCException Restores the version with the given HDOC.- 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
-
search
@Deprecated List<SaPropertyValue[]> search(String hqlQuery) throws SaSystemException, SaAuthenticationException, SaDBException Deprecated.Use searchHQL() instead. Will be removed with version 8.1Performs a search with the given hql query (hibernate query language).- 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
List<SaDocumentInfo> searchHQL(SaQueryInfo hqlQuery) throws SaSystemException, SaAuthenticationException, SaDBException Performs a search with the given hql query (hibernate query language).- 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
-
deleteDocument
void deleteDocument(String documentHDOC, int deleteType) throws SaSystemException, SaAuthenticationException, SaDDCException Deletes a document from the backend system with the given delete type strategy.- 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
List<String> getVersionIDs(String ddcName, String sysrowID) throws SaSystemException, SaAuthenticationException 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).- 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
InputStream readVersionDocument(String versionID, int elementNumber) throws SaSystemException, SaAuthenticationException Loads a document version from the backend system.- Parameters:
versionID
- 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
SaVersionData readVersionMetadata(String versionID) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the version metadata of the document with the given ID.- 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
SaVersionData readVersionMetadata(String versionID, boolean resolveLinks) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the version metadata of the document with the given ID.- 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
-
resolveLatestHDoc
Resolves and returns the XHDOC of the latest version of the document identified by the given HDOC.- 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
-
removeEvent
Deprecated.no longer supported. Will be removed with version 8.1Deletes the row from XEvents for the given event.- Parameters:
event
- Event object- Returns:
- boolean true deleted
- Throws:
SaSystemException
- if a backend system error occurs
-
readDocumentFilename
@Deprecated String readDocumentFilename(String documentHDOC, boolean currentRevision, int elementNumber) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.will be removed with version 8.1Reads the filenames of the application data of the document with the given ID.- Parameters:
documentHDOC
- 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
-
readVersionDocumentFilename
@Deprecated String readVersionDocumentFilename(String documentHDOC, int elementNumber) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.use getDocumentInfo.getFullName() instead. Will be removed with version 8.1Reads the filenames of the application data of the document with the given ID.- Parameters:
documentHDOC
- 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
-
getACLNames
String getACLNames(String documentHDOC) throws SaSystemException, SaAuthenticationException, SaDDCException This method returns the names of the Access Control Lists that are assigned to this document. UsegetACLRights(String[])
to evaluate the rights of the current user on the given ACLs.- Parameters:
documentHDOC
- The ID of the document revision (XHDOC)- Returns:
- a ';'-separated list of names of the acls set on the given document
- Throws:
SaDDCException
- on functional failures concerning the given documentSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
setACLName
SaSaveInfo setACLName(String ddcname, String documentHDOC, String acl, String versionComment) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetACLException 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.- 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:
SaDDCException
- when the definition name given was invalidSaSetACLException
- on functional failures concerning the given document or aclsSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
getInvolvedUsers
@Deprecated List<String> getInvolvedUsers(String documentHDOC) throws SaSystemException, SaAuthenticationException, SaDDCException Deprecated.usegetAuthorizedUsers(String, String, MatchKind)
instead. Will be removed in version 8.1.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.- 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:
SaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failuresSaDDCException
-
getAllACLs
Deprecated.usegetAcls()
instead. Will be removed with version 8.1Reads all existing ACL names.- Returns:
- List of ACL names
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- SaAuthenticationException
-
getAcls
This method returns all Access Control Lists in the current tenant.- Returns:
- all Access Control Lists in the current tenant
- 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
-
getACLRights
This method returns the access rights the current user has when in the context of the Access Controll Lists given by name.- 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:
SaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
getDocumentAccessData
SaDocAccessData getDocumentAccessData(String documentHDOC) throws SaSystemException, SaAuthenticationException This method reads the access rights the current user has on a given document.- Parameters:
documentHDOC
- The ID of the document (XHDOC)- Returns:
- the access rights the current user has on a given document
- 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
-
getLockInfo
SaLockInfo getLockInfo(String sysRowId) throws SaSystemException, SaAuthenticationException, SaLockException This method returns the locking information for a given document.- Parameters:
sysRowId
- Document SysRowId- Returns:
- the locking information for a given document
- Throws:
SaLockException
- Locking errorSaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
getWorkflowConnector
Returns a workflow connector based on this classic connector.- Returns:
- Workflow connector
- Throws:
SaAuthenticationException
- Authentification errorSaSystemException
- Remote exception
-
isAlive
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).- Returns:
- true if alive
- Throws:
SaSystemException
- System exception
-
getAnnotations
@Deprecated String getAnnotations(String hDoc, int indexOfContentElement) throws SaAuthenticationException, SaSystemException Deprecated.usegetAnnotations(String, int, boolean)
instead. Will be removed with version 8.1Reads the annotations from the given document.- 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
String getAnnotations(String hDoc, int indexOfContentElement, boolean currentRevision) throws SaAuthenticationException, SaSystemException 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.- 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
void setAnnotations(String hDoc, int indexOfContentElement, String annotations) throws SaAuthenticationException, SaSystemException 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
getAnnotations(String, int, boolean)
documentation and the online documentation for more information about the custom-section.- Parameters:
hDoc
- Document HDOCindexOfContentElement
- the index of the chosen context elementannotations
- Annotation string, definition described heregetAnnotations(String, int, boolean)
- Throws:
SaAuthenticationException
- Authentication errorSaSystemException
- Remote exception
-
getFolderChildren
List<SaDocumentInfo> getFolderChildren(String folderTableDDC, String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException 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.- 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 SaDocumentInfo getFolderInfo(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Deprecated.usegetFolderInfo(String, String, boolean)
instead. Will be removed in version 8.1.Returns the folder information object for the given folder.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder exception
-
getFolderInfo
SaDocumentInfo getFolderInfo(String folderTableDDC, String folderId, boolean forceLoadVariables) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException Returns the folder information object for the given folder.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDforceLoadVariables
- if true, variables will be loaded from medium if the DDC does not contain the SYSPROPERTIES field.- Returns:
- Folder information
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exceptionSaFolderException
- Folder exception
-
getFolderParent
SaDocumentInfo getFolderParent(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDBException Returns the parent of the given 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.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Properties of the folder or null, if not found
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDBException
- Database exception
-
getFolderFromPath
List<SaDocumentInfo> getFolderFromPath(String folderTableDDC, String startFolderId, String folderPath) throws SaSystemException, SaAuthenticationException, SaDBException 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. UsegetFolderByPath(String, String, String)
to retrieve a single folder.- 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
-
getFolderByPath
SaDocumentInfo getFolderByPath(String folderTableDDC, String startFolderId, String folderPath) throws SaSystemException, SaAuthenticationException, SaDBException 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.- 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
-
createFolder
@Deprecated String createFolder(String folderTableDDC, String parentId, String beforeChild, String folderName, SaFolderConstants.FOLDER_TYPE folderType, Properties namevaluePairs) throws SaSystemException, SaAuthenticationException, SaDDCException, SaFolderNameException Deprecated.usecreateFolder(SaFolderSaveInfo, Properties)
instead. Will be removed with version 8.1Creates a new folder below a given folder. The parent folder can be the root node (empty id).- 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 exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaFolderNameException
- when the folder name contained an invalid character
-
createFolder
String createFolder(SaFolderSaveInfo info, Properties namevaluePairs) throws SaSystemException, SaAuthenticationException, SaDDCException, SaFolderNameException Creates a new folder below a given folder. The parent folder can be the root node (empty id).- 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 exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaFolderNameException
- when the folder name contained an invalid character
-
updateFolder
void updateFolder(String folderTableDDC, String folderId, Properties namevaluePairs) throws SaSystemException, SaAuthenticationException, SaDDCException, SaFolderNameException 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.- Parameters:
folderTableDDC
- name of folder table (DDC)folderId
- id of folder to updatenamevaluePairs
- Folder properties to update- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaFolderNameException
- when the folder name contained an invalid character- See Also:
-
searchFolderDocuments
List<SaDocumentInfo> searchFolderDocuments(String folderTableDDC, String folderId, SaQueryInfo hqlFilter) throws SaSystemException, SaAuthenticationException, SaDDCException HQL search extended with additional folder informations and depth.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDhqlFilter
- HQL query for document tables. The 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
-
deleteFolder
void deleteFolder(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException 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.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID to delete- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
copyFolder
String copyFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild, boolean withDocuments) throws SaSystemException, SaAuthenticationException, SaDDCException Copies the given 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.- 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
-
moveFolder
void moveFolder(String folderTableDDC, String folderId, String destinationId, String beforeChild) throws SaSystemException, SaAuthenticationException, SaDDCException 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.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDdestinationId
- Destination folder IDbeforeChild
- Child ID or empty for append- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
addToFolder
void addToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Adds the document 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. - 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
-
removeFromFolder
void removeFromFolder(String folderTableDDC, String documentSysRowId, String documentDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Removes the document from the given folder.- Parameters:
folderTableDDC
- Folder tabledocumentSysRowId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
moveToFolder
void moveToFolder(String folderTableDDC, String documentId, String documentDDC, String folderId, String destinationId) throws SaSystemException, SaAuthenticationException, SaDDCException Removes the document from the source folder and adds it to the source folder. Both source- and destination folder have to exist.- Parameters:
folderTableDDC
- Folder tabledocumentId
- Document SysRowIddocumentDDC
- Document DDC namefolderId
- Source folder IDdestinationId
- Destination folder ID- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getDocumentFolders
List<SaDocumentInfo> getDocumentFolders(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Returns a list of folder properties which contains all 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.- 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
long getDocumentFolderCount(String folderTableDDC, String documentDDC, String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException Returns the total count over all folders from all users in which the specified document is contained in.- Parameters:
folderTableDDC
- Folder tabledocumentDDC
- Document DDCsysRowId
- Document SysRowId- Returns:
- folder count
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exceptionSaSetNodeException
- DDC not fileable
-
setFolderAcl
void setFolderAcl(String folderTableDDC, String folderId, String aclName) throws SaSystemException, SaAuthenticationException, SaDDCException 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.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDaclName
- ACL name- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getFolderRights
SaDocAccessData getFolderRights(String folderTableDDC, String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException Returns the rights mask for the given folder and user. The effective rights are calculated by using ACL inheritance.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder access data
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getFolderClass
SaFolderClass getFolderClass(String className) throws SaSystemException, SaAuthenticationException, SaDDCException Reads the folder class with the given name.- Parameters:
className
- Class name in dotted notation- Returns:
- Folder class
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- authentication errorSaDDCException
- Database exception
-
searchFolderClass
Set<SaFolderClass> searchFolderClass(SaFolderClassSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException Searches for folder classes that match the specified propertied.- 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
List<String> getSystemFiles(SystemFileKind kind, String filter) throws SaAuthenticationException, SaSystemException This method returns the names of all system files of a specific kind.- 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
-
storeSystemFile
void storeSystemFile(SystemFileKind kind, String name, InputStream data) throws SaAuthenticationException, SaSystemException This method stores a system file of a specific kind.- 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
InputStream loadSystemFile(SystemFileKind kind, String name) throws SaAuthenticationException, SaSystemException This method loads a system file of a specific kind.- Parameters:
kind
- The kind of system file to loadname
- The name of the file to load.- Returns:
- an InputStream that holds the content of the file.
- Throws:
SaAuthenticationException
- error on the authentification / insufficient rightsSaSystemException
- general error
-
logClientEvent
void logClientEvent(String hdoc, SaConstants.ProtoEvents event, String remark) throws SaSystemException, SaAuthenticationException Adds an audit log event.- Parameters:
hdoc
- Document HDOCevent
- Event typeremark
- Remark- Throws:
SaSystemException
- general errorSaAuthenticationException
- error on the authentification / insufficient rights
-
changePassword
void changePassword(String user, String oldPassword, String tenant, String newPassword) throws SaSystemException, SaAuthenticationException Changes the password of an existing user.- 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 rightslogon(String, String, int, String)
was successfully invoked.
-
getAuthorizedUsers
List<UsersRights> getAuthorizedUsers(String hDoc, String rights, MatchKind match) throws SaSystemException, SaAuthenticationException This method returns the users that have specific rights on a document.- 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:
SaAuthenticationException
- when the classic connector is not authenticated or the current user has not the required rights for the operationSaSystemException
- on general system failures
-
getArchivedSize
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.
- 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
-
getCurrentUserName
String getCurrentUserName()This method returns the name of teh user currently logged in.- Returns:
- the name of the user currently logged in
-
getFolderUpdateInfo
@Deprecated Set<FolderUpdateInfo> getFolderUpdateInfo(Map<String, Long> folderIds) throws SaSystemException, SaAuthenticationExceptionDeprecated.No longer supported. Will be removed in 8.1.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.- 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:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights
-
checkSapUrl
SapDocInfo checkSapUrl(String url) throws SaSystemException, SaSapUrlException, SaAuthenticationException Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC. If not, null will be returned.- Parameters:
url
- the SAP URL to check- Returns:
SaSaveInfo
object with hdoc und ddc name describing the found document- Throws:
SaSystemException
- if a system error occuredSaSystemException
- if checking the sap url by the RLINK server failedSaAuthenticationException
- if the user is not logged in or has insufficient rightsSaSapUrlException
-
cacheDocument
SaSaveInfo cacheDocument(String xhDoc, String ddcName, Properties namevaluePairs, InputStream[] content, String versionComment, String strAcl) throws SaSystemException, SaAuthenticationException, SaDDCException 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 methodcreateDocument(DocumentInfo)
.
The given xhdoc should already exist on the named DDC. This method should only used by cosolidation services like the IXOS connetor.- 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
-
cacheDocument
SaSaveInfo cacheDocument(String xhDoc, DocumentInfo document) throws SaSystemException, SaAuthenticationException, SaDDCException 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 methodcreateDocument(DocumentInfo)
.
The given xhdoc should already exist on the named DDC. This method should only used by cosolidation services like the IXOS connetor.- 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
-
getCurrentUserInfo
This method returns detailed info about the current user.- 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
@Deprecated void setCurrentUserPresent(boolean present) throws SaAuthenticationException, SaSystemException Deprecated.UseupdateCurrentUserInformation(MutableUserInformation)
instead. Will be removed with version 8.1.Sets whether the current user is present.- Parameters:
present
- whether the current user is present- Throws:
SaSystemException
- system errorSaAuthenticationException
- authentication error
-
updateCurrentUserInformation
void updateCurrentUserInformation(MutableUserInformation user) throws SaAuthenticationException, SaSystemException 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.- 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
-
getRendition
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 Returns the rendition object from a rendered document.- 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
void sendBarcode(String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) throws SaBarcodeException 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.- 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
-
hasRenderEngine
boolean hasRenderEngine()Checks wether this classic connector has a render engine.- Returns:
- if there is a render engine
true
, otherwisefalse
-
getSupportedRenderSourceFormats
Set<com.saperion.connector.formats.SourceFormat> getSupportedRenderSourceFormats()Gets the supported source formats from the render engine.- Returns:
- set of supported source formats (empty if there is no render engine)
-
getSupportedRenderTargetFormats
Set<com.saperion.connector.formats.TargetFormat> getSupportedRenderTargetFormats()Gets the supported target formats from the render engine.- Returns:
- set of supported target formats (empty if there is no render engine)
-
setEventsEnabled
This method sets whether events (e.g. for the Integration Server) should be enabled for the current session.- Parameters:
enabled
- true, to enable events, otherwise false.- Throws:
SaSystemException
- system errorSaAuthenticationException
- authentication error
-
getEventsEnabled
This method returns whether events (e.g. for the Integration Server) are enabled for the current session.- Returns:
- true, if events are enabled for the current session, otherwise false.
- 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
-
getDDC
This method returns a document definition given by its name.- 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
-
getServerSideClientConfiguration
ServerSideClientConfiguration getServerSideClientConfiguration()This method returns the configuration concerning the classic connector that is set on the server side. It is only valid after a login.- Returns:
- the configuration concerning the classic connector that is set on the server side
-
getFullTextFields
default Set<Map.Entry<String,String>> getFullTextFields(String ddcName, List<String> fullTextFields, String hdoc) throws SaSystemException Fetches values of Full text columns- Parameters:
ddcName
- name of the DDCfullTextFields
- List of Fields which are of Text retrieval type. Make sure to prefixSaConstants.FULL_TEXT_COLUMN_PREFIX
hdoc
- hdoc of the document- Returns:
- Set of entries containing full text coulmn and corresponding value
- Throws:
SaSystemException
-
getExternalStorageFoldersForUpload
List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload(ExternalStorageType storageType) throws SaAuthenticationException, SaSystemException Fetches all folders of External Storage from where documents need to be uploaded- Parameters:
storageType
-- Returns:
- list of folder mappings
- Throws:
SaAuthenticationException
SaSystemException
-
getExternalStorageFoldersForUpload
List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaAuthenticationException, SaSystemExceptionFetches all folders of all types of External Storage services from where documents need to be uploaded- Returns:
- list of folder mappings
- Throws:
SaAuthenticationException
SaSystemException
-
getExternalStorageMapping
SaperionExternalStorageMappingInfo getExternalStorageMapping(String sysRowId) throws SaAuthenticationException, SaSystemException Fetches the external storage mapping for the provided SysRowId- Parameters:
sysRowId
-- Returns:
- mapping object
- Throws:
SaAuthenticationException
SaSystemException
-
createExternalStorageFolderMapping
void createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo) throws SaAuthenticationException, SaSystemException Stores the mapping information about Saperion document and External Storage folder- Parameters:
mappingInfo
- mapping information about Saperion document and External Storage folder- Throws:
SaAuthenticationException
SaSystemException
-
updateExternalStorageUploadStatus
void updateExternalStorageUploadStatus(String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType) throws SaAuthenticationException, SaSystemException Updates the upload status of External Storage folder- Parameters:
folderId
- folderid whose status needs to be updatedstatus
-storageType
-- Throws:
SaAuthenticationException
SaSystemException
-
deleteExternalStorageFolderMapping
int deleteExternalStorageFolderMapping(Date expiryTime, List<ExternalStorageDocUploadStatus> statusList) throws SaSystemException, SaAuthenticationException Deletes external storage mappings for given status and older than the given time- Parameters:
expiryTime
- defined time before which all mappings are deletedstatusList
- status whose mapping need to be deleted- Returns:
- Throws:
SaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rights.
-
getCurrentUserRole
com.lexmark.saperion.administration.RoleType getCurrentUserRole() throws SaSystemException, SaAuthenticationException- Returns:
- the effective role (combined rights of all roles / profiles) of the current logged-in user
- Throws:
SaSystemException
SaAuthenticationException
-