Package co.mastermindcms.builder.rest
Class PageBuilderController
- java.lang.Object
-
- co.mastermindcms.builder.rest.PageBuilderController
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@RestController public class PageBuilderController extends java.lang.Object implements org.springframework.beans.factory.InitializingBean
-
-
Field Summary
Fields Modifier and Type Field Description private BuilderProperties
builderProperties
private PageProcessorService
pageProcessorService
-
Constructor Summary
Constructors Constructor Description PageBuilderController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
org.springframework.http.ResponseEntity<?>
themeHandler(java.lang.String site, javax.servlet.http.HttpServletRequest request)
This is entrypoint for HTTP-requests from the clients, where it loads a HTML-template from filesystem.
-
-
-
Field Detail
-
pageProcessorService
@Autowired private PageProcessorService pageProcessorService
-
builderProperties
@Autowired private BuilderProperties builderProperties
-
-
Method Detail
-
themeHandler
@RequestMapping(value="/api/v1/{site:^(?!sock).+$}/theme.css", produces="text/css") @ResponseBody public org.springframework.http.ResponseEntity<?> themeHandler(@PathVariable("site") java.lang.String site, javax.servlet.http.HttpServletRequest request)
This is entrypoint for HTTP-requests from the clients, where it loads a HTML-template from filesystem.- Parameters:
site
- this is identification for a folder in /MSM2/www/{site}, except for "sock" as this was used for WebSocketsrequest
- http servlet request- Returns:
- response as valid HTML
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
-