Package org.jboss.as.controller.security
Class CredentialReferenceWriteAttributeHandler
java.lang.Object
org.jboss.as.controller.AbstractWriteAttributeHandler<Void>
org.jboss.as.controller.ReloadRequiredWriteAttributeHandler
org.jboss.as.controller.security.CredentialReferenceWriteAttributeHandler
- All Implemented Interfaces:
OperationStepHandler
A write attribute handler that is capable of handling automatic updates of credential stores via
credential reference attributes.
- Author:
- Farah Juma
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
AbstractWriteAttributeHandler.HandbackHolder<T> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.CredentialReferenceWriteAttributeHandler(AttributeDefinition... attributes) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanapplyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder) Hook to allow subclasses to make runtime changes to effect the attribute value change.protected voidfinishModelStage(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode oldValue, Resource resource) Hook to allow subclasses to do any finalOperationContext.Stage.MODELprocessing following the application of the new attribute value.protected voidrevertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode resolvedValue, Void handback) Hook to allow subclasses to revert runtime changes made inAbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder).Methods inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
execute, getAttributeDefinition, recordCapabilitiesAndRequirements, requiresRuntime, validateUpdatedModel
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
CredentialReferenceWriteAttributeHandler
@Deprecated(forRemoval=true) public CredentialReferenceWriteAttributeHandler(AttributeDefinition... attributes) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead. -
CredentialReferenceWriteAttributeHandler
@Deprecated(forRemoval=true) public CredentialReferenceWriteAttributeHandler(AttributeDefinition attribute) Deprecated, for removal: This API element is subject to removal in a future version.UseINSTANCEinstead.
-
-
Method Details
-
finishModelStage
protected void finishModelStage(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode oldValue, Resource resource) throws OperationFailedException Description copied from class:AbstractWriteAttributeHandlerHook to allow subclasses to do any finalOperationContext.Stage.MODELprocessing following the application of the new attribute value. This default implementation callsAbstractWriteAttributeHandler.validateUpdatedModel(OperationContext, Resource).NOTE: Implementations must not call
OperationContext.completeStep(OperationContext.ResultHandler)or any of its variants. The method that calls this one handles step completion.- Overrides:
finishModelStagein classAbstractWriteAttributeHandler<Void>- Parameters:
context- the operation contextoperation- the operationattributeName- the name of the attribute being modifiednewValue- the new value for the attributeoldValue- the previous value for the attributeresource- the updated model resource- Throws:
OperationFailedException
-
applyUpdateToRuntime
protected boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder) throws OperationFailedException Description copied from class:AbstractWriteAttributeHandlerHook to allow subclasses to make runtime changes to effect the attribute value change.- Overrides:
applyUpdateToRuntimein classReloadRequiredWriteAttributeHandler- Parameters:
context- the context of the operationoperation- the operationattributeName- the name of the attribute being modifiedresolvedValue- the new value for the attribute, after anyValueExpressionhas been resolvedcurrentValue- the existing value for the attributehandbackHolder- holder for an arbitrary object to pass toAbstractWriteAttributeHandler.revertUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, Object)if the operation needs to be rolled back- Returns:
trueif the server requires reload to effect the attribute value change;falseif not- Throws:
OperationFailedException
-
revertUpdateToRuntime
protected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode resolvedValue, Void handback) throws OperationFailedException Description copied from class:AbstractWriteAttributeHandlerHook to allow subclasses to revert runtime changes made inAbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder).- Overrides:
revertUpdateToRuntimein classReloadRequiredWriteAttributeHandler- Parameters:
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 executedresolvedValue- the new value for the attribute that should be revertedhandback- an object, if any, passed in to thehandbackHolderby theapplyUpdateToRuntimeimplementation- Throws:
OperationFailedException
-
INSTANCEinstead.