Package org.analogweb.core
Class RequestPathDefinition
- java.lang.Object
-
- org.analogweb.core.AbstractRequestPathMetadata
-
- org.analogweb.core.RequestPathDefinition
-
- All Implemented Interfaces:
RequestPathMetadata
public class RequestPathDefinition extends AbstractRequestPathMetadata
DefineRequestPath
that enable entry-point to invoke.- Author:
- y2k2mt
-
-
Field Summary
Fields Modifier and Type Field Description protected String
actualPath
static RequestPathMetadata
EMPTY
protected List<String>
requestMethods
-
Constructor Summary
Constructors Modifier Constructor Description protected
RequestPathDefinition(String path, String[] requestMethods)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestPathDefinition
define(String root, String path)
static RequestPathDefinition
define(String root, String path, String[] requestMethods)
protected static StringBuilder
editPath(String root, String path)
protected static StringBuilder
editRoot(String root, String path)
String
getActualPath()
Obtain defined path.List<String>
getRequestMethods()
Obtain defined (HTTP) request methods.boolean
match(RequestPath requestPath)
Check ownRequestPath
match assigned one.String
toString()
-
Methods inherited from class org.analogweb.core.AbstractRequestPathMetadata
equals, hashCode
-
-
-
-
Field Detail
-
EMPTY
public static final RequestPathMetadata EMPTY
-
actualPath
protected final String actualPath
-
-
Method Detail
-
define
public static RequestPathDefinition define(String root, String path)
-
define
public static RequestPathDefinition define(String root, String path, String[] requestMethods)
-
editPath
protected static StringBuilder editPath(String root, String path)
-
editRoot
protected static StringBuilder editRoot(String root, String path)
-
getActualPath
public String getActualPath()
Description copied from interface:RequestPathMetadata
Obtain defined path.- Returns:
- path
-
getRequestMethods
public List<String> getRequestMethods()
Description copied from interface:RequestPathMetadata
Obtain defined (HTTP) request methods.- Returns:
- request methods
-
match
public boolean match(RequestPath requestPath)
Description copied from interface:RequestPathMetadata
Check ownRequestPath
match assigned one.- Parameters:
requestPath
-RequestPath
- Returns:
true
- if matchedRequestPath
-
-