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
 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 setLocale(Locale value)
          Invoked when the locale for the current thread is changed.
 

Method Detail

initialize

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

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

getProperty

Object getProperty(String propertyName)
Returns a named property.

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

getApplicationSpecification

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


getApplicationPropertySource

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


getGlobalPropertySource

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


getResetEventHub

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

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


getTemplateSource

TemplateSource getTemplateSource()
Returns component or page template contents.


getSpecificationSource

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


getObjectPool

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


getPageSource

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


getClassResolver

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


getDataSqueezer

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


getScriptSource

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


getServiceMap

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


getRequestExceptionReporter

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


getResponseRenderer

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


getLinkFactory

LinkFactory getLinkFactory()
Constructs ILink instances for IEngineServices.


getRequestCycleFactory

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


getApplicationStateManager

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


getRequest

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


getResponse

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


getContextPath

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

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

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


getComponentPropertySource

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


setLocale

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

See Also:
IEngine.setLocale(Locale)

getOutputEncoding

String getOutputEncoding()

getMarkupWriterSource

MarkupWriterSource getMarkupWriterSource()

getHTMLDescriber

HTMLDescriber getHTMLDescriber()

getExceptionPresenter

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


getListenerMapSource

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


getStaleSessionExceptionPresenter

StaleSessionExceptionPresenter getStaleSessionExceptionPresenter()
The service responsible for reporting StaleSessionExceptions.


getStaleLinkExceptionPresenter

StaleLinkExceptionPresenter getStaleLinkExceptionPresenter()
The service responsible for reporting StaleLinkExceptions.


getValueConverter

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


getListenerInvoker

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


getAssetFactory

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


getCookieSource

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


getClassFinder

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


getRequestCycle

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



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