public class Operations
extends org.jboss.as.controller.client.helpers.ClientConstants
Modifier and Type | Class and Description |
---|---|
static class |
Operations.CompositeOperationBuilder
A builder for building composite operations.
|
Modifier and Type | Field and Description |
---|---|
static String |
CHILD_TYPE |
static String |
ENABLE |
static String |
LAUNCH_TYPE |
static String |
PROFILE |
static String |
READ_ATTRIBUTE_OPERATION |
static String |
READ_CHILDREN_NAMES |
static String |
READ_RESOURCE |
static String |
READ_RESOURCE_OPERATION |
static String |
RECURSIVE |
static String |
RELOAD |
static String |
REMOVE_OPERATION |
static String |
SERVER_STATE |
static String |
SHUTDOWN |
static String |
UNDEFINE_ATTRIBUTE_OPERATION |
static String |
VALUE |
static String |
WRITE_ATTRIBUTE_OPERATION |
ADD, COMPOSITE, CONTENT, DEPLOYMENT, DEPLOYMENT_DEPLOY_OPERATION, DEPLOYMENT_FULL_REPLACE_OPERATION, DEPLOYMENT_REDEPLOY_OPERATION, DEPLOYMENT_REMOVE_OPERATION, DEPLOYMENT_REPLACE_OPERATION, DEPLOYMENT_UNDEPLOY_OPERATION, EXTENSION, FAILURE_DESCRIPTION, INPUT_STREAM_INDEX, NAME, OP, OP_ADDR, OPERATION_HEADERS, OUTCOME, RESULT, ROLLBACK_ON_RUNTIME_FAILURE, ROLLOUT_PLAN, RUNTIME_NAME, STEPS, SUCCESS, TO_REPLACE
Constructor and Description |
---|
Operations() |
Modifier and Type | Method and Description |
---|---|
static org.jboss.dmr.ModelNode |
createAddOperation(org.jboss.dmr.ModelNode address)
Creates an add operation.
|
static org.jboss.dmr.ModelNode |
createAddress(String key,
String name) |
static org.jboss.dmr.ModelNode |
createCompositeOperation()
Creates a composite operation with an empty address and empty steps that will rollback on a runtime failure.
|
static org.jboss.dmr.ModelNode |
createListDeploymentsOperation()
Creates an operation to list the deployments.
|
static org.jboss.dmr.ModelNode |
createOperation(String operation)
Creates a generic operation with an empty (root) address.
|
static org.jboss.dmr.ModelNode |
createOperation(String operation,
org.jboss.dmr.ModelNode address)
Creates an operation.
|
static org.jboss.dmr.ModelNode |
createOperation(String operation,
org.jboss.dmr.ModelNode address,
boolean recursive)
Creates an operation.
|
static org.jboss.dmr.ModelNode |
createReadAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName)
Creates an operation to read the attribute represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createReadAttributeOperation(String attributeName)
Creates an operation to read the attribute represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createReadResourceOperation(org.jboss.dmr.ModelNode address)
Creates a non-recursive operation to read a resource.
|
static org.jboss.dmr.ModelNode |
createReadResourceOperation(org.jboss.dmr.ModelNode address,
boolean recursive)
Creates an operation to read a resource.
|
static org.jboss.dmr.ModelNode |
createRemoveOperation(org.jboss.dmr.ModelNode address)
Creates a remove operation.
|
static org.jboss.dmr.ModelNode |
createRemoveOperation(org.jboss.dmr.ModelNode address,
boolean recursive)
Creates a remove operation.
|
static org.jboss.dmr.ModelNode |
createUndefineAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName)
Creates an operation to undefine an attribute value represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createWriteAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName,
boolean value)
Creates an operation to write an attribute value represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createWriteAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName,
int value)
Creates an operation to write an attribute value represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createWriteAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName,
long value)
Creates an operation to write an attribute value represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createWriteAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName,
org.jboss.dmr.ModelNode value)
Creates an operation to write an attribute value represented by the
attributeName parameter. |
static org.jboss.dmr.ModelNode |
createWriteAttributeOperation(org.jboss.dmr.ModelNode address,
String attributeName,
String value)
Creates an operation to write an attribute value represented by the
attributeName parameter. |
static org.jboss.dmr.Property |
getChildAddress(org.jboss.dmr.ModelNode address)
Finds the last entry of the address list and returns it as a property.
|
static String |
getFailureDescription(org.jboss.dmr.ModelNode result)
Parses the result and returns the failure description.
|
static org.jboss.dmr.ModelNode |
getOperationAddress(org.jboss.dmr.ModelNode op)
Returns the address for the operation.
|
static org.jboss.dmr.ModelNode |
getParentAddress(org.jboss.dmr.ModelNode address)
Finds the parent address, everything before the last address part.
|
static boolean |
isSuccessfulOutcome(org.jboss.dmr.ModelNode outcome)
Checks the result for a successful operation outcome.
|
static org.jboss.dmr.ModelNode |
readResult(org.jboss.dmr.ModelNode result)
Reads the result of an operation and returns the result.
|
static String |
readResultAsString(org.jboss.dmr.ModelNode result)
Reads the result of an operation and returns the result as a string.
|
static boolean |
successful(org.jboss.dmr.ModelNode result)
Checks the result for a successful operation.
|
public static final String CHILD_TYPE
public static final String ENABLE
public static final String LAUNCH_TYPE
public static final String PROFILE
public static final String READ_ATTRIBUTE_OPERATION
public static final String READ_CHILDREN_NAMES
public static final String READ_RESOURCE
public static final String READ_RESOURCE_OPERATION
public static final String RECURSIVE
public static final String RELOAD
public static final String REMOVE_OPERATION
public static final String SERVER_STATE
public static final String SHUTDOWN
public static final String UNDEFINE_ATTRIBUTE_OPERATION
public static final String VALUE
public static final String WRITE_ATTRIBUTE_OPERATION
public static boolean isSuccessfulOutcome(org.jboss.dmr.ModelNode outcome)
outcome
- the result of executing an operationtrue
if the operation was successful, otherwise false
public static boolean successful(org.jboss.dmr.ModelNode result)
result
- the result of executing an operationtrue
if the operation was successful, otherwise false
public static String getFailureDescription(org.jboss.dmr.ModelNode result)
result
- the result of executing an operationpublic static org.jboss.dmr.ModelNode getOperationAddress(org.jboss.dmr.ModelNode op)
op
- the operationpublic static org.jboss.dmr.ModelNode createAddOperation(org.jboss.dmr.ModelNode address)
address
- the address for the operationpublic static org.jboss.dmr.ModelNode createRemoveOperation(org.jboss.dmr.ModelNode address)
address
- the address for the operationpublic static org.jboss.dmr.ModelNode createRemoveOperation(org.jboss.dmr.ModelNode address, boolean recursive)
address
- the address for the operationpublic static org.jboss.dmr.ModelNode createListDeploymentsOperation()
public static org.jboss.dmr.ModelNode createCompositeOperation()
ClientConstants.ROLLBACK_ON_RUNTIME_FAILURE
is set to true
to rollback all
operations if one fails.public static org.jboss.dmr.ModelNode createReadAttributeOperation(String attributeName)
attributeName
parameter.attributeName
- the name of the parameter to readpublic static org.jboss.dmr.ModelNode createReadAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName)
attributeName
parameter.address
- the address to create the read attribute forattributeName
- the name of the parameter to readpublic static org.jboss.dmr.ModelNode createReadResourceOperation(org.jboss.dmr.ModelNode address)
address
- the address to create the read forpublic static org.jboss.dmr.ModelNode createReadResourceOperation(org.jboss.dmr.ModelNode address, boolean recursive)
address
- the address to create the read forrecursive
- whether to search recursively or notpublic static org.jboss.dmr.ModelNode createUndefineAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName)
attributeName
parameter.address
- the address to create the write attribute forattributeName
- the name attribute to undefinepublic static org.jboss.dmr.ModelNode createWriteAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName, boolean value)
attributeName
parameter.address
- the address to create the write attribute forattributeName
- the name of the attribute to writevalue
- the value to set the attribute topublic static org.jboss.dmr.ModelNode createWriteAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName, int value)
attributeName
parameter.address
- the address to create the write attribute forattributeName
- the name of the attribute to writevalue
- the value to set the attribute topublic static org.jboss.dmr.ModelNode createWriteAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName, long value)
attributeName
parameter.address
- the address to create the write attribute forattributeName
- the name of the attribute to writevalue
- the value to set the attribute topublic static org.jboss.dmr.ModelNode createWriteAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName, String value)
attributeName
parameter.address
- the address to create the write attribute forattributeName
- the name of the attribute to writevalue
- the value to set the attribute topublic static org.jboss.dmr.ModelNode createWriteAttributeOperation(org.jboss.dmr.ModelNode address, String attributeName, org.jboss.dmr.ModelNode value)
attributeName
parameter.address
- the address to create the write attribute forattributeName
- the name of the attribute to writevalue
- the value to set the attribute topublic static org.jboss.dmr.ModelNode createOperation(String operation)
operation
- the operation to createpublic static org.jboss.dmr.ModelNode createOperation(String operation, org.jboss.dmr.ModelNode address)
operation
- the operation nameaddress
- the address for the operationIllegalArgumentException
- if the address is not of type ModelType.LIST
public static org.jboss.dmr.ModelNode createOperation(String operation, org.jboss.dmr.ModelNode address, boolean recursive)
operation
- the operation nameaddress
- the address for the operationrecursive
- whether the operation is recursive or notIllegalArgumentException
- if the address is not of type ModelType.LIST
public static org.jboss.dmr.Property getChildAddress(org.jboss.dmr.ModelNode address)
address
- the address to get the last part ofIllegalArgumentException
- if the address is not of type ModelType.LIST
or is emptypublic static org.jboss.dmr.ModelNode getParentAddress(org.jboss.dmr.ModelNode address)
address
- the address to get the parentIllegalArgumentException
- if the address is not of type ModelType.LIST
or is emptypublic static String readResultAsString(org.jboss.dmr.ModelNode result)
ClientConstants.RESULT
attribute and empty string is returned.result
- the result of executing an operationpublic static org.jboss.dmr.ModelNode readResult(org.jboss.dmr.ModelNode result)
ClientConstants.RESULT
attribute, a new undefined ModelNode
is returned.result
- the result of executing an operationCopyright © 2013 JBoss by Red Hat. All Rights Reserved.