Package org.jboss.as.controller.transform

Examples of org.jboss.as.controller.transform.OperationRejectionPolicy


    public OperationTransformer.TransformedOperation transformOperation(final TransformationContext ctx, final PathAddress address, final ModelNode operation) throws OperationFailedException {
        // See whether the operation should be rejected or not
        switch (discardPolicy) {
            case REJECT_AND_WARN:
                // Just execute the original operation to see that it failed
                return new TransformedOperation(operation, new OperationRejectionPolicy() {
                    @Override
                    public boolean rejectOperation(ModelNode preparedResult) {
                        return true;
                    }
View Full Code Here


        final ModelNode transformed = operation.clone();
        final RejectedAttributesLogContext rejectedAttributes = new RejectedAttributesLogContext(context, address, operation);

        doTransform(address, transformed, operation, context, rejectedAttributes);

        final OperationRejectionPolicy policy;
        if (!rejectedAttributes.hasRejections()) {
            policy = OperationTransformer.DEFAULT_REJECTION_POLICY;
        } else {
            policy = new OperationRejectionPolicy() {
                @Override
                public boolean rejectOperation(ModelNode preparedResult) {
                    return true;
                }
View Full Code Here

            context.setImmutableResource(true);
            try {
                //Check the rest of the model can be transformed
                final RejectedAttributesLogContext rejectedAttributes = new RejectedAttributesLogContext(context, address, TransformationRule.cloneAndProtect(operation));
                description.rejectAttributes(rejectedAttributes, attributeValue);
                final OperationRejectionPolicy policy;
                if(rejectedAttributes.hasRejections()) {

                    policy = new OperationRejectionPolicy() {
                        @Override
                        public boolean rejectOperation(ModelNode preparedResult) {
                            return true;
                        }
View Full Code Here

        @Override
        public TransformedOperation transformOperation(final TransformationContext context, final PathAddress address, final ModelNode operation) throws OperationFailedException {
            Resource original = context.readResourceFromRoot(address);
            if (original.getChildren(EJB3SubsystemModel.FILE_DATA_STORE).size() > 1){
                return new TransformedOperation(operation,new OperationRejectionPolicy() {
                    @Override
                    public boolean rejectOperation(ModelNode preparedResult) {
                        return true;
                    }
View Full Code Here

    /**
     * Reject an operation if applied successfully.
     *
     */
    private OperationRejectionPolicy rejectOperation(final String failureMessage) {
        return new OperationRejectionPolicy() {
            @Override
            public boolean rejectOperation(ModelNode preparedResult) {
                return true;
            }

View Full Code Here

TOP

Related Classes of org.jboss.as.controller.transform.OperationRejectionPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.