| java.lang.Object com.uwyn.rife.engine.Site
Site | public class Site (Code) | | A Site contains all the elements that will be used to handle
web requests
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3806 $ since: 1.0 |
Constructor Summary | |
protected | Site() |
Method Summary | |
void | addElementInfo(String id, ElementInfo elementInfo, String url) | void | addFallback(ElementInfo elementInfo, String url) | public void | addListener(SiteListener listener) Adds the specified listener to receive site-related events. | void | addResourceModificationTime(UrlResource location, long modificationTime) | public synchronized void | clearCaches() | public boolean | containsId(String id) Indicates whether an absolute element ID is present in the site. | public boolean | containsUrl(String url) Indicates whether a certain URL has a mapping in this site. | public ElementToService | findElementForRequest(String elementUrl) Looks for an element that corresponds to a particular request URL.
This method will determine the best element match by stepping up the path
segments. | public void | fireModified() Notifies the registered listeners that one of the site's resources has
been detected as being modified. | public static String | getAbsoluteId(String id, ElementInfo reference) Transforms the provided element ID into an absolute element ID. | Map<String, Method> | getCachedInbeanSetters(String elementId) | Map<String, Method> | getCachedIncookieSetters(String elementId) | Map<String, Method> | getCachedInputSetters(String elementId) | Map<String, Method> | getCachedOutbeanGetters(String elementId) | Map<String, Method> | getCachedOutcookieGetters(String elementId) | Map<String, Method> | getCachedOutputGetters(String elementId) | Map<String, Method> | getCachedPropertySetters(String elementId) | public static String | getCanonicalId(String id) Transforms the provided element ID into a canonical ID without any
parent indicators. | public ContinuationManager | getContinuationManager() Retrieves the continuation manager that is used by this site. | Collection<ElementInfo> | getElementInfos() | public Collection<String> | getIds() Retrieves the collection of all the element IDs that are present in
this site. | public static Site | getRepInstance() Retrieves the default object as a Site from the participant
that was returned by
Site.getRepParticipant . | public static Participant | getRepParticipant() Retrieves the participant named "ParticipantSite " from the
default repository. | public ResourceFinder | getResourceFinder() Retrieves the resource finder that was used to populate this site. | public Map<UrlResource, Long> | getResourceModificationTimes() Retrieves a map of all the resources that were used to construct the site
and their last modification time. | SubmissionSettersCache | getSubmissionSettersCache(String elementId) | public Collection<String> | getUrls() Retrieves the collection of all the URLs that are present in this site. | public static boolean | hasRepInstance() Indicates whether the default repository has a participant named
"ParticipantSite ". | void | mapElementId(String id, String url) | public synchronized void | populateFromOther(Site otherSite) Populates this site instance from another site instance.
This method is typically used during the implementation of a
SiteListener.modified method. | void | putCachedInbeanSetters(String elementId, Map<String, Method> inbeanSetters) | void | putCachedIncookieSetters(String elementId, Map<String, Method> incookieSetters) | void | putCachedInputSetters(String elementId, Map<String, Method> inputSetters) | void | putCachedOutbeanGetters(String elementId, Map<String, Method> outbeanGetters) | void | putCachedOutcookieGetters(String elementId, Map<String, Method> outcookieGetters) | void | putCachedOutputGetters(String elementId, Map<String, Method> outputGetters) | void | putCachedPropertySetters(String elementId, Map<String, Method> propertySetters) | void | putSubmissionSettersCache(String elementId, SubmissionSettersCache submissionSettersCache) | public void | removeListener(SiteListener listener) Removes the site listener so that it no longer receives any events. | public void | resetLastModificationCheck() Resets the last modification check so that the next request will always
check for modifications. | public ElementInfo | resolveId(String id) Retrieves the element information in this site that corresponds to
provided absolute element ID. | public ElementInfo | resolveId(String id, ElementInfo reference) Retrieves the element information in this site that corresponds to
provided element ID. | public ElementInfo | resolveUrl(String url, String pathinfo) Looks up the information of the element that is responsible for handling
a certain URL and pathinfo. | public ElementInfo | searchFallback(String url) Searches which element would be used as a fallback for a particilar URL. | void | setDeclarationName(String declarationName) | void | setResourceFinder(ResourceFinder resourceFinder) |
DEFAULT_PARTICIPANT_NAME | final public static String DEFAULT_PARTICIPANT_NAME(Code) | | |
addListener | public void addListener(SiteListener listener)(Code) | | Adds the specified listener to receive site-related events.
If listener is null, no exception is thrown and no action
is performed.
Parameters: listener - The site listener that will be added. See Also: SiteListener See Also: Site.removeListener(SiteListener) since: 1.5 |
addResourceModificationTime | void addResourceModificationTime(UrlResource location, long modificationTime)(Code) | | |
clearCaches | public synchronized void clearCaches()(Code) | | Clears the cached data
since: 1.5.1 |
containsId | public boolean containsId(String id)(Code) | | Indicates whether an absolute element ID is present in the site.
Parameters: id - the absolute element ID that should be looked up true if the element ID could be found; orfalse otherwise since: 1.0
|
containsUrl | public boolean containsUrl(String url)(Code) | | Indicates whether a certain URL has a mapping in this site.
Parameters: url - the URL that should be looked up true if the URL corresponds to and element; orfalse otherwise since: 1.0
|
findElementForRequest | public ElementToService findElementForRequest(String elementUrl)(Code) | | Looks for an element that corresponds to a particular request URL.
This method will determine the best element match by stepping up the path
segments. It will also look for fallback elements, cater for trailing
slashes, and figure out the correct pathinfo.
Basically, this is the method that is used by the Gate to
figure out which element to service when a request arrives.
Parameters: elementUrl - the URL that will be used to search for the element an instance of ElementToService when an element matchwas found; or null if no suitable element could be found. since: 1.6
|
fireModified | public void fireModified()(Code) | | Notifies the registered listeners that one of the site's resources has
been detected as being modified.
See Also: SiteListener since: 1.5 |
getAbsoluteId | public static String getAbsoluteId(String id, ElementInfo reference)(Code) | | Transforms the provided element ID into an absolute element ID.
Parameters: id - the element ID that should be transformed Parameters: reference - the element information that should be used as areference to look up the element information from when a relative IDis provided the absolute element ID that corresponds to the providedelement ID since: 1.0 |
getCanonicalId | public static String getCanonicalId(String id)(Code) | | Transforms the provided element ID into a canonical ID without any
parent indicators.
Parameters: id - the element ID that should be transformed the canonical element ID that corresponds to the providedelement ID since: 1.0 |
getContinuationManager | public ContinuationManager getContinuationManager()(Code) | | Retrieves the continuation manager that is used by this site.
the site's contiuation manager since: 1.5 |
getIds | public Collection<String> getIds()(Code) | | Retrieves the collection of all the element IDs that are present in
this site.
the collection of all the element IDs in this site since: 1.0 |
getRepParticipant | public static Participant getRepParticipant()(Code) | | Retrieves the participant named "ParticipantSite " from the
default repository.
the participant; ornull if no such participant was present See Also: Rep.getDefaultRepository See Also: Participant since: 1.0
|
getResourceFinder | public ResourceFinder getResourceFinder()(Code) | | Retrieves the resource finder that was used to populate this site.
this site's resource finder since: 1.4 |
getResourceModificationTimes | public Map<UrlResource, Long> getResourceModificationTimes()(Code) | | Retrieves a map of all the resources that were used to construct the site
and their last modification time.
the map of resources with their modification times; or null if the site was totally built manually or if theSITE_AUTO_RELOAD configuration parameter was not set totrue at the time of construction. since: 1.0
|
getSubmissionSettersCache | SubmissionSettersCache getSubmissionSettersCache(String elementId)(Code) | | |
getUrls | public Collection<String> getUrls()(Code) | | Retrieves the collection of all the URLs that are present in this site.
the collection of all the URLs in this site since: 1.0 |
hasRepInstance | public static boolean hasRepInstance()(Code) | | Indicates whether the default repository has a participant named
"ParticipantSite ".
true if that participant was present; orfalse otherwise See Also: Rep.getDefaultRepository See Also: Participant since: 1.0
|
populateFromOther | public synchronized void populateFromOther(Site otherSite)(Code) | | Populates this site instance from another site instance.
This method is typically used during the implementation of a
SiteListener.modified method. Doing this, will ensure that the active request as well as
subsequent requests will be executed against the data of the other site
instance.
Parameters: otherSite - the other site that will be used to replace this site'sdata with since: 1.5 |
putSubmissionSettersCache | void putSubmissionSettersCache(String elementId, SubmissionSettersCache submissionSettersCache)(Code) | | |
removeListener | public void removeListener(SiteListener listener)(Code) | | Removes the site listener so that it no longer receives any events. This
method performs no function, nor does it throw an exception if the listener
specified by the argument was not previously added to this component or is
null .
Parameters: listener - The site listener that will be removed. See Also: SiteListener See Also: Site.addListener(SiteListener) since: 1.5 |
resetLastModificationCheck | public void resetLastModificationCheck()(Code) | | Resets the last modification check so that the next request will always
check for modifications.
since: 1.5.1 |
resolveId | public ElementInfo resolveId(String id) throws EngineException(Code) | | Retrieves the element information in this site that corresponds to
provided absolute element ID.
Parameters: id - the absolute element ID that should be looked up the corresponding element information; ornull if the absolute element ID couldn't be found since: 1.0
|
resolveId | public ElementInfo resolveId(String id, ElementInfo reference) throws EngineException(Code) | | Retrieves the element information in this site that corresponds to
provided element ID.
Parameters: id - the element ID that should be looked up Parameters: reference - the element information that should be used as areference to look up the element information from when a relative IDis provided the corresponding element information; ornull if the element ID couldn't be found since: 1.0
|
resolveUrl | public ElementInfo resolveUrl(String url, String pathinfo) throws EngineException(Code) | | Looks up the information of the element that is responsible for handling
a certain URL and pathinfo.
Parameters: url - the URL that should be looked up Parameters: pathinfo - the pathinfo that should be taken into account the corresponding element information; ornull if the URL and pathinfo aren't registered in this site since: 1.4
|
searchFallback | public ElementInfo searchFallback(String url) throws EngineException(Code) | | Searches which element would be used as a fallback for a particilar URL.
Parameters: url - the URL for which a fallback should be found the fallback element; ornull if no fallback is available for that URL since: 1.0
|
setDeclarationName | void setDeclarationName(String declarationName)(Code) | | |
|
|