Package net.officefloor.web
Class HttpPathFactoryImpl<T>
- java.lang.Object
-
- net.officefloor.web.HttpPathFactoryImpl<T>
-
- All Implemented Interfaces:
HttpPathFactory<T>
public class HttpPathFactoryImpl<T> extends java.lang.Object implements HttpPathFactory<T>
Factory to create the HTTP path.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpPathFactoryImpl.ParameterSegment<T>
ParameterHttpPathFactoryImpl.Segment
.static class
HttpPathFactoryImpl.Segment<T>
Segment of the path.static class
HttpPathFactoryImpl.StaticSegment<T>
StaticHttpPathFactoryImpl.Segment
.
-
Constructor Summary
Constructors Constructor Description HttpPathFactoryImpl(java.lang.Class<T> valuesType, HttpPathFactoryImpl.Segment<T>[] segments)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createApplicationClientPath(T values)
Creates the client application path.java.lang.Class<T>
getValuesType()
Obtains the expected type to retrieve values in constructing the path.
-
-
-
Constructor Detail
-
HttpPathFactoryImpl
public HttpPathFactoryImpl(java.lang.Class<T> valuesType, HttpPathFactoryImpl.Segment<T>[] segments)
Instantiate.- Parameters:
valuesType
- Type to obtain values.segments
-HttpPathFactoryImpl.Segment
instances.
-
-
Method Detail
-
getValuesType
public java.lang.Class<T> getValuesType()
Description copied from interface:HttpPathFactory
Obtains the expected type to retrieve values in constructing the path.- Specified by:
getValuesType
in interfaceHttpPathFactory<T>
- Returns:
- Expected type to retrieve values in constructing the path. May be
null
if no values are required.
-
createApplicationClientPath
public java.lang.String createApplicationClientPath(T values) throws HttpException
Description copied from interface:HttpPathFactory
Creates the client application path.
This is the path on the server to the
HttpInput
(i.e. includes the context path). It, however, does not includeprotocol
,domain
andport
.- Specified by:
createApplicationClientPath
in interfaceHttpPathFactory<T>
- Parameters:
values
- Optional object to obtain values to create the path.- Returns:
- Application path.
- Throws:
HttpException
- If fails to create the application path.
-
-