public class EnvironmentUtils extends Object
| Constructor and Description |
|---|
EnvironmentUtils() |
| 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
|
static void |
discoverAllTuningParameters(oracle.fmwplatform.envspec.common.Tunable modelObject,
oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst,
boolean offlineEnv,
oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries,
String version,
Map<String,String> tokens) |
static void |
discoverAllTuningParameters(oracle.fmwplatform.envspec.common.Tunable modelObject,
oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst,
boolean offlineEnv,
oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries,
String version,
Map<String,String> tokens,
Map<String,Map<String,String>> pathCache) |
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 String |
getIdFromName(String name,
Class<?> resourceType)
Generates a valid xml id for a given string replacing invalid characters with underscore.
|
protected static List<Setting> |
getTuningParameters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst,
boolean offlineEnv,
oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries,
String version,
Map<String,String> tokens) |
protected static List<Setting> |
getTuningParameters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst,
boolean offlineEnv,
oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries,
String version,
Map<String,String> tokens,
Map<String,Map<String,String>> pathCache) |
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 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 valuespublic static void discoverAllTuningParameters(oracle.fmwplatform.envspec.common.Tunable modelObject,
oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst,
boolean offlineEnv,
oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries,
String version,
Map<String,String> tokens)
throws oracle.fmwplatform.wlst.InterpreterException,
oracle.fmwplatform.wlst.PyErrorException,
InvalidVersionException
oracle.fmwplatform.wlst.InterpreterExceptionoracle.fmwplatform.wlst.PyErrorExceptionInvalidVersionExceptionpublic static void discoverAllTuningParameters(oracle.fmwplatform.envspec.common.Tunable modelObject,
oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst,
boolean offlineEnv,
oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries,
String version,
Map<String,String> tokens,
Map<String,Map<String,String>> pathCache)
throws oracle.fmwplatform.wlst.InterpreterException,
oracle.fmwplatform.wlst.PyErrorException,
InvalidVersionException
oracle.fmwplatform.wlst.InterpreterExceptionoracle.fmwplatform.wlst.PyErrorExceptionInvalidVersionExceptionprotected static List<Setting> getTuningParameters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst, boolean offlineEnv, oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries, String version, Map<String,String> tokens) throws oracle.fmwplatform.wlst.InterpreterException, oracle.fmwplatform.wlst.PyErrorException, InvalidVersionException
oracle.fmwplatform.wlst.InterpreterExceptionoracle.fmwplatform.wlst.PyErrorExceptionInvalidVersionExceptionprotected static List<Setting> getTuningParameters(oracle.fmwplatform.wlst.EmbeddedWLSTInvoker wlst, boolean offlineEnv, oracle.fmwplatform.envspec.lookup.AliasEntries aliasEntries, String version, Map<String,String> tokens, Map<String,Map<String,String>> pathCache) throws oracle.fmwplatform.wlst.InterpreterException, oracle.fmwplatform.wlst.PyErrorException, InvalidVersionException
oracle.fmwplatform.wlst.InterpreterExceptionoracle.fmwplatform.wlst.PyErrorExceptionInvalidVersionExceptionpublic 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 nullpublic static String getIdFromName(String name, Class<?> resourceType)
name - the string to generate id fromresourceType - String to prepend. Ex: Library, Application to indicate the type of the resource