org.apache.tapestry.services.impl
Class InfrastructureImpl

java.lang.Object
  extended by org.apache.tapestry.services.impl.InfrastructureImpl
All Implemented Interfaces:
Infrastructure

public class InfrastructureImpl
extends Object
implements Infrastructure

Allows access to selected HiveMind services.

Since:
4.0
Author:
Howard Lewis Ship

Constructor Summary
InfrastructureImpl()
           
 
Method Summary
 String getApplicationId()
          Returns the application's id; a unique name that is incorporated into various session attribute keys and into certain paths when searching for resources.
 IPropertySource getApplicationPropertySource()
          Returns an IPropertySource configured to search the application specification, etc.
 IApplicationSpecification getApplicationSpecification()
          Returns the IApplicationSpecification for the current application.
 ApplicationStateManager getApplicationStateManager()
          Accesses application state objects (Visit and Global from Tapestry 3.0, but now more can be created).
 AssetFactory getAssetFactory()
          Service that is used to convert Resources into IAssets.
 ClassFinder getClassFinder()
          Used to search for a class name within a list of packages.
 org.apache.hivemind.ClassResolver getClassResolver()
          Returns the ClassResolver used by the Tapestry HiveMind module, which should be sufficient for use throughout the application.
 ComponentMessagesSource getComponentMessagesSource()
          Returns the source of component message bundles.
 ComponentPropertySource getComponentPropertySource()
          Returns an object used to access component meta-data properties.
 String getContextPath()
          Returns the context path, which identifies the application within the application server.
 org.apache.hivemind.Resource getContextRoot()
          Returns the root context resource, which is the starting point when looking for resources within the application.
 CookieSource getCookieSource()
          Service used to access HTTP Cookies.
 DataSqueezer getDataSqueezer()
          The DataSqueezer, used when constructing and decoding values stored in URLs (as query parameters or hidden form fields).
 ExceptionPresenter getExceptionPresenter()
          Responsible for presenting an exception error report to the user.
 IPropertySource getGlobalPropertySource()
          Returns an IPropertySource configured to search the servlet, servlet context, and factory defaults.
 HTMLDescriber getHTMLDescriber()
           
 LinkFactory getLinkFactory()
          Constructs ILink instances for IEngineServices.
 ListenerInvoker getListenerInvoker()
          Service (possibly a pipeline) that will invoke IActionListener objects.
 ListenerMapSource getListenerMapSource()
          The source for ListenerMaps, for components or other objects.
 MarkupWriterSource getMarkupWriterSource()
           
 ObjectPool getObjectPool()
          Returns a generic, shared ObjectPool instance.
 String getOutputEncoding()
           
 IPageSource getPageSource()
          Returns the source for pages.
 Object getProperty(String propertyName)
          Returns a named property.
 WebRequest getRequest()
          Returns the request for the current request cycle.
 IRequestCycle getRequestCycle()
          Returns the request cycle for the current thread.
 RequestCycleFactory getRequestCycleFactory()
          Used by the IEngine to create instances of IRequestCycle.
 RequestExceptionReporter getRequestExceptionReporter()
          Service used to report exceptions to the console.
 ResetEventHub getResetEventHub()
          Returns the coordinator to be notified of reset events (which will, in turn, notify other services that they should discard cached data).
 WebResponse getResponse()
          Returns the response for the current request cycle.
 ResponseRenderer getResponseRenderer()
          Renders the active page as the response.
 IScriptSource getScriptSource()
          The source for ready-to-execute versions of Tapestry script templates.
 ServiceMap getServiceMap()
          The object from which engine services are obtained.
 ISpecificationSource getSpecificationSource()
          Returns the source of all application, page, component and library specifications.
 StaleLinkExceptionPresenter getStaleLinkExceptionPresenter()
          The service responsible for reporting StaleLinkExceptions.
 StaleSessionExceptionPresenter getStaleSessionExceptionPresenter()
          The service responsible for reporting StaleSessionExceptions.
 TemplateSource getTemplateSource()
          Returns component or page template contents.
 ValueConverter getValueConverter()
          Service used to convert and coerce types.
 void initialize(String mode)
          Initializes the Infrastructure for a particular mode.
 void setClassResolver(org.apache.hivemind.ClassResolver classResolver)
           
 void setErrorLog(org.apache.hivemind.ErrorLog errorLog)
           
 void setLocale(Locale locale)
          Invoked when the locale for the current thread is changed.
 void setLocaleManager(RequestLocaleManager manager)
           
 void setNormalContributions(List normalContributions)
           
 void setOverrideContributions(List overrideContributions)
           
 void setThreadLocale(org.apache.hivemind.service.ThreadLocale threadLocale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfrastructureImpl

public InfrastructureImpl()
Method Detail

setLocale

public void setLocale(Locale locale)
Description copied from interface: Infrastructure
Invoked when the locale for the current thread is changed.

Specified by:
setLocale in interface Infrastructure
See Also:
IEngine.setLocale(Locale)

getApplicationId

public String getApplicationId()
Description copied from interface: Infrastructure
Returns the application's id; a unique name that is incorporated into various session attribute keys and into certain paths when searching for resources. For a servlet-based Tapestry application, the id is the name of the servlet.

Specified by:
getApplicationId in interface Infrastructure

getApplicationPropertySource

public IPropertySource getApplicationPropertySource()
Description copied from interface: Infrastructure
Returns an IPropertySource configured to search the application specification, etc. See tapestry.ApplicationPropertySource.

Specified by:
getApplicationPropertySource in interface Infrastructure

getApplicationSpecification

public IApplicationSpecification getApplicationSpecification()
Description copied from interface: Infrastructure
Returns the IApplicationSpecification for the current application.

Specified by:
getApplicationSpecification in interface Infrastructure

getApplicationStateManager

public ApplicationStateManager getApplicationStateManager()
Description copied from interface: Infrastructure
Accesses application state objects (Visit and Global from Tapestry 3.0, but now more can be created).

Specified by:
getApplicationStateManager in interface Infrastructure

getClassResolver

public org.apache.hivemind.ClassResolver getClassResolver()
Description copied from interface: Infrastructure
Returns the ClassResolver used by the Tapestry HiveMind module, which should be sufficient for use throughout the application.

Specified by:
getClassResolver in interface Infrastructure

getComponentMessagesSource

public ComponentMessagesSource getComponentMessagesSource()
Description copied from interface: Infrastructure
Returns the source of component message bundles.

Specified by:
getComponentMessagesSource in interface Infrastructure

getComponentPropertySource

public ComponentPropertySource getComponentPropertySource()
Description copied from interface: Infrastructure
Returns an object used to access component meta-data properties.

Specified by:
getComponentPropertySource in interface Infrastructure

getContextPath

public String getContextPath()
Description copied from interface: Infrastructure
Returns the context path, which identifies the application within the application server. Context path should be used as a prefix for any URLs generated. The context path may be the empty string, and will not end in a slash (servlet paths should start with a slash).

Specified by:
getContextPath in interface Infrastructure

getContextRoot

public org.apache.hivemind.Resource getContextRoot()
Description copied from interface: Infrastructure
Returns the root context resource, which is the starting point when looking for resources within the application.

Specified by:
getContextRoot in interface Infrastructure

getDataSqueezer

public DataSqueezer getDataSqueezer()
Description copied from interface: Infrastructure
The DataSqueezer, used when constructing and decoding values stored in URLs (as query parameters or hidden form fields).

Specified by:
getDataSqueezer in interface Infrastructure

getGlobalPropertySource

public IPropertySource getGlobalPropertySource()
Description copied from interface: Infrastructure
Returns an IPropertySource configured to search the servlet, servlet context, and factory defaults.

Specified by:
getGlobalPropertySource in interface Infrastructure

getLinkFactory

public LinkFactory getLinkFactory()
Description copied from interface: Infrastructure
Constructs ILink instances for IEngineServices.

Specified by:
getLinkFactory in interface Infrastructure

getObjectPool

public ObjectPool getObjectPool()
Description copied from interface: Infrastructure
Returns a generic, shared ObjectPool instance.

Specified by:
getObjectPool in interface Infrastructure

getPageSource

public IPageSource getPageSource()
Description copied from interface: Infrastructure
Returns the source for pages. The source is a cache of pages, but also can create new instances when needed.

Specified by:
getPageSource in interface Infrastructure

getRequest

public WebRequest getRequest()
Description copied from interface: Infrastructure
Returns the request for the current request cycle.

Specified by:
getRequest in interface Infrastructure

getRequestCycleFactory

public RequestCycleFactory getRequestCycleFactory()
Description copied from interface: Infrastructure
Used by the IEngine to create instances of IRequestCycle.

Specified by:
getRequestCycleFactory in interface Infrastructure

getRequestExceptionReporter

public RequestExceptionReporter getRequestExceptionReporter()
Description copied from interface: Infrastructure
Service used to report exceptions to the console.

Specified by:
getRequestExceptionReporter in interface Infrastructure

getResetEventHub

public ResetEventHub getResetEventHub()
Description copied from interface: Infrastructure
Returns the coordinator to be notified of reset events (which will, in turn, notify other services that they should discard cached data).

Specified by:
getResetEventHub in interface Infrastructure

getResponse

public WebResponse getResponse()
Description copied from interface: Infrastructure
Returns the response for the current request cycle.

Specified by:
getResponse in interface Infrastructure

getResponseRenderer

public ResponseRenderer getResponseRenderer()
Description copied from interface: Infrastructure
Renders the active page as the response.

Specified by:
getResponseRenderer in interface Infrastructure

getScriptSource

public IScriptSource getScriptSource()
Description copied from interface: Infrastructure
The source for ready-to-execute versions of Tapestry script templates.

Specified by:
getScriptSource in interface Infrastructure

getServiceMap

public ServiceMap getServiceMap()
Description copied from interface: Infrastructure
The object from which engine services are obtained.

Specified by:
getServiceMap in interface Infrastructure

getSpecificationSource

public ISpecificationSource getSpecificationSource()
Description copied from interface: Infrastructure
Returns the source of all application, page, component and library specifications.

Specified by:
getSpecificationSource in interface Infrastructure

getTemplateSource

public TemplateSource getTemplateSource()
Description copied from interface: Infrastructure
Returns component or page template contents.

Specified by:
getTemplateSource in interface Infrastructure

getOutputEncoding

public String getOutputEncoding()
Specified by:
getOutputEncoding in interface Infrastructure

getMarkupWriterSource

public MarkupWriterSource getMarkupWriterSource()
Specified by:
getMarkupWriterSource in interface Infrastructure

getHTMLDescriber

public HTMLDescriber getHTMLDescriber()
Specified by:
getHTMLDescriber in interface Infrastructure

getExceptionPresenter

public ExceptionPresenter getExceptionPresenter()
Description copied from interface: Infrastructure
Responsible for presenting an exception error report to the user.

Specified by:
getExceptionPresenter in interface Infrastructure

getListenerMapSource

public ListenerMapSource getListenerMapSource()
Description copied from interface: Infrastructure
The source for ListenerMaps, for components or other objects.

Specified by:
getListenerMapSource in interface Infrastructure

getStaleSessionExceptionPresenter

public StaleSessionExceptionPresenter getStaleSessionExceptionPresenter()
Description copied from interface: Infrastructure
The service responsible for reporting StaleSessionExceptions.

Specified by:
getStaleSessionExceptionPresenter in interface Infrastructure

getStaleLinkExceptionPresenter

public StaleLinkExceptionPresenter getStaleLinkExceptionPresenter()
Description copied from interface: Infrastructure
The service responsible for reporting StaleLinkExceptions.

Specified by:
getStaleLinkExceptionPresenter in interface Infrastructure

getValueConverter

public ValueConverter getValueConverter()
Description copied from interface: Infrastructure
Service used to convert and coerce types.

Specified by:
getValueConverter in interface Infrastructure

getListenerInvoker

public ListenerInvoker getListenerInvoker()
Description copied from interface: Infrastructure
Service (possibly a pipeline) that will invoke IActionListener objects.

Specified by:
getListenerInvoker in interface Infrastructure

getAssetFactory

public AssetFactory getAssetFactory()
Description copied from interface: Infrastructure
Service that is used to convert Resources into IAssets.

Specified by:
getAssetFactory in interface Infrastructure

getCookieSource

public CookieSource getCookieSource()
Description copied from interface: Infrastructure
Service used to access HTTP Cookies. This is only available for Servlet Tapestry; a placeholder will be provided for Portlet Tapestry.

Specified by:
getCookieSource in interface Infrastructure

getClassFinder

public ClassFinder getClassFinder()
Description copied from interface: Infrastructure
Used to search for a class name within a list of packages.

Specified by:
getClassFinder in interface Infrastructure

getRequestCycle

public IRequestCycle getRequestCycle()
Description copied from interface: Infrastructure
Returns the request cycle for the current thread.

Specified by:
getRequestCycle in interface Infrastructure

getProperty

public Object getProperty(String propertyName)
Description copied from interface: Infrastructure
Returns a named property.

Specified by:
getProperty in interface Infrastructure

initialize

public void initialize(String mode)
Description copied from interface: Infrastructure
Initializes the Infrastructure for a particular mode.

Specified by:
initialize in interface Infrastructure

setClassResolver

public void setClassResolver(org.apache.hivemind.ClassResolver classResolver)

setThreadLocale

public void setThreadLocale(org.apache.hivemind.service.ThreadLocale threadLocale)

setNormalContributions

public void setNormalContributions(List normalContributions)

setOverrideContributions

public void setOverrideContributions(List overrideContributions)

setLocaleManager

public void setLocaleManager(RequestLocaleManager manager)

setErrorLog

public void setErrorLog(org.apache.hivemind.ErrorLog errorLog)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.