Examples of protect()


Examples of org.jboss.dmr.ModelNode.protect()

            if (ras != null && ras.getResourceAdapters() != null) {
                for (ResourceAdapter ra : ras.getResourceAdapters()) {
                    final ModelNode raAddress = address.clone();
                    raAddress.add(RESOURCEADAPTER, ra.getArchive());
                    raAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(raAddress);
                    operation.get(OP).set(ADD);
                    if (ra.getConfigProperties() != null) {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        @Override
        public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> list) throws XMLStreamException {

            final ModelNode address = new ModelNode();
            address.add(org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM, JCA);
            address.protect();

            final ModelNode subsystem = new ModelNode();
            subsystem.get(OP).set(ADD);
            subsystem.get(OP_ADDR).set(address);
            list.add(subsystem);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        static final ResourceAdaptersSubsystemDescribeHandler INSTANCE = new ResourceAdaptersSubsystemDescribeHandler();

        public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
            final ModelNode address = new ModelNode();
            address.add(ModelDescriptionConstants.SUBSYSTEM, RESOURCEADAPTERS);
            address.protect();

            final ModelNode add = new ModelNode();
            add.get(OP).set(ADD);
            add.get(OP_ADDR).set(address);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

    @Override
    public void readElement(XMLExtendedStreamReader reader, List<ModelNode> operations) throws XMLStreamException {

        ModelNode address = new ModelNode();
        address.add(ModelDescriptionConstants.SUBSYSTEM, JGroupsExtension.SUBSYSTEM_NAME);
        address.protect();

        ModelNode subsystem = Util.getEmptyOperation(ModelDescriptionConstants.ADD, address);

        for (int i = 0; i < reader.getAttributeCount(); i++) {
            ParseUtils.requireNoNamespaceAttribute(reader, i);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        @Override
        public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> list) throws XMLStreamException {

            final ModelNode address = new ModelNode();
            address.add(ModelDescriptionConstants.SUBSYSTEM, DATASOURCES);
            address.protect();

            final ModelNode subsystem = new ModelNode();
            subsystem.get(OP).set(ADD);
            subsystem.get(OP_ADDR).set(address);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

            if (dataSources != null) {
                for (DataSource dataSource : dataSources.getDataSource()) {
                    final ModelNode dsAddress = address.clone();
                    dsAddress.add(DATA_SOURCE, dataSource.getJndiName());
                    dsAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(dsAddress);
                    operation.get(OP).set(ADD);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

                }

                for (XaDataSource xaDataSource : dataSources.getXaDataSource()) {
                    final ModelNode dsAddress = address.clone();
                    dsAddress.add(XA_DATA_SOURCE, xaDataSource.getJndiName());
                    dsAddress.protect();

                    final ModelNode operation = new ModelNode();
                    operation.get(OP_ADDR).set(dsAddress);
                    operation.get(OP).set(ADD);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

                }

                for (Driver driver : dataSources.getDrivers()) {
                    final ModelNode driverAddress = address.clone();
                    driverAddress.add(JDBC_DRIVER, driver.getName());
                    driverAddress.protect();
                    final ModelNode op = Util.getEmptyOperation(ADD, driverAddress);

                    op.get(DRIVER_NAME).set(driver.getName());
                    op.get(DRIVER_MODULE_NAME).set(driver.getModule());
                    if (driver.getMajorVersion() != null)
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        Assert.assertEquals(SimpleType.STRING, converter.getOpenType());

        ModelNode node = new ModelNode();
        node.get("abc").set(BigInteger.valueOf(10));
        node.get("def").set(false);
        node.protect();

        String json = assertCast(String.class, converter.fromModelNode(node));
        Assert.assertEquals(node, ModelNode.fromJSONString(json));
        Assert.assertEquals(json, assertCast(String.class, converter.fromModelNode(node)));
        assertToArray(converter, json);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

    public void testUndefineSocketBindingPortOffset() throws IOException {
        final DomainClient masterClient = domainMasterLifecycleUtil.getDomainClient();

        final ModelNode address = new ModelNode();
        address.add("server-group", "other-server-group");
        address.protect();
        {
            final ModelNode operation = new ModelNode();
            operation.get(OP).set(READ_ATTRIBUTE_OPERATION);
            operation.get(OP_ADDR).set(address);
            operation.get(NAME).set("socket-binding-port-offset");
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.