public class RestActionInvoker extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RestActionInvoker.JacksonObjectMapper
Provider for the Jackson object mapper.
|
Modifier and Type | Field and Description |
---|---|
static String |
LCMCLIENT_KEYSTORE_PASSWD |
static String |
LCMCLIENT_KEYSTORE_PATH |
static String |
LCMCLIENT_KEYSTORE_TYPE |
Constructor and Description |
---|
RestActionInvoker(String url)
Construct a REST action invoker.
|
Modifier and Type | Method and Description |
---|---|
static InvokeActionReq |
buildInvokeActionReq(oracle.fmwplatform.envspec.model.EnvironmentModel model,
List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets,
Properties extra,
String oracleHome)
Build a REST invoker request for the provided environment model.
|
static Map<oracle.fmwplatform.envspec.common.ResourceReference,oracle.fmwplatform.envspec.common.Versioned> |
cacheResources(oracle.fmwplatform.envspec.model.EnvironmentModel environmentModel)
Build a cache of referenced objects in the passed environment model.
|
ListActionsResp |
getActions()
Invoke the get known action REST request
|
String |
getDebugPort()
Return the port used for debugging LcmAgent child processes.
|
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Create a Jackson object mapper for converting to/from JSON.
|
ActionResult |
runAction(String actionName,
oracle.fmwplatform.envspec.model.EnvironmentModel env,
List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets)
Run a remote action via the action framework REST server
|
ActionResult |
runAction(String actionName,
oracle.fmwplatform.envspec.model.EnvironmentModel env,
List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets,
Properties extra)
Run a remote action via the action framework REST server
|
ActionResult |
runAction(String actionName,
oracle.fmwplatform.envspec.model.EnvironmentModel env,
List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets,
Properties extra,
String oracleHome)
Run a remote action via the action framework REST server
|
ActionResult |
runAction(String actionName,
oracle.fmwplatform.envspec.model.EnvironmentModel env,
List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets,
Properties extra,
String oracleHome,
ActionType actionType)
Run a remote action via the action framework REST server
|
ActionResult |
runAction(String actionName,
oracle.fmwplatform.envspec.model.EnvironmentModel env,
List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets,
String oracleHome)
Run a remote action via the action framework REST server
|
RestActionInvoker |
setDebugPort(String debugPort)
Set the port used for LcmAganet child process debugging.
|
public static final String LCMCLIENT_KEYSTORE_PATH
public static final String LCMCLIENT_KEYSTORE_PASSWD
public static final String LCMCLIENT_KEYSTORE_TYPE
public RestActionInvoker(String url) throws KeyStoreException
url
- the url of the REST server - http(s)://host:portKeyStoreException
- if SSL error encounteredpublic ListActionsResp getActions() throws ActionInvocationException
ActionInvocationException
- if response status is badpublic ActionResult runAction(String actionName, oracle.fmwplatform.envspec.model.EnvironmentModel env, List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets) throws ActionInvocationException
actionName
- name of the action to runenv
- the environment model to be passed to the actiontargets
- the list of targets to be passed to the actionActionInvocationException
- if response status is badpublic ActionResult runAction(String actionName, oracle.fmwplatform.envspec.model.EnvironmentModel env, List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets, Properties extra) throws ActionInvocationException
actionName
- name of the action to runenv
- the environment model to be passed to the actiontargets
- the list of targets to be passed to the actionextra
- any extra parameters needed by the actionActionInvocationException
- if response status is badpublic ActionResult runAction(String actionName, oracle.fmwplatform.envspec.model.EnvironmentModel env, List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets, String oracleHome) throws ActionInvocationException
actionName
- name of the action to runenv
- the environment model to be passed to the actiontargets
- the list of targets to be passed to the actionoracleHome
- oracle home containing the actionActionInvocationException
- if response status is badpublic ActionResult runAction(String actionName, oracle.fmwplatform.envspec.model.EnvironmentModel env, List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets, Properties extra, String oracleHome) throws ActionInvocationException
actionName
- name of the action to runenv
- the environment model to be passed to the actiontargets
- the list of targets to be passed to the actionextra
- extra parameter if necessaryoracleHome
- oracle home containing the actionActionInvocationException
- if response status is badpublic ActionResult runAction(String actionName, oracle.fmwplatform.envspec.model.EnvironmentModel env, List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets, Properties extra, String oracleHome, ActionType actionType) throws ActionInvocationException
actionName
- name of the action to runenv
- the environment model to be passed to the actiontargets
- the list of targets to be passed to the actionextra
- extra parameter if necessaryoracleHome
- oracle home containing the actionactionType
- the action type to attempt to runActionInvocationException
- if the response status is badpublic static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public static InvokeActionReq buildInvokeActionReq(oracle.fmwplatform.envspec.model.EnvironmentModel model, List<oracle.fmwplatform.envspec.model.targets.ModelTarget> targets, Properties extra, String oracleHome) throws oracle.fmwplatform.envspec.exception.FMWEnvSpecException, com.fasterxml.jackson.core.JsonProcessingException
model
- the model to be send via RESTtargets
- the action targetsextra
- optional extra class or MaporacleHome
- the remote oracle home to be usedoracle.fmwplatform.envspec.exception.FMWEnvSpecException
- if an error occurscom.fasterxml.jackson.core.JsonProcessingException
- if an error occurspublic static Map<oracle.fmwplatform.envspec.common.ResourceReference,oracle.fmwplatform.envspec.common.Versioned> cacheResources(oracle.fmwplatform.envspec.model.EnvironmentModel environmentModel) throws oracle.fmwplatform.envspec.exception.FMWEnvSpecException
environmentModel
- the environment modeloracle.fmwplatform.envspec.exception.FMWEnvSpecException
- if an error occurspublic String getDebugPort()
public RestActionInvoker setDebugPort(String debugPort)
debugPort
- the port for debugging or empty string for none