Class MapfishParser

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void parse​(boolean errorOnExtraProperties, PObject requestData, java.lang.Object objectToPopulate, java.lang.String... extraPropertyToIgnore)
      Populate the param object by obtaining the values from the like names values in the request data object.
      static java.lang.Object parsePrimitive​(java.lang.String fieldName, PrimitiveAttribute<?> pAtt, PObject requestData)
      Get the value of a primitive type from the request data.
      static java.lang.String stringRepresentation​(java.lang.Class<?> aClass)
      Return a friendly representation of the class for printing the configuration options to a client.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • POST_CONSTRUCT_METHOD_NAME

        public static final java.lang.String POST_CONSTRUCT_METHOD_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • parse

        public static void parse​(boolean errorOnExtraProperties,
                                 PObject requestData,
                                 java.lang.Object objectToPopulate,
                                 java.lang.String... extraPropertyToIgnore)
        Populate the param object by obtaining the values from the like names values in the request data object.
        Parameters:
        errorOnExtraProperties - if true then throw an error when there are properties in the request data that are not in the param. Otherwise log them as a warning.
        requestData - the layer configuration json.
        objectToPopulate - the parameter object that will be passed to the layer factory or is the attribute value.
        extraPropertyToIgnore - An array of properties to ignore in request data. For example Layers do not need "type" but the property has to be there for MapAttribute to be able to choose the correct plugin.
      • parsePrimitive

        public static java.lang.Object parsePrimitive​(java.lang.String fieldName,
                                                      PrimitiveAttribute<?> pAtt,
                                                      PObject requestData)
        Get the value of a primitive type from the request data.
        Parameters:
        fieldName - the name of the attribute to get from the request data.
        pAtt - the primitive attribute.
        requestData - the data to retrieve the value from.
      • stringRepresentation

        public static java.lang.String stringRepresentation​(java.lang.Class<?> aClass)
        Return a friendly representation of the class for printing the configuration options to a client.
        Parameters:
        aClass - the class to inspect