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

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

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

origin: com.haulmont.cuba/cuba-portal

/**
 * @param path path relative to the root of webapp
 * @return Full absolute path including protocol, domain and webapp prefix
 */
public String composeFullAbsolutePath(String path) {
  String webAppUrl = configuration.getConfig(GlobalConfig.class).getWebAppUrl();
  webAppUrl = StringUtils.chomp(webAppUrl, "/"); //remove last slash
  return path.startsWith("/") ? webAppUrl.concat(path) : webAppUrl.concat("/").concat(path);
}
origin: com.haulmont.cuba/cuba-web

public static String getControllerURL(String mapping) {
  if (mapping == null) throw new IllegalArgumentException("Mapping cannot be null");
  Configuration configuration = AppBeans.get(Configuration.NAME);
  GlobalConfig globalConfig = configuration.getConfig(GlobalConfig.class);
  StringBuilder sb = new StringBuilder(globalConfig.getWebAppUrl()).append(getControllerPrefix());
  if (!mapping.startsWith("/")) {
    sb.append("/");
  }
  sb.append(mapping);
  return sb.toString();
}
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-gui

String url = String.format("%s/open?screen=%s", globalConfig.getWebAppUrl(), frameOwner.getId());
origin: com.haulmont.cuba/cuba-web-auth

protected String getWebAppUrl() {
  if (webAppUrl == null) {
    synchronized (this) {
      if (webAppUrl == null) {
        UserSession systemSession;
        try {
          systemSession = trustedClientService.getSystemSession(webAuthConfig.getTrustedClientPassword());
        } catch (LoginException e) {
          throw new RuntimeException("Unable to get systemSession", e);
        }
        // webAppUrl can be overridden in DB, thus we need SecurityContext to obtain it from middleware
        withSecurityContext(new SecurityContext(systemSession), () -> {
          String webAppUrl = globalConfig.getWebAppUrl();
          if (!webAppUrl.endsWith("/")) {
            webAppUrl += "/";
          }
          this.webAppUrl = webAppUrl;
        });
      }
    }
  }
  return this.webAppUrl;
}
com.haulmont.cuba.core.globalGlobalConfiggetWebAppUrl

Popular methods of GlobalConfig

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JTable (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • From CI to AI: The AI layer in your organization
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