org.apache.tapestry.services
Interface Infrastructure

All Known Implementing Classes:
InfrastructureImpl

public interface Infrastructure

Tapestry infrastructure ... key services required by the IEngine instance.

Since:
4.0
Author:
Howard Lewis Ship

Method Summary
 java.lang.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.
 java.lang.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.
 java.lang.String getOutputEncoding()
           
 IPageSource getPageSource()
          Returns the source for pages.
 java.lang.Object getProperty(java.lang.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(java.lang.String mode)
          Initializes the Infrastructure for a particular mode.
 void setLocale(java.util.Locale value)
          Invoked when the locale for the current thread is changed.
 

Method Detail

initialize

public void initialize(java.lang.String mode)
Initializes the Infrastructure for a particular mode.

Throws:
java.lang.IllegalStateException - if the Infrastructure has already been initialized.

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns a named property.

Throws:
java.lang.IllegalStateException - if the Infrastructure has not yet been initialized.
org.apache.hivemind.ApplicationRuntimeException - if no value has been contributed for specified property name.

getApplicationSpecification

public IApplicationSpecification getApplicationSpecification()
Returns the IApplicationSpecification for the current application.


getApplicationPropertySource

public IPropertySource getApplicationPropertySource()
Returns an IPropertySource configured to search the application specification, etc. See tapestry.ApplicationPropertySource.


getGlobalPropertySource

public IPropertySource getGlobalPropertySource()
Returns an IPropertySource configured to search the servlet, servlet context, and factory defaults.


getResetEventHub

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


getComponentMessagesSource

public ComponentMessagesSource getComponentMessagesSource()
Returns the source of component message bundles.


getTemplateSource

public TemplateSource getTemplateSource()
Returns component or page template contents.


getSpecificationSource

public ISpecificationSource getSpecificationSource()
Returns the source of all application, page, component and library specifications.


getObjectPool

public ObjectPool getObjectPool()
Returns a generic, shared ObjectPool instance.


getPageSource

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


getClassResolver

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


getDataSqueezer

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


getScriptSource

public IScriptSource getScriptSource()
The source for ready-to-execute versions of Tapestry script templates.


getServiceMap

public ServiceMap getServiceMap()
The object from which engine services are obtained.


getRequestExceptionReporter

public RequestExceptionReporter getRequestExceptionReporter()
Service used to report exceptions to the console.


getResponseRenderer

public ResponseRenderer getResponseRenderer()
Renders the active page as the response.


getLinkFactory

public LinkFactory getLinkFactory()
Constructs ILink instances for IEngineServices.


getRequestCycleFactory

public RequestCycleFactory getRequestCycleFactory()
Used by the IEngine to create instances of IRequestCycle.


getApplicationStateManager

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


getRequest

public WebRequest getRequest()
Returns the request for the current request cycle.


getResponse

public WebResponse getResponse()
Returns the response for the current request cycle.


getContextPath

public java.lang.String getContextPath()
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).


getApplicationId

public java.lang.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. For a servlet-based Tapestry application, the id is the name of the servlet.


getContextRoot

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


getComponentPropertySource

public ComponentPropertySource getComponentPropertySource()
Returns an object used to access component meta-data properties.


setLocale

public void setLocale(java.util.Locale value)
Invoked when the locale for the current thread is changed.

See Also:
IEngine.setLocale(Locale)

getOutputEncoding

public java.lang.String getOutputEncoding()

getMarkupWriterSource

public MarkupWriterSource getMarkupWriterSource()

getHTMLDescriber

public HTMLDescriber getHTMLDescriber()

getExceptionPresenter

public ExceptionPresenter getExceptionPresenter()
Responsible for presenting an exception error report to the user.


getListenerMapSource

public ListenerMapSource getListenerMapSource()
The source for ListenerMaps, for components or other objects.


getStaleSessionExceptionPresenter

public StaleSessionExceptionPresenter getStaleSessionExceptionPresenter()
The service responsible for reporting StaleSessionExceptions.


getStaleLinkExceptionPresenter

public StaleLinkExceptionPresenter getStaleLinkExceptionPresenter()
The service responsible for reporting StaleLinkExceptions.


getValueConverter

public ValueConverter getValueConverter()
Service used to convert and coerce types.


getListenerInvoker

public ListenerInvoker getListenerInvoker()
Service (possibly a pipeline) that will invoke IActionListener objects.


getAssetFactory

public AssetFactory getAssetFactory()
Service that is used to convert Resources into IAssets.


getCookieSource

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


getClassFinder

public ClassFinder getClassFinder()
Used to search for a class name within a list of packages.


getRequestCycle

public IRequestCycle getRequestCycle()
Returns the request cycle for the current thread.