|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.core.ModelManager | +--org.scopemvc.core.ActionManager | +--org.scopemvc.model.beans.BeansActionManager
BeansActionManager is a ActionManager
that handles
the actions (invokable methods) of JavaBean model objects.
Constructor Summary | |
BeansActionManager()
|
Method Summary | |
boolean |
canDoAction(java.lang.Object inModel,
ModelAction inAction)
Returns true if the ModelAction can be executed on the model object. |
java.lang.Object |
doAction(java.lang.Object inModel,
ModelAction inAction,
java.lang.Object[] inParameters)
Execute the ModelAction with the given parameters |
protected java.lang.reflect.Method |
getMethod(java.lang.Object inModel,
ModelAction inAction)
Find a Method matching the prototype in the passed ModelAction for the passed model object, using the BeanInfo to introspect the model as a JavaBean. |
protected static boolean |
matchesItem(java.lang.Class inPrototypeClass,
java.lang.Class inParameterClass)
Utility method to determine if a given class matches another class, taking into account primitive<->class mapping and inheritance. |
protected static boolean |
matchesPrototype(java.lang.Class[] inPrototypeClasses,
java.lang.Class[] inParameterClasses)
Utility method to determine if a given parameter class array matches the supplied prototype class array |
Methods inherited from class org.scopemvc.core.ActionManager |
getInstance, getInstance |
Methods inherited from class org.scopemvc.core.ModelManager |
getModelClass, make |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BeansActionManager()
Method Detail |
protected static boolean matchesPrototype(java.lang.Class[] inPrototypeClasses, java.lang.Class[] inParameterClasses)
inPrototypeClasses
- the prototype that is used in the comparisoninParameterClasses
- these are the parameter classes that must be
validated against the prototype
protected static boolean matchesItem(java.lang.Class inPrototypeClass, java.lang.Class inParameterClass)
inPrototypeClass
- TODO: Describe the ParameterinParameterClass
- TODO: Describe the Parameter
public java.lang.Object doAction(java.lang.Object inModel, ModelAction inAction, java.lang.Object[] inParameters) throws java.lang.Exception
doAction
in class ActionManager
inModel
- The model used for executing the ModelActioninAction
- The action (method) to executeinParameters
- The parameters of the method
java.lang.Exception
- if the execution of the ModelAction failed for any
reasonpublic boolean canDoAction(java.lang.Object inModel, ModelAction inAction)
DynamicInvokable
, then check that the
ModelAction can be invoked by calling the isActionInvokable()
method on the
model.
canDoAction
in class ActionManager
inModel
- The model used for executing the ModelActioninAction
- The action (method) to execute
protected java.lang.reflect.Method getMethod(java.lang.Object inModel, ModelAction inAction)
inAction
- find a Method that matches the prototype described in
this ModelAction.inModel
- The model used for executing the ModelAction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |