Tabnine Logo
GlobalConfig.getWebContextName
Code IndexAdd Tabnine to your IDE (free)

How to use
getWebContextName
method
in
com.haulmont.cuba.core.global.GlobalConfig

Best Java code snippets using com.haulmont.cuba.core.global.GlobalConfig.getWebContextName (Showing top 19 results out of 315)

origin: com.haulmont.cuba/cuba-core

protected String getAppName() {
  return config.getWebContextName();
}
origin: com.haulmont.cuba/cuba-rest-api

protected String getBasePath() {
  return "/" + globalConfig.getWebContextName() + "/rest/v2";
}
origin: com.haulmont.cuba/cuba-web

protected String getWebAppName(GlobalConfig config) {
  return config.getWebContextName();
}
origin: com.haulmont.cuba/cuba-core

protected String getMBeanDomain() {
  return globalConfig.getWebContextName() + ".jgroups";
}
origin: com.haulmont.cuba/cuba-portal

/**
 * Basically this method prepends webapp's prefix to the path
 *
 * @param path path relative to the root of webapp
 * @return Full relative path on server
 */
public String composeFullRelativePath(String path) {
  GlobalConfig globalConfig = configuration.getConfig(GlobalConfig.class);
  String webAppPrefix = "/".concat(globalConfig.getWebContextName().intern());
  return path.startsWith("/") ? webAppPrefix.concat(path) : webAppPrefix.concat("/").concat(path);
}
origin: com.haulmont.cuba/cuba-web

public void setUserAppTheme(String themeName) {
  addCookie(APP_THEME_COOKIE_PREFIX + globalConfig.getWebContextName(), themeName);
}
origin: com.haulmont.cuba/cuba-rest-api

protected String makeClientInfo(String userAgent) {
  //noinspection UnnecessaryLocalVariable
  String serverInfo = String.format("REST API (%s:%s/%s) %s",
      globalConfig.getWebHostName(),
      globalConfig.getWebPort(),
      globalConfig.getWebContextName(),
      StringUtils.trimToEmpty(userAgent));
  return serverInfo;
}
origin: com.haulmont.cuba/cuba-rest-api

protected String makeClientInfo(String userAgent) {
  //noinspection UnnecessaryLocalVariable
  String serverInfo = String.format("REST API (%s:%s/%s) %s",
      globalConfig.getWebHostName(),
      globalConfig.getWebPort(),
      globalConfig.getWebContextName(),
      StringUtils.trimToEmpty(userAgent));
  return serverInfo;
}
origin: com.haulmont.cuba/cuba-portal

protected String getPortalNetworkLocation() {
  return globalConfig.getWebHostName() + ":" +
      globalConfig.getWebPort() + "/" +
      globalConfig.getWebContextName();
}
origin: com.haulmont.cuba/cuba-rest-api

  protected String makeClientInfo(String userAgent) {
    GlobalConfig globalConfig = configuration.getConfig(GlobalConfig.class);

    //noinspection UnnecessaryLocalVariable
    String serverInfo = String.format("REST API (%s:%s/%s) %s",
        globalConfig.getWebHostName(),
        globalConfig.getWebPort(),
        globalConfig.getWebContextName(),
        StringUtils.trimToEmpty(userAgent));

    return serverInfo;
  }
}
origin: com.haulmont.cuba/cuba-core

if (contextPath.startsWith("/"))
  contextPath = contextPath.substring(1);
if (!contextPath.equals(config.getWebContextName())) {
  sb.append("***** cuba.webContextName=").append(config.getWebContextName())
      .append(", actual=").append(contextPath).append("\n");
origin: com.haulmont.reports/reports-core

protected String resolveServerPrefix(String uri) {
  Configuration configStorage = AppBeans.get(Configuration.NAME);
  GlobalConfig globalConfig = configStorage.getConfig(GlobalConfig.class);
  String coreUrl = String.format("http://%s:%s/%s/",
      globalConfig.getWebHostName(), globalConfig.getWebPort(), globalConfig.getWebContextName());
  String webUrl = globalConfig.getWebAppUrl() + "/";
  return uri.replace(WEB_APP_PREFIX, webUrl).replace(CORE_APP_PREFIX, coreUrl);
}
origin: com.haulmont.cuba/cuba-core

@Override
public String getServerId() {
  if (serverId == null) {
    GlobalConfig globalConfig = configuration.getConfig(GlobalConfig.class);
    serverId = globalConfig.getWebHostName() + ":" + globalConfig.getWebPort() + "/" + globalConfig.getWebContextName();
  }
  return serverId;
}
origin: com.haulmont.cuba/cuba-web

protected ThemeConstants loadTheme() {
  String appWindowTheme = webConfig.getAppWindowTheme();
  String userAppTheme = cookies.getCookieValue(APP_THEME_COOKIE_PREFIX + globalConfig.getWebContextName());
  if (userAppTheme != null) {
    if (!Objects.equals(userAppTheme, appWindowTheme)) {
      // check theme support
      Set<String> supportedThemes = themeConstantsRepository.getAvailableThemes();
      if (supportedThemes.contains(userAppTheme)) {
        appWindowTheme = userAppTheme;
      }
    }
  }
  ThemeConstants theme = themeConstantsRepository.getConstants(appWindowTheme);
  if (theme == null) {
    throw new IllegalStateException("Unable to use theme constants '" + appWindowTheme + "'");
  }
  return theme;
}
origin: com.haulmont.cuba/cuba-web

protected String makeClientInfo() {
  // timezone info is passed only on VaadinSession creation
  WebBrowser webBrowser = getWebBrowserDetails();
  //noinspection UnnecessaryLocalVariable
  String serverInfo = String.format("Web (%s:%s/%s) %s",
      globalConfig.getWebHostName(),
      globalConfig.getWebPort(),
      globalConfig.getWebContextName(),
      webBrowser.getBrowserApplication());
  return serverInfo;
}
origin: com.haulmont.cuba/cuba-rest-api

protected void setSessionInfo(HttpServletRequest request, UserSession userSession) {
  userSessionService.setSessionAddress(userSession.getId(), request.getRemoteAddr());
  String serverInfo = "REST API (" +
      globalConfig.getWebHostName() + ":" +
      globalConfig.getWebPort() + "/" +
      globalConfig.getWebContextName() + ") ";
  userSessionService.setSessionClientInfo(userSession.getId(), serverInfo + request.getHeader("User-Agent"));
}
origin: com.haulmont.cuba/cuba-portal

protected Map<String, Object> getSessionParams(String ipAddress, String clientInfo) {
  GlobalConfig globalConfig = configuration.getConfig(GlobalConfig.class);
  String serverInfo = "Portal (" +
      globalConfig.getWebHostName() + ":" +
      globalConfig.getWebPort() + "/" +
      globalConfig.getWebContextName() + ") ";
  return ParamsMap.of(
      ClientType.class.getName(), AppContext.getProperty("cuba.clientType"),
      SessionParams.IP_ADDRESS.getId(), ipAddress,
      SessionParams.CLIENT_INFO.getId(), serverInfo + clientInfo
  );
}
origin: com.haulmont.cuba/cuba-web

@Override
public String getTheme(UICreateEvent event) {
  // get theme from cookies before app ui initialized for smooth theme enabling
  WebConfig webConfig = configuration.getConfig(WebConfig.class);
  GlobalConfig globalConfig = configuration.getConfig(GlobalConfig.class);
  String appWindowTheme = webConfig.getAppWindowTheme();
  String userAppTheme = getCookieValue(event.getRequest().getCookies(),
      App.APP_THEME_COOKIE_PREFIX + globalConfig.getWebContextName());
  if (userAppTheme != null) {
    if (!Objects.equals(userAppTheme, appWindowTheme)) {
      // check theme support
      ThemeConstantsRepository themeRepository = AppBeans.get(ThemeConstantsRepository.NAME);
      Set<String> supportedThemes = themeRepository.getAvailableThemes();
      if (supportedThemes.contains(userAppTheme)) {
        return userAppTheme;
      }
    }
  }
  return super.getTheme(event);
}
origin: com.haulmont.reports/reports-core

StopWatch stopWatch = null;
MDC.put("user", userSessionSource.getUserSession().getUser().getLogin());
MDC.put("webContextName", globalConfig.getWebContextName());
executions.startExecution(report.getId().toString(), "Reporting");
try {
com.haulmont.cuba.core.globalGlobalConfiggetWebContextName

Popular methods of GlobalConfig

  • getAvailableLocales
    Supported locales. List of locales is shown on user login.
  • getConfDir
  • getWebHostName
  • getWebPort
  • getWebAppUrl
  • getLocaleSelectVisible
    Show locale select in LoginWindow.
  • getTempDir
  • getAllowQueryFromSelected
  • getDataDir
  • getHealthCheckResponse
  • getNumberIdCacheSize
  • getRestRequiresSecurityToken
  • getNumberIdCacheSize,
  • getRestRequiresSecurityToken,
  • getTestMode,
  • getUserSessionLogEnabled,
  • getAnonymousSessionId,
  • getAppFolderEditWindowClassName,
  • getCubaClasspathDirectories,
  • getDeepCopyNonPersistentReferences,
  • getDisableEscapingLikeForDataStores

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now