use of com.sun.pkg.client.LicenseAction in project Payara by payara.
the class UpdateCenterHandlers method getLicense.
private static String getLicense(Image img, Fmri fmri) {
StringBuffer licenseText = new StringBuffer();
try {
Manifest manifest = img.getManifest(fmri);
List<LicenseAction> lla = manifest.getActionsByType(LicenseAction.class);
for (LicenseAction la : lla) {
licenseText.append("============= ").append(la.getName()).append(" ================\n");
licenseText.append(fmri.toString());
licenseText.append("\n\n");
licenseText.append(la.getText());
licenseText.append("\n\n");
}
return "" + licenseText;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
Aggregations