Class DefaultPropJsonFileParser


  • public class DefaultPropJsonFileParser
    extends java.lang.Object
    A utility class that parses a json file adding components to a static map of componentTypeId: JsonObject, given that* the json file contains either a single json component definition, or array of json component definitions associated* with a "components" property inside the root of the json object, where a 'json component definition' is a valid json* object string like: { "id" : "ia.input.button", "palette" : { "name": "Button", "category": "input" }, "props": { "aName": "somePropertyValue" }, "resources": [ { "name": "someComponentLib-js", // unique name of the resource "path": "/main/data/myModuleAlias/js/someComponentLib.js", // url to the resource file "type": "js" // type of resource, such as 'js' or 'css' } ] }
    • Constructor Detail

      • DefaultPropJsonFileParser

        public DefaultPropJsonFileParser()
    • Method Detail

      • parse

        public DefaultPropJsonFileParser.JsonDefParseResult parse​(java.io.InputStream jsonStream)
        Attempts to parse a json formatted stream given, returning a Map of entries containing a String:JsonObject, where the string is a component type id (e.g. 'ia.input.button'), and the JsonObject is the "properties" object defined for that type. The json file may contain either a single root object describing a single component's properties, or it can be an array of such object descriptors, each containing 'prefix', 'category', 'type' and 'properties' keys in the object.