/**
  * Gets the locked value of the field if it is overridden, otherwise returns null.
  *
  * @param field the field.
  * @return the locked value, or null.
  */
 private static String getLockedValue(CatalogServiceFieldRestRep field) {
   if (Boolean.TRUE.equals(field.getOverride()) && StringUtils.isNotBlank(field.getValue())) {
     return field.getValue();
   } else {
     return null;
   }
 }
 /**
  * Gets all locked fields from the catalog service.
  *
  * @param service the catalog service.
  * @return the map of locked field values.
  */
 private static Map<String, String> getLockedFields(CatalogServiceRestRep service) {
   Map<String, String> fields = Maps.newLinkedHashMap();
   for (CatalogServiceFieldRestRep field : service.getCatalogServiceFields()) {
     String value = getLockedValue(field);
     if (value != null) {
       fields.put(field.getName(), value);
     }
   }
   return fields;
 }