Package org.jboss.as.controller.registry

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


    public Resource navigate(PathAddress address) {
        if (address.size() == 0) {
            return this;
        } else {
            Resource child = requireChild(address.getElement(0));
            return address.size() == 1 ? child : child.navigate(address.subAddress(1));
        }
    }

    @Override
    public Set<String> getChildTypes() {
View Full Code Here


    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final ModelNode address = operation.require(VALUE);
        final PathAddress pathAddr = PathAddress.pathAddress(address);
        final Resource resource = context.readResource(PathAddress.EMPTY_ADDRESS);
        try {
            resource.navigate(pathAddr);
            context.getResult().get(VALID).set(true);
        } catch(NoSuchElementException e) {
            context.getResult().get(VALID).set(false);
            context.getResult().get(PROBLEM).set(e.getMessage());
        }
View Full Code Here

            return this;
        }
        PathElement pe = address.getElement(0);
        Resource child = getChild(pe);
        if (child != null) {
            return size == 1 ? child : child.navigate(address.subAddress(1));
        } else {
            throw new NoSuchResourceException(pe);
        }
    }
View Full Code Here

    public Resource navigate(PathAddress address) {
        if (address.size() == 0) {
            return this;
        } else {
            Resource child = requireChild(address.getElement(0));
            return address.size() == 1 ? child : child.navigate(address.subAddress(1));
        }
    }

    @Override
    public Set<Resource.ResourceEntry> getChildren(String childType) {
View Full Code Here

            return this;
        }
        PathElement pe = address.getElement(0);
        Resource child = getChild(pe);
        if (child != null) {
            return size == 1 ? child : child.navigate(address.subAddress(1));
        } else {
            throw new NoSuchResourceException(pe);
        }
    }
View Full Code Here

    public Resource navigate(PathAddress address) {
        if (address.size() == 0) {
            return this;
        } else {
            Resource child = requireChild(address.getElement(0));
            return address.size() == 1 ? child : child.navigate(address.subAddress(1));
        }
    }

    @Override
    public Set<Resource.ResourceEntry> getChildren(String childType) {
View Full Code Here

            return this;
        }
        PathElement pe = address.getElement(0);
        Resource child = getChild(pe);
        if (child != null) {
            return size == 1 ? child : child.navigate(address.subAddress(1));
        } else {
            throw new NoSuchResourceException(pe);
        }
    }
View Full Code Here

        ServiceName cacheServiceName = containerServiceName.append(cacheName);
        ServiceName cacheConfigurationServiceName = CacheConfigurationService.getServiceName(containerName, cacheName);

        // get container Model
        Resource rootResource = context.getRootResource();
        ModelNode container = rootResource.navigate(containerAddress).getModel();

        // get default cache of the container and start mode
        String defaultCache = container.require(ModelKeys.DEFAULT_CACHE).asString();
        StartMode startMode = model.hasDefined(ModelKeys.START) ? StartMode.valueOf(model.get(ModelKeys.START).asString()) : StartMode.LAZY;
View Full Code Here

    public Resource navigate(PathAddress address) {
        if (address.size() == 0) {
            return this;
        } else {
            Resource child = requireChild(address.getElement(0));
            return address.size() == 1 ? child : child.navigate(address.subAddress(1));
        }
    }

    @Override
    public Set<Resource.ResourceEntry> getChildren(String childType) {
View Full Code Here

    public Resource navigate(PathAddress address) {
        if (address.size() == 0)
            return this;

        Resource child = requireChild(address.getElement(0));
        return address.size() == 1 ? child : child.navigate(address.subAddress(1));
    }

    @Override
    public Set<String> getChildrenNames(String childType) {
        if (hasChildren(childType)) {
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.