|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.greenhopper.web.util.WebUtilities
@Service(value="gh-webUtilities") public class WebUtilities
This service object provides access to web utilities that don't fit anywhere else. It is available from all actions through $action.util.
Field Summary | |
---|---|
static java.lang.String |
SERVICE
Used for dependency injection |
Constructor Summary | |
---|---|
WebUtilities()
|
Method Summary | |
---|---|
static java.util.Collection<java.lang.Long> |
asLongList(java.lang.String[] values)
TODO Should also not be in there. |
static java.lang.String |
decodeHtml(java.lang.String txt)
|
static java.lang.String |
encodeHtml(java.lang.String txt)
Escape HTML text |
java.lang.String |
encodeInlineJson(java.lang.String json)
We can't inline JSON into the page, because that stuff is read by the browser's HTML interpreter first rather than the JS interpreter, as it would in AJAX. |
java.lang.String |
encodeJavaScript(java.lang.String text)
TODO: Use escape tools instead? Used when loading resources |
java.lang.String |
encodeJson(java.lang.String text)
Escape double-quotes where necessary to produce a JSON-ready string. |
BuildProperties |
getBuildProperties()
Get the GreenHopper build properties |
DatePickerHelper |
getDatePicker()
Encapsulates code to work with the JIRA date picker. |
java.util.Locale |
getLocale(com.opensymphony.user.User user)
Fetch the locale for the current user. |
java.lang.String |
getModifierKey()
Required for keyBoard shortcuts |
java.lang.String |
getResourceLocation(java.lang.String moduleName,
java.lang.String resourceName)
Get the resource location for a specific module. |
void |
includeFieldResourcesForCurrentUser()
Load additional field specific javascript files JIRA includes this on various jsp files, such as the navigator, search, issuedetails or wizards and forms. |
boolean |
isDateOverdue(org.joda.time.DateMidnight date)
Checks whether a date is in the past currently used in boxSettings.vm, here because we don't know where else to put it. |
void |
registerKeyboardContext()
Registers the GreenHopper keyboard context. |
void |
validateStringSpecialCharacters(java.lang.String str,
ErrorCollection errorCollection)
TODO Should not be in here. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SERVICE
Constructor Detail |
---|
public WebUtilities()
Method Detail |
---|
public java.lang.String getResourceLocation(java.lang.String moduleName, java.lang.String resourceName)
public java.lang.String getModifierKey()
public void registerKeyboardContext()
public void includeFieldResourcesForCurrentUser()
public java.lang.String encodeJavaScript(java.lang.String text)
text
- public static java.lang.String encodeHtml(java.lang.String txt)
public static java.lang.String decodeHtml(java.lang.String txt)
public java.lang.String encodeJson(java.lang.String text)
public java.lang.String encodeInlineJson(java.lang.String json)
json
- : preformatted JSON text
public DatePickerHelper getDatePicker()
public boolean isDateOverdue(org.joda.time.DateMidnight date)
date
- the date to check, can be null
public java.util.Locale getLocale(com.opensymphony.user.User user)
JiraActionSupport
, avoiding the webwork action dependencies.
public void validateStringSpecialCharacters(java.lang.String str, ErrorCollection errorCollection)
public static java.util.Collection<java.lang.Long> asLongList(java.lang.String[] values)
public BuildProperties getBuildProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |