Class ServiceParameters


  • public class ServiceParameters
    extends Object
    Wrapper around parameters that should be passed trough to the delegated service call.
    Author:
    Frederik Heremans
    • Constructor Detail

      • ServiceParameters

        public ServiceParameters()
    • Method Detail

      • addParameter

        public void addParameter​(String name,
                                 Object value)
      • addValidParameter

        public void addValidParameter​(String name,
                                      Object value)
        Adds a parameter and marks is as valid.
      • getParameter

        public Object getParameter​(String name)
      • isParameterSet

        public boolean isParameterSet​(String name)
      • addValidParameterNames

        public void addValidParameterNames​(String[] validParameters)
      • fromHttpRequest

        public static ServiceParameters fromHttpRequest​(javax.servlet.http.HttpServletRequest request)
        Creates a new ServiceParameters instance based on all non-empty query-parameters in the given request.
      • fromObjectNode

        public static ServiceParameters fromObjectNode​(com.fasterxml.jackson.databind.node.ObjectNode node)
        Creates a new ServiceParameters instance based on all properties in the given object node. Only numbers, text and boolean values are added, nested object structures are ignored.