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.services
Class LibraryMapping

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

    public final class LibraryMapping

extends java.lang.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(java.lang.String virtualFolderName, java.lang.String rootPackage)` Maps a virtual folder to a package that contains sub-packages for components, pages, etc.

Method Summary
`java.lang.String` | `getPathPrefix()` Returns the virtual folder name (the odd name of this method reflects the evolution of the framework).
`java.lang.String` | `getRootPackage()`
`java.lang.String` | `toString()`

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

Constructor Detail

### LibraryMapping

    public LibraryMapping(java.lang.String virtualFolderName,
                          java.lang.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 java.lang.String getPathPrefix()

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

### getRootPackage

    public java.lang.String getRootPackage()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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.