com.groiss.gui
Class WebUtils

java.lang.Object
  extended by com.groiss.gui.WebUtils
All Implemented Interfaces:
Public

public class WebUtils
extends java.lang.Object
implements Public

Miscellanea data retrieval methods used in a Web tier.


Constructor Summary
WebUtils()
           
 
Method Summary
static JSONPage agentSelect(javax.servlet.http.HttpServletRequest req)
          can be used by ObjectSelect-widgets to query for agents (either roles or users)
possible parameters are: role,application,orgunit,noEmptyEntry,includeRoleToo
currently it's only possible to search for users and optionally include the given role too
static JSONPage genJSONPage(java.util.Collection<Pair> pairs)
           
static JSONPage getJSONObjectSelect(java.util.Map<java.lang.String,java.lang.String> params)
           
 void jsonHolidays(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns holidays for the date picker in JSON format.
static void jsonObjectSelect(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Performs the search using the criteria, specified as request parameters, and returns the JSON-encoded page with the content of found entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebUtils

public WebUtils()
Method Detail

jsonObjectSelect

public static void jsonObjectSelect(javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Performs the search using the criteria, specified as request parameters, and returns the JSON-encoded page with the content of found entries.

Parameters:
req - current request
Throws:
java.lang.Exception - in case of an error

jsonHolidays

public void jsonHolidays(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res)
                  throws java.lang.Exception
Returns holidays for the date picker in JSON format.

Parameters:
req - current request
Throws:
org.json.JSONException - in case of an error
java.lang.Exception

agentSelect

public static JSONPage agentSelect(javax.servlet.http.HttpServletRequest req)
                            throws java.lang.Exception
can be used by ObjectSelect-widgets to query for agents (either roles or users)
possible parameters are: role,application,orgunit,noEmptyEntry,includeRoleToo
currently it's only possible to search for users and optionally include the given role too

Parameters:
req - the request
Throws:
java.lang.Exception

genJSONPage

public static JSONPage genJSONPage(java.util.Collection<Pair> pairs)
                            throws java.lang.Exception
Parameters:
pairs - a list of elements. The key of the com.groiss.ds.Pair is the value of the option. The value of the Pair is the label of the option
Returns:
a JSONPage filling the Dojo Select
Throws:
java.lang.Exception

getJSONObjectSelect

public static JSONPage getJSONObjectSelect(java.util.Map<java.lang.String,java.lang.String> params)
                                    throws java.lang.Exception
Parameters:
params - a map containing all configuration parameters for the dojo select
Returns:
a JSONPage filling the dojo options
Throws:
java.lang.Exception


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.