public class SaRMIClientCommandImpl extends AbstractWfRMIClientCommand
SaRemoteApplication
interface. This is the main point of
communication between Java kernel and LARIX connector. The essential functionality consists of
the documents processing, the transactions handling and log in/ofAPPEND_CONTENT, appl, credentials, LOGGER, props, session, sessionInfo, sysConnector, writeBufferSize
Constructor and Description |
---|
SaRMIClientCommandImpl()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
changePassword(String user,
String oldPassword,
String client,
String newPassword)
Changes the password of an existing user.
|
boolean |
closeSession(com.saperion.connector.authentication.Session session)
Close the given
Session |
boolean |
deleteSetting(String name,
String section,
boolean isLong)
Deletes a setting in the database.
|
int |
getArchivedSize(String hDoc)
Returns the total document size in archive.
|
List<UsersRights> |
getAuthorizedUsers(String hDoc,
String rights,
MatchKind match)
Returns the users, that have specific rights on a document.
|
int |
getCommitMode() |
DDC |
getDDC(String ddcName)
Returns information about the specified DDC.
|
int |
getDeleteMode() |
boolean |
getEventsEnabled()
Returns whether events (e.g.
|
SaFeature |
getFeatures()
Read the features.
|
SaFieldDescription[] |
getFieldDescriptions(String ddcName)
Reads the field descriptions for a given DDC.
|
SaFieldDescription[] |
getFieldDescriptions(String ddcName,
String mandant)
Reads the field descriptions for a given DDC.
|
Set<Map.Entry<String,String>> |
getFullTextFields(String ddcName,
List<String> fullTextFields,
String hdoc)
|
int |
getLicenseCount(int type)
Read the licence count for the given user.
|
String |
getMandant() |
WorkflowMember |
getMember(WorkflowMember member,
int depth,
String filter)
Reads the member.
|
WorkflowMember |
getMembers()
Reads the member.
|
String |
getRealDBName(String ddcName,
String field,
String mandant)
returns the real database table name for a given DDC.
|
String |
getRMIVersion()
Get the RMI interface version from java core server.
|
List<SaRMIServerInfo> |
getServerInfos()
Returns a list of objects describing the servers this connector is connected to.
|
com.saperion.connector.authentication.Session |
getSession() |
Setting |
getSetting(String name,
String section,
boolean isLong)
Retrieves a setting from the database.
|
SaRMISystemConnector |
getSystemConnector() |
List<String> |
getSystemFiles(SystemFileKind kind,
String filter)
Gets the system files of a specific kind.
|
SaSystemInfo |
getSystemInfo()
Reads system info.
|
SaSystemSetting |
getSystemSetting(String accessKey)
Retrieves a system setting object.
|
int |
getToken() |
int[] |
getUserIdsForQuery()
Read the userids.
|
SaUserSetting |
getUserSetting(String accessKey)
Retrieves a user setting object.
|
<T extends Serializable> |
invoke(com.lexmark.saperion.remote.common.operations.Operation<T,SaBasicException,LegacyConnection> operation)
This method invokes a
Operation on the backend. |
boolean |
isAlive()
Test the lifetime of this token.
|
boolean |
isRevisionEnabled(int mandant,
String ddcName)
Gets the information whether the provided ddc table contains the fields required for
revisions.
|
List<com.saperion.connector.authentication.Session> |
listActiveSessions()
List the active sessions of the logged in user.
|
String[] |
loadDDCNames()
Retrieves the available DDC names.
|
String[] |
loadFolderDDCNames()
Retrieves the available folder DDC names.
|
Properties |
loadSettings(String section)
Load settings from backend.
|
InputStream |
loadSystemFile(SystemFileKind kind,
String name)
Loads a system file of a specific kind.
|
String |
loadWorkflowDDCName()
Retrieves the workflow DDC name.
|
boolean |
logoff()
Log off the user from the server instance.
|
com.saperion.connector.authentication.Session |
logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials)
Logon with the passed credentials.
|
com.saperion.connector.authentication.Session |
logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials,
com.saperion.connector.authentication.SessionInfo sessionInfo)
Logon with the passed credentials and associate the given session information.
|
<ResultType extends Serializable,ExceptionType extends com.lexmark.saperion.exceptions.EcmException> |
newInvoke(com.lexmark.saperion.remote.common.operations.EcmOperation<ResultType,ExceptionType> operation)
This method invokes a
EcmOperation in the backend. |
protected void |
performLogonAfterFailure(Exception e)
Performs relogon in the backend.
|
String |
resolveLatestHdoc(String oldHdoc)
Resolves the hdoc of the latest version of the document identified by the given hdoc.
|
SettingSearchResult |
searchSettings(SettingSearchInfo searchInfo)
Searches for settings.
|
void |
sendBarcode(String indexMask,
String docUid,
String contentRep,
String sid,
String docType,
String value,
int mandant)
Send barcode to SAP.
|
void |
setEventsEnabled(boolean enabled)
Sets whether events (e.g.
|
void |
setLocale(Locale local)
Set the locale for localization.
|
void |
setSetting(Setting setting)
Persists a setting in the database.
|
boolean |
setUsedLicense(int type,
int count)
Set the count of used licenses.
|
void |
setUserSetting(SaUserSetting setting)
Persists a user setting object.
|
void |
storeSystemFile(SystemFileKind kind,
String name,
InputStream data)
Stores a system file of a specific kind.
|
addComment, addHistory, executeCommand, getBoxCount, getBoxDefinitions, getCommandInfos, getCommandInfos, getCommentInfos, getCompleteHistoryInfos, getHistoryInfos, getOutOfOffice, getParentTask, getSubstitute, getTask, getTaskAuditList, getTaskList, getUsers, getWorkflowDefinitions, setOutOfOffice, setSubstitute
finishSQLTransaction, getFulltext, getHDocForSysRowId, getIdsFromQuery, getStringQueryResult, getVersionList, readDocumentMetadata, startSQLTransaction
cacheDocument, checkoutDocument, checkSapUrl, clearContent, closeDocument, createDocument, createLink, deleteDocument, discardDocument, dsicardCheckout, finishTransaction, getACLNames, getACLRights, getAcls, getAllACLs, getAnnotations, getInvolvedUsers, getLockInfo, getLocks, getLocks, getNodeAccessData, getThumbnail, lockNode, logClientEvent, readDocumentFirst, readDocumentFirst, readDocumentNext, readVersionMetadata, readVersionMetadata, releaseDocument, removeElement, removeElement, restoreVersion, saveDocument, saveDocument, setACLName, setAnnotations, setElementMark, setVariables, startTransaction, storeDocument, storeDocument, unlockNode, writeContent, writeContent, writeContent, writeContent
addToFolder, copyFolder, createFolder, deleteFolder, getDocumentFolderCount, getDocumentFolders, getFolderChildren, getFolderClass, getFolderFromPath, getFolderInfo, getFolderParent, getFolderRights, getFolderUpdateInfo, moveFolder, moveToFolder, removeFromFolder, searchFolderClass, searchFolderDocuments, setFolderAcl, updateFolder
getRemoteCommand, init, reLogon, reLogonAfterConnectionFailure
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logon
public SaRMIClientCommandImpl() throws RemoteException, NotBoundException
RemoteException
- RemoteExceptionNotBoundException
- Server not foundprotected void performLogonAfterFailure(Exception e) throws SaSystemException
SaSystemException
is thrown.SaSystemException
public int getToken()
SaRMIClientCommand.getToken()
public com.saperion.connector.authentication.Session getSession()
SaRMIClientCommand.getSession()
public SaRMISystemConnector getSystemConnector()
SaRMIClientCommand.getSystemConnector()
public String getMandant()
SaRMIClientCommand.getMandant()
public int getCommitMode()
SaRMIClientCommand.getCommitMode()
public int getDeleteMode()
SaRMIClientCommand.getDeleteMode()
public boolean logoff() throws SaSystemException, SaAuthenticationException
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.logoff()
public com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials) throws SaSystemException, SaAuthenticationException
credentials
- credentials which should be used for logonSaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.logon(Credentials)
public com.saperion.connector.authentication.Session logon(com.lexmark.saperion.remote.common.authentication.Credentials credentials, com.saperion.connector.authentication.SessionInfo sessionInfo) throws SaSystemException, SaAuthenticationException
credentials
- credentials which should be used for logonsessionInfo
- The session information like user agent, remote address etc.SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.logon(Credentials, SessionInfo)
public List<com.saperion.connector.authentication.Session> listActiveSessions() throws SaSystemException
Session
SaSystemException
SaRMIClientCommand.listActiveSessions()
public boolean closeSession(com.saperion.connector.authentication.Session session) throws SaSystemException
Session
SaSystemException
SaRMIClientCommand.closeSession(Session)
public int[] getUserIdsForQuery() throws SaSystemException
SaSystemException
- SaRMICommandExceptionSaRMIClientCommand.getUserIdsForQuery()
public SaFieldDescription[] getFieldDescriptions(String ddcName) throws SaSystemException, SaAuthenticationException, SaDDCException
ddcName
- DDC nameSaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaRMIClientCommand.getFieldDescriptions(String)
public SaFieldDescription[] getFieldDescriptions(String ddcName, String mandant) throws SaSystemException
ddcName
- DDC namemandant
- MandantSaSystemException
- SaRMICommandExceptionSaRMIClientCommand.getFieldDescriptions(java.lang.String,
java.lang.String)
public String[] loadDDCNames() throws SaSystemException, SaAuthenticationException
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.loadDDCNames()
public String[] loadFolderDDCNames() throws SaSystemException, SaAuthenticationException
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.loadFolderDDCNames()
public String loadWorkflowDDCName() throws SaSystemException
SaSystemException
- SaRMICommandExceptionSaRMIClientCommand.loadWorkflowDDCName()
public boolean isAlive() throws SaSystemException
SaRMIServerCommand.isAlive(int)
SaSystemException
- System exception(int)
public boolean isRevisionEnabled(int mandant, String ddcName) throws SaSystemException, SaAuthenticationException
mandant
- mandant numberddcName
- table/jcr workspace nameSaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.isRevisionEnabled(int, String)
public final Properties loadSettings(String section) throws SaSystemException
section
- SectionSaSystemException
- Exceptionpublic String getRealDBName(String ddcName, String field, String mandant) throws SaSystemException
ddcName
- DDC namefield
- field namemandant
- MandantSaSystemException
- SaRMICommandExceptionSaRMIClientCommand.getRealDBName(java.lang.String,
java.lang.String, java.lang.String)
public SaSystemSetting getSystemSetting(String accessKey) throws SaSystemException
accessKey
- key to get associated system settingSaSystemSetting
SaSystemException
- System exceptionpublic SaSystemInfo getSystemInfo() throws SaSystemException
SaSystemException
- System exceptionSaRMIClientCommand.getSystemInfo()
public SaFeature getFeatures() throws SaSystemException
SaSystemException
- System exceptionSaRMIClientCommand.getFeatures()
public final SaUserSetting getUserSetting(String accessKey) throws SaSystemException, SaAuthenticationException
accessKey
- key to get associated user settingSaUserSetting
SaSystemException
- System exceptionSaAuthenticationException
- authentication exceptionpublic final void setUserSetting(SaUserSetting setting) throws SaSystemException, SaAuthenticationException
setting
- the SaUserSetting
object to be storedSaSystemException
- System exceptionSaAuthenticationException
- authentication exceptionpublic Setting getSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException
name
- the setting's namesection
- the setting's sectionisLong
- whether this is a setting with a long (>2KB) value or notSaSystemException
- system error when retrieving the settingSaAuthenticationException
- authentication errorSaRMIClientCommand.getSetting(java.lang.String, java.lang.String, boolean)
public SettingSearchResult searchSettings(SettingSearchInfo searchInfo) throws SaSystemException, SaAuthenticationException
searchInfo
- SettingSearchInfo
containing information about what to searchSettingSearchResult
SaSystemException
- system error when searchingSaAuthenticationException
- authentication errorSaRMIClientCommand.searchSettings(com.saperion.settings.SettingSearchInfo)
public void setSetting(Setting setting) throws SaSystemException, SaAuthenticationException
setting
- the setting to persistSaSystemException
- system error when persisting the settingSaAuthenticationException
- authenticatin error when persisting the settingSaRMIClientCommand.setSetting(com.saperion.settings.Setting)
public boolean deleteSetting(String name, String section, boolean isLong) throws SaSystemException, SaAuthenticationException
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 notSaSystemException
- system error when deleting the settingSaAuthenticationException
- authentication error when deleting the settingSaRMIClientCommand.deleteSetting(java.lang.String, java.lang.String, boolean)
public void setLocale(Locale local) throws SaSystemException, SaAuthenticationException
local
- LocaleSaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.setLocale(java.util.Locale)
public WorkflowMember getMembers() throws SaSystemException, SaAuthenticationException
SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.getMembers()
public WorkflowMember getMember(WorkflowMember member, int depth, String filter) throws SaSystemException, SaAuthenticationException
member
- workflow member, which direct children have to be returned.depth
- depth of the returned children.filter
- filter for search, only matching members will be found, leave empty to get all
members.SaSystemException
- SaRMICommandExceptionSaAuthenticationException
- SaAuthenticationExceptionSaRMIClientCommand.getMember(WorkflowMember, int, String)
public List<String> getSystemFiles(SystemFileKind kind, String filter) throws SaSystemException, SaAuthenticationException
kind
- the kind of systemfiles to read.filter
- A filter string. Only files will be returned, that match the filter. To get all
systemfiles of a kind set filter to the empty string.SaSystemException
- general errorSaAuthenticationException
- error on the authentification / insufficient rightsSaRMIClientCommand.getSystemFiles(SystemFileKind, String)
public void changePassword(String user, String oldPassword, String client, String newPassword) throws SaAuthenticationException, SaSystemException
SaRMIClientCommand.logon(Credentials)
was successfully invoked.user
- The name of the user.oldPassword
- The old password. This parameter is required, since the password should only be
changed by the user himselfclient
- The client of the actionsnewPassword
- The new passwordSaAuthenticationException
SaSystemException
SaRMIClientCommand.changePassword(String, String, String, String)
public List<UsersRights> getAuthorizedUsers(String hDoc, String rights, MatchKind match) throws SaAuthenticationException, SaSystemException
hDoc
- The id of the document.rights
- The rights the requested users should have.match
- How the rights are matched: MKONEOF - find all users that have one of the
specified rights MKEXACT - find all users that have exactly the specified rights
MKATLEAST - find all users that have at least the specified rightsSaAuthenticationException
SaSystemException
SaRMIClientCommand.getAuthorizedUsers(String, String, MatchKind)
public int getArchivedSize(String hDoc) throws SaAuthenticationException, SaSystemException
hDoc
- The document whichs size is wanted.SaAuthenticationException
SaSystemException
SaRMIClientCommand.getArchivedSize(String)
public void storeSystemFile(SystemFileKind kind, String name, InputStream data) throws SaSystemException, SaAuthenticationException
kind
- The kind of systemfile to store.name
- The name of the file. This has to be a filename without path and extension.data
- The content of the file to save.SaSystemException
- Remote exceptionSaAuthenticationException
- Authentication errorSaRMIClientCommand.storeSystemFile(SystemFileKind, String, InputStream)
public InputStream loadSystemFile(SystemFileKind kind, String name) throws SaSystemException, SaAuthenticationException
kind
- The kind of system file to loadname
- The name of the file to load.SaSystemException
- general errorSaAuthenticationException
- error on the authentification / insufficient rightsSaRMIClientCommand.loadSystemFile(com.saperion.settings.SystemFileKind,
java.lang.String)
public String getRMIVersion() throws SaSystemException
SaSystemException
SaRMIClientCommand.getRMIVersion()
public String resolveLatestHdoc(String oldHdoc) throws SaSystemException, SaAuthenticationException
oldHdoc
- the old hdocSaSystemException
- the system error exceptionSaAuthenticationException
- the authentication error exceptionSaRMIClientCommand.resolveLatestHdoc(java.lang.String)
public <T extends Serializable> T invoke(com.lexmark.saperion.remote.common.operations.Operation<T,SaBasicException,LegacyConnection> operation) throws SaSystemException, SaAuthenticationException
Operation
on the backend.T
- The return typeoperation
- The operation to invokeSaSystemException
SaAuthenticationException
SaRMIClientCommand.invoke(Operation)
public <ResultType extends Serializable,ExceptionType extends com.lexmark.saperion.exceptions.EcmException> ResultType newInvoke(com.lexmark.saperion.remote.common.operations.EcmOperation<ResultType,ExceptionType> operation) throws SaSystemException, SaAuthenticationException
SaRMIClientCommand
EcmOperation
in the backend.operation
- the operation to invokeSaSystemException
SaAuthenticationException
public void sendBarcode(String indexMask, String docUid, String contentRep, String sid, String docType, String value, int mandant) throws SaSystemException, SaAuthenticationException
indexMask
- Index mask namedocUid
- Document UIDcontentRep
- SAP Content repositorysid
- SAP IDdocType
- Document typevalue
- Valuemandant
- Mandant nameSaSystemException
- when a system error occuredSaAuthenticationException
- when the user is not logged in or has insufficient rightsSaRMIClientCommand.sendBarcode(java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, int)
public List<SaRMIServerInfo> getServerInfos()
SaRMIServerInfo
SaRMIClientCommand.getServerInfos()
public int getLicenseCount(int type) throws SaSystemException
type
- Client typeSaSystemException
- Error on the saperion systemSaRMIClientCommand.getLicenseCount(int)
public boolean setUsedLicense(int type, int count) throws SaSystemException
type
- Client typecount
- Number of licensesSaSystemException
- Error on the saperion systemSaRMIClientCommand.setUsedLicense(int, int)
public void setEventsEnabled(boolean enabled) throws SaSystemException, SaAuthenticationException
SaRMIClientCommand
enabled
- true, if events should be enabled, otherwise false.SaSystemException
- when a system error occured.SaAuthenticationException
- when the user is not logged in or has insufficient rights.public boolean getEventsEnabled() throws SaSystemException, SaAuthenticationException
SaRMIClientCommand
SaSystemException
- when a system error occured.SaAuthenticationException
- when the user is not logged in or has insufficient rights.public DDC getDDC(String ddcName) throws SaSystemException, SaAuthenticationException
SaRMIClientCommand
ddcName
- the name of the DDCSaSystemException
- system error when retrieving information about requested DDCSaAuthenticationException
- authentication exception when retrieving information about requested DDCpublic Set<Map.Entry<String,String>> getFullTextFields(String ddcName, List<String> fullTextFields, String hdoc) throws SaSystemException
ddcName
- name of the DDCfullTextFields
- List of Fields which are of Text retrieval type.
Make sure to prefix SaConstants.FULL_TEXT_COLUMN_PREFIX
hdoc
- hdoc of the documentSaSystemException
Copyright © 2020 Hyland Software Germany GmbH. All rights reserved.