org.granite.tide.spring
Class SpringServiceContext
java.lang.Object
org.granite.tide.TideServiceContext
org.granite.tide.spring.SpringServiceContext
- All Implemented Interfaces:
- Serializable, ApplicationContextAware
- Direct Known Subclasses:
- SpringMVCServiceContext
public class SpringServiceContext
- extends TideServiceContext
- implements ApplicationContextAware
- Author:
- Sebastien Deleuze, William DRAI
- See Also:
- Serialized Form
|
Method Summary |
protected Set<Class<?>> |
buildComponentClasses(Object bean)
|
Object |
findComponent(String componentName,
Class<?> componentClass)
|
Set<Class<?>> |
findComponentClasses(String componentName,
Class<?> componentClass)
|
protected AsyncPublisher |
getAsyncPublisher()
|
protected ApplicationContext |
getSpringContext()
|
protected TidePersistenceManager |
getTidePersistenceManager(boolean create)
Create a TidePersistenceManager |
protected boolean |
isBeanAnnotationPresent(Object bean,
Class<? extends Annotation> annotationClass)
|
protected boolean |
isBeanMethodAnnotationPresent(Object bean,
String methodName,
Class<?>[] methodArgTypes,
Class<? extends Annotation> annotationClass)
|
IInvocationResult |
postCall(ServiceInvocationContext context,
Object result,
String componentName,
Class<?> componentClass)
|
void |
postCallFault(ServiceInvocationContext context,
Throwable t,
String componentName,
Class<?> componentClass)
|
void |
prepareCall(ServiceInvocationContext context,
IInvocationCall c,
String componentName,
Class<?> componentClass)
|
void |
setApplicationContext(ApplicationContext springContext)
|
void |
setEntityManagerFactoryBeanName(String beanName)
|
void |
setPersistenceManagerBeanName(String beanName)
|
| Methods inherited from class org.granite.tide.TideServiceContext |
adjustInvokee, beforeMethodSearch, equals, getSessionId, initCall, isBeanAnnotationPresent, lazyInitialize, mergeExternal, mergeExternal, sendEvent, setSessionId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
springContext
protected transient ApplicationContext springContext
SpringServiceContext
public SpringServiceContext()
throws ServiceException
- Throws:
ServiceException
SpringServiceContext
public SpringServiceContext(ApplicationContext springContext)
throws ServiceException
- Throws:
ServiceException
setApplicationContext
public void setApplicationContext(ApplicationContext springContext)
- Specified by:
setApplicationContext in interface ApplicationContextAware
getSpringContext
protected ApplicationContext getSpringContext()
getAsyncPublisher
protected AsyncPublisher getAsyncPublisher()
- Specified by:
getAsyncPublisher in class TideServiceContext
findComponent
public Object findComponent(String componentName,
Class<?> componentClass)
- Specified by:
findComponent in class TideServiceContext
findComponentClasses
public Set<Class<?>> findComponentClasses(String componentName,
Class<?> componentClass)
- Specified by:
findComponentClasses in class TideServiceContext
buildComponentClasses
protected Set<Class<?>> buildComponentClasses(Object bean)
isBeanAnnotationPresent
protected boolean isBeanAnnotationPresent(Object bean,
Class<? extends Annotation> annotationClass)
isBeanMethodAnnotationPresent
protected boolean isBeanMethodAnnotationPresent(Object bean,
String methodName,
Class<?>[] methodArgTypes,
Class<? extends Annotation> annotationClass)
prepareCall
public void prepareCall(ServiceInvocationContext context,
IInvocationCall c,
String componentName,
Class<?> componentClass)
- Specified by:
prepareCall in class TideServiceContext
postCall
public IInvocationResult postCall(ServiceInvocationContext context,
Object result,
String componentName,
Class<?> componentClass)
- Specified by:
postCall in class TideServiceContext
postCallFault
public void postCallFault(ServiceInvocationContext context,
Throwable t,
String componentName,
Class<?> componentClass)
- Overrides:
postCallFault in class TideServiceContext
setEntityManagerFactoryBeanName
public void setEntityManagerFactoryBeanName(String beanName)
setPersistenceManagerBeanName
public void setPersistenceManagerBeanName(String beanName)
getTidePersistenceManager
protected TidePersistenceManager getTidePersistenceManager(boolean create)
- Create a TidePersistenceManager
- Specified by:
getTidePersistenceManager in class TideServiceContext
- Parameters:
create - create if not existent (can be false for use in entity merge)
- Returns:
- a PersistenceContextManager