Class MockPropertyGroup

    • Constructor Detail

      • MockPropertyGroup

        public MockPropertyGroup​(javax.json.JsonObject jsonObj)
    • Method Detail

      • getPropertyGroup

        public MockPropertyGroup getPropertyGroup​(String propertyName)
        Description copied from class: PropertyGroup
        Returns a PropertyGroup associated with the specified property.
        Overrides:
        getPropertyGroup in class PropertyGroup
        Parameters:
        propertyName - a hierarchical property name (e.g. "level1/level2/level3") that refers to a property group.
        Returns:
        a PropertyGroup that holds the sub-structure associated with the specified property.
      • setProperty

        public void setProperty​(String propertyName,
                                Object value)
        Sets the specified property to the specified value. The value must be an instance of String, Boolean, or Number.
        Parameters:
        propertyName - a hierarchical property name (e.g. "level1/level2/myProperty")
        value - the value to set
      • getGsonSubGroup

        protected com.google.gson.JsonObject getGsonSubGroup​(com.google.gson.JsonObject gsonObj,
                                                             String[] pathElements)
        Retrieves the JsonObject that contains the property associated with the specified path elements. If a certain property subgroup doesn't exist, then it is created.
        Parameters:
        gsonObj - the root JsonObject to start the search in
        pathElements - the various elements that make up the hierarchical property name.
        Returns:
        a JsonObject that will contain the specified property
      • toJson

        protected javax.json.JsonObject toJson​(com.google.gson.JsonObject gsonObj)
                                        throws javax.json.JsonException
        Throws:
        javax.json.JsonException
      • toGson

        protected com.google.gson.JsonObject toGson​(javax.json.JsonObject jsonObj)