Interface SaClassicConnector
-
- All Superinterfaces:
LegacyConnection
- All Known Implementing Classes:
SaClassicConnectorImpl
public interface SaClassicConnector extends LegacyConnection
Connector interface for classic DMS functionalities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
addListener(SaEventListener listener)
Deprecated.will be removed with version 8.1void
addListener(SaStatusEventListener listener)
Deprecated.will be removed with version 8.1void
addToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId)
Adds the document with given documentId to a given folder with given folderId.SaSaveInfo
cacheDocument(java.lang.String xhDoc, DocumentInfo document)
Caches a new document in the backend system with the given metadata and content.SaSaveInfo
cacheDocument(java.lang.String xhDoc, java.lang.String ddcName, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.String strAcl)
Caches a new document in the backend system with the given metadata and content.void
changePassword(java.lang.String user, java.lang.String oldPassword, java.lang.String tenant, java.lang.String newPassword)
Changes the password of an existing user.void
checkoutDocument(java.lang.String hDoc)
Checks out a document for the given document id (hdoc).void
checkoutDocument(java.lang.String hDoc, boolean withCloudShare, int[] shareBaseDocIds)
Checks out a document with filesystem/ShareBase for the given document id (hdoc).SapDocInfo
checkSapUrl(java.lang.String url)
Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC.boolean
closeSession(com.saperion.connector.authentication.Session session)
Close the givenSession
of logged in userjava.lang.String
copyFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild, boolean withDocuments)
Copies the given folder and all it's children to the destination.SaSaveInfo
createDocument(DocumentInfo document)
Creates a new document on the backend system with the givenDocumentInfo
.SaSaveInfo
createDocument(java.lang.String ddcName, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment)
Deprecated.will be removed with version 8.1, usecreateDocument(DocumentInfo)
instead.SaSaveInfo
createDocument(java.lang.String ddcName, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.String acls)
Deprecated.will be removed with version 8.1, usecreateDocument(DocumentInfo)
instead.void
createExternalStorageFolderMapping(SaperionExternalStorageMappingInfo mappingInfo)
Stores the mapping information about Saperion document and External Storage folderjava.lang.String
createFolder(SaFolderSaveInfo info, java.util.Properties namevaluePairs)
Creates a new folder below a given folder.java.lang.String
createFolder(java.lang.String folderTableDDC, java.lang.String parentId, java.lang.String beforeChild, java.lang.String folderName, SaFolderConstants.FOLDER_TYPE folderType, java.util.Properties namevaluePairs)
Deprecated.usecreateFolder(SaFolderSaveInfo, Properties)
instead.SaSaveInfo
createLink(LinkInfo link)
Creates a link to a document for givenLinkInfo
.void
deleteDocument(java.lang.String documentHDOC, int deleteType)
Deletes a document from the backend system with the given delete type strategy.int
deleteExternalStorageFolderMapping(java.util.Date expiryTime, java.util.List<ExternalStorageDocUploadStatus> statusList)
Deletes external storage mappings for given status and older than the given timevoid
deleteFolder(java.lang.String folderTableDDC, java.lang.String folderId)
Deletes an existing folder.boolean
deleteSetting(java.lang.String name, java.lang.String section, boolean isLong)
This method deletes a setting in the database.void
discardCheckout(java.lang.String hDoc)
Discards a checkout of a document which was performed via the methodcheckoutDocument(String)
.java.lang.String
getACLNames(java.lang.String documentHDOC)
This method returns the names of the Access Control Lists that are assigned to this document.SaACLRights
getACLRights(java.lang.String[] acls)
This method returns the access rights the current user has when in the context of the Access Controll Lists given by name.java.util.List<SaAcl>
getAcls()
This method returns all Access Control Lists in the current tenant.java.util.List<java.lang.String>
getAllACLs()
Deprecated.usegetAcls()
instead.java.lang.String
getAnnotations(java.lang.String hDoc, int indexOfContentElement)
Deprecated.usegetAnnotations(String, int, boolean)
instead.java.lang.String
getAnnotations(java.lang.String hDoc, int indexOfContentElement, boolean currentRevision)
Reads the annotations of the document with the specified ID.int
getArchivedSize(java.lang.String hDoc)
Returns the total document size in the archive in bytes.java.util.List<UsersRights>
getAuthorizedUsers(java.lang.String hDoc, java.lang.String rights, MatchKind match)
This method returns the users that have specific rights on a document.java.util.Properties
getConfiguration(java.lang.String section)
This method reads the application configuration properties from the backend system.SaUserInfo
getCurrentUserInfo()
This method returns detailed info about the current user.java.lang.String
getCurrentUserName()
This method returns the name of teh user currently logged in.com.lexmark.saperion.administration.RoleType
getCurrentUserRole()
SaFieldDescription[]
getDBDefinition(java.lang.String name)
Deprecated.usegetDDC(String)
instead.DDC
getDDC(java.lang.String ddcName)
This method returns a document definition given by its name.java.lang.String[]
getDefinitions()
This method returns the names of all DDCs registered in the Saperion system.SaDocAccessData
getDocumentAccessData(java.lang.String documentHDOC)
This method reads the access rights the current user has on a given document.long
getDocumentFolderCount(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId)
Returns the total count over all folders from all users in which the specified document is contained in.java.util.List<SaDocumentInfo>
getDocumentFolders(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId)
Returns a list of folder properties which contains all folders the document is contained in.SaDocInfo
getDocumentInfo(java.lang.String hDoc, boolean currentRevision, boolean resolveLinks)
Reads information like the document-structure and variables for the given document.SaDocInfo
getDocumentInfo(java.lang.String hDoc, boolean currentRevision, boolean resolveLinks, boolean forceSizeDetermination)
Reads information like the document-structure and variables for the given document.boolean
getEventsEnabled()
This method returns whether events (e.g.java.util.List<SaperionExternalStorageMappingInfo>
getExternalStorageFoldersForUpload()
Fetches all folders of all types of External Storage services from where documents need to be uploadedjava.util.List<SaperionExternalStorageMappingInfo>
getExternalStorageFoldersForUpload(ExternalStorageType storageType)
Fetches all folders of External Storage from where documents need to be uploadedSaperionExternalStorageMappingInfo
getExternalStorageMapping(java.lang.String sysRowId)
Fetches the external storage mapping for the provided SysRowIdSaFeature
getFeatures()
This method returns the features enabled in the Saperion system.SaDocumentInfo
getFolderByPath(java.lang.String folderTableDDC, java.lang.String startFolderId, java.lang.String folderPath)
Returns the folder which matches to the given path.java.util.List<SaDocumentInfo>
getFolderChildren(java.lang.String folderTableDDC, java.lang.String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders)
Returns a list with the children of the given node.SaFolderClass
getFolderClass(java.lang.String className)
Reads the folder class with the given name.java.lang.String[]
getFolderDefinitions()
Reads the registered folder DDC names from the repository.java.util.List<SaDocumentInfo>
getFolderFromPath(java.lang.String folderTableDDC, java.lang.String startFolderId, java.lang.String folderPath)
Returns the folders which match to the given path.SaDocumentInfo
getFolderInfo(java.lang.String folderTableDDC, java.lang.String folderId)
Deprecated.usegetFolderInfo(String, String, boolean)
instead.SaDocumentInfo
getFolderInfo(java.lang.String folderTableDDC, java.lang.String folderId, boolean forceLoadVariables)
Returns the folder information object for the given folder.SaDocumentInfo
getFolderParent(java.lang.String folderTableDDC, java.lang.String folderId)
Returns the parent of the given folder.SaDocAccessData
getFolderRights(java.lang.String folderTableDDC, java.lang.String folderId)
Returns the rights mask for the given folder and user.java.util.Set<FolderUpdateInfo>
getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds)
Deprecated.No longer supported.java.lang.String
getFulltext(java.lang.String ddcName, java.lang.String sysRowId)
Deprecated.Will be removed in 8.1.java.lang.String
getFulltext(java.lang.String ddcName, java.lang.String hdoc, java.lang.String fieldName, long length)
Reads the fulltext information for the given document with the given HDOC in the given DDC from the specified field.default java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>
getFullTextFields(java.lang.String ddcName, java.util.List<java.lang.String> fullTextFields, java.lang.String hdoc)
Fetches values of Full text columnsjava.util.List<java.lang.String>
getInvolvedUsers(java.lang.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.SaLockInfo
getLockInfo(java.lang.String sysRowId)
This method returns the locking information for a given document.java.lang.String
getReleasedHdoc(java.lang.String oldHdoc)
Gets the released hdoc for given hdoc if release feature is on and release tag is set, otherwise returns the given hDoc.java.util.List<com.saperion.connector.renditions.Rendition>
getRendition(Element element, com.saperion.connector.options.Options options)
Returns the rendition object from a rendered document.ServerSideClientConfiguration
getServerSideClientConfiguration()
This method returns the configuration concerning the classic connector that is set on the server side.Setting
getSetting(java.lang.String name, java.lang.String section, boolean isLong)
This method retrieves aSetting
identified by it's key and section from the database.java.util.Set<com.saperion.connector.formats.SourceFormat>
getSupportedRenderSourceFormats()
Gets the supported source formats from the render engine.java.util.Set<com.saperion.connector.formats.TargetFormat>
getSupportedRenderTargetFormats()
Gets the supported target formats from the render engine.java.util.List<java.lang.String>
getSystemFiles(SystemFileKind kind, java.lang.String filter)
This method returns the names of all system files of a specific kind.SaSystemInfo
getSystemInfo()
This method returns general information about the connected system.SaSystemSetting
getSystemSetting(java.lang.String accessKey)
Retrieves a system setting object.byte[]
getThumbnail(java.lang.String hDoc, int widthX, int widthY, boolean color)
Reads the thumbnail of the given document.SaUserSetting
getUserSetting(java.lang.String accessKey)
Retrieves a user-specific setting object.java.util.List<java.lang.String>
getVersionIDs(java.lang.String ddcName, java.lang.String sysrowID)
Reads the version IDs of the given document.SaWFConnector
getWorkflowConnector()
Returns a workflow connector based on this classic connector.boolean
hasRenderEngine()
Checks wether this classic connector has a render engine.boolean
isAlive()
Tests the lifetime of this connector.boolean
isReleaseActive()
Checks if is release feature in the program.ini in section [Release] is active.java.util.List<com.saperion.connector.authentication.Session>
listActiveSessions()
List active sessions of the logged in userjava.io.InputStream
loadSystemFile(SystemFileKind kind, java.lang.String name)
This method loads a system file of a specific kind.boolean
lockDocument(java.lang.String sysRowId, java.lang.String ddcName)
Locks a document.void
logClientEvent(java.lang.String hdoc, SaConstants.ProtoEvents event, java.lang.String remark)
Adds an audit log event.boolean
logoff()
This method logs the current user off from the system.int
logon(byte[] token, int type, java.lang.String client)
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
logon(java.lang.String username, java.lang.String password, int type, java.lang.String client)
Deprecated.uselogon(Credentials)
withUsernamePasswordKey
instead.int
logon(jcifs.smb.NtlmPasswordAuthentication auth, int type, java.lang.String client)
Deprecated.will be removed with version 8.1void
moveFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild)
Moves the given folder to a new destination.void
moveToFolder(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId, java.lang.String destinationId)
Removes the document from the source folder and adds it to the source folder.java.io.InputStream
readDocument(java.lang.String documentHDOC, boolean currentRevision, int elementNumber)
Loads a document's content from the backend system.java.io.InputStream
readDocument(java.lang.String docHdoc, boolean currentRevision, int elementNumber, boolean withAnnotations)
Loads a document's content from the backend system.java.lang.String
readDocumentFilename(java.lang.String documentHDOC, boolean currentRevision, int elementNumber)
Deprecated.will be removed with version 8.1SaPropertyValue[]
readDocumentMetadata(java.lang.String documentSysRowID, java.lang.String ddcName, java.lang.String[] fields)
Reads the metadata of the document with the given ID.java.io.InputStream
readReleasedDocument(java.lang.String docHdoc, boolean currentRevision, int elementNumber)
Read released document if the release feature is active.java.io.InputStream
readVersionDocument(java.lang.String versionID, int elementNumber)
Loads a document version from the backend system.java.lang.String
readVersionDocumentFilename(java.lang.String documentHDOC, int elementNumber)
Deprecated.use getDocumentInfo.getFullName() instead.SaVersionData
readVersionMetadata(java.lang.String versionID)
Reads the version metadata of the document with the given ID.SaVersionData
readVersionMetadata(java.lang.String versionID, boolean resolveLinks)
Reads the version metadata of the document with the given ID.void
releaseDocument(java.lang.String ddcName, java.lang.String hDoc, java.lang.String versionComment)
Release the given document.boolean
removeEvent(SaEvent event)
Deprecated.no longer supported.void
removeFromFolder(java.lang.String folderTableDDC, java.lang.String documentSysRowId, java.lang.String documentDDC, java.lang.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.1java.lang.String
resolveLatestHDoc(java.lang.String oldHdoc)
Resolves and returns the XHDOC of the latest version of the document identified by the given HDOC.SaSaveInfo
restoreVersion(java.lang.String versionID)
Restores the version with the given HDOC.java.util.List<SaPropertyValue[]>
search(java.lang.String hqlQuery)
Deprecated.Use searchHQL() instead.java.util.Set<SaFolderClass>
searchFolderClass(SaFolderClassSearchInfo searchInfo)
Searches for folder classes that match the specified propertied.java.util.List<SaDocumentInfo>
searchFolderDocuments(java.lang.String folderTableDDC, java.lang.String folderId, SaQueryInfo hqlFilter)
HQL search extended with additional folder informations and depth.java.util.List<SaDocumentInfo>
searchHQL(SaQueryInfo hqlQuery)
Performs a search with the given hql query (hibernate query language).SettingSearchResult
searchSettings(SettingSearchInfo searchInfo)
This method searches settings in the database.void
sendBarcode(java.lang.String indexMask, java.lang.String docUid, java.lang.String contentRep, java.lang.String sid, java.lang.String docType, java.lang.String value, int mandant)
Sends the Document UID with the barcode to SAP R/3.SaSaveInfo
setACLName(java.lang.String ddcname, java.lang.String documentHDOC, java.lang.String acl, java.lang.String versionComment)
This method specifies the Access Control Lists that secure the document given by its id.void
setAnnotations(java.lang.String hDoc, int indexOfContentElement, java.lang.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(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String aclName)
Sets an ACL for the given folder.void
setLocale(java.util.Locale locale)
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
stopServer()
Deprecated.Functionality removed because of security-concerns.void
storeSystemFile(SystemFileKind kind, java.lang.String name, java.io.InputStream data)
This method stores a system file of a specific kind.boolean
unlockDocument(java.lang.String sysRowId, java.lang.String ddcName)
Unlocks a document.void
updateCurrentUserInformation(MutableUserInformation user)
Changes information about the current user.SaSaveInfo
updateDocument(UpdateDocumentInfo updateInfo)
Updates a document in the backend system with the given metadata, acls and content.SaSaveInfo
updateDocument(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment)
Deprecated.will be removed with version 8.1, useupdateDocument(UpdateDocumentInfo)
instead.SaSaveInfo
updateDocument(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.String acls)
Deprecated.will be removed with version 8.1SaSaveInfo
updateDocument(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.String acls, boolean resolveLinks)
Deprecated.will be removed with version 8.1SaSaveInfo
updateDocument(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.String acls, boolean resolveLinks, boolean checkin)
Deprecated.will be removed with version 8.1void
updateExternalStorageUploadStatus(java.lang.String folderId, ExternalStorageDocUploadStatus status, ExternalStorageType storageType)
Updates the upload status of External Storage foldervoid
updateFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.util.Properties namevaluePairs)
Updates an existing folder with the given properties.-
Methods inherited from interface com.saperion.connector.LegacyConnection
invoke
-
-
-
-
Method Detail
-
getConfiguration
java.util.Properties getConfiguration(java.lang.String section) throws SaSystemException, SaAuthenticationException
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 void stopServer() throws SaSystemException, SaAuthenticationException
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 void removeListener(SaEventListener listener) throws SaSystemException
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 void removeListener(SaStatusEventListener listener) throws SaSystemException
Deprecated.will be removed with version 8.1Removes a listener from the handler.- Parameters:
listener
- Event listener- Throws:
SaSystemException
- SaSystemException
-
getDefinitions
java.lang.String[] getDefinitions() throws SaSystemException, SaAuthenticationException
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
java.lang.String[] getFolderDefinitions() throws SaSystemException, SaAuthenticationException
Reads the registered folder DDC names from the repository.- Returns:
- Array of folder DDC names
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationException
-
getDBDefinition
@Deprecated SaFieldDescription[] getDBDefinition(java.lang.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(java.lang.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
SaSystemInfo getSystemInfo() throws SaSystemException
This method returns general information about the connected system.- Returns:
- general information about the connected system
- Throws:
SaSystemException
- on general system failures
-
getFeatures
SaFeature getFeatures() throws SaSystemException
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
SaUserSetting getUserSetting(java.lang.String accessKey) throws SaSystemException, SaAuthenticationException
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
void setUserSetting(SaUserSetting setting) throws SaSystemException, SaAuthenticationException
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(java.lang.String name, java.lang.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
void setSetting(Setting setting) throws SaSystemException, SaAuthenticationException
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(java.lang.String name, java.lang.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(java.lang.String username, java.lang.String password, int type, java.lang.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, java.lang.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, java.lang.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
java.util.List<com.saperion.connector.authentication.Session> listActiveSessions() throws SaAuthenticationException, SaSystemException
List 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
boolean logoff() throws SaAuthenticationException, SaSystemException
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
int getLicenseCount(int type) throws SaSystemException
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
boolean setUsedLicense(int type, int count) throws SaSystemException
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
void setLocale(java.util.Locale locale) throws SaAuthenticationException, SaSystemException
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
java.io.InputStream readDocument(java.lang.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
java.io.InputStream readDocument(java.lang.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
java.io.InputStream readReleasedDocument(java.lang.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(java.lang.String documentSysRowID, java.lang.String ddcName, java.lang.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 java.lang.String getFulltext(java.lang.String ddcName, java.lang.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
java.lang.String getFulltext(java.lang.String ddcName, java.lang.String hdoc, java.lang.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(java.lang.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(java.lang.String ddcName, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.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(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.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(java.lang.String ddcName, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.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(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.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(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.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(java.lang.String ddcName, java.lang.String documentHDOC, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String ddcName, java.lang.String hDoc, java.lang.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
boolean isReleaseActive() throws SaAuthenticationException, SaSystemException
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
java.lang.String getReleasedHdoc(java.lang.String oldHdoc) throws SaAuthenticationException, SaSystemException
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(java.lang.String sysRowId, java.lang.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(java.lang.String sysRowId, java.lang.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(java.lang.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(String, boolean, boolean, boolean)
-
getDocumentInfo
SaDocInfo getDocumentInfo(java.lang.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(java.lang.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 java.util.List<SaPropertyValue[]> search(java.lang.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
java.util.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(java.lang.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
java.util.List<java.lang.String> getVersionIDs(java.lang.String ddcName, java.lang.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
java.io.InputStream readVersionDocument(java.lang.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(java.lang.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(java.lang.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
java.lang.String resolveLatestHDoc(java.lang.String oldHdoc) throws SaSystemException, SaAuthenticationException
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 boolean removeEvent(SaEvent event) throws SaSystemException
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 java.lang.String readDocumentFilename(java.lang.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 java.lang.String readVersionDocumentFilename(java.lang.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
java.lang.String getACLNames(java.lang.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(java.lang.String ddcname, java.lang.String documentHDOC, java.lang.String acl, java.lang.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 java.util.List<java.lang.String> getInvolvedUsers(java.lang.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 java.util.List<java.lang.String> getAllACLs() throws SaSystemException, SaAuthenticationException
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
java.util.List<SaAcl> getAcls() throws SaSystemException, SaAuthenticationException
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
SaACLRights getACLRights(java.lang.String[] acls) throws SaSystemException, SaAuthenticationException
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(java.lang.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(java.lang.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
SaWFConnector getWorkflowConnector() throws SaAuthenticationException, SaSystemException
Returns a workflow connector based on this classic connector.- Returns:
- Workflow connector
- Throws:
SaAuthenticationException
- Authentification errorSaSystemException
- Remote exception
-
isAlive
boolean isAlive() throws SaSystemException
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 java.lang.String getAnnotations(java.lang.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
java.lang.String getAnnotations(java.lang.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(java.lang.String hDoc, int indexOfContentElement, java.lang.String annotations) throws SaAuthenticationException, SaSystemException
Sets the given annotations to the document. This method creates a new revision.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
java.util.List<SaDocumentInfo> getFolderChildren(java.lang.String folderTableDDC, java.lang.String folderId, int depth, SaQueryInfo filter, int allowedMaxNrOfChildFolders) throws SaSystemException, SaAuthenticationException, SaDBException, SaFolderException
Returns a 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(java.lang.String folderTableDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.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
java.util.List<SaDocumentInfo> getFolderFromPath(java.lang.String folderTableDDC, java.lang.String startFolderId, java.lang.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(java.lang.String folderTableDDC, java.lang.String startFolderId, java.lang.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 java.lang.String createFolder(java.lang.String folderTableDDC, java.lang.String parentId, java.lang.String beforeChild, java.lang.String folderName, SaFolderConstants.FOLDER_TYPE folderType, java.util.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
java.lang.String createFolder(SaFolderSaveInfo info, java.util.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(java.lang.String folderTableDDC, java.lang.String folderId, java.util.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:
SaFolderConstants.FIELD_SYSNODETYPE
,SaFolderConstants.FOLDER_TYPE
-
searchFolderDocuments
java.util.List<SaDocumentInfo> searchFolderDocuments(java.lang.String folderTableDDC, java.lang.String folderId, SaQueryInfo hqlFilter) throws SaSystemException, SaAuthenticationException, SaDDCException
HQL search extended with additional folder informations and depth.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder IDhqlFilter
- HQL query for document tables. The 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(java.lang.String folderTableDDC, java.lang.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
java.lang.String copyFolder(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.String beforeChild, boolean withDocuments) throws SaSystemException, SaAuthenticationException, 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(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.String destinationId, java.lang.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(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.String documentSysRowId, java.lang.String documentDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.String documentId, java.lang.String documentDDC, java.lang.String folderId, java.lang.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
java.util.List<SaDocumentInfo> getDocumentFolders(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.String sysRowId) throws SaSystemException, SaAuthenticationException, SaDDCException, SaSetNodeException
Returns a list of folder properties which contains all 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(java.lang.String folderTableDDC, java.lang.String documentDDC, java.lang.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(java.lang.String folderTableDDC, java.lang.String folderId, java.lang.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(java.lang.String folderTableDDC, java.lang.String folderId) throws SaSystemException, SaAuthenticationException, SaDDCException
Returns the rights mask for the given folder and user. The effective rights are calculated by using ACL inheritance.- Parameters:
folderTableDDC
- Folder tablefolderId
- Folder ID- Returns:
- Folder access data
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaDDCException
- Database exception
-
getFolderClass
SaFolderClass getFolderClass(java.lang.String className) throws SaSystemException, SaAuthenticationException, SaDDCException
Reads the folder class with the given name.- Parameters:
className
- Class name in dotted notation- Returns:
- Folder class
- Throws:
SaSystemException
- Remote exceptionSaAuthenticationException
- authentication errorSaDDCException
- Database exception
-
searchFolderClass
java.util.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
java.util.List<java.lang.String> getSystemFiles(SystemFileKind kind, java.lang.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, java.lang.String name, java.io.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
java.io.InputStream loadSystemFile(SystemFileKind kind, java.lang.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(java.lang.String hdoc, SaConstants.ProtoEvents event, java.lang.String remark) throws SaSystemException, SaAuthenticationException
Adds an audit log event.- Parameters:
hdoc
- Document HDOCevent
- Event typeremark
- Remark- Throws:
SaSystemException
- general errorSaAuthenticationException
- error on the authentification / insufficient rights
-
changePassword
void changePassword(java.lang.String user, java.lang.String oldPassword, java.lang.String tenant, java.lang.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
java.util.List<UsersRights> getAuthorizedUsers(java.lang.String hDoc, java.lang.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
int getArchivedSize(java.lang.String hDoc) throws SaSystemException, SaAuthenticationException
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
java.lang.String getCurrentUserName()
This method returns the name of teh user currently logged in.- Returns:
- the name of the user currently logged in
-
getFolderUpdateInfo
@Deprecated java.util.Set<FolderUpdateInfo> getFolderUpdateInfo(java.util.Map<java.lang.String,java.lang.Long> folderIds) throws SaSystemException, SaAuthenticationException
Deprecated.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(java.lang.String url) throws SaSystemException, SaSapUrlException, SaAuthenticationException
Checks the given SAP URL on the R/Link server and returns, if successfull, the HDOC and the DDC. If not, null will be returned.- Parameters:
url
- 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(java.lang.String xhDoc, java.lang.String ddcName, java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.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(java.lang.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
SaUserInfo getCurrentUserInfo() throws SaAuthenticationException, SaSystemException
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
java.util.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, java.util.concurrent.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 missingjava.util.concurrent.TimeoutException
- 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(java.lang.String indexMask, java.lang.String docUid, java.lang.String contentRep, java.lang.String sid, java.lang.String docType, java.lang.String value, int mandant) throws 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
java.util.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
java.util.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
void setEventsEnabled(boolean enabled) throws SaSystemException, SaAuthenticationException
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
boolean getEventsEnabled() throws SaSystemException, SaAuthenticationException
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
DDC getDDC(java.lang.String ddcName) throws SaSystemException, SaAuthenticationException
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 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getFullTextFields(java.lang.String ddcName, java.util.List<java.lang.String> fullTextFields, java.lang.String hdoc) throws 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
java.util.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
java.util.List<SaperionExternalStorageMappingInfo> getExternalStorageFoldersForUpload() throws SaAuthenticationException, SaSystemException
Fetches 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(java.lang.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(java.lang.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(java.util.Date expiryTime, java.util.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
-
-