Package com.saperion.ngc.model
Class SettingsClassicConnectorService
- java.lang.Object
-
- com.saperion.ngc.model.ClassicConnectorService
-
- com.saperion.ngc.model.SettingsClassicConnectorService
-
- All Implemented Interfaces:
Service,SettingsService
public class SettingsClassicConnectorService extends ClassicConnectorService implements SettingsService
Default-implementation ofSettingsService.
-
-
Field Summary
-
Fields inherited from class com.saperion.ngc.model.ClassicConnectorService
ddcCache
-
-
Constructor Summary
Constructors Constructor Description SettingsClassicConnectorService()SettingsClassicConnectorService(javax.servlet.http.HttpSession session)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleandeleteSetting(java.lang.String name, java.lang.String section, boolean longSetting)Deletes a setting in the backend.DocumentIdfixRevId(DocumentId id, boolean force)Fix the revision id, if it's empty.java.lang.StringgetActualUser()Reads the actual user name from connector.java.util.List<java.lang.String>getAllAcls()Gets all ACL names.java.lang.StringgetDatabaseType()Deprecated.com.saperion.config.SQLTypegetDatabaseType(java.lang.String ddcName)This method returns the type of database the given DDC is stored on.com.saperion.intf.DDCgetDDC(java.lang.String definitionName)Retrieves the specified DDC.java.util.Map<java.lang.String,java.lang.String>getFastAccessItems()Retrieves the fast access items.java.util.List<com.saperion.intf.SaFieldDescription>getFieldDescriptionsList(java.lang.String definitionName)Retrieves the field descriptions for the specified definition.java.util.List<java.lang.String>getLastLaunched()Reads and sort the last launched workflow names.java.util.Map<java.lang.String,java.lang.String>getProperties(java.lang.String section)Reads the properties stored in the given section in the INI configuration files of Saperion.com.saperion.ngc.iform.xml.ResultTypegetResultType(java.lang.String formName, int id, int rev, java.lang.String ddc)Deprecated.use getSetting insteadjava.lang.StringgetSetting(java.lang.String name, java.lang.String section, boolean longSetting)Retrieves a setting from the backend.java.util.Map<java.lang.String,java.lang.String>getUtf8Properties(java.lang.String section)Reads the properties stored in the given section in the INI configuration files of Saperion.booleanhasLicence(com.saperion.rmi.SaFeature.FeatureKind kind)Checks, if the feature is supported.booleanisAlive()Check the backend connector.booleanisAuditTable(java.lang.String ddcName)Checks, if the given ddc is an audit/protocol table.booleanisLookupTable(java.lang.String ddcName)Checks, if the given ddc is a lookup table.booleanisReleaseActive()Checks if release feature active.voidsetFastAccessItems(java.util.Map<java.lang.String,java.lang.String> items)Stores the fast access items.voidsetLastLaunched(java.lang.String lastName)Set the last lauched workflow name.voidsetProperties(java.util.Map<java.lang.String,java.lang.String> props, java.lang.String section)Writes the given properties to the given section.voidsetResultType(java.lang.String formName, int id, int rev, com.saperion.ngc.iform.xml.ResultType resultType, java.lang.String ddc)Deprecated.use setSetting insteadvoidsetSetting(java.lang.String value, java.lang.String name, java.lang.String section, boolean longSetting)Stores a setting in the backend.voidsetUtf8Properties(java.util.Map<java.lang.String,java.lang.String> props, java.lang.String section, boolean cleanSection)Writes the given properties with UTF-8 encoded values to the given section.-
Methods inherited from class com.saperion.ngc.model.ClassicConnectorService
convertAuthenticationException, getCachedDDC, getConnectionProvider, getCurrentUserFromSession, getSession, getWfConnectionProvider, isActive
-
-
-
-
Method Detail
-
getActualUser
public java.lang.String getActualUser()
Reads the actual user name from connector.- Specified by:
getActualUserin interfaceSettingsService- Returns:
- Actual user name
- See Also:
SettingsService.getActualUser()
-
isAlive
public boolean isAlive() throws com.saperion.exception.SaSystemExceptionCheck the backend connector.- Specified by:
isAlivein interfaceSettingsService- Returns:
- Connector is alive
- Throws:
com.saperion.exception.SaSystemException- System exception- See Also:
SettingsService.isAlive()
-
hasLicence
public boolean hasLicence(com.saperion.rmi.SaFeature.FeatureKind kind) throws SystemExceptionChecks, if the feature is supported.- Specified by:
hasLicencein interfaceSettingsService- Parameters:
kind- Feature kind- Returns:
- True, if feature exists
- Throws:
SystemException- See Also:
SettingsService.hasLicence(com.saperion.rmi.SaFeature.FeatureKind)
-
isReleaseActive
public boolean isReleaseActive() throws SystemException, AuthenticationExceptionChecks if release feature active.- Specified by:
isReleaseActivein interfaceSettingsService- Returns:
- true, if release feature active
- Throws:
SystemException- the system exceptionAuthenticationException- the authentication exception- See Also:
SettingsService.isReleaseActive()
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties(java.lang.String section) throws AuthenticationException, SystemExceptionReads the properties stored in the given section in the INI configuration files of Saperion. Tenant-specific settings will not be resolved automatically. To read a tenant-specific setting, the section name must include the tenant-ID. Consider usingSaperionIniSettingsinstead for automatic tenant handling.- Specified by:
getPropertiesin interfaceSettingsService- Parameters:
section- Section- Returns:
- Properties
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.getProperties(java.lang.String)
-
getUtf8Properties
public java.util.Map<java.lang.String,java.lang.String> getUtf8Properties(java.lang.String section) throws AuthenticationException, SystemExceptionReads the properties stored in the given section in the INI configuration files of Saperion. The content of the section must be UTF-8 encoded. enant-specific settings will not be resolved automatically. To read a tenant-specific setting, the section name must include the tenant-ID.- Specified by:
getUtf8Propertiesin interfaceSettingsService- Parameters:
section- Section- Returns:
- Properties
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.getUtf8Properties(java.lang.String)
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> props, java.lang.String section) throws AuthenticationException, SystemExceptionWrites the given properties to the given section.- Specified by:
setPropertiesin interfaceSettingsService- Parameters:
props- Propertiessection- Section- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.setProperties(java.util.Map, java.lang.String)
-
setUtf8Properties
public void setUtf8Properties(java.util.Map<java.lang.String,java.lang.String> props, java.lang.String section, boolean cleanSection) throws AuthenticationException, SystemExceptionWrites the given properties with UTF-8 encoded values to the given section.- Specified by:
setUtf8Propertiesin interfaceSettingsService- Parameters:
props- Propertiessection- SectioncleanSection- Clean section- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.setUtf8Properties(java.util.Map, java.lang.String, boolean)
-
getLastLaunched
public java.util.List<java.lang.String> getLastLaunched() throws AuthenticationException, SystemExceptionReads and sort the last launched workflow names.- Specified by:
getLastLaunchedin interfaceSettingsService- Returns:
- Last launched items
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.getLastLaunched()
-
setLastLaunched
public void setLastLaunched(java.lang.String lastName) throws AuthenticationException, SystemExceptionSet the last lauched workflow name.- Specified by:
setLastLaunchedin interfaceSettingsService- Parameters:
lastName- Last name- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.setLastLaunched(java.lang.String)
-
getFieldDescriptionsList
public final java.util.List<com.saperion.intf.SaFieldDescription> getFieldDescriptionsList(java.lang.String definitionName) throws SystemException, AuthenticationExceptionRetrieves the field descriptions for the specified definition.- Specified by:
getFieldDescriptionsListin interfaceSettingsService- Parameters:
definitionName- definition name- Returns:
- field descriptions
- Throws:
SystemException- system exceptionAuthenticationException- authentication exception- See Also:
SettingsService.getFieldDescriptionsList(java.lang.String)
-
getDDC
public com.saperion.intf.DDC getDDC(java.lang.String definitionName) throws SystemException, AuthenticationExceptionRetrieves the specified DDC.- Specified by:
getDDCin interfaceSettingsService- Parameters:
definitionName- name of the DDC to retrieve- Returns:
- information about the requested DDC
- Throws:
SystemException- system error when retrieving DDCAuthenticationException- authentication error when retrieving DDC- See Also:
SettingsService.getDDC(java.lang.String)
-
isLookupTable
public boolean isLookupTable(java.lang.String ddcName) throws SystemException, AuthenticationExceptionChecks, if the given ddc is a lookup table.- Specified by:
isLookupTablein interfaceSettingsService- Parameters:
ddcName- DDC name- Returns:
- True, if it is a lookup table
- Throws:
SystemException- system exceptionAuthenticationException- authentication exception- See Also:
SettingsService.isLookupTable(java.lang.String)
-
isAuditTable
public boolean isAuditTable(java.lang.String ddcName) throws SystemException, AuthenticationExceptionChecks, if the given ddc is an audit/protocol table.- Specified by:
isAuditTablein interfaceSettingsService- Parameters:
ddcName- DDC name- Returns:
- True, if it is a audit table
- Throws:
SystemException- system exceptionAuthenticationException- authentication exception- See Also:
SettingsService.isAuditTable(java.lang.String)
-
fixRevId
public DocumentId fixRevId(DocumentId id, boolean force) throws SystemException, AuthenticationException
Fix the revision id, if it's empty.- Specified by:
fixRevIdin interfaceSettingsService- Parameters:
id- Document idforce- Force the renew- Returns:
- New document id
- Throws:
SystemException- System exceptionAuthenticationException- authentication exception- See Also:
SettingsService.fixRevId(com.saperion.ngc.model.document.DocumentId, boolean)
-
getAllAcls
public final java.util.List<java.lang.String> getAllAcls() throws SystemException, AuthenticationExceptionGets all ACL names.- Specified by:
getAllAclsin interfaceSettingsService- Returns:
- list of ACL names
- Throws:
AuthenticationExceptionSystemException- See Also:
SettingsService.getAllAcls()
-
setResultType
@Deprecated public final void setResultType(java.lang.String formName, int id, int rev, com.saperion.ngc.iform.xml.ResultType resultType, java.lang.String ddc) throws SystemException, AuthenticationExceptionDeprecated.use setSetting insteadSave the resultset format to backend.- Specified by:
setResultTypein interfaceSettingsService- Parameters:
formName- Form nameid- Frame idrev- Revision numberresultType- Result type instanceddc- DDC name- Throws:
SystemException- System exceptionAuthenticationException- Authentication exception- See Also:
SettingsService.setResultType(java.lang.String, int, int, com.saperion.ngc.iform.xml.ResultType, java.lang.String)
-
getResultType
@Deprecated public final com.saperion.ngc.iform.xml.ResultType getResultType(java.lang.String formName, int id, int rev, java.lang.String ddc) throws SystemException, AuthenticationExceptionDeprecated.use getSetting insteadReads the resultset format from backend.- Specified by:
getResultTypein interfaceSettingsService- Parameters:
formName- Form nameid- Frame idrev- Revision numberddc- DDC name- Returns:
- Result type instance
- Throws:
SystemException- System exceptionAuthenticationException- Authentication exception- See Also:
SettingsService.getResultType(java.lang.String, int, int, java.lang.String)
-
getSetting
public java.lang.String getSetting(java.lang.String name, java.lang.String section, boolean longSetting) throws SystemException, AuthenticationExceptionRetrieves a setting from the backend.- Specified by:
getSettingin interfaceSettingsService- Parameters:
name- the name of the settingsection- the section of the settinglongSetting- whether the value of the setting is allowed to be longer than 2KB or not- Returns:
- the setting's value as a string. Note that long settings cannot hold unicode chararacters
- Throws:
SystemException- system error when retrieving the settingAuthenticationException- authentication error when retrieving the setting- See Also:
SettingsService.getSetting(java.lang.String, java.lang.String, boolean)
-
setSetting
public void setSetting(java.lang.String value, java.lang.String name, java.lang.String section, boolean longSetting) throws SystemException, AuthenticationExceptionStores a setting in the backend.- Specified by:
setSettingin interfaceSettingsService- Parameters:
value- the setting's value. If longSetting is false, this is limited to 2KB. If longSetting is true, the string must not contain unicode characters.name- the name of the settingsection- the section of the settinglongSetting- whether the value is allowed to be longer than 2KB or not- Throws:
SystemException- system error when storing the settingAuthenticationException- authentication error when storing the setting- See Also:
SettingsService.setSetting(java.lang.String, java.lang.String, java.lang.String, boolean)
-
deleteSetting
public boolean deleteSetting(java.lang.String name, java.lang.String section, boolean longSetting) throws SystemException, AuthenticationExceptionDeletes a setting in the backend.- Specified by:
deleteSettingin interfaceSettingsService- Parameters:
name- the name of the settingsection- the section of the settinglongSetting- whether the setting's value is allowed to be longer than 2KB or not- Returns:
- true if setting was deleted
- Throws:
SystemException- system error when deleting the settingAuthenticationException- authentication error when deleting the setting- See Also:
SettingsService.deleteSetting(java.lang.String, java.lang.String, boolean)
-
getFastAccessItems
public java.util.Map<java.lang.String,java.lang.String> getFastAccessItems() throws AuthenticationException, SystemExceptionRetrieves the fast access items.- Specified by:
getFastAccessItemsin interfaceSettingsService- Returns:
- fast access items
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.getFastAccessItems()
-
setFastAccessItems
public void setFastAccessItems(java.util.Map<java.lang.String,java.lang.String> items) throws AuthenticationException, SystemExceptionStores the fast access items.- Specified by:
setFastAccessItemsin interfaceSettingsService- Parameters:
items- fast access items as pairs of name and path- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
SettingsService.setFastAccessItems(java.util.Map)
-
getDatabaseType
@Deprecated public java.lang.String getDatabaseType() throws AuthenticationException, SystemExceptionDeprecated.Description copied from interface:SettingsServiceConvenience method to get the type of the database currently in use.- Specified by:
getDatabaseTypein interfaceSettingsService- Returns:
- type of the database
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception
-
getDatabaseType
public com.saperion.config.SQLType getDatabaseType(java.lang.String ddcName) throws AuthenticationException, SystemExceptionDescription copied from interface:SettingsServiceThis method returns the type of database the given DDC is stored on.- Specified by:
getDatabaseTypein interfaceSettingsService- Parameters:
ddcName- the name of the DDC to check- Returns:
- the type of database for the DDC
- Throws:
AuthenticationException- missing privileges or re-logon requiredSystemException- system error when loading DDC
-
-