Package ch.entwine.weblounge.common.site

Examples of ch.entwine.weblounge.common.site.SiteURL


   */
  @Override
  public boolean equals(Object o) {
    if (! (o instanceof SiteURL))
      return false;
    SiteURL siteURL = (SiteURL)o;
    return url.equals(siteURL.getURL()) && environment.equals(siteURL.getEnvironment());
  }
View Full Code Here


    // If a site registered this endpoint, other sites should not be able to
    // access it
    if (site != null) {
      String requestPath = request.getRequestURL().toString();
      SiteURL siteUrl = null;
      logger.trace("Making sure the endpoint should be accessible through site '{}'", site);
      for (SiteURL url : site.getHostnames()) {
        if (environment != null && !environment.equals(url.getEnvironment()))
          continue;
        if (requestPath.startsWith(url.toExternalForm())) {
View Full Code Here

  public WebUrl getUrl(Environment environment) {
    if (url != null)
      return url;
    if (site == null)
      throw new IllegalStateException("Site has not yet been set");
    SiteURL siteURL = site.getHostname(environment);
    url = new WebUrlImpl(site, UrlUtils.concat(siteURL.toExternalForm(), "module", identifier));
    return url;
  }
View Full Code Here

   * {@inheritDoc}
   *
   * @see ch.entwine.weblounge.common.site.Site#getHostname(ch.entwine.weblounge.common.site.Environment)
   */
  public SiteURL getHostname(Environment environment) {
    SiteURL url = defaultURLByEnvironment.get(environment);
    if (url != null)
      return url;
    return defaultURL;
  }
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.site.SiteURL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.