org.apache.tapestry.services.impl
Class InfrastructureImpl

java.lang.Object
  |
  +--org.apache.tapestry.services.impl.InfrastructureImpl
All Implemented Interfaces:
Infrastructure

public class InfrastructureImpl
extends java.lang.Object
implements Infrastructure

Allows access to selected HiveMind services.

Since:
3.1
Author:
Howard Lewis Ship

Constructor Summary
InfrastructureImpl()
           
 
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 IPropertySourceconfigured to search the application specification, etc.
 IApplicationSpecification getApplicationSpecification()
          Returns the IApplicationSpecificationfor the current application.
 ApplicationStateManager getApplicationStateManager()
          Accesses application state objects (Visit and Global from Tapestry 3.0, but now more can be created).
 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.
 DataSqueezer getDataSqueezer()
          The DataSqueezer, used when constructing and decoding values stored in URLs (as query parameters or hidden form fields).
 IPropertySource getGlobalPropertySource()
          Returns an IPropertySource configured to search the servlet, servlet context, and factory defaults.
 LinkFactory getLinkFactory()
          Constructs ILinkinstances for IEngineServices.
 ObjectPool getObjectPool()
          Returns a generic, shared ObjectPool instance.
 IPageSource getPageSource()
          Returns the source for pages.
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the request for the current request.
 RequestCycleFactory getRequestCycleFactory()
          Used by the IEngineto create instances of IRequestCycle.
 RequestExceptionReporter getRequestExceptionReporter()
          Service used to report exceptions to the console.
 ResetEventCoordinator getResetEventCoordinator()
          Returns the coordinator to be notified of reset events (which will, in turn, notify other services).
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the response for the current request.
 ResponseRenderer getResponseRenderer()
          Renders the active page as the response.
 IScriptSource getScriptSource()
          The source for read-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.
 TemplateSource getTemplateSource()
          Returns component or page template contents.
 void setApplicationId(java.lang.String applicationId)
           
 void setApplicationPropertySource(IPropertySource source)
           
 void setApplicationSpecification(IApplicationSpecification specification)
           
 void setApplicationStateManager(ApplicationStateManager applicationStateManager)
           
 void setClassResolver(org.apache.hivemind.ClassResolver resolver)
           
 void setComponentMessagesSource(ComponentMessagesSource source)
           
 void setComponentPropertySource(ComponentPropertySource componentPropertySource)
           
 void setContext(javax.servlet.ServletContext context)
           
 void setDataSqueezer(DataSqueezer dataSqueezer)
           
 void setGlobalPropertySource(IPropertySource globalPropertySource)
           
 void setLinkFactory(LinkFactory linkFactory)
           
 void setObjectPool(ObjectPool pool)
           
 void setPageSource(IPageSource source)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 void setRequestCycleFactory(RequestCycleFactory requestCycleFactory)
           
 void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)
           
 void setResetEventCoordinator(ResetEventCoordinator coordinator)
           
 void setResponse(javax.servlet.http.HttpServletResponse response)
           
 void setResponseRenderer(ResponseRenderer responseRenderer)
           
 void setScriptSource(IScriptSource scriptSource)
           
 void setServiceMap(ServiceMap serviceMap)
           
 void setSpecificationSource(ISpecificationSource source)
           
 void setTemplateSource(TemplateSource source)
           
 
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

getScriptSource

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

Specified by:
getScriptSource in interface Infrastructure

setScriptSource

public void setScriptSource(IScriptSource scriptSource)

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

setDataSqueezer

public void setDataSqueezer(DataSqueezer dataSqueezer)

setApplicationPropertySource

public void setApplicationPropertySource(IPropertySource source)

getApplicationPropertySource

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

Specified by:
getApplicationPropertySource 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

getResetEventCoordinator

public ResetEventCoordinator getResetEventCoordinator()
Description copied from interface: Infrastructure
Returns the coordinator to be notified of reset events (which will, in turn, notify other services).

Specified by:
getResetEventCoordinator in interface Infrastructure

setComponentMessagesSource

public void setComponentMessagesSource(ComponentMessagesSource source)

setResetEventCoordinator

public void setResetEventCoordinator(ResetEventCoordinator coordinator)

getTemplateSource

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

Specified by:
getTemplateSource in interface Infrastructure

setTemplateSource

public void setTemplateSource(TemplateSource source)

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

setSpecificationSource

public void setSpecificationSource(ISpecificationSource source)

getObjectPool

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

Specified by:
getObjectPool in interface Infrastructure

setObjectPool

public void setObjectPool(ObjectPool pool)

getApplicationSpecification

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

Specified by:
getApplicationSpecification in interface Infrastructure

setApplicationSpecification

public void setApplicationSpecification(IApplicationSpecification specification)

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

setPageSource

public void setPageSource(IPageSource source)

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

setClassResolver

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

getServiceMap

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

Specified by:
getServiceMap in interface Infrastructure

setServiceMap

public void setServiceMap(ServiceMap serviceMap)

getRequestExceptionReporter

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

Specified by:
getRequestExceptionReporter in interface Infrastructure

setRequestExceptionReporter

public void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)

getResponseRenderer

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

Specified by:
getResponseRenderer in interface Infrastructure

setResponseRenderer

public void setResponseRenderer(ResponseRenderer responseRenderer)

getLinkFactory

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

Specified by:
getLinkFactory in interface Infrastructure

setLinkFactory

public void setLinkFactory(LinkFactory linkFactory)

getRequestCycleFactory

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

Specified by:
getRequestCycleFactory in interface Infrastructure

setRequestCycleFactory

public void setRequestCycleFactory(RequestCycleFactory requestCycleFactory)

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

setApplicationStateManager

public void setApplicationStateManager(ApplicationStateManager applicationStateManager)

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Description copied from interface: Infrastructure
Returns the request for the current request.

Specified by:
getRequest in interface Infrastructure

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Description copied from interface: Infrastructure
Returns the response for the current request.

Specified by:
getResponse in interface Infrastructure

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse response)

getContextPath

public java.lang.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

getApplicationId

public java.lang.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

setApplicationId

public void setApplicationId(java.lang.String applicationId)

setContext

public void setContext(javax.servlet.ServletContext context)

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

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

setGlobalPropertySource

public void setGlobalPropertySource(IPropertySource globalPropertySource)

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

setComponentPropertySource

public void setComponentPropertySource(ComponentPropertySource componentPropertySource)