Package io.avaje.http.generator.core
Interface PlatformAdapter
-
public interface PlatformAdapter
Adapter to specific platforms like Javalin and Helidon.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringbodyAsClass(String shortType)Return platform specific code to return the body content.voidcontrollerRoles(List<String> roles, ControllerReader controller)Handle controller level roles.Stringindent()Return whitespace indent for setting parameter values.booleanisBodyMethodParam()Return true if body is passed as a method parameter.booleanisContextType(String rawType)Return true if this type is the platform specific request, response or context type.voidmethodRoles(List<String> roles, ControllerReader controller)Handle method level roles.StringplatformVariable(String rawType)Return the platform specific parameter (request, response or context).voidwriteReadParameter(Append writer, ParamType paramType, String paramName)voidwriteReadParameter(Append writer, ParamType paramType, String paramName, String paramDefault)
-
-
-
Method Detail
-
isContextType
boolean isContextType(String rawType)
Return true if this type is the platform specific request, response or context type. For example Javalin Context, Helidon ServerRequest or ServerResponse type).
-
platformVariable
String platformVariable(String rawType)
Return the platform specific parameter (request, response or context).
-
bodyAsClass
String bodyAsClass(String shortType)
Return platform specific code to return the body content.
-
isBodyMethodParam
boolean isBodyMethodParam()
Return true if body is passed as a method parameter.
-
controllerRoles
void controllerRoles(List<String> roles, ControllerReader controller)
Handle controller level roles.
-
methodRoles
void methodRoles(List<String> roles, ControllerReader controller)
Handle method level roles.
-
writeReadParameter
void writeReadParameter(Append writer, ParamType paramType, String paramName)
-
writeReadParameter
void writeReadParameter(Append writer, ParamType paramType, String paramName, String paramDefault)
-
-