Package co.mastermindcms.framework.rest
Class MainFrameworkController
- java.lang.Object
-
- co.mastermindcms.framework.rest.MainFrameworkController
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@RestController public class MainFrameworkController extends java.lang.Object implements org.springframework.beans.factory.InitializingBean
-
-
Field Summary
Fields Modifier and Type Field Description private BeanHandlerService
beanHandlerService
private CommonProperties
commonProperties
private DocumentHandlerService
documentHandlerService
private static org.slf4j.Logger
logger
private org.springframework.messaging.simp.SimpMessagingTemplate
messagingTemplate
private PageRenderService
pageRenderer
private org.springframework.session.data.mongo.MongoIndexedSessionRepository
sessionRepository
private org.springframework.messaging.simp.user.SimpUserRegistry
simpUserRegistry
private TemplateLocatorService
templateLocatorService
private UserManagementService
userManagementService
private WebSocketService
webSocketService
-
Constructor Summary
Constructors Constructor Description MainFrameworkController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
dataBaseHandler(DocumentRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor)
Database Web-Socket handler.void
handleBeanInvoke(BeanRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor)
void
handleBeanUpdate(BeanRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor)
void
handleRepository(RepositoryRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor)
void
jsonBeanHandler(BeanRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, ActionType type)
Json Web-Socket handler.void
jsonDatabaseHandler(DocumentRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor)
Json Web-Socket handler.void
jsonRepositoryHandler(RepositoryRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, ActionType type)
Json Web-Socket handler.void
renderHandler(BasicRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor)
Sending a message directly from the websocket client.
-
-
-
Field Detail
-
pageRenderer
@Autowired private PageRenderService pageRenderer
-
beanHandlerService
@Autowired private BeanHandlerService beanHandlerService
-
documentHandlerService
@Autowired private DocumentHandlerService documentHandlerService
-
messagingTemplate
@Autowired private org.springframework.messaging.simp.SimpMessagingTemplate messagingTemplate
-
simpUserRegistry
@Autowired private org.springframework.messaging.simp.user.SimpUserRegistry simpUserRegistry
-
templateLocatorService
@Autowired private TemplateLocatorService templateLocatorService
-
sessionRepository
@Autowired private org.springframework.session.data.mongo.MongoIndexedSessionRepository sessionRepository
-
commonProperties
@Autowired private CommonProperties commonProperties
-
userManagementService
@Autowired private UserManagementService userManagementService
-
webSocketService
@Autowired private WebSocketService webSocketService
-
logger
private static final org.slf4j.Logger logger
-
-
Method Detail
-
renderHandler
@MessageMapping("/msm/render") public void renderHandler(BasicRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor) throws java.lang.Exception
Sending a message directly from the websocket client.- Parameters:
request
- basic type of request messageheaderAccessor
- header accessor keeps headers of WebSocket request- Throws:
java.lang.Exception
- any exception
-
handleBeanUpdate
@MessageMapping("/beans/update") public void handleBeanUpdate(BeanRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleBeanInvoke
@MessageMapping("/beans/invoke") public void handleBeanInvoke(BeanRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleRepository
@MessageMapping("/repository/call") public void handleRepository(RepositoryRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor) throws java.lang.Exception
- Throws:
java.lang.Exception
-
dataBaseHandler
@MessageMapping("/documents") public void dataBaseHandler(DocumentRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor) throws java.lang.Exception
Database Web-Socket handler.- Parameters:
request
- document request objectheaderAccessor
- header accessor keeps headers of WebSocket request- Throws:
java.lang.Exception
- any exception
-
jsonBeanHandler
@MessageMapping("/json/bean/{type}") public void jsonBeanHandler(BeanRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, @DestinationVariable ActionType type) throws java.lang.Exception
Json Web-Socket handler.- Parameters:
request
- bean request objectheaderAccessor
- header accessor keeps headers of WebSocket requesttype
- action type INVOKE,UPDATE- Throws:
java.lang.Exception
- any exception
-
jsonRepositoryHandler
@MessageMapping("/json/repository/{type}") public void jsonRepositoryHandler(RepositoryRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor, @DestinationVariable ActionType type) throws java.lang.Exception
Json Web-Socket handler.- Parameters:
headerAccessor
- header accessor keeps headers of WebSocket requestrequest
- repository request objecttype
- action type INVOKE,UPDATE- Throws:
java.lang.Exception
- any exception
-
jsonDatabaseHandler
@MessageMapping("/json/database") public void jsonDatabaseHandler(DocumentRequestMessage request, org.springframework.messaging.simp.SimpMessageHeaderAccessor headerAccessor) throws java.lang.Exception
Json Web-Socket handler.- Parameters:
headerAccessor
- header accessor keeps headers of WebSocket requestrequest
- document request object- Throws:
java.lang.Exception
- any exception
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
-