Examples of writeModel()


Examples of org.jboss.as.controller.registry.Resource.writeModel()

        }
        ModelNode model = new ModelNode();
        contentAttribute.validateAndSet(operation, model);

        // IMPORTANT: Use writeModel, as this is what causes the content to be flushed to the content repo!
        resource.writeModel(model);

        context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
    }

    @Override
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

    public Resource createResource(final PathAddress element, Resource copy) {
        final PathAddress absoluteAddress = this.current.append(element);
        final PathAddress readAddress = this.read.append(element);
        final Resource resource = Resource.Factory.create();
        resource.writeModel(copy.getModel());
        addTransformedRecursiveResourceFromRoot(absoluteAddress, readAddress, resource);
        return resource;
    }

    @Override
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

    public ResourceTransformationContext addTransformedResourceFromRoot(PathAddress absoluteAddress, PathAddress read, Resource toAdd) {
        // Only keep the mode, drop all children
        final Resource copy = Resource.Factory.create();
        if (toAdd != null) {
            copy.writeModel(toAdd.getModel());
        }
        return addTransformedRecursiveResourceFromRoot(absoluteAddress, read, copy);
    }

    @Override
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

                    }
                }
            }
        } else {
            //If this was the root address, replace the resource model
            model.writeModel(toAdd.getModel());
        }
        return new ResourceTransformationContextImpl(root, absoluteAddress, read, originalModel);
    }

    @Override
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

                if (model.hasDefined(name)) {
                    value.get(name).set(model.get(name));
                }
            }
        }
        res.writeModel(value);

        for (PathElement path : reg.getChildAddresses(PathAddress.EMPTY_ADDRESS)) {

            ImmutableManagementResourceRegistration sub = reg.getSubModel(PathAddress.pathAddress(path));
            if (path.isWildcard()) {
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

                        }
                    } catch (ModuleLoadException e) {
                        throw new RuntimeException(e);
                    }
                }
                resource.writeModel(resourceDescription.get("domain-resource-model"));
            }
        }
        context.completeStep();
    }
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

        }
        if(recursive) {
            return model.clone();
        } else {
            final Resource copy = Resource.Factory.create();
            copy.writeModel(model.getModel());
            for(final String childType : model.getChildTypes()) {
                for(final Resource.ResourceEntry child : model.getChildren(childType)) {
                    copy.registerChild(child.getPathElement(), PlaceholderResource.INSTANCE);
                }
            }
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

            allFields.remove(name);
        }
        if (!value.isDefined() && model.isDefined() && reg.getChildAddresses(PathAddress.EMPTY_ADDRESS).size() == 0) {
            value.setEmptyObject();
        }
        res.writeModel(value);

        for (PathElement path : reg.getChildAddresses(PathAddress.EMPTY_ADDRESS)) {

            ImmutableManagementResourceRegistration sub = reg.getSubModel(PathAddress.pathAddress(path));
            if (path.isWildcard()) {
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

                if (!appliedExensions.contains(module)) {
                    appliedExensions.add(module);
                    initializeExtension(module);
                }
            }
            resource.writeModel(resourceDescription.get("domain-resource-model"));

            // Track deployment and management content hashes and server group deployments so we can pull over the content we need
            if (resourceAddress.size() == 1) {
                PathElement pe = resourceAddress.getElement(0);
                String peKey = pe.getKey();
View Full Code Here

Examples of org.jboss.as.controller.registry.Resource.writeModel()

                if (!appliedExensions.contains(module)) {
                    appliedExensions.add(module);
                    initializeExtension(module);
                }
            }
            resource.writeModel(resourceDescription.get("domain-resource-model"));

            // Track deployment hashes and server group deployments so we can pull over the content we need
            if (resourceAddress.size() == 1
                    && resourceAddress.getElement(0).getKey().equals(DEPLOYMENT)) {
                ModelNode model = resource.getModel();
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.