protected static class FileAuditLogHandlerResourceDefinition.FileAuditLogHandlerAddHandler extends AbstractAddStepHandler
AbstractAddStepHandler.Parameters| Modifier and Type | Field and Description |
|---|---|
protected ManagedAuditLogger |
auditLogger |
protected PathManagerService |
pathManager |
attributes| Modifier | Constructor and Description |
|---|---|
protected |
FileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger,
PathManagerService pathManager,
AttributeDefinition[] attributes) |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractFileAuditLogHandler |
createHandler(PathManagerService pathManager,
OperationContext context,
org.jboss.dmr.ModelNode operation) |
protected void |
performRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
org.jboss.dmr.ModelNode model)
Make any runtime changes necessary to effect the changes indicated by the given
operation. |
protected void |
populateModel(OperationContext context,
org.jboss.dmr.ModelNode operation,
Resource resource)
Populate the given resource in the persistent configuration model based on the values in the given operation.
|
protected boolean |
requiresRuntime(OperationContext context)
Gets whether a
OperationContext.Stage.RUNTIME step should be added to call
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}. |
protected void |
rollbackRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
Resource resource)
Rollback runtime changes made in
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource). |
createResource, createResource, execute, performRuntime, performRuntime, populateModel, populateModel, recordCapabilitiesAndRequirements, requiresRuntimeVerification, rollbackRuntimeprotected final ManagedAuditLogger auditLogger
protected final PathManagerService pathManager
protected FileAuditLogHandlerAddHandler(ManagedAuditLogger auditLogger, PathManagerService pathManager, AttributeDefinition[] attributes)
protected void populateModel(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource) throws OperationFailedException
AbstractAddStepHandlerOperationContext.Stage.MODEL.
This default implementation simply calls AbstractAddStepHandler.populateModel(ModelNode, org.jboss.as.controller.registry.Resource).
populateModel in class AbstractAddStepHandlercontext - the operation contextoperation - the operationresource - the resource that corresponds to the address of operationOperationFailedException - if operation is invalid or populating the model otherwise failsprotected boolean requiresRuntime(OperationContext context)
AbstractAddStepHandlerOperationContext.Stage.RUNTIME step should be added to call
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}.
This default implementation will return true for a normal server running in normal (non admin-only) mode.
If running on a host controller, it will return true if it is the active copy of the host controller subsystem.
Subclasses that perform no runtime update could override and return false. This method is
invoked during OperationContext.Stage.MODEL.requiresRuntime in class AbstractAddStepHandlercontext - operation contexttrue if performRuntime should be invoked; false otherwise.protected AbstractFileAuditLogHandler createHandler(PathManagerService pathManager, OperationContext context, org.jboss.dmr.ModelNode operation) throws OperationFailedException
OperationFailedExceptionprotected void performRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, org.jboss.dmr.ModelNode model) throws OperationFailedException
AbstractAddStepHandleroperation. Executes
after AbstractAddStepHandler.populateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode), so the given resource
parameter will reflect any changes made in that method. This method is
invoked during OperationContext.Stage.RUNTIME. Subclasses that wish to make
changes to runtime services should override this method or the
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource) variant.
To provide compatible behavior with previous releases, this default implementation calls the deprecated
AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)
method. It then does nothing with the objects referenced by the verificationHandler and
controllers parameters passed to that method. Subclasses that overrode that method are encouraged to
instead override this one or the AbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)
variant. Subclasses that override this method should not callsuper.performRuntime(...).
performRuntime in class AbstractAddStepHandlercontext - the operation contextoperation - the operation being executedmodel - persistent configuration model from the resource that corresponds to the address of operationOperationFailedException - if operation is invalid or updating the runtime otherwise failsprotected void rollbackRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, Resource resource)
AbstractAddStepHandlerAbstractAddStepHandler.performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource).
Any services that were added in OperationContext.Stage.RUNTIME will be automatically removed after this
method executes. Called from the OperationContext.ResultHandler or
OperationContext.RollbackHandler passed to OperationContext.completeStep(...).
To provide compatible behavior with previous releases, this default implementation calls the deprecated
AbstractAddStepHandler.rollbackRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, java.util.List)
variant, passing in an empty list for the controllers parameter. Subclasses that overrode that method are
encouraged to instead override this one. Subclasses that override this method should not call
super.rollbackRuntime(...).
rollbackRuntime in class AbstractAddStepHandlercontext - the operation contextoperation - the operation being executedresource - persistent configuration model node that corresponds to the address of operationCopyright © 2021 JBoss by Red Hat. All rights reserved.