Package org.torproject.metrics.web
Class GraphParameterChecker
- java.lang.Object
-
- org.torproject.metrics.web.GraphParameterChecker
-
public class GraphParameterChecker extends java.lang.Object
Checks request parameters passed to graph-generating servlets.
-
-
Constructor Summary
Constructors Constructor Description GraphParameterChecker()
Initializes map with valid parameters for each of the graphs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String[]>
checkParameters(java.lang.String graphType, java.util.Map requestParameters)
Checks request parameters for the given graph type and returns a map of recognized parameters, or null if the graph type doesn't exist or the parameters are invalid.static GraphParameterChecker
getInstance()
Returns the singleton instance of this class.
-
-
-
Method Detail
-
getInstance
public static GraphParameterChecker getInstance()
Returns the singleton instance of this class.
-
checkParameters
public java.util.Map<java.lang.String,java.lang.String[]> checkParameters(java.lang.String graphType, java.util.Map requestParameters)
Checks request parameters for the given graph type and returns a map of recognized parameters, or null if the graph type doesn't exist or the parameters are invalid.
-
-