Package net.officefloor.web.rest.build
Interface RestMethodDecoratorContext<M>
public interface RestMethodDecoratorContext<M>
Context for the
RestMethod.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddHttpInputInterceptor(HttpInputInterceptor interceptor) Allows intercepting functionality before the servicingOfficeSectionInputis invoked.Obtains theComposeArchitect.<T> TgetConfiguration(String itemName, Class<T> type) Obtains additional configuration for theRestMethod.Obtains theHttpMethod.Obtains theOfficeArchitect.Obtains theOfficeSourceContext.getPath()Obtains the REST path for thisRestMethodDecoratorContext.Obtains theWebArchitect.booleanisSecure()Indicates if secure (e.g.voidsetMomento(M momento) Optionally sets a Momento on theRestMethod.voidsetSecure(boolean isSecure) Allows overriding if secure.
-
Method Details
-
isSecure
boolean isSecure()Indicates if secure (e.g. HTTPS).- Returns:
trueif secure.
-
setSecure
void setSecure(boolean isSecure) Allows overriding if secure.- Parameters:
isSecure- Specify if secure.
-
getPath
RestPathContext getPath()Obtains the REST path for thisRestMethodDecoratorContext.- Returns:
- REST path for this
RestMethodDecoratorContext.
-
getHttpMethod
HttpMethod getHttpMethod()Obtains theHttpMethod.- Returns:
HttpMethod.
-
getConfiguration
Obtains additional configuration for the
RestMethod.This for example is CORS specific configuration for the
RestMethod.- Type Parameters:
T- Type of configuration.- Parameters:
itemName- Name of configuration item.type- Type of configuration.- Returns:
- Configuration item.
-
addHttpInputInterceptor
Allows intercepting functionality before the servicingOfficeSectionInputis invoked.- Parameters:
interceptor-HttpInputInterceptor.
-
setMomento
Optionally sets a Momento on theRestMethod.- Parameters:
momento- Momento on theRestMethodavailable via theMomentoKey.
-
getOfficeArchitect
OfficeArchitect getOfficeArchitect()Obtains theOfficeArchitect.- Returns:
OfficeArchitect.
-
getWebArchitect
WebArchitect getWebArchitect()Obtains theWebArchitect.- Returns:
WebArchitect.
-
getComposeArchitect
ComposeArchitect getComposeArchitect()Obtains theComposeArchitect.- Returns:
ComposeArchitect.
-
getOfficeSourceContext
OfficeSourceContext getOfficeSourceContext()Obtains theOfficeSourceContext.- Returns:
OfficeSourceContext.
-