com.tibco.n2.service.adapter.binding

## Interface UserSettingsService

- All Known Implementing Classes:
    UserSettingsService

      public interface UserSettingsService

  Interface to provide the `UserSettingsService` methods in the Service Adapter. The User Settings service provides a generic store where name, value pairs can be stored.

  Each Setting is indentified by a Storage Key and Setting Id.

  Each Storage Key is unique and can have multiple Setting Ids.

  Under each Setting Id multiple Name, Value pairs can be stored.

  This service can be used by any component to store configuration data.

  The following functionality is provided :

  Save settings for the specified Storage Key and Setting Id.

  Get settings for the specified Storage Key and Setting Id.

  List the Setting Ids associated with a Storage Key.

  Delete Settings stored under the specified Storage Key.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `deleteUserSettings(java.lang.String storageKey)` Deletes all the User Settings for the specified Storage key.
    `com.tibco.n2.de.api.usersettingsservice.XmlSettingProperty[]` | `getUserSettings(java.lang.String storageKey, java.lang.String settingId)` Returns the value of the User Setting identified by the given key and ID.
    `java.lang.String[]` | `listUserSettingIds(java.lang.String storageKey)` List the values of the User Settings grouped by the given key.
    `int` | `saveUserSettings(com.tibco.n2.de.api.usersettingsservice.XmlSaveUserSettingsDetail settings)` Saves the given collection of User Settings.

- - ### Method Detail

    - #### deleteUserSettings

          int deleteUserSettings(java.lang.String storageKey)
                          throws com.tibco.n2.de.services.InternalServiceFault

      Deletes all the User Settings for the specified Storage key.
      Parameters:
        `storageKey` - The Storage Key identifiying the User Settings to be deleted.
      Returns:
        Not used
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.de.services.InternalServiceFault`

    - #### getUserSettings

          com.tibco.n2.de.api.usersettingsservice.XmlSettingProperty[] getUserSettings(java.lang.String storageKey,
                                                                                       java.lang.String settingId)
                                                                                throws com.tibco.n2.de.services.InternalServiceFault

      Returns the value of the User Setting identified by the given key and ID.
      Parameters:
        `storageKey` - The Storage Key of the User Settings to be retrieved.
        `settingId` - The Setting Id of the User Setting to be retrieved.
      Returns:
        Returns a `List` of `XmlSettingProperty` structures.

        Each one contains the Name and Value for the User Setting.

      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.de.services.InternalServiceFault`

    - #### listUserSettingIds

          java.lang.String[] listUserSettingIds(java.lang.String storageKey)
                                         throws com.tibco.n2.de.services.InternalServiceFault

      List the values of the User Settings grouped by the given key.
      Parameters:
        `storageKey` - The Storage Key
      Returns:
        Returns a `List` of Setting Ids
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.de.services.InternalServiceFault`

    - #### saveUserSettings

          int saveUserSettings(com.tibco.n2.de.api.usersettingsservice.XmlSaveUserSettingsDetail settings)
                        throws com.tibco.n2.de.services.InternalServiceFault

      Saves the given collection of User Settings.
      Parameters:
        `settings` - A `XmlSaveUserSettingsDetail` document containing the User Setting to be saved.

        Each Save can contain multiple User Setting values for the specified Storage Key and Setting ID.

      Returns:
        Not Used
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.de.services.InternalServiceFault`

Copyright © 2018 TIBCO Software Inc. All Rights Reserved.