This is handled by OOOSiteIdentifier now.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2603 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-07-31 21:43:48 +00:00
parent a3ae16ef3c
commit ca20f3efe6
3 changed files with 3 additions and 20 deletions
@@ -36,13 +36,7 @@ public class IndiscriminateSiteIdentifier implements SiteIdentifier
*/ */
public int identifySite (HttpServletRequest req) public int identifySite (HttpServletRequest req)
{ {
// check whether our site id was overridden return DEFAULT_SITE_ID;
Integer override = (Integer)req.getAttribute(SITE_ID_OVERRIDE_KEY);
if (override != null) {
return override;
} else {
return DEFAULT_SITE_ID;
}
} }
/** /**
@@ -95,12 +95,6 @@ public class JDBCTableSiteIdentifier implements SiteIdentifier
// documentation inherited // documentation inherited
public int identifySite (HttpServletRequest req) public int identifySite (HttpServletRequest req)
{ {
// check whether our site id was overridden
Integer override = (Integer)req.getAttribute(SITE_ID_OVERRIDE_KEY);
if (override != null) {
return override;
}
checkReloadSites(); checkReloadSites();
String serverName = req.getServerName(); String serverName = req.getServerName();
@@ -307,7 +301,8 @@ public class JDBCTableSiteIdentifier implements SiteIdentifier
return other._rdomain.compareTo(_rdomain); return other._rdomain.compareTo(_rdomain);
} }
@Override public String toString () @Override // from Object
public String toString ()
{ {
return "[" + domain + " => " + siteId + "]"; return "[" + domain + " => " + siteId + "]";
} }
@@ -38,12 +38,6 @@ public interface SiteIdentifier
/** The string identifier for the default site. */ /** The string identifier for the default site. */
public static final String DEFAULT_SITE_STRING = "default"; public static final String DEFAULT_SITE_STRING = "default";
/** Use this to override the site identification process by calling {@link
* HttpServletRequest#setAttribute} with this key and an Integer value indicating the site id
* to be used, and any call to {@link #identifySite} on that request will return the overridden
* site. */
public static final String SITE_ID_OVERRIDE_KEY = "SiteIdentifierOverride";
/** /**
* Returns the unique identifier for the site on which this request originated. That may be * Returns the unique identifier for the site on which this request originated. That may be
* divined by looking at the server name, or perhaps a request parameter, or part of the path * divined by looking at the server name, or perhaps a request parameter, or part of the path