Package org.rhq.core.domain.content

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


        em.persist(package1);
        em.flush();
        //AdvisoryPackage ap = new AdvisoryPackage(advobject, package1);
        //em.persist(ap);

        AdvisoryPackage ap = advManager.createAdvisoryPackage(overlord, advobject, package1.getVersions().get(0));

        PageList<AdvisoryPackage> pkglist = advManager.findPackageByAdvisory(overlord, id1, PageControl
            .getUnlimitedInstance());
        assert pkglist != null;
        assert pkglist.size() != 0;
View Full Code Here


    @RequiredPermission(Permission.MANAGE_INVENTORY)
    public AdvisoryPackage createAdvisoryPackage(Subject user, Advisory advisory, PackageVersion pkg)
        throws AdvisoryException {
        log.debug("User [" + user + "] is creating AdvisoryPackage [" + advisory + "]");
        AdvisoryPackage advpkg = new AdvisoryPackage(advisory, pkg);

        entityManager.persist(advpkg);
        return advpkg;
    }
View Full Code Here

        Query query = entityManager.createNamedQuery(AdvisoryPackage.FIND_ADVISORY_PACKAGE);
        log.error("Advisory ID: " + advId + " PackageVerId: " + pkgVerId);
        query.setParameter("advId", advId);
        query.setParameter("pkgVerId", pkgVerId);
        try {
            AdvisoryPackage result = (AdvisoryPackage) query.getSingleResult();
            return result;
        } catch (NoResultException nre) {
            //Object not found, return null for new creation
            return null;
        }
View Full Code Here

                Query q = entityManager.createNamedQuery(PackageVersion.QUERY_FIND_PACKAGEVERSION_BY_FILENAME);
                for (AdvisoryPackageDetails pkg : pkgs) {
                    try {
                        q.setParameter("rpmName", pkg.getRpmFilename());
                        PackageVersion pExisting = (PackageVersion) q.getSingleResult();
                        AdvisoryPackage apkg = advManager.findAdvisoryPackage(overlord, newAdv.getId(), pExisting
                            .getId());
                        if (apkg == null) {
                            apkg = new AdvisoryPackage(newAdv, pExisting);
                            entityManager.persist(apkg);
                            entityManager.flush();
                        }
                    } catch (NoResultException nre) {
                        log.info("Advisory has package thats not yet in the db [" + pkg.getRpmFilename()
View Full Code Here

TOP

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

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.