private void setLevels(Logger l) { // try to pull the log level from the query param String levelParam = Location.getParameter("logLevel"); Level level = levelParam == null ? null : Level.parse(levelParam); if (level != null) { l.setLevel(level); } else { // if it isn't there, then pull it from the gwt.xml file DefaultLevel defaultLevel = GWT.create(DefaultLevel.class); l.setLevel(defaultLevel.getLevel()); } } }
static Mode requestedMode() { String renderer = Window.Location.getParameter(PARAM_NAME); if (CANVAS.equals(renderer)) { return Mode.CANVAS; } else if (GL.equals(renderer)) { return Mode.WEBGL; } return Mode.AUTODETECT; } }
static Mode requestedMode() { String renderer = Window.Location.getParameter(PARAM_NAME); if (CANVAS.equals(renderer)) { return Mode.CANVAS; } else if (GL.equals(renderer)) { return Mode.WEBGL; } return Mode.AUTODETECT; } }
/** Returns workspace key from current address or empty string when it is undefined. */ public String getWorkspaceKey() { String browserUrl = Window.Location.getPath(); // TODO temporary to make it work with not "path obliged" URL String wsParam = Window.Location.getParameter("ws"); if (wsParam != null) return wsParam; // String[] urlParts = browserUrl.split("/", NAMESPACE_START_SEGMENT + 1); if (urlParts.length < NAMESPACE_START_SEGMENT) { return ""; } else { return SimpleHtmlSanitizer.sanitizeHtml(urlParts[NAMESPACE_START_SEGMENT]).asString(); } }
private static String getDecodedParameter(PermalinkParameter parameter) { return Window.Location.getParameter(parameter.nameLowerCase()); }
public String getParameter(String name) { return Window.Location.getParameter(name); }
public String getParameter(String name) { return Window.Location.getParameter(name); }
@Override public String getParameter(String name) { return Window.Location.getParameter(name); }
private void setLevels(Logger l) { // try to pull the log level from the query param String levelParam = Location.getParameter("logLevel"); Level level = levelParam == null ? null : Level.parse(levelParam); if (level != null) { l.setLevel(level); } else { // if it isn't there, then pull it from the gwt.xml file DefaultLevel defaultLevel = GWT.create(DefaultLevel.class); l.setLevel(defaultLevel.getLevel()); } } }
private void setLevels(Logger l) { // try to pull the log level from the query param String levelParam = Location.getParameter("logLevel"); Level level = levelParam == null ? null : Level.parse(levelParam); if (level != null) { l.setLevel(level); } else { // if it isn't there, then pull it from the gwt.xml file DefaultLevel defaultLevel = GWT.create(DefaultLevel.class); l.setLevel(defaultLevel.getLevel()); } } }
private int getNodeId() { if(Location.getParameter("node") != null) { return Integer.valueOf(Location.getParameter("node")); }else { return -1; } }
static Mode requestedMode() { String renderer = Window.Location.getParameter(PARAM_NAME); if (CANVAS.equals(renderer)) { return Mode.CANVAS; } else if (GL.equals(renderer)) { return Mode.WEBGL; } return Mode.AUTODETECT; } }
public String getProjectName() { String projectNameFromPage = getProjectNameFromPage(); return (null == projectNameFromPage ? Window.Location.getParameter( "project" ) : projectNameFromPage ); }
public static String[] getDecodedParameters(String parameter) { String value = Window.Location.getParameter(parameter); if (value == null || value.isEmpty()) { return new String[] {}; } if (value.startsWith("{")) { return splitJsonObjects(value); } else { return value.split(","); } }
public int extractNodeIdFromLocation() { if(Location.getParameter("node") != null) { return Integer.valueOf(Location.getParameter("node")); }else { return -1; } }
public static String getCodeServer() { String codeServer = com.google.gwt.user.client.Window.Location.getParameter("gwt.codesvr"); if (codeServer != null) { codeServer = "?gwt.codesvr=" + codeServer; } else { codeServer = ""; } return codeServer; } }
public int getBuildnumber() { String buildNumberFromPage = getBuildNumberFromPage(); return Integer.parseInt(null == buildNumberFromPage ? Window.Location.getParameter( "build" ) : buildNumberFromPage ); }
private void switchMode(final boolean refreshWorkbenchFlag) { String isRefresh = Window.Location.getParameter("isRefresh"); if (refreshWorkbenchFlag && isRefresh.equals("false")) { refreshPerspective(); } }
private static int getRequestedRuntimeLogLevel() { String logLevelString = Location.getParameter("log_level"); int lowestLogLevel = Log.getLowestLogLevel(); return logLevelString == null ? lowestLogLevel : Math.max(lowestLogLevel, LogUtil.stringToLevel(logLevelString)); }
/** * Add the parameters from the request on the context. * @param context */ private static void setAttributes(ViewContext context){ for (String key : Window.Location.getParameterMap().keySet()){ if ((!key.equals(VIEW_ATR)) && (!key.equals(ViewContext.ID_ATR)) && (!key.equals(ViewContext.ID_TYPE_ATR))){ context.setAttribute(key, Window.Location.getParameter(key)); } } }