Package net.officefloor.web
Class HttpInputPathImpl
java.lang.Object
net.officefloor.web.HttpInputPathImpl
- All Implemented Interfaces:
HttpInputPath
HttpInputPath implementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionHttpInputPathImpl(String routePath, HttpInputPathSegment segmentHead, int parameterCount) Instantiate. -
Method Summary
Modifier and TypeMethodDescription<T> HttpPathFactory<T>createHttpPathFactory(Class<T> valuesType) Creates theHttpPathFactory.booleanisMatchPath(String path, int endingPathParameterTerminatingCharacter) Indicates if the path matches theHttpInputpath.boolean================ HttpInputPath =======================
-
Constructor Details
-
HttpInputPathImpl
Instantiate.- Parameters:
routePath- Route path.segmentHead- HeadHttpInputPathSegmentof linked list ofHttpInputPathSegmentinstances.parameterCount- Number of path parameters for sorting routes.
-
-
Method Details
-
isPathParameters
public boolean isPathParameters()================ HttpInputPath =======================- Specified by:
isPathParametersin interfaceHttpInputPath- Returns:
trueif the path contains parameters.
-
isMatchPath
Description copied from interface:HttpInputPathIndicates if the path matches theHttpInputpath.- Specified by:
isMatchPathin interfaceHttpInputPath- Parameters:
path- Path.endingPathParameterTerminatingCharacter-Charactervalue for theCharacterthat terminates the ending path parameter. This is ignored if the last part of the path is static (i.e. only applies for last parameter to know when it terminates the path, e.g./path/{last}). Should the last parameter consume the remainder of the path, provide-1to indicate no terminatingCharacter.- Returns:
trueif the path matches theHttpInputpath.
-
createHttpPathFactory
Description copied from interface:HttpInputPathCreates theHttpPathFactory.- Specified by:
createHttpPathFactoryin interfaceHttpInputPath- Type Parameters:
T- Value type.- Parameters:
valuesType- Type to use for obtaining values to construct the path. Should the path not contain parameters, it may benull.- Returns:
HttpPathFactory.- Throws:
HttpException- If required path parameters are not available on the values type.
-