Class CmsJsonPart

java.lang.Object
org.opencms.jsp.jsonpart.CmsJsonPart

public class CmsJsonPart extends Object
Helper class used to translate key/value pairs from and to the format which can be processed by the CmsJsonPartFilter.

  • Field Details

  • Constructor Details

    • CmsJsonPart

      public CmsJsonPart(String key, String value)
      Creates a new instance.

      Parameters:
      key - the key
      value - the value
  • Method Details

    • getHeader

      public static final String getHeader(String key)
      Gets the header section for a named JSON part.

      Parameters:
      key - the JSON key for the part
      Returns:
      the header section for the given key
    • parseJsonParts

      public static List<CmsJsonPart> parseJsonParts(String text)
      Parses the encoded JSON parts from the given string and puts them in a list.

      Parameters:
      text - the text containing the encoded JSON parts
      Returns:
      the decoded JSON parts
    • getKey

      public String getKey()
      Returns the key.

      Returns:
      the key
    • getValue

      public String getValue()
      Returns the value.

      Returns:
      the value