Package com.helger.photon.api
Class APIPath
- java.lang.Object
-
- com.helger.photon.api.APIPath
-
- All Implemented Interfaces:
Serializable
@Immutable @MustImplementEqualsAndHashcode public class APIPath extends Object implements Serializable
This class contains a combination of path and HTTP method.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static APIPathcreateForFilter(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)static APIPathcreateForServlet(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)static APIPathdelete(String sPath)booleanequals(Object o)static APIPathget(String sPath)com.helger.commons.http.EHttpMethodgetHttpMethod()com.helger.commons.url.SimpleURLgetInvocationURL(String sBasePath)Get the invocation URL of this API path.StringgetPath()inthashCode()static APIPathpost(String sPath)static APIPathput(String sPath)StringtoString()
-
-
-
Method Detail
-
getHttpMethod
@Nonnull public com.helger.commons.http.EHttpMethod getHttpMethod()
- Returns:
- The HTTP method as provided in the constructor. Never
null.
-
getPath
@Nonnull @Nonempty public String getPath()
- Returns:
- The path as provided in the constructor. Neither
nullnor empty.
-
getInvocationURL
@Nonnull public com.helger.commons.url.SimpleURL getInvocationURL(@Nonnull String sBasePath)
Get the invocation URL of this API path.- Parameters:
sBasePath- The HTTP base path of the server (e.g. http://www.example.org/api"), which is prepended to the relative path of this object. May not benullbut maybe empty (since v8.1.4)- Returns:
- The new URL. Never
null. - See Also:
getPath()
-
createForFilter
@Nonnull public static APIPath createForFilter(@Nonnull com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)
-
-