Examples of toModelNode()


Examples of org.jboss.as.controller.PathAddress.toModelNode()

    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final ModelNode model = context.readModel(PathAddress.EMPTY_ADDRESS);

        PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(OP_ADDR)).getLastElement());
        final ModelNode result = context.getResult();
        result.add(LoggingExtension.NewLoggingSubsystemAdd.createOperation(rootAddress.toModelNode()));
        if (model.hasDefined(ROOT_LOGGER)) {
            ModelNode add = Util.getEmptyOperation(RootLoggerAdd.OPERATION_NAME, rootAddress.toModelNode());
            add.get(LEVEL).set(model.get(ROOT_LOGGER, LEVEL));
            add.get(HANDLERS).set(model.get(ROOT_LOGGER, HANDLERS));
            result.add(add);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

        PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(OP_ADDR)).getLastElement());
        final ModelNode result = context.getResult();
        result.add(LoggingExtension.NewLoggingSubsystemAdd.createOperation(rootAddress.toModelNode()));
        if (model.hasDefined(ROOT_LOGGER)) {
            ModelNode add = Util.getEmptyOperation(RootLoggerAdd.OPERATION_NAME, rootAddress.toModelNode());
            add.get(LEVEL).set(model.get(ROOT_LOGGER, LEVEL));
            add.get(HANDLERS).set(model.get(ROOT_LOGGER, HANDLERS));
            result.add(add);
        }
        if (model.hasDefined(LOGGER)) {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

                                break;
                            }
                            final PathAddress childAddress = address.append(PathElement.pathElement(childName, key));

                            final ModelNode readOp = operation.clone();
                            readOp.get(OP_ADDR).set(childAddress.toModelNode());

                            if(operation.hasDefined(INCLUDE_RUNTIME))
                                readOp.get(INCLUDE_RUNTIME).set(operation.get(INCLUDE_RUNTIME).asBoolean());

                            final ModelNode readResult = readModel(context, readOp, new ResultHandler() {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final ModelNode model = context.readModel(PathAddress.EMPTY_ADDRESS);

        PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(OP_ADDR)).getLastElement());
        final ModelNode result = context.getResult();
        result.add(LoggingExtension.NewLoggingSubsystemAdd.createOperation(rootAddress.toModelNode()));
        if (model.hasDefined(ROOT_LOGGER)) {
            final ModelNode add = Util.getEmptyOperation(RootLoggerAdd.OPERATION_NAME, rootAddress.append(LoggingExtension.rootLoggerPath).toModelNode());
            final ModelNode rootLogger = model.get(ROOT_LOGGER, ROOT_LOGGER_NAME);
            copy(LEVEL, rootLogger, add);
            copy(FILTER, rootLogger, add);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

                        }
                    }
                }

                PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(DEPLOYMENT, name));
                ModelNode addOp = Util.getEmptyOperation(ADD, addr.toModelNode());
                addOp.get(RUNTIME_NAME).set(details.get(RUNTIME_NAME));
                addOp.get(CONTENT).set(deploymentContent);
                addOp.get(ENABLED).set(!details.hasDefined(ENABLED) || details.get(ENABLED).asBoolean());

                updates.add(addOp);
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

        final ModelNode subsystemAdd = new ModelNode();
        final ModelNode subModel = context.getSubModel();
        PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(OP_ADDR)).getLastElement());
        subsystemAdd.get(OP).set(ADD);
        subsystemAdd.get(OP_ADDR).set(rootAddress.toModelNode());
        //
        for(final String attribute : MessagingSubsystemProviders.MESSAGING_ROOT_ATTRIBUTES) {
            if(subModel.hasDefined(attribute)) {
                subsystemAdd.get(attribute).set(subModel.get(attribute));
            }
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

        final ModelNode result = new ModelNode();
        final ModelNode subModel = context.getSubModel();

        final ModelNode subsystemAdd = new ModelNode();
        subsystemAdd.get(OP).set(ADD);
        subsystemAdd.get(OP_ADDR).set(rootAddress.toModelNode());
        result.add(subsystemAdd);

        if(subModel.hasDefined(CommonAttributes.CONNECTION_FACTORY)) {
            for(final Property property : subModel.get(CommonAttributes.CONNECTION_FACTORY).asPropertyList()) {
                final ModelNode address = rootAddress.toModelNode();
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

        subsystemAdd.get(OP_ADDR).set(rootAddress.toModelNode());
        result.add(subsystemAdd);

        if(subModel.hasDefined(CommonAttributes.CONNECTION_FACTORY)) {
            for(final Property property : subModel.get(CommonAttributes.CONNECTION_FACTORY).asPropertyList()) {
                final ModelNode address = rootAddress.toModelNode();
                address.add(CommonAttributes.CONNECTION_FACTORY, property.getName());
                result.add(ConnectionFactoryAdd.getAddOperation(address, property.getValue()));
            }
        }
        if(subModel.hasDefined(CommonAttributes.QUEUE)) {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

                result.add(ConnectionFactoryAdd.getAddOperation(address, property.getValue()));
            }
        }
        if(subModel.hasDefined(CommonAttributes.QUEUE)) {
            for(final Property property : subModel.get(CommonAttributes.QUEUE).asPropertyList()) {
                final ModelNode address = rootAddress.toModelNode();
                address.add(CommonAttributes.QUEUE, property.getName());
                result.add(JMSQueueAdd.getOperation(address, property.getValue()));
            }
        }
        if(subModel.hasDefined(CommonAttributes.TOPIC)) {
View Full Code Here

Examples of org.jboss.as.controller.PathAddress.toModelNode()

                result.add(JMSQueueAdd.getOperation(address, property.getValue()));
            }
        }
        if(subModel.hasDefined(CommonAttributes.TOPIC)) {
            for(final Property property : subModel.get(CommonAttributes.TOPIC).asPropertyList()) {
                final ModelNode address = rootAddress.toModelNode();
                address.add(CommonAttributes.TOPIC, property.getName());
                result.add(JMSTopicAdd.getOperation(address, property.getValue()));
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.