Package org.rhq.core.domain.content.composite

Examples of org.rhq.core.domain.content.composite.PackageAndLatestVersionComposite


                    Field f = PackageCriteria.class.getDeclaredField("filterName");
                    f.setAccessible(true);
                    String name = (String) f.get(crit);

                    if (CORRECT_PACKAGE_NAME.equals(name)) {
                        PackageAndLatestVersionComposite composite = new PackageAndLatestVersionComposite();

                        composite
                            .setGeneralPackage(new org.rhq.core.domain.content.Package(CORRECT_PACKAGE_NAME, null));

                        PackageVersion pv = new PackageVersion();
                        pv.setId(CORRECT_PACKAGE_VERSION_ID);

                        composite.setLatestPackageVersion(pv);

                        PageList<PackageAndLatestVersionComposite> ret = new PageList<PackageAndLatestVersionComposite>(
                            PageControl.getUnlimitedInstance());
                        ret.add(composite);
                        return ret;
View Full Code Here


        PageList<PackageAndLatestVersionComposite> ret = new PageList<PackageAndLatestVersionComposite>(
            packages.getTotalSize(), packages.getPageControl());

        for (Package p : packages) {
            PackageVersion latest = repoManager.getLatestPackageVersion(subject, p.getId(), criteria.getFilterRepoId());
            ret.add(new PackageAndLatestVersionComposite(p, latest));
        }

        return ret;
    }
View Full Code Here

                CriteriaQuery<PackageAndLatestVersionComposite, PackageCriteria> pvs = new CriteriaQuery<PackageAndLatestVersionComposite, PackageCriteria>(
                    pCrit, pQueryExecutor);

                //                if (!pvs.iterator().hasNext()) {
                if (pvs.iterator().hasNext()) {
                    PackageAndLatestVersionComposite pv = pvs.iterator().next();

                    byte[] bytes = repoManager.getPackageVersionBytes(rhqFacade.getSubject(), repo.getId(), pv
                        .getLatestPackageVersion().getId());

                    return new InputStreamReader(new ByteArrayInputStream(bytes), Charset.forName("UTF-8"));
                }
            }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.content.composite.PackageAndLatestVersionComposite

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.