private void upgradeApplication(EntitlementConfiguration ec,String appName,String resourceTypeUUID) throws UpgradeException {
  try {
    UpgradeProgress.reportStart(AUDIT_MODIFIED_APP_UUID_START,appName);
    final Application application=ec.getApplication(appName);
    application.addAllResourceTypeUuids(Collections.singleton(resourceTypeUUID));
    ec.storeApplication(application);
    UpgradeProgress.reportEnd(AUDIT_UPGRADE_SUCCESS);
  }
 catch (  EntitlementException ee) {
    UpgradeProgress.reportEnd(AUDIT_UPGRADE_FAIL);
    throw new UpgradeException("Failed to add resource type uuid to application " + appName,ee);
  }
}

private void upgradeApplication ( EntitlementConfiguration ec , String appName , String resourceTypeUUID ) throws UpgradeException { try { UpgradeProgress . reportStart ( AUDIT_MODIFIED_APP_UUID_START , appName ) ; final Application application = ec . getApplication ( appName ) ; application . addAllResourceTypeUuids ( Collections . singleton ( resourceTypeUUID ) ) ; ec . storeApplication ( application ) ; UpgradeProgress . reportEnd ( AUDIT_UPGRADE_SUCCESS ) ; } catch ( EntitlementException ee ) { UpgradeProgress . reportEnd ( AUDIT_UPGRADE_FAIL ) ; throw new UpgradeException ( "Failed to add resource type uuid to application " + appName , ee ) ; } }
add the resource type uuid to the application and persist it .
