
org.tynamo.routing.services.RouteProviderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tapestry-routing Show documentation
Show all versions of tapestry-routing Show documentation
Tapestry Routing allows you to makes pretty, concise and RESTful URLs for your Tapestry pages with no
effort.
The newest version!
package org.tynamo.routing.services;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.tapestry5.commons.util.CollectionFactory;
import org.tynamo.routing.Route;
public class RouteProviderImpl implements RouteProvider {
private final List routes;
private final Map routeMap = CollectionFactory.newConcurrentMap();
public RouteProviderImpl(List routes) {
this.routes = Collections.unmodifiableList(routes);
for (Route route : routes) {
routeMap.put(route.getCanonicalizedPageName(), route);
}
}
@Override
public Route getRoute(String canonicalizedPageName) {
return routeMap.get(canonicalizedPageName);
}
@Override
public List getRoutes() {
return routes;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy