Class BeanHandlerServiceImpl
- java.lang.Object
-
- co.mastermindcms.framework.services.BeanHandlerServiceImpl
-
- All Implemented Interfaces:
BeanHandlerService
,java.io.Serializable
@Service public class BeanHandlerServiceImpl extends java.lang.Object implements BeanHandlerService
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
logger
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private MongoStorageService
mongoStorageService
private org.springframework.data.mongodb.core.MongoTemplate
mongoTemplate
private RouterService
routerService
-
Constructor Summary
Constructors Constructor Description BeanHandlerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getBean(java.lang.String beanId)
This method returns a bean instance.java.lang.Object
getRepository(java.lang.String repositoryId)
This method does return repository.java.lang.Object
getSessionBean(java.lang.String beanId)
This method returns a session bean instance.<T> T
handleBeanInvokeResponse(BeanRequestMessage request)
This method does invoke to get instance of bean.<T> T
handleBeanUpdateResponse(BeanRequestMessage request)
This method does update a bean and get instance of updated bean.void
handleInvoke(BeanRequestMessage request)
This method does invoke a bean methods.void
handleRepositoryCall(RepositoryRequestMessage request)
This method does repository call.<T> java.util.List<T>
handleRepositoryInvoke(RepositoryRequestMessage request)
This method does repository call.<T> T
handleRepositoryUpdate(RepositoryRequestMessage request)
This method does repository call.void
handleUpdate(BeanRequestMessage request)
This method does update of bean.void
updateSessionBean(java.lang.String beanId, java.lang.Object bean)
This method does update of session bean.
-
-
-
Field Detail
-
routerService
@Autowired private RouterService routerService
-
mongoStorageService
@Autowired private MongoStorageService mongoStorageService
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
logger
private static final org.slf4j.Logger logger
-
-
Method Detail
-
getRepository
public java.lang.Object getRepository(java.lang.String repositoryId)
Description copied from interface:BeanHandlerService
This method does return repository.- Specified by:
getRepository
in interfaceBeanHandlerService
- Parameters:
repositoryId
- identification bean, which will be returned- Returns:
- object
-
getBean
public java.lang.Object getBean(java.lang.String beanId)
Description copied from interface:BeanHandlerService
This method returns a bean instance.- Specified by:
getBean
in interfaceBeanHandlerService
- Parameters:
beanId
- identification bean, which will be returned- Returns:
- a bean instance
-
getSessionBean
public java.lang.Object getSessionBean(java.lang.String beanId)
Description copied from interface:BeanHandlerService
This method returns a session bean instance.- Specified by:
getSessionBean
in interfaceBeanHandlerService
- Parameters:
beanId
- identification bean, which will be returned- Returns:
- a bean instance
-
updateSessionBean
public void updateSessionBean(java.lang.String beanId, java.lang.Object bean)
Description copied from interface:BeanHandlerService
This method does update of session bean.- Specified by:
updateSessionBean
in interfaceBeanHandlerService
- Parameters:
beanId
- identification bean, which will be updatedbean
- representation of bean, which will be copied to current instance
-
handleUpdate
public void handleUpdate(BeanRequestMessage request)
Description copied from interface:BeanHandlerService
This method does update of bean.- Specified by:
handleUpdate
in interfaceBeanHandlerService
- Parameters:
request
- contains an instructions for updated fields
-
handleInvoke
public void handleInvoke(BeanRequestMessage request)
Description copied from interface:BeanHandlerService
This method does invoke a bean methods.- Specified by:
handleInvoke
in interfaceBeanHandlerService
- Parameters:
request
- contains an instructions for invoked fields
-
handleRepositoryCall
public void handleRepositoryCall(RepositoryRequestMessage request)
Description copied from interface:BeanHandlerService
This method does repository call.- Specified by:
handleRepositoryCall
in interfaceBeanHandlerService
- Parameters:
request
- contains an instructions for repository call
-
handleBeanInvokeResponse
public <T> T handleBeanInvokeResponse(BeanRequestMessage request)
Description copied from interface:BeanHandlerService
This method does invoke to get instance of bean.- Specified by:
handleBeanInvokeResponse
in interfaceBeanHandlerService
- Type Parameters:
T
- class type of entity- Parameters:
request
- contains an instructions for invoked fields- Returns:
- map representation of object
-
handleBeanUpdateResponse
public <T> T handleBeanUpdateResponse(BeanRequestMessage request)
Description copied from interface:BeanHandlerService
This method does update a bean and get instance of updated bean.- Specified by:
handleBeanUpdateResponse
in interfaceBeanHandlerService
- Type Parameters:
T
- class type of entity- Parameters:
request
- contains an instructions for invoked fields- Returns:
- map representation of object
-
handleRepositoryInvoke
public <T> java.util.List<T> handleRepositoryInvoke(RepositoryRequestMessage request)
Description copied from interface:BeanHandlerService
This method does repository call.- Specified by:
handleRepositoryInvoke
in interfaceBeanHandlerService
- Type Parameters:
T
- class type of entity- Parameters:
request
- contains an instructions for invoked fields.- Returns:
- list of objects representation
-
handleRepositoryUpdate
public <T> T handleRepositoryUpdate(RepositoryRequestMessage request)
Description copied from interface:BeanHandlerService
This method does repository call.- Specified by:
handleRepositoryUpdate
in interfaceBeanHandlerService
- Type Parameters:
T
- class type of entity- Parameters:
request
- contains an instructions for invoked fields.- Returns:
- map representation of object
-
-