@Deprecated public class ServerWriteAttributeOperationHandler extends WriteAttributeHandlers.WriteAttributeOperationHandler
INSTANCE
Constructor and Description |
---|
ServerWriteAttributeOperationHandler()
Deprecated.
Creates a handler that doesn't validate values.
|
ServerWriteAttributeOperationHandler(AttributeDefinition attributeDefinition)
Deprecated.
Creates a handler that users the given
attributeDefinition
to validate values before applying them to the model. |
ServerWriteAttributeOperationHandler(ParameterValidator valueValidator)
Deprecated.
Creates a handler that users the given
valueValidator
to validate values before applying them to the model. |
ServerWriteAttributeOperationHandler(ParameterValidator valueValidator,
ParameterValidator resolvedValueValidator)
Deprecated.
Creates a handler that uses the given
valueValidator
to validate values before applying them to the model, and a separate
validator to validate the resolved value
after it has been applied to the model. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
applyUpdateToRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode newValue,
org.jboss.dmr.ModelNode currentValue)
Deprecated.
Hook to allow subclasses to make runtime changes to effect the attribute value change.
|
protected void |
modelChanged(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode newValue,
org.jboss.dmr.ModelNode currentValue)
Deprecated.
Notification that the model has been changed.
|
protected void |
revertUpdateToRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode valueToRestore,
org.jboss.dmr.ModelNode valueToRevert)
Deprecated.
Hook to allow subclasses to revert runtime changes made in
applyUpdateToRuntime(org.jboss.as.controller.OperationContext, org.jboss.dmr.ModelNode, String, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode) . |
protected void |
validateResolvedValue(String name,
org.jboss.dmr.ModelNode value)
Deprecated.
If a resolved value validator was passed to the constructor, uses it to validate the value.
|
execute, validateValue
public ServerWriteAttributeOperationHandler()
public ServerWriteAttributeOperationHandler(ParameterValidator valueValidator)
valueValidator
to validate values before applying them to the model.valueValidator
- the validator to use to validate the value. May be null
public ServerWriteAttributeOperationHandler(AttributeDefinition attributeDefinition)
attributeDefinition
to validate values before applying them to the model.attributeDefinition
- the definition of the attribute being writtenpublic ServerWriteAttributeOperationHandler(ParameterValidator valueValidator, ParameterValidator resolvedValueValidator)
valueValidator
to validate values before applying them to the model, and a separate
validator to validate the resolved value
after it has been applied to the model.
Typically if this constructor is used the valueValidator
would
allow expressions, while the resolvedValueValidator
would not.valueValidator
- the validator to use to validate the value before application to the model. May be null
*resolvedValueValidator
- the validator to use to validate the value before application to the model. May be null
protected void modelChanged(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode currentValue) throws OperationFailedException
WriteAttributeHandlers.WriteAttributeOperationHandler
OperationContext.completeStep()
is invoked
or OperationFailedException
is thrown.modelChanged
in class WriteAttributeHandlers.WriteAttributeOperationHandler
context
- the context of the operationoperation
- the operationattributeName
- the name of the attribute being modifiednewValue
- the new value for the attributecurrentValue
- the existing value for the attributeOperationFailedException
protected void validateResolvedValue(String name, org.jboss.dmr.ModelNode value) throws OperationFailedException
OperationFailedException
protected boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode currentValue) throws OperationFailedException
adding a new step
with OperationContext.Stage.RUNTIME
.
This default implementation simply returns true
.
context
- the context of the operationoperation
- the operationattributeName
- the name of the attribute being modifiednewValue
- the new value for the attributecurrentValue
- the existing value for the attributetrue
if the server requires restart to effect the attribute
value change; false
if notOperationFailedException
protected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert) throws OperationFailedException
applyUpdateToRuntime(org.jboss.as.controller.OperationContext, org.jboss.dmr.ModelNode, String, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)
.
This default implementation simply does nothing.
context
- the context of the operationoperation
- the operationattributeName
- the name of the attribute being modifiedvalueToRestore
- the previous value for the attribute, before this operation was executedvalueToRevert
- the new value for the attribute that should be revertedOperationFailedException
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.