org.sonar.api.web.gwt.client
Class Utils
java.lang.Object
org.sonar.api.web.gwt.client.Utils
public final class Utils
- extends Object
A class of web utility
- Since:
- 1.10
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getConfiguration
public static String getConfiguration(String key)
getConfiguration
public static String getConfiguration(String key,
String defaultValue)
setConfiguration
public static void setConfiguration(String key,
String val)
getRequestParameter
public static String getRequestParameter(String key)
getConfigurationKeys
public static Set<String> getConfigurationKeys()
getRequestParameterNames
public static Set<String> getRequestParameterNames()
widgetGWTIdJSEncode
public static String widgetGWTIdJSEncode(String widgetGWTId)
getServerUrl
public static String getServerUrl()
getServerApiUrl
public static String getServerApiUrl()
escapeHtml
public static String escapeHtml(String maybeHtml)
formatPercent
public static String formatPercent(String percentage)
formatPercent
public static String formatPercent(double percentage)
formatNumber
public static String formatNumber(String number)
formatNumber
public static String formatNumber(double number)
showError
public static void showError(String message)
showWarning
public static void showWarning(String message)
showInfo
public static void showInfo(String message)
openResourcePopup
public static void openResourcePopup(Resource resource,
String metricKey)
- Display the resource in a popup.
- Parameters:
resource
- the resource to display, not nullmetricKey
- the metric to highlight (optional : can be null)
getUrlToRuleDescription
public static String getUrlToRuleDescription(String ruleKey,
boolean showLayout)
Copyright © 2009-2011 SonarSource. All Rights Reserved.