Package org.rhq.core.domain.content

Examples of org.rhq.core.domain.content.ResourceRepo


    public ResourceRepo addRepo(Repo repo) {
        if (this.resourceRepos == null) {
            this.resourceRepos = new HashSet<ResourceRepo>(1);
        }

        ResourceRepo mapping = new ResourceRepo(this, repo);
        this.resourceRepos.add(mapping);
        repo.addResource(this);
        return mapping;
    }
View Full Code Here


    public ResourceRepo removeRepo(Repo repo) {
        if ((this.resourceRepos == null) || (repo == null)) {
            return null;
        }

        ResourceRepo doomed = null;

        for (ResourceRepo rc : this.resourceRepos) {
            if (repo.equals(rc.getResourceRepoPK().getRepo())) {
                doomed = rc;
                repo.removeResource(this);
View Full Code Here

                throw new PermissionException("User [" + subject + "] cannot access a repo with id " + repo.getId());
            }
        }
       
        for (Repo repo : repos) {
            ResourceRepo mapping = repo.addResource(resource);
            entityManager.persist(mapping);
        }
    }
View Full Code Here

        if (repos.size() != repoIds.length) {
            throw new RuntimeException("One or more of the repos do not exist [" + idList + "]->[" + repos + "]");
        }

        for (Repo repo : repos) {
            ResourceRepo mapping = repo.removeResource(resource);
            entityManager.remove(mapping);
        }
    }
View Full Code Here

            // add repo and subscribe resource to it; test metadata query
            Repo repo = new Repo("testPVCSRepo");
            em.persist(repo);
            RepoContentSource ccsmapping = repo.addContentSource(cs);
            em.persist(ccsmapping);
            ResourceRepo subscription = repo.addResource(resource);
            em.persist(subscription);
            RepoPackageVersion mapping = repo.addPackageVersion(pv);
            em.persist(mapping);
            em.flush();
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.content.ResourceRepo

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.