public class UpdateUddiRegistration extends Object implements SLAActionInterface
Modifier and Type | Field and Description |
---|---|
protected String |
password |
boolean |
State |
protected String |
username |
Constructor and Description |
---|
UpdateUddiRegistration() |
Modifier and Type | Method and Description |
---|---|
protected static Set<String> |
GetAlternateUrls(String url,
Connection perf)
Alternate URLs, basically multiple hostnames, FQDN, host file entries,
etc can map to the same service.
|
List<PolicyType> |
GetAppliesTo()
Returns a list of service policy types that this plugin can be applied to
use Utility.getAllPolicyTypes() if it applies to everything.
|
String |
GetDisplayName()
end user facing display name
|
String |
GetHtmlFormattedHelp()
returns html formatted help to guide users towards proper usage.
|
List<NameValuePair> |
GetOptionalParameters()
returns a list of optional parameters
|
List<NameValuePair> |
GetRequiredParameters()
returns a list of required parameters
|
void |
ProcessAction(AlertContainer alert,
List<NameValuePair> params)
Process an action.
|
boolean |
ValidateConfiguration(List<NameValuePair> params,
AtomicReference<String> outError)
validates the configuration before saving it.
|
public boolean State
protected String username
protected String password
public List<NameValuePair> GetRequiredParameters()
PluginCommon
GetRequiredParameters
in interface PluginCommon
public List<NameValuePair> GetOptionalParameters()
PluginCommon
GetOptionalParameters
in interface PluginCommon
public boolean ValidateConfiguration(List<NameValuePair> params, AtomicReference<String> outError)
SLAActionInterface
ValidateConfiguration
in interface SLAActionInterface
public String GetHtmlFormattedHelp()
PluginCommon
GetHtmlFormattedHelp
in interface PluginCommon
public String GetDisplayName()
PluginCommon
GetDisplayName
in interface PluginCommon
public void ProcessAction(AlertContainer alert, List<NameValuePair> params)
SLAActionInterface
Process an action. This could do anything you want it to do. Such as call a web service, send an email, an SMS or a JMS message.
This function should never throw an unhandled exception. Please do your best.
Here's a few useful examples for getting configuration settings from fgsms that you'll probably need that aren't provided with the parameters to this interface.
As a developer, you have two choices for getting access to properties that can be used to accomplish your tasks.
String val=null; KeyNameValueEnc setting = DBSettingsLoader.GetPropertiesFromDB(true, "MyPlugin", "MyName"); if (setting!=null && setting.getKeyNameValue()!=null) { val=setting.getKeyNameValue().getPropertyValue(); } //use val for something, log if it's nullNote: The value could be encrypted.
String val=Utility.DE(val);
AuditLogger.LogItem(this.getClass().getCanonicalName(), "CheckRule", "system", "my message", new SecurityWrapper(), null);
SLACommon.GetCurrentStatus((boolean pooled, String policyurl, Boolean out_status, Long out_timestamp, String out_message);
Connection con = Utility.GetPerformanceDBConnection(); //or use Utility.ConfigurationDBConnection(); for the configuration database try { // do something } catch (Exception ex) { // log some message } finally { if (con != null) { try { con.close(); } catch (Exception e) { } } }
ProcessAction
in interface SLAActionInterface
alert
- This alert container has a reference to the policy. Do not
make modifications to it, unpredictable results may occur. Also provided
is a human readable fault message, the actual Rule(s)
that caused the trigger to occur, (note: this may be another plugin) and
various other parameters. The AlertContainer should never be null.AlertContainer
,
RuleBaseType
,
Utility
,
AuditLogger
,
DBSettingsLoader
,
SLACommon
,
SetServicePolicyRequestMsg
,
ServicePolicy
,
org.miloss.fgsms.services.interfaces.policyconfiguration.SLAActionGeneric
,
SLA
public List<PolicyType> GetAppliesTo()
PluginCommon
GetAppliesTo
in interface PluginCommon
protected static Set<String> GetAlternateUrls(String url, Connection perf) throws MalformedURLException
url
- perf
- MalformedURLException
Copyright © 2008–2017 MIL-OSS. All rights reserved.