public boolean getOnlyRemote() { return SharedPackageListingsSettings.instance().get("remote").isOnlyRemote(); }
public ListingFilterSetting get(String listName) { if (!settings.containsKey(listName)) { settings.put(listName, new ListingFilterSetting()); } return settings.get(listName); }
public void setOnlyRemote(boolean onlyRemote) { SharedPackageListingsSettings.instance().get("remote").setOnlyRemote(onlyRemote); }
PackageManager pm = Framework.getLocalService(PackageManager.class); if (pkgType == null) { pkgType = SharedPackageListingsSettings.instance().get("remote").getPackageTypeFilter(); filterOnPlatform = SharedPackageListingsSettings.instance().get("remote").getPlatformFilter(); onlyRemote = SharedPackageListingsSettings.instance().get("remote").isOnlyRemote();
@GET @Produces("text/html") @Path(value = "updates") public Object getUpdates(@QueryParam("type") String pkgType, @QueryParam("filterOnPlatform") Boolean filterOnPlatform) { PackageManager pm = Framework.getLocalService(PackageManager.class); if (pkgType == null) { pkgType = SharedPackageListingsSettings.instance().get("updates").getPackageTypeFilter(); } if (filterOnPlatform == null) { filterOnPlatform = SharedPackageListingsSettings.instance().get("updates").getPlatformFilter(); } String targetPlatform = getTargetPlatform(filterOnPlatform); List<DownloadablePackage> pkgs; if (StringUtils.isBlank(pkgType)) { pkgs = pm.listUpdatePackages(null, targetPlatform); } else { pkgs = pm.listUpdatePackages(PackageType.getByValue(pkgType), targetPlatform); } return getView("simpleListing").arg("pkgs", pm.sort(pkgs)).arg("showCommunityInfo", true).arg("source", "updates").arg("filterOnPlatform", filterOnPlatform); }
public String getPackageTypeFilter() { return SharedPackageListingsSettings.instance().get(getListName()).getPackageTypeFilter(); }
public boolean getPlatformFilter() { return SharedPackageListingsSettings.instance().get(getListName()).getPlatformFilter(); }
public void setPackageTypeFilter(String filter) { SharedPackageListingsSettings.instance().get(getListName()).setPackageTypeFilter(filter); }
public void setPlatformFilter(boolean doFilter) { SharedPackageListingsSettings.instance().get(getListName()).setPlatformFilter(doFilter); }
PackageManager pm = Framework.getService(PackageManager.class); if (pkgType == null) { pkgType = SharedPackageListingsSettings.instance().get("remote").getPackageTypeFilter(); filterOnPlatform = SharedPackageListingsSettings.instance().get("remote").getPlatformFilter(); onlyRemote = SharedPackageListingsSettings.instance().get("remote").isOnlyRemote();
@GET @Produces("text/html") @Path(value = "private") public Object getPrivate(@QueryParam("type") String pkgType, @QueryParam("filterOnPlatform") Boolean filterOnPlatform) { PackageManager pm = Framework.getLocalService(PackageManager.class); if (pkgType == null) { pkgType = SharedPackageListingsSettings.instance().get("private").getPackageTypeFilter(); } if (filterOnPlatform == null) { filterOnPlatform = SharedPackageListingsSettings.instance().get("private").getPlatformFilter(); } String targetPlatform = getTargetPlatform(filterOnPlatform); List<DownloadablePackage> pkgs; if (StringUtils.isBlank(pkgType)) { pkgs = pm.listPrivatePackages(targetPlatform); } else { pkgs = pm.listPrivatePackages(PackageType.getByValue(pkgType), targetPlatform); } return getView("simpleListing").arg("pkgs", pm.sort(pkgs)).arg("showCommunityInfo", true).arg("source", "private").arg("filterOnPlatform", filterOnPlatform); }
public String getPackageTypeFilter() { return SharedPackageListingsSettings.instance().get(getListName()).getPackageTypeFilter(); }
public boolean getPlatformFilter() { return SharedPackageListingsSettings.instance().get(getListName()).getPlatformFilter(); }
public void setPackageTypeFilter(String filter) { SharedPackageListingsSettings.instance().get(getListName()).setPackageTypeFilter(filter); }
public void setPlatformFilter(boolean doFilter) { SharedPackageListingsSettings.instance().get(getListName()).setPlatformFilter(doFilter); }
@GET @Produces("text/html") @Path(value = "updates") public Object getUpdates(@QueryParam("type") String pkgType, @QueryParam("filterOnPlatform") Boolean filterOnPlatform) { PackageManager pm = Framework.getService(PackageManager.class); if (pkgType == null) { pkgType = SharedPackageListingsSettings.instance().get("updates").getPackageTypeFilter(); } if (filterOnPlatform == null) { filterOnPlatform = SharedPackageListingsSettings.instance().get("updates").getPlatformFilter(); } String targetPlatform = getTargetPlatform(filterOnPlatform); List<DownloadablePackage> pkgs; if (StringUtils.isBlank(pkgType)) { pkgs = pm.listUpdatePackages(null, targetPlatform); } else { pkgs = pm.listUpdatePackages(PackageType.getByValue(pkgType), targetPlatform); } return getView("simpleListing").arg("pkgs", pm.sort(pkgs)) .arg("showCommunityInfo", true) .arg("source", "updates") .arg("filterOnPlatform", filterOnPlatform); }
@GET @Produces("text/html") @Path(value = "local") public Object getLocal(@QueryParam("type") String pkgType) { PackageManager pm = Framework.getService(PackageManager.class); if (pkgType == null) { pkgType = SharedPackageListingsSettings.instance().get("local").getPackageTypeFilter(); } List<DownloadablePackage> pkgs; if (StringUtils.isBlank(pkgType)) { pkgs = pm.listLocalPackages(); } else { pkgs = pm.listLocalPackages(PackageType.getByValue(pkgType)); } return getView("simpleListing").arg("pkgs", pm.sort(pkgs)).arg("showCommunityInfo", false).arg("source", "local"); }
public boolean getOnlyRemote() { return SharedPackageListingsSettings.instance().get("remote").isOnlyRemote(); }
public ListingFilterSetting get(String listName) { if (!settings.containsKey(listName)) { settings.put(listName, new ListingFilterSetting()); } return settings.get(listName); }
public void setOnlyRemote(boolean onlyRemote) { SharedPackageListingsSettings.instance().get("remote").setOnlyRemote(onlyRemote); }