code: public static boolean isFieldProtected(FormModel formModel, String fieldName) {
          FieldMetadata metaData = formModel.getFieldMetadata(fieldName);
          return Boolean.TRUE.equals(metaData.getUserMetadata(UserMetadata.PROTECTED_FIELD));
      }
docs: tests if the usermetadata of the field has a boolean value true for the key {@value #PROTECTED_FIELD}
  
  @param fieldName
  the fieldname
  @return true if the field is protected, otherwise false