Class OfficeFloorRestEndpoint
java.lang.Object
net.officefloor.spring.starter.rest.OfficeFloorRestEndpoint
REST endpoint for handling by
OfficeFloor.-
Constructor Summary
ConstructorsConstructorDescriptionOfficeFloorRestEndpoint(RestEndpoint endpoint, MomentoKey<org.springframework.web.cors.CorsConfiguration> corsMomento) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.web.cors.CorsConfigurationcombineCors(org.springframework.web.cors.CorsConfiguration corsA, org.springframework.web.cors.CorsConfiguration corsB) Convenience method to combineCorsConfigurationallowing handling ofnull.static org.springframework.web.cors.CorsConfigurationcreateCorsConfiguration(ComposeCorsConfiguration configuration) Creates theCorsConfigurationfromComposeCorsConfiguration.org.springframework.web.cors.CorsConfigurationObtains theCorsConfiguration.getPath()Obtains the path.Obtains theOfficeFloorRestMethodfor thisOfficeFloorRestEndpoint.
-
Constructor Details
-
OfficeFloorRestEndpoint
public OfficeFloorRestEndpoint(RestEndpoint endpoint, MomentoKey<org.springframework.web.cors.CorsConfiguration> corsMomento) Instantiate.- Parameters:
endpoint-RestEndpoint.corsMomento-MomentoKeyfor CORS configuration.
-
-
Method Details
-
createCorsConfiguration
public static org.springframework.web.cors.CorsConfiguration createCorsConfiguration(ComposeCorsConfiguration configuration) Creates theCorsConfigurationfromComposeCorsConfiguration.- Parameters:
configuration-ComposeCorsConfiguration.- Returns:
CorsConfiguration.
-
combineCors
public static org.springframework.web.cors.CorsConfiguration combineCors(org.springframework.web.cors.CorsConfiguration corsA, org.springframework.web.cors.CorsConfiguration corsB) Convenience method to combineCorsConfigurationallowing handling ofnull.- Parameters:
corsA-CorsConfigurationA.corsB-CorsConfigurationB.- Returns:
- Combined
CorsConfigurationornullif bothnull.
-
getPath
Obtains the path.- Returns:
- Path.
-
getCorsConfiguration
public org.springframework.web.cors.CorsConfiguration getCorsConfiguration()Obtains theCorsConfiguration.- Returns:
CorsConfigurationornullif no CORS.
-
getRestMethods
Obtains theOfficeFloorRestMethodfor thisOfficeFloorRestEndpoint.- Returns:
OfficeFloorRestMethodfor thisOfficeFloorRestEndpoint.
-