Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.internal.services
Class ComponentSourceImpl

    java.lang.Object
      org.apache.tapestry5.internal.services.ComponentSourceImpl

All Implemented Interfaces:
  ComponentSource

    public class ComponentSourceImpl

extends java.lang.Object
implements ComponentSource

Constructor Summary
`ComponentSourceImpl(RequestPageCache pageCache, ComponentClassResolver resolver, RequestGlobals globals)`

Method Summary
`Component` | `getActivePage()` Returns the active page, as defined by `RequestGlobals.getActivePageName()`.
`Component` | `getComponent(java.lang.String completeId)` Gets a component by its complete id.
`Component` | `getPage(java.lang.Class pageClass)` A convienience for obtaining a page instance via a class instance.
`Component` | `getPage(java.lang.String pageName)` Returns the page identified by its logical page name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComponentSourceImpl

    public ComponentSourceImpl(RequestPageCache pageCache,
                               ComponentClassResolver resolver,
                               RequestGlobals globals)

Method Detail

### getComponent

    public Component getComponent(java.lang.String completeId)

  Description copied from interface: `ComponentSource`
  Gets a component by its complete id. If the component id is for a mixin, then the mixin attached to the component will be returned. A mixin's complete id is its container's complete id, suffixed with "$" and the mixin's id (its simple class name).

  Specified by:
    `getComponent` in interface `ComponentSource`
  Parameters:
    `completeId` - complete component id (case insensitive)
  Returns:
    the component
  See Also:
    `ComponentResourcesCommon.getCompleteId()`

### getPage

    public Component getPage(java.lang.String pageName)

  Description copied from interface: `ComponentSource`
  Returns the page identified by its logical page name. A logical page name is the short form of a page name often emebedded into URLs.

  Specified by:
    `getPage` in interface `ComponentSource`
  Parameters:
    `pageName` - the logical page name
  Returns:
    the corresponding page's root component

### getPage

    public Component getPage(java.lang.Class pageClass)

  Description copied from interface: `ComponentSource`
  A convienience for obtaining a page instance via a class instance. This is provided so as to be refactoring safe. The pageClass is simply converted to a class name and this is used to locate a page instance.

  Specified by:
    `getPage` in interface `ComponentSource`
  Parameters:
    `pageClass` - used to locate the page instance
  Returns:
    the page instance

### getActivePage

    public Component getActivePage()

  Description copied from interface: `ComponentSource`
  Returns the active page, as defined by `RequestGlobals.getActivePageName()`. This is the primary page for handling the current request, the page which will be activated for the request. The identity of the active page is not known until the correct `Dispatcher` determines this.

  Specified by:
    `getActivePage` in interface `ComponentSource`
  Returns:
    the active page, or null if no active page is yet identified

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.