private void saveResourceType(ResourceType resourceType,String realm) throws UpgradeException {
  try {
    UpgradeProgress.reportStart(AUDIT_CREATE_RESOURCE_TYPE_START,resourceType.getName());
    resourceTypeService.saveResourceType(getAdminSubject(),realm,resourceType);
    UpgradeProgress.reportEnd(AUDIT_UPGRADE_SUCCESS);
  }
 catch (  EntitlementException ee) {
    UpgradeProgress.reportEnd(AUDIT_UPGRADE_FAIL);
    throw new UpgradeException("Failed to create resource type " + resourceType.getName(),ee);
  }
}

private void saveResourceType ( ResourceType resourceType , String realm ) throws UpgradeException { try { UpgradeProgress . reportStart ( AUDIT_CREATE_RESOURCE_TYPE_START , resourceType . getName ( ) ) ; resourceTypeService . saveResourceType ( getAdminSubject ( ) , realm , resourceType ) ; UpgradeProgress . reportEnd ( AUDIT_UPGRADE_SUCCESS ) ; } catch ( EntitlementException ee ) { UpgradeProgress . reportEnd ( AUDIT_UPGRADE_FAIL ) ; throw new UpgradeException ( "Failed to create resource type " + resourceType . getName ( ) , ee ) ; } }
persist the given resource type .
