Package org.jboss.dmr

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


        node = operation.get(IDENTITY_TRUST);
        if (node.isDefined()) {
            if (applicationPolicy == null)
                applicationPolicy = new ApplicationPolicy(securityDomain);
            IdentityTrustInfo identityTrustInfo = new IdentityTrustInfo(securityDomain);
            modules = node.asList();
            for (ModelNode module : modules) {
                String codeName = module.require(CODE).asString();
                ControlFlag controlFlag = ControlFlag.valueOf(module.require(FLAG).asString());
                Map<String, Object> options = new HashMap<String, Object>();
                if (module.hasDefined(MODULE_OPTIONS)) {
View Full Code Here


        // mapping
        node = operation.get(MAPPING);
        if (node.isDefined()) {
            if (applicationPolicy == null)
                applicationPolicy = new ApplicationPolicy(securityDomain);
            modules = node.asList();
            String mappingType = null;
            for (ModelNode module : modules) {
                MappingInfo mappingInfo = new MappingInfo(securityDomain);
                String codeName = module.require(CODE).asString();
                if (ModulesMap.MAPPING_MAP.containsKey(codeName))
View Full Code Here

            if (applicationPolicy == null)
                applicationPolicy = new ApplicationPolicy(securityDomain);
            JASPIAuthenticationInfo authenticationInfo = new JASPIAuthenticationInfo(securityDomain);
            Map<String, LoginModuleStackHolder> holders = new HashMap<String, LoginModuleStackHolder>();
            ModelNode moduleStack = node.get(LOGIN_MODULE_STACK);
            modules = moduleStack.asList();
            for (ModelNode loginModuleStack : modules) {
                List<ModelNode> nodes = loginModuleStack.asList();
                Iterator<ModelNode> iter = nodes.iterator();
                ModelNode nameNode = iter.next();
                String name = nameNode.get(NAME).asString();
View Full Code Here

                LoginModuleStackHolder holder = new LoginModuleStackHolder(name, null);
                holders.put(name, holder);
                authenticationInfo.add(holder);
                while (iter.hasNext()) {
                    ModelNode lmsNode = iter.next();
                    List<ModelNode> lms = lmsNode.asList();
                    for (ModelNode lmNode : lms) {
                        String code = lmNode.require(CODE).asString();
                        LoginModuleControlFlag controlFlag = getControlFlag(lmNode.require(FLAG).asString());
                        Map<String, Object> options = new HashMap<String, Object>();
                        if (lmNode.hasDefined(MODULE_OPTIONS)) {
View Full Code Here

                        holder.addAppConfigurationEntry(entry);
                    }
                }
            }
            ModelNode authModuleNode = node.get(AUTH_MODULE);
            List<ModelNode> authModules = authModuleNode.asList();
            for (ModelNode authModule : authModules) {
                String code = authModule.require(CODE).asString();
                String loginStackRef = null;
                if (authModule.hasDefined(LOGIN_MODULE_STACK_REF))
                    loginStackRef = authModule.get(LOGIN_MODULE_STACK_REF).asString();
View Full Code Here

        op = getOperation("get-thread-infos", "threading", null);
        op.get("ids").add(mainThreadId);
        result = executeOp(op, false);
        Assert.assertEquals(ModelType.LIST, result.getType());
        List<ModelNode> threads = result.asList();
        Assert.assertEquals(1, threads.size());
        ModelNode thread = threads.get(0);
        Assert.assertEquals("main", thread.get("thread-name").asString());
        Assert.assertEquals(mainThreadId, thread.get("thread-id").asLong());
        list = thread.get("stack-trace").asList();
View Full Code Here

                Iterator<ModelNode> iter = nodes.iterator();
                ModelNode nameNode = iter.next();
                writeAttribute(writer, Attribute.NAME, nameNode.require(NAME));
                while (iter.hasNext()) {
                    ModelNode loginModuleNode = iter.next();
                    List<ModelNode> lms = loginModuleNode.asList();
                    for (ModelNode loginModule : lms) {
                        writer.writeStartElement(Element.LOGIN_MODULE.getLocalName());
                        writeCommonModule(writer, loginModule);
                    }
                }
View Full Code Here

        final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);

        final ModelNode globalMods = this.globalModules;

        if (globalMods.isDefined()) {
            for (final ModelNode module : globalMods.asList()) {
                final String name = module.get(GlobalModulesDefinition.NAME).asString();
                String slot = module.hasDefined(GlobalModulesDefinition.SLOT) ? module.get(GlobalModulesDefinition.SLOT).asString() : GlobalModulesDefinition.DEFAULT_SLOT;
                final ModuleIdentifier identifier = ModuleIdentifier.create(name, slot);
                moduleSpecification.addSystemDependency(new ModuleDependency(Module.getBootModuleLoader(), identifier, false, false, true, false));
            }
View Full Code Here

        Assert.assertEquals(ControllerInitializer.INTERFACE_NAME, group.require(DEFAULT_INTERFACE).asString());
        Assert.assertEquals(ControllerInitializer.SOCKET_BINDING_GROUP_NAME, group.require(NAME).asString());
        Assert.assertEquals(0, group.require(PORT_OFFSET).asInt());

        ModelNode bindings = group.require(SOCKET_BINDING);
        Assert.assertEquals(3, bindings.asList().size());
        Assert.assertEquals(123, group.require(SOCKET_BINDING).require("test1").require(PORT).asInt());
        Assert.assertEquals(234, group.require(SOCKET_BINDING).require("test2").require(PORT).asInt());
        Assert.assertEquals(345, group.require(SOCKET_BINDING).require("test3").require(PORT).asInt());

        ServiceController<?> controller = services.getContainer().getService(SocketBindingUserService.NAME);
View Full Code Here

        //Read the whole model and make sure it looks as expected
        ModelNode model = services.readWholeModel();
        Assert.assertTrue(model.get(SUBSYSTEM).hasDefined(OtherServicesSubsystemExtension.SUBSYSTEM_NAME));

        ModelNode path = model.require(PATH);
        Assert.assertEquals(2, path.asList().size());
        Assert.assertEquals("p1", path.require("p1").require("name").asString());
        Assert.assertEquals(new File(".").getAbsolutePath(), path.require("p1").require("path").asString());
        Assert.assertFalse(path.get("p1", "relative-to").isDefined());
        Assert.assertEquals("p2", path.require("p2").require("name").asString());
        Assert.assertEquals("target", path.require("p2").require("path").asString());
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.