HP Anywhere API Reference
Admin Settings XML

App settings are specified in the Admin Settings XML file. Place the App admin settings XML file under the App's setting folder, for example myapp\myapp-runtime\src\main\install\setting\myapp-admin-settings.xml

The settings can be updated by the administrator using the Administrator Console (<hostname>:8080/admin).

To get an admin setting value, use AdminSettingService:getAdminSetting, public String getAdminSetting(String categoryId, String settingName)

For example, to retrieve the value of the offline mode from NOTES App in the example App admin xml, use:
String clientOfflineAdminSetting = adminSettingsService.getAdminSetting("NOTES","client.support.offline.mode");

Fields in the Admin XML

Property name Description
context name The App serviceId
category The App serviceId
Setting name The key of the admin setting, this key will be sent by the App to retrieve its value.
This is the key to place in the event notificationType property.
Setting sectionKey A key to the translated section value. Each setting can be placed under specific section. The various sections will be displayed in the admin UI setting tab for the selected App.
Note: if no translation is found in the App resource bundle, the key will be displayed as is in the admin UI
Setting nameKey A key to the translated name value. Each setting has different name lable. The settings names will be displayed in the admin UI setting tab for the selected App.
Note: if no translation is found in the App resource bundle, the key will be displayed as is in the admin UI
Setting descKey A key to the translated description value. Each setting has description which is detailed description of the setting meaning. The settings description will be displayed in the admin UI setting tab for the selected App under the setting name formatted as Italic font.
Note: if no translation is found in the App resource bundle, the key will be displayed as is in the admin UI
Setting refreshRate Supported values:
“Immediate”: update the setting immediately after administrator changed it in the admin UI.
“Reboot”: the setting value will be updated only after server reboot.
Setting settingType Supported values:
“global”: In non multi-tenant environment, the setting can be updated by the administrator via the admin UI.
In multi-tenant environment the setting can be changed only by the central administrator via the admin UI. And its value is the same for all tenants.
“tenant”: relevant to multi-tenant environment only.
Set the setting type to tenant if you want to allow each tenant to keep different setting value.
Setting Required Supported values: “true”/”false”
When required is set to true, administrator will have to set value to this setting in order to save the settings list in the admin UI.
When required is set to false, the value of this setting can remain empty (null).
Setting displayInUI Supported values: “true”/”false”
When display in UI is set to true, this setting will be visible in the admin UI, and the administrator will be able to update its value.
When display in UI is set to false, this setting will not be visible in the admin UI. App can still retrieve the value of this setting, but administrator will not be able to change its value in the admin UI.

Value element:
<string></string>
<boolean></ boolean >
<enumeration></enumeration>

The initial setting value. Setting value type can be string, boolean or enumeration.
For notificationType setting, the value element is of type string represent the channels to notify, separated by comma.
Available channels are FRONTAPGE,EMAIL,PUSH_NOTIFICATION,NONE
Please note, when the value is NONE, no notification will be sent.
Example of typical notification type cahnnels value will be:
FRONTPAGE,EMAIL,PUSH_NOTIFICATION
Other setting value types available are Boolean and enumeration:
For boolean value type the value can be true/false.
For enumeration value type the value can be selection of enum string values, where one of the enum values will be the default value when it is set with default=”true”
For example:



Example of App Admin XML

<!DOCTYPE context SYSTEM "SettingsManager.dtd">
<context name="NOTES" category="NOTES">
    <!-- Enable/Disable the 'ping to server' mechanism that keeps the session alive -->
    <setting name="authentication.policy"
             sectionKey="sections.authentication.name"
             nameKey="settings.authentication.policy.name"
             descKey="settings.authentication.policy.desc"
             refreshRate="Immediate"
             displayInUI="true"
             settingType="global">
        <enumeration>
            <enum value="LWSSO" default="true"/>
            <enum value="BasicAuth"/>
        </enumeration>
    </setting>

    <!-- Client Offline Settings -->
    <setting name="client.support.offline.mode"
             sectionKey="sections.general.client.name"
             nameKey="settings.general.client.support.offline.mode.name"
             descKey="settings.general.client.support.offline.mode.desc"
             refreshRate="Immediate"
             settingType="global"
             required="true"
             displayInUI="true">
        <boolean>false</boolean>
    </setting>

    <!-- App Supported Notification Types  -->
    <!-- Supported values are:  FRONTPAGE, EMAIL, PUSH_NOTIFICATION, NONE -->
    <!--  The section below sets that when an event is sent with notificationType
            notification.type.reject.note, users receive notification on their HP Anywhere fronpage,
            by email, and pushed to their mobile device.  -->

    <setting name="notification.type.reject.note"
             sectionKey="sections.notification.types.name"
             nameKey="settings.notification.type.reject.note.name"
             descKey="settings.notification.type.general.note.desc"
             refreshRate="Immediate"
             settingType="global"
             required="true"
             displayInUI="true">
        <string>FRONTPAGE,EMAIL,PUSH_NOTIFICATION</string>
    </setting>

    <setting name="notification.type.approve.note"
             sectionKey="sections.notification.types.name"
             nameKey="settings.notification.type.approve.note.name"
             descKey="settings.notification.type.general.note.desc"
             refreshRate="Immediate"
             settingType="global"
             required="true"
             displayInUI="true">
        <string>FRONTPAGE,EMAIL</string>
    </setting>

    <setting name="notification.type.saved.note"
             sectionKey="sections.notification.types.name"
             nameKey="settings.notification.type.saved.note.name"
             descKey="settings.notification.type.general.note.desc"
             refreshRate="Immediate"
             settingType="global"
             required="true"
             displayInUI="true">
        <string>NONE</string>
    </setting>

</context>