org.apache.tapestry5.services
Class LibraryMapping

java.lang.Object
  extended by org.apache.tapestry5.services.LibraryMapping

public final class LibraryMapping
extends Object

Used to configure the ComponentClassResolver, to allow it to map prefixes to library root packages (the application namespace is a special case of this). In each case, a prefix on the path is mapped to a package. Starting with Tapestry 5.2, the path prefix may not contain a slash character.

The root package name should have a number of sub-packages:

pages
contains named pages
components
contains components
mixins
contains component mixins
base
contains base classes


Constructor Summary
LibraryMapping(String virtualFolderName, String rootPackage)
          Maps a virtual folder to a package that contains sub-packages for components, pages, etc.
 
Method Summary
 String getPathPrefix()
          Returns the virtual folder name (the odd name of this method reflects the evolution of the framework).
 String getRootPackage()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LibraryMapping

public LibraryMapping(String virtualFolderName,
                      String rootPackage)
Maps a virtual folder to a package that contains sub-packages for components, pages, etc. The special pathPrefix "" (the empty string) identifies the application. Tapestry defines a special pathPrefix, "core", for the core components.

Note that it is allowed to contribute mutiple LibraryMappings with the same prefix to the ComponentClassResolver, and the results are merged (though conflicts, where the same simple name appears under multiple root packages, is not currently checked for).

Parameters:
virtualFolderName - identifies the virtual folder "containing" the pages and components of the library. This may contain an embedded slash, but not a leading or trailing slash.
rootPackage - The root package to search.
Method Detail

getPathPrefix

public String getPathPrefix()
Returns the virtual folder name (the odd name of this method reflects the evolution of the framework).


getRootPackage

public String getRootPackage()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2012 The Apache Software Foundation.