public class SchemaLocationAddHandler extends AbstractModelUpdateHandler implements DescriptionProvider
Modifier and Type | Field and Description |
---|---|
static SchemaLocationAddHandler |
INSTANCE |
static String |
OPERATION_NAME |
Modifier and Type | Method and Description |
---|---|
static org.jboss.dmr.ModelNode |
getAddSchemaLocationOperation(org.jboss.dmr.ModelNode address,
String schemaUrl,
String schemaLocation) |
org.jboss.dmr.ModelNode |
getModelDescription(Locale locale)
Gets the descriptive information (human-friendly description, list of attributes,
list of children) describing a single model node or operation.
|
protected boolean |
requiresRuntime(OperationContext context)
|
protected void |
updateModel(org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
Update the given node in the persistent configuration model based on the values in the given operation.
|
execute, performRuntime, requiresRuntimeVerification, rollbackRuntime, updateModel
public static final String OPERATION_NAME
public static final SchemaLocationAddHandler INSTANCE
public static org.jboss.dmr.ModelNode getAddSchemaLocationOperation(org.jboss.dmr.ModelNode address, String schemaUrl, String schemaLocation)
protected void updateModel(org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
AbstractModelUpdateHandler
updateModel
in class AbstractModelUpdateHandler
operation
- the operationmodel
- persistent configuration model node that corresponds to the address of operation
OperationFailedException
- if operation
is invalid or populating the model otherwise failsprotected boolean requiresRuntime(OperationContext context)
AbstractModelUpdateHandler
AbstractModelUpdateHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)
}
should be called. This default implementation returns true
if the context type
is OperationContext.Type.SERVER
.
Subclasses can override for different behavior.requiresRuntime
in class AbstractModelUpdateHandler
context
- operation contexttrue
if performRuntime
should be invoked; false
otherwise.public org.jboss.dmr.ModelNode getModelDescription(Locale locale)
DescriptionProvider
The implementation must assume that the caller intends to modify the
returned ModelNode
so it should not hand out a reference to any internal data structures.
getModelDescription
in interface DescriptionProvider
locale
- the locale to use to generate any localized text used in the description.
May be null
, in which case Locale.getDefault()
should be usedModelNode
describing the model node's structureCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.