org.granite.tide
Class TideServiceContext

java.lang.Object
  extended by org.granite.tide.TideServiceContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EjbServiceContext

public abstract class TideServiceContext
extends Object
implements Serializable

Author:
William DRAI
See Also:
Serialized Form

Field Summary
static String COMPONENT_ATTR
           
static String COMPONENT_CLASS_ATTR
           
protected static Object[] EMPTY_ARGS
           
 
Constructor Summary
TideServiceContext()
           
 
Method Summary
 Object adjustInvokee(Object instance, String componentName, Set<Class<?>> componentClasses)
           
 Object[] beforeMethodSearch(Object instance, String methodName, Object[] args)
           
protected  boolean equals(Object obj1, Object obj2)
           
abstract  Object findComponent(String componentName, Class<?> componentClass)
           
abstract  Set<Class<?>> findComponentClasses(String componentName, Class<?> componentClass)
           
protected abstract  AsyncPublisher getAsyncPublisher()
           
 String getSessionId()
           
protected abstract  TidePersistenceManager getTidePersistenceManager(boolean create)
          Create a TidePersistenceManager
 void initCall()
           
 Object lazyInitialize(Object entity, String[] propertyNames)
          Initialize the lazy property for the passed in entity.
 Object mergeExternal(Object obj, Object previous)
           
protected  Object mergeExternal(TidePersistenceManager pm, ClassGetter classGetter, Object obj, Object previous, Object owner, String propertyName)
           
abstract  IInvocationResult postCall(ServiceInvocationContext context, Object result, String componentName, Class<?> componentClass)
           
 void postCallFault(ServiceInvocationContext context, Throwable t, String componentName, Class<?> componentClass)
           
abstract  void prepareCall(ServiceInvocationContext context, IInvocationCall call, String componentName, Class<?> componentClass)
           
 void sendEvent(String componentName, Class<?> componentClass)
           
 void setSessionId(String sessionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_ARGS

protected static final Object[] EMPTY_ARGS

COMPONENT_ATTR

public static final String COMPONENT_ATTR
See Also:
Constant Field Values

COMPONENT_CLASS_ATTR

public static final String COMPONENT_CLASS_ATTR
See Also:
Constant Field Values
Constructor Detail

TideServiceContext

public TideServiceContext()
                   throws ServiceException
Throws:
ServiceException
Method Detail

getSessionId

public String getSessionId()

setSessionId

public void setSessionId(String sessionId)

initCall

public void initCall()

adjustInvokee

public Object adjustInvokee(Object instance,
                            String componentName,
                            Set<Class<?>> componentClasses)

beforeMethodSearch

public Object[] beforeMethodSearch(Object instance,
                                   String methodName,
                                   Object[] args)

findComponent

public abstract Object findComponent(String componentName,
                                     Class<?> componentClass)

findComponentClasses

public abstract Set<Class<?>> findComponentClasses(String componentName,
                                                   Class<?> componentClass)

prepareCall

public abstract void prepareCall(ServiceInvocationContext context,
                                 IInvocationCall call,
                                 String componentName,
                                 Class<?> componentClass)

postCall

public abstract IInvocationResult postCall(ServiceInvocationContext context,
                                           Object result,
                                           String componentName,
                                           Class<?> componentClass)

postCallFault

public void postCallFault(ServiceInvocationContext context,
                          Throwable t,
                          String componentName,
                          Class<?> componentClass)

getAsyncPublisher

protected abstract AsyncPublisher getAsyncPublisher()

sendEvent

public void sendEvent(String componentName,
                      Class<?> componentClass)

getTidePersistenceManager

protected abstract TidePersistenceManager getTidePersistenceManager(boolean create)
Create a TidePersistenceManager

Parameters:
create - create if not existent (can be false for use in entity merge)
Returns:
a PersistenceContextManager

mergeExternal

public Object mergeExternal(Object obj,
                            Object previous)

mergeExternal

protected Object mergeExternal(TidePersistenceManager pm,
                               ClassGetter classGetter,
                               Object obj,
                               Object previous,
                               Object owner,
                               String propertyName)

equals

protected boolean equals(Object obj1,
                         Object obj2)

lazyInitialize

public Object lazyInitialize(Object entity,
                             String[] propertyNames)
Initialize the lazy property for the passed in entity.

Parameters:
entity - the entity that has a lazy relationship
propertyNames - the properties of the entity that has been marked lazy
Returns:
the lazy collection