Examples of PatchBundle


Examples of org.rhq.common.wildfly.PatchBundle

                parseResults = new RecipeParseResults(props, config, null);
                fileName = patch.getId();
                recipe = patch.getContents();
            } else if (patchInfo.is(PatchBundle.class)) {
                PatchBundle patchBundle = patchInfo.as(PatchBundle.class);

                Patch lastPatch = null;
                StringBuilder allPatchIds = new StringBuilder();

                for (PatchBundle.Element p : patchBundle) {
                    lastPatch = p.getPatch();
                    allPatchIds.append(p.getPatch().getId()).append("#");
                }
                allPatchIds.replace(allPatchIds.length() - 1, allPatchIds.length(), "");

                if (lastPatch == null) {
                    throw new UnknownRecipeException("Not a Wildfly patch");
                }

                DeploymentProperties props = new DeploymentProperties(0, lastPatch.getIdentityName(),
                    lastPatch.getTargetVersion(), lastPatch.getDescription(), DestinationComplianceMode.full);

                ConfigurationDefinition config = new ConfigurationDefinition("wildfly-patch", null);
                PropertyDefinitionSimple allPatchIdsProp = new PropertyDefinitionSimple("allPatchIds",
                    "Hash-separated list of all individual patches the patch bundle is composed of.", true,
                    PropertySimpleType.STRING);
                allPatchIdsProp.setDefaultValue(allPatchIds.toString());
                allPatchIdsProp.setReadOnly(true);
                PropertyDefinitionSimple patchTypeProp = new PropertyDefinitionSimple("patchType",
                    "The type of the patch", true, PropertySimpleType.STRING);
                patchTypeProp.setDefaultValue("patch-bundle");
                patchTypeProp.setReadOnly(true);

                config.put(allPatchIdsProp);
                config.put(patchTypeProp);
                addCommonProperties(config);

                parseResults = new RecipeParseResults(props, config, null);
                fileName = allPatchIds.toString();
                recipe = patchBundle.getContents();
            }
        } finally {
            in.close();
        }
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.