org.zkoss.zk.ui.http
Class Utils

java.lang.Object
  extended by org.zkoss.zk.ui.http.Utils

public class Utils
extends java.lang.Object

A collection of utilities for this package.

Since:
2.4.1
Author:
tomyeh

Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String checkUpdateURI(java.lang.String updateURI, java.lang.String info)
          Checks the update URI.
static int getFirstDayOfWeek()
          Returns the first day of the week, or -1 if no defined by the application.
static int getFirstDayOfWeek(Session sess)
          Returns the first day of the week of the given session, or -1 if no defined by the application.
static void updateDebugJS(WebApp wapp, boolean debug)
          Update the status of debug-js.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

updateDebugJS

public static void updateDebugJS(WebApp wapp,
                                 boolean debug)
Update the status of debug-js. It is called by Configuration.setDebugJS(boolean) to change the loading of JavaScript files dynamically.

Since:
5.0.3

getFirstDayOfWeek

public static final int getFirstDayOfWeek()
Returns the first day of the week, or -1 if no defined by the application. It is the same as getFirstDayOfWeek(Sessions.getCurrent()).

Since:
5.0.3

getFirstDayOfWeek

public static final int getFirstDayOfWeek(Session sess)
Returns the first day of the week of the given session, or -1 if no defined by the application. It searches the following attributes and properties until found. Notice that it doesn't look for Calendar.getFirstDayOfWeek().
  1. Session attribute: Attributes.PREFERRED_FIRST_DAY_OF_WEEK
  2. Application attribute: Attributes.PREFERRED_FIRST_DAY_OF_WEEK
  3. Library property: Attributes.PREFERRED_FIRST_DAY_OF_WEEK

Parameters:
sess - the session to look at. Ignored if null.
Since:
5.0.3

checkUpdateURI

public static final java.lang.String checkUpdateURI(java.lang.String updateURI,
                                                    java.lang.String info)
                                             throws javax.servlet.ServletException
Checks the update URI.

Parameters:
updateURI - the update URI to be checked.
info - the info to show if updateURI is incorrect.
Returns:
the update URI (by removing ending / if any)
Throws:
javax.servlet.ServletException - if updateURI is incorrect.
Since:
5.0.5


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo