public class EnvironmentUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
checkIfLocalHost(List<String> hostNames)
Test whether a given list of hostnames / addresses is same as the host running on
|
static boolean |
checkIfLocalHost(String hostname)
Test whether a given hostname is same as the host running on
|
protected static HashMap<String,oracle.fmwplatform.envspec.lookup.AliasWLSTValues> |
filterEnvironmentTypeWLSTValues(HashMap<String,oracle.fmwplatform.envspec.lookup.AliasWLSTValues> map, DomainEnvironment environment)
Filter WLST alias values so it matches with the online or offline environment
|
static boolean |
isValidUrl(String url)
Validate the WebLogic AdminServer or Managed Server url
|
protected static List<Setting> |
mergeSettings(List<Setting> existing, List<Setting> discovered)
Merge the existing tuning parameter settings with the discovered settings
|
static String |
normalizeFile(String file)
Normalizes a path or file, removing double slashes, removing double forwardd slashes convert to unix style with forward slashes, separator.
|
protected static List<Setting> |
refreshSettings(List<Setting> existing, List<Setting> discovered)
Update existing tuning parameter settings with their latest discovered value
|
protected static List<Setting> |
updateTuningParameters(Object domainObject, Map<String,String> objectMappings, HashMap<String,oracle.fmwplatform.envspec.lookup.AliasWLSTValues> parameterAlias)
Return all tuning parameter settings from a discovered domain object
|
protected static HashMap<String,oracle.fmwplatform.envspec.lookup.AliasWLSTValues> filterEnvironmentTypeWLSTValues(HashMap<String,oracle.fmwplatform.envspec.lookup.AliasWLSTValues> map, DomainEnvironment environment)
map
- All WLST values, not filteredenvironment
- Online of Offline environment objectpublic static boolean isValidUrl(String url)
url
- The WebLogic t3 urlprotected static List<Setting> mergeSettings(List<Setting> existing, List<Setting> discovered)
existing
- Tuning parameters which need to be mergeddiscovered
- Discovered Tuning parameters which has the latest valuespublic static String normalizeFile(String file)
file
- a full path to a file or directoryprotected static List<Setting> refreshSettings(List<Setting> existing, List<Setting> discovered)
existing
- Tuning parameters which need to be refresheddiscovered
- Discovered Tuning parameters which has the latest valuesprotected static List<Setting> updateTuningParameters(Object domainObject, Map<String,String> objectMappings, HashMap<String,oracle.fmwplatform.envspec.lookup.AliasWLSTValues> parameterAlias)
domainObject
- with all the online or offline discovered domain object attributesobjectMappings
- Map of object attributesparameterAlias
- Map of all the requested,wanted online or offline attributespublic static boolean checkIfLocalHost(String hostname)
hostname
- host name to compare against the current hosttrue
if hostname is same as current host or if input is nullpublic static boolean checkIfLocalHost(List<String> hostNames)
hostNames
- list of hostnames to compare against the current hosttrue
if any of the given hostnames is same as the current hostIllegalArgumentException
- if input is null