Package org.qubership.atp.ram.utils
Class Utils
java.lang.Object
org.qubership.atp.ram.utils.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcleanXmlTags(String htmlString) Remove tags from xml source.static StringfilterAllExceptFields(Object objectToConvert, String[] fields, com.fasterxml.jackson.databind.ObjectMapper mapper, String filterId) Util method to crete json representation of object using field filter.getAllDeclaredFields(Class clazz) Get all fields in class how list.
-
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- -ObjectMapperthat should be used for serialization.filterId- -PropertyFilterid string. SeeJsonFilter- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
cleanXmlTags
Remove tags from xml source.- Parameters:
htmlString- xml source string.- Returns:
- formatted string without tags.
-
getAllDeclaredFields
Get all fields in class how list.
-