/** * @deprecated since 4.13, see * {@link BundleManagerLocal#createBundleVersion(org.rhq.core.domain.auth.Subject, int, String, String, String, String)} */ @Override @SuppressWarnings("unchecked") @Deprecated public BundleVersion createBundleVersion(Subject subject, int bundleId, String name, String description, String version, String recipe) throws Exception { if (null == name || "".equals(name.trim())) { throw new IllegalArgumentException("Invalid bundleVersionName: " + name); } Bundle bundle = entityManager.find(Bundle.class, bundleId); if (null == bundle) { throw new IllegalArgumentException("Invalid bundleId: " + bundleId); } checkCreateBundleVersionAuthz(subject, bundleId); // parse the recipe (validation occurs here) and get the config def and list of files BundleType bundleType = bundle.getBundleType(); RecipeParseResults results; try { results = BundleManagerHelper.getPluginContainer().getBundleServerPluginManager() .parseRecipe(bundleType.getName(), recipe); } catch (Exception e) { // ensure that we throw a runtime exception to force a rollback throw new RuntimeException("Failed to parse recipe", e); } return createBundleVersionInternal(bundle, name, version, description, recipe, results.getConfigurationDefinition()); }
Set<ResourceType> targetedResourceTypes = bundle.getBundleType().getExplicitlyTargetedResourceTypes(); throw new IllegalArgumentException("Bundle of type [" + bundle.getBundleType().getName() + "] is incompatible with resource type " + group.getResourceType()); String bundleType = bundle.getBundleType().getName(); ResourceType rt = group.getResourceType(); ResourceTypeBundleConfiguration bundleConfig = rt.getResourceTypeBundleConfiguration();
BundleType bundleType = bundleVersion.getBundle().getBundleType(); RecipeParseResults parseResults = BundleManagerHelper.getPluginContainer().getBundleServerPluginManager() .parseRecipe(bundleType.getName(), bundleVersion.getRecipe());
BundleType bundleType = bundleVersion.getBundle().getBundleType(); RecipeParseResults parseResults = BundleManagerHelper.getPluginContainer().getBundleServerPluginManager() .parseRecipe(bundleType.getName(), bundleVersion.getRecipe());
BundleType bundleType = bundleDeployment.getBundleVersion().getBundle().getBundleType(); ResourceType resourceType = bundleType.getResourceType(); Set<Resource> resources = inventoryManager.getResourcesWithType(resourceType);
BundleType bundleType = bundle.getBundleType(); RecipeParseResults results;
rtc.addFilterBundleTypeId(liveDeployment.getBundleVersion().getBundle().getBundleType().getId()); PageList<ResourceType> rts = resourceTypeManager.findResourceTypesByCriteria(subject, rtc); liveDeployment.getBundleVersion().getBundle().getBundleType().setResourceType(rts.get(0));
BundleType bundleType = bundleDeployment.getBundleVersion().getBundle().getBundleType(); ResourceType resourceType = bundleType.getResourceType(); Set<Resource> resources = inventoryManager.getResourcesWithType(resourceType);
rtc.addFilterBundleTypeId(bundle.getBundleType().getId()); ResourceType resourceType = resourceTypeManager.findResourceTypesByCriteria(subject, rtc).get(0); bundle.getBundleType().setResourceType(resourceType);