Class AbstractModelUpdateHandler

    • Constructor Detail

      • AbstractModelUpdateHandler

        public AbstractModelUpdateHandler()
    • Method Detail

      • updateModel

        protected void updateModel​(org.jboss.dmr.ModelNode operation,
                                   Resource resource)
                            throws OperationFailedException
        Update the given resource in the persistent configuration model based on the values in the given operation.
        Parameters:
        operation - the operation
        resource - the resource that corresponds to the address of operation
        Throws:
        OperationFailedException - if operation is invalid or populating the model otherwise fails
      • updateModel

        protected abstract void updateModel​(org.jboss.dmr.ModelNode operation,
                                            org.jboss.dmr.ModelNode model)
                                     throws OperationFailedException
        Update the given node in the persistent configuration model based on the values in the given operation.
        Parameters:
        operation - the operation
        model - persistent configuration model node that corresponds to the address of operation
        Throws:
        OperationFailedException - if operation is invalid or populating the model otherwise fails
      • performRuntime

        protected void performRuntime​(OperationContext context,
                                      org.jboss.dmr.ModelNode operation,
                                      Resource resource)
                               throws OperationFailedException
        Make any runtime changes necessary to effect the changes indicated by the given operation. Executes after updateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode), so the given model parameter will reflect any changes made in that method.

        This default implementation does nothing.

        Parameters:
        context - the operation context
        operation - the operation being executed
        resource - the resource that corresponds to the address of operation
        Throws:
        OperationFailedException - if operation is invalid or updating the runtime otherwise fails
      • rollbackRuntime

        protected void rollbackRuntime​(OperationContext context,
                                       org.jboss.dmr.ModelNode operation,
                                       Resource resource)
        Rollback runtime changes made in performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource).

        This default implementation removes all services in the given list of controllers. The contents of controllers is the same as what was in the newControllers parameter passed to performRuntime() when that method returned.

        Parameters:
        context - the operation context
        operation - the operation being executed
        resource - the resource that corresponds to the address of operation