public class EnvironmentModelHelper extends Object
Constructor and Description |
---|
EnvironmentModelHelper() |
Modifier and Type | Method and Description |
---|---|
MappedDomain |
findMappedDomain(Host host,
String domainPath,
String oracleHomePath) |
String |
getAdminServerId(EnvironmentModel model,
String domainId)
Return the admin server id for the supplied domain.
|
String |
getAdminServerUrl(EnvironmentModel model,
String domainId)
Get the admin server URL for the supplied domain.
|
List<String> |
getDomainIds(EnvironmentModel model)
Get a list of domains from the supplied model.
|
List<String> |
getDomainIds(EnvironmentModel model,
String oracleHomeId)
Get a list of domain ids associated with an oracle home.
|
String |
getDomainPath(EnvironmentModel model,
String domainId)
Get the path for the specified domain.
|
String |
getFMWCommonVersion()
Get version of FMWCommon libraries
|
String |
getHostAddress(EnvironmentModel model,
String hostId)
Get the address for the supplied host.
|
String |
getHostId(EnvironmentModel model,
List<String> hostAddresses)
Get the host id of a Host that has an address that matches on of the values in the supplied list.
|
List<String> |
getHostIds(EnvironmentModel model)
Get the list of hosts in the model
|
List<String> |
getHostIds(EnvironmentModel model,
String domainId)
Get the list of hosts for the supplied domain
|
String |
getNodeManagerId(EnvironmentModel model,
List<String> hostAddresses,
String domainPath,
String oracleHomePath)
Get a node manager id based on the host address, domain path, and oracle home path.
|
List<String> |
getNodeManagerIds(EnvironmentModel model,
String domainId)
Get a list of Node Manager ids for a domain.
|
String |
getOracleHomeId(EnvironmentModel model,
String domainId)
Get the oracle home id for the Admin Server of the supplied domain.
|
List<String> |
getOracleHomeIdsForHost(EnvironmentModel model,
String hostId)
Get the oracle home id list for the supplied host.
|
String |
getOracleHomePath(EnvironmentModel model,
String oracleHomeId)
Get the path for the oracle home id supplied.
|
List<String> |
getServerIds(EnvironmentModel model,
List<String> hostAddresses,
String domainPath,
String oracleHomePath)
Get a list of server ids based on the host address, domain path, and oracle home path.
|
List<String> |
getServerIds(EnvironmentModel model,
String domainId)
Get the list of servers associated with a domain.
|
String |
getServerListenAddress(EnvironmentModel model,
String serverId)
Get the listen address from the specified server.
|
String |
getServerListenPort(EnvironmentModel model,
String serverId)
Get the listen port from the specified server.
|
String |
getTopologyCompactString(EnvironmentModel model)
Get the string contents of the Topology in the EnvironmentModel
|
String |
getTopologyJSONCompactString(EnvironmentModel model)
Get the string contents of the Topology in the EnvironmentModel
|
boolean |
isAdminServer(EnvironmentModel model,
String serverId)
Determine if the server id supplied is an admin server.
|
protected boolean |
pathsMatch(String path1,
String path2)
Checks if the paths specified match each other by normalizing
the file separators and checking case insensitive on windows.
|
public String getAdminServerId(EnvironmentModel model, String domainId) throws FMWEnvSpecException
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain to query.FMWEnvSpecException
- if an error occurspublic String getAdminServerUrl(EnvironmentModel model, String domainId) throws FMWEnvSpecException
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain to query.FMWEnvSpecException
- if an error occurspublic List<String> getDomainIds(EnvironmentModel model)
model
- an EnvironmentModel object which contains the topology to be queried.public String getDomainPath(EnvironmentModel model, String domainId)
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain to query.public List<String> getServerIds(EnvironmentModel model, String domainId) throws FMWEnvSpecException
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain to query.FMWEnvSpecException
- if an error occurspublic String getHostAddress(EnvironmentModel model, String hostId)
model
- an EnvironmentModel object which contains the topology to be queried.hostId
- the host to querypublic List<String> getHostIds(EnvironmentModel model, String domainId)
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain id that corresponds to the domain to be queried.public List<String> getHostIds(EnvironmentModel model)
model
- an EnvironmentModel object which contains the topology to be queried.public List<String> getOracleHomeIdsForHost(EnvironmentModel model, String hostId)
model
- an EnvironmentModel object which contains the topology to be queried.hostId
- the host to querypublic List<String> getDomainIds(EnvironmentModel model, String oracleHomeId)
model
- an EnvironmentModel object which contains the topology to be queried.oracleHomeId
- the id of the oracle homepublic String getTopologyCompactString(EnvironmentModel model)
model
- an EnvironmentModel object which contains the topology to be queried.public String getTopologyJSONCompactString(EnvironmentModel model)
model
- an EnvironmentModel object which contains the topology to be queried.public List<String> getNodeManagerIds(EnvironmentModel model, String domainId)
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain to query.public String getOracleHomeId(EnvironmentModel model, String domainId) throws FMWEnvSpecException
model
- an EnvironmentModel object which contains the topology to be queried.domainId
- the domain to query.FMWEnvSpecException
- if an error occurspublic String getOracleHomePath(EnvironmentModel model, String oracleHomeId)
model
- an EnvironmentModel object which contains the topology to be queried.oracleHomeId
- the oracle home to query.public boolean isAdminServer(EnvironmentModel model, String serverId) throws FMWEnvSpecException
model
- an EnvironmentModel object which contains the topology to be queried.serverId
- the server to query.FMWEnvSpecException
- if an error occurspublic String getServerListenAddress(EnvironmentModel model, String serverId)
model
- an EnvironmentModel object which contains the topology to be queried.serverId
- the server to query.public String getServerListenPort(EnvironmentModel model, String serverId)
model
- an EnvironmentModel object which contains the topology to be queried.serverId
- the server to query.public String getFMWCommonVersion()
public List<String> getServerIds(EnvironmentModel model, List<String> hostAddresses, String domainPath, String oracleHomePath)
model
- an EnvironmentModel object which contains the topology to be queried.hostAddresses
- a list of host address strings to use to matchdomainPath
- a domain path to use to matchoracleHomePath
- an oracle home path used to matchpublic String getNodeManagerId(EnvironmentModel model, List<String> hostAddresses, String domainPath, String oracleHomePath)
model
- an EnvironmentModel object which contains the topology to be queried.hostAddresses
- a host address to use to matchdomainPath
- a domain path to use to matchoracleHomePath
- an oracle home path used to matchpublic String getHostId(EnvironmentModel model, List<String> hostAddresses)
model
- an EnvironmentModel object which contains the topology to be queried.hostAddresses
- a list of host address stings to use to find the correct host.public MappedDomain findMappedDomain(Host host, String domainPath, String oracleHomePath)
protected boolean pathsMatch(String path1, String path2)
path1
- The first path value.path2
- The second path value.