Package org.zkoss.zk.ui.http
Class Utils
java.lang.Object
org.zkoss.zk.ui.http.Utils
A collection of utilities for this package.
- Since:
- 2.4.1
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringcheckUpdateURI(String updateURI, String info) Checks the update URI.static final intReturns the start year only for the format using "yy" pattern, change the parse result in the 100 years span after that year. 2DigitYearStart should not be negative.static final intReturns the first day of the week, or -1 if no defined by the application.static final intgetFirstDayOfWeek(Session sess) Returns the first day of the week of the given session, or -1 if no defined by the application.static voidupdateDebugJS(WebApp wapp, boolean debug) Update the status of debug-js.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
updateDebugJS
Update the status of debug-js. It is called byConfiguration.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 asgetFirstDayOfWeek(Sessions.getCurrent()).- Since:
- 5.0.3
-
getFirstDayOfWeek
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 forCalendar.getFirstDayOfWeek().- Session attribute:
Attributes.PREFERRED_FIRST_DAY_OF_WEEK - Application attribute:
Attributes.PREFERRED_FIRST_DAY_OF_WEEK - Library property:
Attributes.PREFERRED_FIRST_DAY_OF_WEEK
- Parameters:
sess- the session to look at. Ignored if null.- Since:
- 5.0.3
- Session attribute:
-
get2DigitYearStart
Returns the start year only for the format using "yy" pattern, change the parse result in the 100 years span after that year. 2DigitYearStart should not be negative. for example, start year 1950 will parse [0-49] : 2000-2049 and [50-99] : 1950-1999Default: 1929
Library property:
Attributes.PREFERRED_2DIGITYEARSTART- Throws:
NumberFormatException- Since:
- 8.6.2
-
checkUpdateURI
public static final String checkUpdateURI(String updateURI, String info) throws jakarta.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:
jakarta.servlet.ServletException- if updateURI is incorrect.- Since:
- 5.0.5
-