Package org.rhq.enterprise.server.resource

Examples of org.rhq.enterprise.server.resource.ResourceNotFoundException


    // local only
    @Override
    public void setResourceConfiguration(int resourceId, Configuration configuration) {
        Resource resource = entityManager.find(Resource.class, resourceId);
        if (resource == null) {
            throw new ResourceNotFoundException("Resource [" + resourceId + "] does not exist.");
        }
        resource.setResourceConfiguration(configuration);
        entityManager.merge(resource);
    }
View Full Code Here


            if (storageNode == null) { // no storage node with the specified id
                throw new IllegalStateException("There is no storage node with id [" + storageNodeId
                    + "] stored in the database.");
            }
            if (storageNode.getResource() == null) { // no associated resource
                throw new ResourceNotFoundException("This storage node [" + storageNode.getId()
                    + "] has no associated resource.");
            }
        }
        resourceId = storageNode.getResource().getId();
        return resourceId;
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.resource.ResourceNotFoundException

Copyright © 2018 www.massapicom. 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.