Package com.hp.ucmdb.api.configuration
Interface ConfigurationService
public interface ConfigurationService
Infrastructure settings management.
-
Method Summary
Modifier and TypeMethodDescriptiongetAllConfigParameters
(Locale locale, boolean displayableInUI) Returns all ConfigParameters.getConfigParameter
(String parameterName, Locale locale) Returns the specified ConfigParameter.getConfigParameters
(List<String> parametersName, Locale locale) Returns the specified ConfigParameters.getConfigParameterValue
(String parameterName) Returns default value for specified ConfigParameter.Returns the default owner CI prototype for UCMDB.Returns configuration factory.registerConfigurationParametersListener
(ConfigurationParametersListener listener, ConfigurationParametersListenerFilter filter) Registers a listener to be called when specified configuration parameters change.void
setConfigParameterDefaultValue
(String parameterName, String value) Sets default value for the specified ConfigParameter.void
setConfigParameterValue
(String parameterName, String value) Sets value for specified ConfigParameter for the current customer.void
setDefaultOwnerCIPrototype
(CI defaultOwnerPrototype, String ownershipRelationClassName, boolean linkFromOwnerToCI) Sets the default owner CI prototype for UCMDB.void
unregisterConfigurationParametersListener
(String listenerId) Unregisters the specified listener.
-
Method Details
-
getFactory
ConfigurationFactory getFactory()Returns configuration factory.- Returns:
- configuration factory.
-
getAllConfigParameters
Returns all ConfigParameters.- Parameters:
locale
- Locale for retrieving display values; if null, no localization applieddisplayableInUI
- if true only ConfigParameters with isDisplayInUI=true return, else all available ConfigParameters- Returns:
- Map (ConfigParameter name -> ConfigParameter)
-
getConfigParameter
Returns the specified ConfigParameter.- Parameters:
parameterName
- ConfigParameter namelocale
- Locale for retrieving display values; if null, no localization applied- Returns:
- ConfigParameter
-
getConfigParameters
Returns the specified ConfigParameters.- Parameters:
parametersName
- List of ConfigParameter nameslocale
- Locale for retrieving display values; if null, no localization applied- Returns:
- Map (ConfigParameter name -> ConfigParameter)
-
setConfigParameterDefaultValue
Sets default value for the specified ConfigParameter. This value is used for all customers without explicitly defined values.- Parameters:
parameterName
- ConfigParameter namevalue
- new default value
-
getConfigParameterValue
Returns default value for specified ConfigParameter.- Parameters:
parameterName
- ConfigParameter name- Returns:
- default value
-
setConfigParameterValue
Sets value for specified ConfigParameter for the current customer.- Parameters:
parameterName
- ConfigParameter namevalue
- new value
-
setDefaultOwnerCIPrototype
void setDefaultOwnerCIPrototype(CI defaultOwnerPrototype, String ownershipRelationClassName, boolean linkFromOwnerToCI) Sets the default owner CI prototype for UCMDB. This CI is used by various functions when an owner must be attached to another CI for identification purposes, but no such owner CI exists. The given CI is a prototype that is used to either identify, create, or re-create the default owner CI for the next invocation of such functions. The current default owner is untouched unless the given CI is identified to the current owner CI.- Parameters:
defaultOwnerPrototype
- the CI.ownershipRelationClassName
- the relation class name that will be used to create the relations between the default owner and the CIs.linkFromOwnerToCI
- true if the link should be created from the owner to the CI, false if it should be created in the other direction.
-
getDefaultOwnerCIPrototype
DefaultOwnerSetting getDefaultOwnerCIPrototype()Returns the default owner CI prototype for UCMDB. SeesetDefaultOwnerCIPrototype(com.hp.ucmdb.api.types.CI, java.lang.String, boolean)
for details. Some or all of the values in theDefaultOwnerSetting
structure can be null or empty, according to the parameters saved in the UCMDB. The default owner CI may or may not exist in the UCMDB, or it may exist but have a different UcmdbId. (It might have a different ID if it has been reconciled.) However, this prototype (if not null), can be used safely in data-in operations (TopologyUpdateService
). -
registerConfigurationParametersListener
String registerConfigurationParametersListener(ConfigurationParametersListener listener, ConfigurationParametersListenerFilter filter) throws UcmdbException Registers a listener to be called when specified configuration parameters change.- Parameters:
listener
- client-side implementation of the listener interface.filter
- notification filter instance obtained through {linkConfigurationFactory.createListenerFilter()
- Throws:
UcmdbException
- Since:
- 10.01
-
unregisterConfigurationParametersListener
Unregisters the specified listener.- Parameters:
listenerId
- id returned by registeration function- Since:
- 10.01
-