Interface SettingsService

  • All Known Implementing Classes:
    SettingsClassicConnectorService

    public interface SettingsService
    A service containing setting- and configuration related methods.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean deleteSetting​(java.lang.String name, java.lang.String section, boolean longSetting)
      Deletes a setting in the backend.
      DocumentId fixRevId​(DocumentId id, boolean force)
      Fix the revision id, if it's empty.
      java.lang.String getActualUser()
      Reads the actual user name from connector.
      java.util.List<java.lang.String> getAllAcls()
      Gets all ACL names.
      java.lang.String getDatabaseType()
      Deprecated.
      This method is kept only for compile-compatibility and will always throw an exception use getDatabaseType(String) instead.
      com.saperion.config.SQLType getDatabaseType​(java.lang.String ddcName)
      This method returns the type of database the given DDC is stored on.
      com.saperion.intf.DDC getDDC​(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.ResultType getResultType​(java.lang.String formName, int id, int rev, java.lang.String ddc)
      Deprecated.
      use getSetting instead
      java.lang.String getSetting​(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.
      boolean hasLicence​(com.saperion.rmi.SaFeature.FeatureKind kind)
      Checks, if the feature is supported.
      boolean isAlive()
      Check the backend connector.
      boolean isAuditTable​(java.lang.String ddcName)
      Checks, if the given ddc is an audit/protocol table.
      boolean isLookupTable​(java.lang.String ddcName)
      Checks, if the given ddc is a lookup table.
      boolean isReleaseActive()
      Checks if release feature active.
      void setFastAccessItems​(java.util.Map<java.lang.String,​java.lang.String> items)
      Stores the fast access items.
      void setLastLaunched​(java.lang.String lastName)
      Set the last lauched workflow name.
      void setProperties​(java.util.Map<java.lang.String,​java.lang.String> props, java.lang.String section)
      Writes the given properties to the given section.
      void setResultType​(java.lang.String formName, int id, int rev, com.saperion.ngc.iform.xml.ResultType resultType, java.lang.String ddc)
      Deprecated.
      use setSetting instead
      void setSetting​(java.lang.String value, java.lang.String name, java.lang.String section, boolean longSetting)
      Stores a setting in the backend.
      void setUtf8Properties​(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.
    • Method Detail

      • getActualUser

        java.lang.String getActualUser()
        Reads the actual user name from connector.
        Returns:
        Actual user name
      • isAlive

        boolean isAlive()
                 throws com.saperion.exception.SaSystemException
        Check the backend connector.
        Returns:
        Connector is alive
        Throws:
        com.saperion.exception.SaSystemException - System exception
      • hasLicence

        boolean hasLicence​(com.saperion.rmi.SaFeature.FeatureKind kind)
                    throws SystemException
        Checks, if the feature is supported.
        Parameters:
        kind - Feature kind
        Returns:
        True, if feature exists
        Throws:
        SystemException - System exception
      • getProperties

        java.util.Map<java.lang.String,​java.lang.String> getProperties​(java.lang.String section)
                                                                      throws AuthenticationException,
                                                                             SystemException
        Reads 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 using SaperionIniSettings instead for automatic tenant handling.
        Parameters:
        section - Section
        Returns:
        Properties
        Throws:
        AuthenticationException - authentication exception
        SystemException - system exception
      • getUtf8Properties

        java.util.Map<java.lang.String,​java.lang.String> getUtf8Properties​(java.lang.String section)
                                                                          throws AuthenticationException,
                                                                                 SystemException
        Reads 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.
        Parameters:
        section - Section
        Returns:
        Properties
        Throws:
        AuthenticationException - authentication exception
        SystemException - system exception
      • setUtf8Properties

        void setUtf8Properties​(java.util.Map<java.lang.String,​java.lang.String> props,
                               java.lang.String section,
                               boolean cleanSection)
                        throws AuthenticationException,
                               SystemException
        Writes the given properties with UTF-8 encoded values to the given section.
        Parameters:
        props - Properties
        section - Section
        cleanSection - Clean section
        Throws:
        AuthenticationException - authentication exception
        SystemException - system exception
      • getFieldDescriptionsList

        java.util.List<com.saperion.intf.SaFieldDescription> getFieldDescriptionsList​(java.lang.String definitionName)
                                                                               throws SystemException,
                                                                                      AuthenticationException
        Retrieves the field descriptions for the specified definition.
        Parameters:
        definitionName - definition name
        Returns:
        field descriptions
        Throws:
        SystemException - system exception
        AuthenticationException - authentication exception
      • getDDC

        com.saperion.intf.DDC getDDC​(java.lang.String definitionName)
                              throws SystemException,
                                     AuthenticationException
        Retrieves the specified DDC.
        Parameters:
        definitionName - name of the DDC to retrieve
        Returns:
        information about the requested DDC
        Throws:
        SystemException - system error when retrieving DDC
        AuthenticationException - authentication error when retrieving DDC
      • setResultType

        @Deprecated
        void setResultType​(java.lang.String formName,
                           int id,
                           int rev,
                           com.saperion.ngc.iform.xml.ResultType resultType,
                           java.lang.String ddc)
                    throws SystemException,
                           AuthenticationException
        Deprecated.
        use setSetting instead
        Save the resultset format to backend.
        Parameters:
        formName - Form name
        id - Frame id
        rev - Revision number
        resultType - Result type instance
        ddc - DDC name
        Throws:
        SystemException - System exception
        AuthenticationException - Authentication exception
      • getResultType

        @Deprecated
        com.saperion.ngc.iform.xml.ResultType getResultType​(java.lang.String formName,
                                                            int id,
                                                            int rev,
                                                            java.lang.String ddc)
                                                     throws SystemException,
                                                            AuthenticationException
        Deprecated.
        use getSetting instead
        Reads the resultset format from backend.
        Parameters:
        formName - Form name
        id - Frame id
        rev - Revision number
        ddc - DDC name
        Returns:
        Result type instance
        Throws:
        SystemException - System exception
        AuthenticationException - Authentication exception
      • getSetting

        java.lang.String getSetting​(java.lang.String name,
                                    java.lang.String section,
                                    boolean longSetting)
                             throws SystemException,
                                    AuthenticationException
        Retrieves a setting from the backend.
        Parameters:
        name - the name of the setting
        section - the section of the setting
        longSetting - 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 setting
        AuthenticationException - authentication error when retrieving the setting
      • setSetting

        void setSetting​(java.lang.String value,
                        java.lang.String name,
                        java.lang.String section,
                        boolean longSetting)
                 throws SystemException,
                        AuthenticationException
        Stores a setting in the backend.
        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 setting
        section - the section of the setting
        longSetting - whether the value is allowed to be longer than 2KB or not
        Throws:
        SystemException - system error when storing the setting
        AuthenticationException - authentication error when storing the setting
      • deleteSetting

        boolean deleteSetting​(java.lang.String name,
                              java.lang.String section,
                              boolean longSetting)
                       throws SystemException,
                              AuthenticationException
        Deletes a setting in the backend.
        Parameters:
        name - the name of the setting
        section - the section of the setting
        longSetting - 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 setting
        AuthenticationException - authentication error when deleting the setting
      • getDatabaseType

        com.saperion.config.SQLType getDatabaseType​(java.lang.String ddcName)
                                             throws AuthenticationException,
                                                    SystemException
        This method returns the type of database the given DDC is stored on.
        Parameters:
        ddcName - the name of the DDC to check
        Returns:
        the type of database for the DDC
        Throws:
        AuthenticationException - missing privileges or re-logon required
        SystemException - system error when loading DDC