Package org.opencms.db
Class CmsRewriteAliasMatcher
- java.lang.Object
-
- org.opencms.db.CmsRewriteAliasMatcher
-
public class CmsRewriteAliasMatcher extends java.lang.Object
Helper class used for matching rewrite aliases to incoming request URIs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsRewriteAliasMatcher.RewriteResult
The result of a match operation.
-
Constructor Summary
Constructors Constructor Description CmsRewriteAliasMatcher(java.util.Collection<CmsRewriteAlias> aliases)
Creates a new matcher instance for the given list of rewrite aliases.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsRewriteAliasMatcher.RewriteResult
match(java.lang.String path)
Tries to rewrite a given path, and either returns the rewrite result or null if no rewrite alias matched the path.
-
-
-
Constructor Detail
-
CmsRewriteAliasMatcher
public CmsRewriteAliasMatcher(java.util.Collection<CmsRewriteAlias> aliases)
Creates a new matcher instance for the given list of rewrite aliases.- Parameters:
aliases
- the list of rewrite aliases to be used for matching
-
-
Method Detail
-
match
public CmsRewriteAliasMatcher.RewriteResult match(java.lang.String path)
Tries to rewrite a given path, and either returns the rewrite result or null if no rewrite alias matched the path.- Parameters:
path
- the path to match- Returns:
- the rewrite result or null if no rewrite alias matched
-
-