Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Copyright 2006, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
 // http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.services;
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

public final class LibraryMapping
    private final String pathPrefixrootPackage;
    public LibraryMapping(String pathPrefixString rootPackage)
    {
        assert InternalUtils.isNonBlank(pathPrefix);
        assert InternalUtils.isNonBlank(rootPackage);
        if (pathPrefix.contains("/"))
            throw new RuntimeException(
                    "LibraryMapping path prefixes may no longer contain slashes (as of Tapestry 5.2).");
        this. = pathPrefix;
        this. = rootPackage;
    }
    public String getPathPrefix()
    {
        return ;
    }
    public String getRootPackage()
    {
        return ;
    }
    @Override
    public String toString()
    {
        return String.format("LibraryMapping[%s, %s]");
    }
New to GrepCode? Check out our FAQ X