/** * Hook to allow subclasses to do any final {@link OperationContext.Stage#MODEL} processing following the * application of the new attribute value. This default implementation calls * {@link #validateUpdatedModel(OperationContext, Resource)}. * <p> * <strong>NOTE:</strong> Implementations must not call * {@link OperationContext#completeStep(OperationContext.ResultHandler)} or any of its variants. The method that * calls this one handles step completion. * </p> * * * @param context the operation context * @param operation the operation * @param attributeName the name of the attribute being modified * @param newValue the new value for the attribute * @param oldValue the previous value for the attribute * @param model the updated model resource * @throws OperationFailedException */ protected void finishModelStage(final OperationContext context, final ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, final Resource model) throws OperationFailedException { validateUpdatedModel(context, model); }
/** * Hook to allow subclasses to do any final {@link OperationContext.Stage#MODEL} processing following the * application of the new attribute value. This default implementation calls * {@link #validateUpdatedModel(OperationContext, Resource)}. * <p> * <strong>NOTE:</strong> Implementations must not call * {@link OperationContext#completeStep(OperationContext.ResultHandler)} or any of its variants. The method that * calls this one handles step completion. * </p> * * * @param context the operation context * @param operation the operation * @param attributeName the name of the attribute being modified * @param newValue the new value for the attribute * @param oldValue the previous value for the attribute * @param model the updated model resource * @throws OperationFailedException */ protected void finishModelStage(final OperationContext context, final ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, final Resource model) throws OperationFailedException { validateUpdatedModel(context, model); }
/** * Hook to allow subclasses to do any final {@link OperationContext.Stage#MODEL} processing following the * application of the new attribute value. This default implementation calls * {@link #validateUpdatedModel(OperationContext, Resource)}. * <p> * <strong>NOTE:</strong> Implementations must not call * {@link OperationContext#completeStep(OperationContext.ResultHandler)} or any of its variants. The method that * calls this one handles step completion. * </p> * * * @param context the operation context * @param operation the operation * @param attributeName the name of the attribute being modified * @param newValue the new value for the attribute * @param oldValue the previous value for the attribute * @param model the updated model resource * @throws OperationFailedException */ protected void finishModelStage(final OperationContext context, final ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, final Resource model) throws OperationFailedException { validateUpdatedModel(context, model); }
/** * Hook to allow subclasses to do any final {@link OperationContext.Stage#MODEL} processing following the * application of the new attribute value. This default implementation calls * {@link #validateUpdatedModel(OperationContext, Resource)}. * <p> * <strong>NOTE:</strong> Implementations must not call * {@link OperationContext#completeStep(OperationContext.ResultHandler)} or any of its variants. The method that * calls this one handles step completion. * </p> * * * @param context the operation context * @param operation the operation * @param attributeName the name of the attribute being modified * @param newValue the new value for the attribute * @param oldValue the previous value for the attribute * @param model the updated model resource * @throws OperationFailedException */ protected void finishModelStage(final OperationContext context, final ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, final Resource model) throws OperationFailedException { validateUpdatedModel(context, model); }
@Override protected void validateUpdatedModel(final OperationContext context, final Resource model) throws OperationFailedException { super.validateUpdatedModel(context, model); final ModelNode submodel = model.getModel(); if (submodel.hasDefined(CommonAttributes.FILTER.getName())) { final String filterSpec = Filters.filterToFilterSpec(CommonAttributes.FILTER.resolveModelAttribute(context, submodel)); submodel.remove(CommonAttributes.FILTER.getName()); submodel.get(CommonAttributes.FILTER_SPEC.getName()).set(filterSpec); } }