Class Utils

java.lang.Object
org.qubership.atp.ram.utils.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • filterAllExceptFields

      public static String filterAllExceptFields(Object objectToConvert, String[] fields, com.fasterxml.jackson.databind.ObjectMapper mapper, String filterId) throws com.fasterxml.jackson.core.JsonProcessingException
      Util method to crete json representation of object using field filter.
      Parameters:
      fields - - array of field names that should be included in result. If null, all fields are returned.
      mapper - - ObjectMapper that should be used for serialization.
      filterId - - PropertyFilter id string. See JsonFilter
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • cleanXmlTags

      public static String cleanXmlTags(String htmlString)
      Remove tags from xml source.
      Parameters:
      htmlString - xml source string.
      Returns:
      formatted string without tags.
    • getAllDeclaredFields

      public static List<Field> getAllDeclaredFields(Class clazz)
      Get all fields in class how list.