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 library names 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. 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
  See Also:
    `ComponentLibraryInfo`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `libraryName`
    `java.lang.String` | `rootPackage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LibraryMapping(java.lang.String libraryName, java.lang.String rootPackage)` Identifies the root package of a library.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getPathPrefix()` Deprecated. In 5.4, use `libraryName` instead.
    `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`

- - ### Field Detail

    - #### libraryName

          public final java.lang.String libraryName

    - #### rootPackage

          public final java.lang.String rootPackage

  - ### Constructor Detail

    - #### LibraryMapping

          public LibraryMapping(java.lang.String libraryName,
                                java.lang.String rootPackage)

      Identifies the root package of a library. The application has uses the library name "" (the empty string). The special library "core" is all the built-in components. The library name is sometimes referred to as the "path prefix" or the "virtual folder name". This is for historical reasons, as the concept of a library and how it was defined and managed evolved from release to release. The library name should be alpha numeric, and directly encodable into a URL. It may contain slashes (though this is not used often), but may not start or end with one. Note that it is allowed to contribute multiple LibraryMappings with the library name to the `ComponentClassResolver`, and the results are merged: the single library will have multiple root packages. Be careful that none of the root packages overlap!
      Parameters:
        `libraryName` - the unique identifier for the library.
        `rootPackage` - the root package to search for classes; sub-packages will include ".pages", ".components", etc.

  - ### Method Detail

    - #### getPathPrefix

          public java.lang.String getPathPrefix()

      Deprecated. In 5.4, use `libraryName` instead.
      Returns the library name; the method is oddly named for historical reasons. The library name is sometimes referred to as the virtual folder name.

    - #### getRootPackage

          public java.lang.String getRootPackage()

    - #### toString

          public java.lang.String toString()

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

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.