| com.methodhead.aikp.AutoIntKeyPersistable com.methodhead.sitecontext.SiteContext
Method Summary | |
public int | compareTo(Object o) Compares this site context using the name of the first domain, if any, and
then any path. | public void | delete() Deletes this site context and any events associated with it. | public boolean | equals(Object o) Returns true if o is a SiteContext and has the
same id as this object. | public static SiteContext | getContext(HttpServletRequest request) Gets the site context, looking first in the session, then in the request
(NEEDS UNIT TESTING). | public static SiteContext | getDefaultContext() Returns the default site context, creating it in the database if
necessary. | public List | getDomains() Returns the site context's domains as a list of Strings. | public int | hashCode() Returns this site context's id. | protected void | init() Initializes site context fields. | public void | load(Key key) | public static List | loadAll() Loads all site contexts in the database, sorted according to the order
specified by
SiteContext.compareTo compareTo() . | public boolean | loadForDomainAndPath(String domain, String path) Loads the context for domain and path, returning
true if it was successfully loaded, or false if no such
context exists. | public void | save() | public void | saveNew() | public static void | setContext(HttpServletRequest request, SiteContext context) Sets the site context in the session. | public String | toString() Returns a human-readable representation of this site context. |
SITECONTEXT_KEY | final public static String SITECONTEXT_KEY(Code) | | |
SiteContext | public SiteContext()(Code) | | |
SiteContext | public SiteContext(DynaClass dynaClass)(Code) | | |
compareTo | public int compareTo(Object o)(Code) | | Compares this site context using the name of the first domain, if any, and
then any path.
|
delete | public void delete()(Code) | | Deletes this site context and any events associated with it.
|
equals | public boolean equals(Object o)(Code) | | Returns true if o is a SiteContext and has the
same id as this object.
|
getContext | public static SiteContext getContext(HttpServletRequest request)(Code) | | Gets the site context, looking first in the session, then in the request
(NEEDS UNIT TESTING). Returns null if no site context is found.
|
getDefaultContext | public static SiteContext getDefaultContext()(Code) | | Returns the default site context, creating it in the database if
necessary. The default context always has id 0. If this method
ends up creating the default context, it won't create any domains for it,
nor will it set a path.
|
getDomains | public List getDomains()(Code) | | Returns the site context's domains as a list of Strings.
|
hashCode | public int hashCode()(Code) | | Returns this site context's id.
|
init | protected void init()(Code) | | Initializes site context fields.
|
loadAll | public static List loadAll()(Code) | | Loads all site contexts in the database, sorted according to the order
specified by
SiteContext.compareTo compareTo() .
|
loadForDomainAndPath | public boolean loadForDomainAndPath(String domain, String path)(Code) | | Loads the context for domain and path, returning
true if it was successfully loaded, or false if no such
context exists.
|
saveNew | public void saveNew()(Code) | | |
toString | public String toString()(Code) | | Returns a human-readable representation of this site context.
|
|
|