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 classHttpPathFactoryImpl.ParameterSegment<T>ParameterHttpPathFactoryImpl.Segment.static classHttpPathFactoryImpl.Segment<T>Segment of the path.static classHttpPathFactoryImpl.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.StringcreateApplicationClientPath(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.Segmentinstances.
-
-
Method Detail
-
getValuesType
public java.lang.Class<T> getValuesType()
Description copied from interface:HttpPathFactoryObtains the expected type to retrieve values in constructing the path.- Specified by:
getValuesTypein interfaceHttpPathFactory<T>- Returns:
- Expected type to retrieve values in constructing the path. May be
nullif no values are required.
-
createApplicationClientPath
public java.lang.String createApplicationClientPath(T values) throws HttpException
Description copied from interface:HttpPathFactoryCreates 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,domainandport.- Specified by:
createApplicationClientPathin 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.
-
-