|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.site.Site
public final class Site
A Site object identifies a Skin + Locale pairing. This bean holds nothing more than the name of the virtual host (siteName) and locale used to access this Skin. It is used as a key to obtain the correct factory instances in the application. There is usually only one Skin per siteName and it is left up to the skin to handle different locales. . Immutable. Does a little bit of niggling wiggling to load the DEFAULT site. See static constructor.
| Nested Class Summary | |
|---|---|
static interface |
Site.Context
During construction of any site we must know who the parent site is going to be. |
| Field Summary | |
|---|---|
static String |
CONFIGURATION_FILE
Name of the resource to find the PARENT_SITE_KEY property. |
static Site |
DEFAULT
the default SiteSearch. |
static String |
DEFAULT_SERVER_PORT_KEY
|
static String |
DEFAULT_SITE_KEY
Found from the configuration.properties resource found in this class's ClassLoader. |
static String |
DEFAULT_SITE_LOCALE_KEY
|
static String |
NAME_KEY
Property key for a site object. |
static String |
PARENT_SITE_KEY
Property key for site parent's name. |
static int |
SERVER_PORT
the server's actual port. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
getConfigContext()
Getter for property cxtName. |
Locale |
getLocale()
Getter for property locale. |
String |
getName()
Getter for property siteName. |
Site |
getParent()
the parent to this site. |
SiteContext |
getSiteContext()
Get a SiteContext for this site. |
String |
getTemplateDir()
Getter for property (velocity) template directory. |
static String |
getUniqueName(String siteName,
Locale locale)
Get a uniqueName given a pair of siteName and locale. |
int |
hashCode()
|
String |
toString()
|
static Site |
valueOf(Site.Context cxt,
String siteName,
Locale locale)
Get the instance for the given siteName. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_SITE_KEY
public static final String DEFAULT_SITE_LOCALE_KEY
public static final String DEFAULT_SERVER_PORT_KEY
public static final String PARENT_SITE_KEY
public static final String NAME_KEY
public static final String CONFIGURATION_FILE
public static final Site DEFAULT
public static final int SERVER_PORT
| Method Detail |
|---|
public SiteContext getSiteContext()
public Site getParent()
public String getName()
public String getConfigContext()
public String getTemplateDir()
public Locale getLocale()
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public static Site valueOf(Site.Context cxt,
String siteName,
Locale locale)
cxt - the cxt to use during creation. null will prevent constructing a new site.siteName - the virtual host name.locale - the locale desired
IllegalArgumentException - when there exists no skin matching the siteName argument.
public static String getUniqueName(String siteName,
Locale locale)
siteName - locale -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||