Examples of RepoManagerLocal


Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        int repoId = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
        int[] resourceIds = getIntegerArray(selected);

        if ((resourceIds != null) && (resourceIds.length > 0)) {
            try {
                RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();

                // TODO: we should have a SLSB method that takes a list of resources
                for (int resourceId : resourceIds) {
                    manager.unsubscribeResourceFromRepos(subject, resourceId, new int[] { repoId });
                }

                FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Unsubscribed [" + resourceIds.length
                    + "] resources from repository");
            } catch (Exception e) {
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        }

        public PageList<Resource> fetchDataForPage(PageControl pc) {
            Subject subject = EnterpriseFacesContextUtility.getSubject();
            int id = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
            RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();

            PageList<Resource> results = manager.findSubscribedResources(subject, id, pc);
            return results;
        }
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        String[] selected = getSelectedRepos();
        List<Integer> repoIds = new ArrayList<Integer>(selected.length);
        for (String sRepoId : selected) {
            repoIds.add(Integer.valueOf(sRepoId));
        }
        RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
        try {
            repoManager.importCandidateRepo(subject, repoIds);
        } catch (RepoException e) {
            FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
                "Failed to import one or more Repositories from " + getProviderName(), e);
            return "failed";
        }
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        int resourceId = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
        int[] repoIds = getIntegerArray(selected);

        if ((repoIds != null) && (repoIds.length > 0)) {
            try {
                RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();
                // TODO: mazz - this shouldn't required Permission.MANAGE_INVENTORY
                manager.subscribeResourceToRepos(subject, resourceId, repoIds);

                FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Subscribed [" + repoIds.length
                    + "] repositories to resource");
            } catch (Exception e) {
                FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        @Override
        @SuppressWarnings("unchecked")
        public PageList<RepoComposite> fetchPage(PageControl pc) {
            Subject subject = EnterpriseFacesContextUtility.getSubject();
            int id = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
            RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();

            PageList<RepoComposite> results = manager.findAvailableResourceSubscriptions(subject, id, pc);
            return results;
        }
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

    }

    public SelectItem[] getSubscribedRepos() {
        Resource resource = EnterpriseFacesContextUtility.getResource();

        RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
        List<RepoComposite> repos = repoManager.findResourceSubscriptions(resource.getId());

        SelectItem[] items = new SelectItem[repos.size()];
        int itemCounter = 0;
        for (RepoComposite repoComposite : repos) {
            Repo repo = repoComposite.getRepo();
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

    }

    public SelectItem[] getUnsubscribedRepos() {
        Resource resource = EnterpriseFacesContextUtility.getResource();

        RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
        List<RepoComposite> repos = repoManager.findAvailableResourceSubscriptions(resource.getId());

        SelectItem[] items = new SelectItem[repos.size()];
        int itemCounter = 0;
        for (RepoComposite repoComposite : repos) {
            Repo repo = repoComposite.getRepo();
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

            repoId = subscribedRepoId;
        } else if (repoOption.equals(REPO_OPTION_UNSUBSCRIBED)) {
            repoId = unsubscribedRepoId;
            int iRepoId = Integer.parseInt(repoId);

            RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();
            repoManager.subscribeResourceToRepos(subject, resourceId, new int[] { iRepoId });

            // Change the subscribedRepoId so if we fall back to the page with a different error,
            // the drop down for selecting an existing subscribed repo will be populated with this
            // new repo
            subscribedRepoId = repoId;
        } else if (repoOption.equals(REPO_OPTION_NEW)) {
            RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal();

            Repo newRepo = new Repo(newRepoName);
            newRepo.setCandidate(false);
            newRepo = repoManager.createRepo(subject, newRepo);

            repoId = Integer.toString(newRepo.getId());

            repoManager.subscribeResourceToRepos(subject, resourceId, new int[] { newRepo.getId() });

            // Change the subscribedRepoId so if we fall back to the page with a different error,
            // the drop down for selecting an existing subscribed repo will be populated with this
            // new repo
            subscribedRepoId = repoId;
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        int resourceId = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
        int[] repoIds = getIntegerArray(selected);

        if ((repoIds != null) && (repoIds.length > 0)) {
            try {
                RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();
                // TODO: mazz - this shouldn't required Permission.MANAGE_INVENTORY
                manager.unsubscribeResourceFromRepos(subject, resourceId, repoIds);

                FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Unsubscribed [" + repoIds.length
                    + "] repositories from resource");
            } catch (Exception e) {
                FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
View Full Code Here

Examples of org.rhq.enterprise.server.content.RepoManagerLocal

        @Override
        @SuppressWarnings("unchecked")
        public PageList<RepoComposite> fetchPage(PageControl pc) {
            Subject subject = EnterpriseFacesContextUtility.getSubject();
            int id = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("id"));
            RepoManagerLocal manager = LookupUtil.getRepoManagerLocal();

            PageList<RepoComposite> results = manager.findResourceSubscriptions(subject, id, pc);
            return results;
        }
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.