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 org.springframework.context.ApplicationContextappContextprivate CommonPropertiescommonPropertiesprivate static com.fasterxml.jackson.databind.ObjectMappermapperprivate MongoStorageServicemongoStorageServiceprivate org.springframework.data.mongodb.core.MongoTemplatemongoTemplateprivate org.springframework.session.data.mongo.MongoIndexedSessionRepositorysessionRepositoryprivate UserManagementServiceuserManagementService
-
Constructor Summary
Constructors Constructor Description BeanHandlerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetBean(java.lang.String beanId)This method returns a bean instance.java.lang.ObjectgetRepository(java.lang.String repositoryId)This method does return repository.java.lang.ObjectgetSessionBean(java.lang.String beanId)This method returns a session bean instance.private java.lang.ObjectgetSessionBeanAsObject(java.lang.String beanId)<T> ThandleBeanInvokeResponse(BeanRequestMessage request)This method does invoke to get instance of bean.<T> ThandleBeanUpdateResponse(BeanRequestMessage request)This method does update a bean and get instance of updated bean.voidhandleInvoke(BeanRequestMessage request)This method does invoke a bean methods.voidhandleRepositoryCall(RepositoryRequestMessage request)This method does repository call.<T> java.util.List<T>handleRepositoryInvoke(RepositoryRequestMessage request)This method does repository call.<T> ThandleRepositoryUpdate(RepositoryRequestMessage request)This method does repository call.voidhandleUpdate(BeanRequestMessage request)This method does update of bean.voidupdateSessionBean(java.lang.String beanId, java.lang.Object bean)This method does update of session bean.
-
-
-
Field Detail
-
appContext
@Autowired private org.springframework.context.ApplicationContext appContext
-
sessionRepository
@Autowired private org.springframework.session.data.mongo.MongoIndexedSessionRepository sessionRepository
-
commonProperties
@Autowired private CommonProperties commonProperties
-
userManagementService
@Autowired private UserManagementService userManagementService
-
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
-
-
Method Detail
-
getRepository
public java.lang.Object getRepository(java.lang.String repositoryId)
Description copied from interface:BeanHandlerServiceThis method does return repository.- Specified by:
getRepositoryin 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:BeanHandlerServiceThis method returns a bean instance.- Specified by:
getBeanin 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:BeanHandlerServiceThis method returns a session bean instance.- Specified by:
getSessionBeanin 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:BeanHandlerServiceThis method does update of session bean.- Specified by:
updateSessionBeanin 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:BeanHandlerServiceThis method does update of bean.- Specified by:
handleUpdatein interfaceBeanHandlerService- Parameters:
request- contains an instructions for updated fields
-
handleInvoke
public void handleInvoke(BeanRequestMessage request)
Description copied from interface:BeanHandlerServiceThis method does invoke a bean methods.- Specified by:
handleInvokein interfaceBeanHandlerService- Parameters:
request- contains an instructions for invoked fields
-
handleRepositoryCall
public void handleRepositoryCall(RepositoryRequestMessage request)
Description copied from interface:BeanHandlerServiceThis method does repository call.- Specified by:
handleRepositoryCallin interfaceBeanHandlerService- Parameters:
request- contains an instructions for repository call
-
handleBeanInvokeResponse
public <T> T handleBeanInvokeResponse(BeanRequestMessage request)
Description copied from interface:BeanHandlerServiceThis method does invoke to get instance of bean.- Specified by:
handleBeanInvokeResponsein 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:BeanHandlerServiceThis method does update a bean and get instance of updated bean.- Specified by:
handleBeanUpdateResponsein 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:BeanHandlerServiceThis method does repository call.- Specified by:
handleRepositoryInvokein 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:BeanHandlerServiceThis method does repository call.- Specified by:
handleRepositoryUpdatein interfaceBeanHandlerService- Type Parameters:
T- class type of entity- Parameters:
request- contains an instructions for invoked fields.- Returns:
- map representation of object
-
getSessionBeanAsObject
private java.lang.Object getSessionBeanAsObject(java.lang.String beanId)
-
-