public class CentralConfig extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AR_SYSTEM_CONFIGURATION_COMPONENT_SETTING_FORM |
Constructor and Description |
---|
CentralConfig() |
Modifier and Type | Method and Description |
---|---|
static void |
changeComponentStatus(ARServerUser context,
String componentGUID,
boolean status)
This method will set the component to Active if status is true, else set
it to Inactive
|
static String |
createComponentEntry(ARServerUser context,
String componentName,
String componentType,
String componentDescription,
boolean status)
The function creates a new configuration component entry and returns the
GUID for that entry.
|
static int |
createSettingEntries(ARServerUser context,
String componentGUID,
String componentName,
String componentType,
List<String[]> nameValuePair)
The function creates a new setting entry on
"AR System Configuration Component Setting" form.
|
static boolean |
deleteSetting(ARServerUser context,
String componentName,
String componentType,
String settingName,
String settingValue)
Delete settings entries that have a specific name and value.
|
static Entry |
getActiveComponent(ARServerUser context,
String componentName,
String componentType)
Get the active component entry for a given component name and type.
|
static String |
getComponentGUIDFromEntry(Entry thisEntry) |
static List<Entry> |
getComponentWithPrefix(ARServerUser context,
String componentNamePrefix,
String componentType)
This method will return the component GUIDs that are active, with the
given component type and prefixed with the componentNamePrefix
|
static List<String[]> |
getConfigSettingsAsList(ARServerUser context,
String configName,
String configType,
String settingName) |
static Map<String,List<String>> |
getConfigSettingsAsMap(ARServerUser context,
String configName,
String configType,
String settingName)
This method will return a HashMap of setting name vs list of setting
values associated with that setting name.
|
static List<Entry> |
getConfigSettingsWithEntryIDs(ARServerUser context,
String configName,
String configType,
String settingName) |
static List<Entry> |
getConfigSettingsWithEntryIDs(ARServerUser context,
String configName,
String configType,
String settingName,
int relationOPForCompName) |
static String |
getEntryValue(Entry thisEntry) |
static void |
setSettingEntries(ARServerUser context,
String entryID,
String componentGUID,
String componentName,
String componentType,
String settingName,
String settingValue)
The function creates a new setting entry on
"AR System Configuration Component Setting" form.
|
static void |
updateComponent(ARServerUser context,
String componentGUID,
String componentName,
String componentType,
String componentDescription,
boolean status)
This method can be used to update component values like name, type and
description provided these fields are not null Status will always be
updated This method will not update the GUID
|
static void |
updateConfigSetting(ARServerUser context,
String settingEntryID,
String settingName,
String settingValue) |
static void |
updateOlderComponents(ARServerUser context,
String componentNamePrefix,
String componentType,
String description,
boolean status)
Use this method to deactivate older Active components.
|
static void |
updateOrCreateSetting(ARServerUser context,
String componentGUID,
String componentName,
String componentType,
String settingName,
String settingValue)
Only use this method if setting name is unique, will not work for
duplicates as it will only update the first one
|
public static final String AR_SYSTEM_CONFIGURATION_COMPONENT_SETTING_FORM
public static String createComponentEntry(ARServerUser context, String componentName, String componentType, String componentDescription, boolean status) throws ARException
context
- : ARServerUser contextcomponentName
- : Name of the component to be createdcomponentType
- : Type of component com.bmc.arsys*status
- : true : Creates the new component in active state false:
creates the new component in inactive state.ARException
public static void updateOlderComponents(ARServerUser context, String componentNamePrefix, String componentType, String description, boolean status) throws ARException
context
- componentNamePrefix
- componentType
- description
- status
- ARException
public static List<Entry> getComponentWithPrefix(ARServerUser context, String componentNamePrefix, String componentType) throws ARException
context
- componentNamePrefix
- componentType
- ARException
public static Entry getActiveComponent(ARServerUser context, String componentName, String componentType) throws ARException
context
- componentName
- componentType
- ARException
public static int createSettingEntries(ARServerUser context, String componentGUID, String componentName, String componentType, List<String[]> nameValuePair) throws ARException
context
- : ARServerUser contextcomponentGUID
- : Component GUID. If a NULL is passed here, a new component
entry will get createdcomponentName
- : Component Name.componentType
- : Component Type.nameValuePair
- : List of Name value pairs.ARException
public static void setSettingEntries(ARServerUser context, String entryID, String componentGUID, String componentName, String componentType, String settingName, String settingValue) throws ARException
context
- : ARServerUser contextcomponentGUID
- : Component GUID. If a NULL is passed here, a new component
entry will get createdcomponentName
- : Component Name.componentType
- : Component Type.nameValuePair
- : List of Name value pairs.ARException
public static List<String[]> getConfigSettingsAsList(ARServerUser context, String configName, String configType, String settingName) throws ARException
ARException
public static List<Entry> getConfigSettingsWithEntryIDs(ARServerUser context, String configName, String configType, String settingName) throws ARException
ARException
public static List<Entry> getConfigSettingsWithEntryIDs(ARServerUser context, String configName, String configType, String settingName, int relationOPForCompName) throws ARException
ARException
public static Map<String,List<String>> getConfigSettingsAsMap(ARServerUser context, String configName, String configType, String settingName) throws ARException
context
- configName
- configType
- settingName
- ARException
public static void changeComponentStatus(ARServerUser context, String componentGUID, boolean status) throws ARException
componentGUID
- status
- ARException
public static void updateComponent(ARServerUser context, String componentGUID, String componentName, String componentType, String componentDescription, boolean status) throws ARException
componentGUID
- status
- ARException
public static void updateConfigSetting(ARServerUser context, String settingEntryID, String settingName, String settingValue) throws ARException
ARException
public static void updateOrCreateSetting(ARServerUser context, String componentGUID, String componentName, String componentType, String settingName, String settingValue) throws ARException
context
- componentGUID
- componentName
- componentType
- settingName
- settingValue
- ARException
public static boolean deleteSetting(ARServerUser context, String componentName, String componentType, String settingName, String settingValue) throws ARException
context
- the server connectioncomponentName
- the component namecomponentType
- the component typesettingName
- the setting namesettingValue
- the setting valueARException
? Copyright 2013 BMC Software, Inc.