|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjade.core.behaviours.Behaviour
jade.core.behaviours.CompositeBehaviour
jade.core.behaviours.SerialBehaviour
jade.core.behaviours.FSMBehaviour
ibspan.tss.agents.sha.mvc.ModelConstructor
public abstract class ModelConstructor
This behaviour constructs model of data in Model-View-Controller
architecture.
This class should not be used directly, but extended. As a result of it
action it should, eventually, put constructed DataModel
object
with use of putModel(DataModel)
method or infrom about
InternalSystemError
by calling
putError(InternalSystemError)
method. Returned
DataModel
should contain at least contain
LayoutStructure
object, fetched from
TemplatesRegister
object, provided by the Agent this behaviour
belongs to.
DataModel
,
InternalSystemError
,
LayoutStructure
,
TemplatesRegister
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour |
---|
Behaviour.RunnableChangedEvent |
Field Summary | |
---|---|
protected SessionHandlingAgent |
myAgent
|
protected TemplatesRegister |
templates
|
Fields inherited from class jade.core.behaviours.FSMBehaviour |
---|
currentName, lastStates, previousName |
Fields inherited from class jade.core.behaviours.CompositeBehaviour |
---|
currentExecuted |
Fields inherited from class jade.core.behaviours.Behaviour |
---|
myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING |
Constructor Summary | |
---|---|
ModelConstructor(Agent a,
DataStore ds)
Constructs ModelConstructor. |
Method Summary | |
---|---|
protected SHA_process_user_request |
getAction()
Returns action concept extracted from current request. |
protected String |
getActionName()
Returns the name of action resolved by action dispatcher for current request. |
protected Session |
getCurrentSession()
Returns the session to which currently service request belongs to. |
protected OntModel |
getTemplatesDB()
Returns the register of templates used to build screen layouts. |
protected UserRequest |
getUserRequest()
Returns concept of current user request. |
int |
onEnd()
|
protected void |
putError(InternalSystemError error)
Puts the given error in the DataStore in case of constructing failure. |
protected void |
putModel(DataModel model)
Puts the given model in the DataStore as the result of successful constructing. |
void |
setAccessKeys(Object actKey,
Object actionNameKey,
Object resultKey)
Sets the keys necessary for the work of this behaviour. |
Methods inherited from class jade.core.behaviours.FSMBehaviour |
---|
checkTermination, deregisterState, forceTransitionTo, getChildren, getCurrent, getLastExitValue, getName, getPrevious, getState, handleInconsistentFSM, handleStateEntered, registerDefaultTransition, registerDefaultTransition, registerFirstState, registerLastState, registerState, registerTransition, registerTransition, reset, resetStates, scheduleFirst, scheduleNext |
Methods inherited from class jade.core.behaviours.SerialBehaviour |
---|
handle |
Methods inherited from class jade.core.behaviours.CompositeBehaviour |
---|
action, block, done, registerAsChild, resetChildren, restart, setAgent |
Methods inherited from class jade.core.behaviours.Behaviour |
---|
actionWrapper, block, getBehaviourName, getDataStore, getExecutionState, getParent, isRunnable, onStart, root, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TemplatesRegister templates
protected SessionHandlingAgent myAgent
Constructor Detail |
---|
public ModelConstructor(Agent a, DataStore ds)
a
- is the agent owning this behaviour.ds
- is the DataStore for this constructor.Method Detail |
---|
public void setAccessKeys(Object actKey, Object actionNameKey, Object resultKey)
actKey
- is the key in the DataStore where the Action
concept
extracted from current request can be found.actionNameKey
- is tThe key in the DataStore where the name of action resolved
by action dispatcher - for current request - can be found.resultKey
- is the key in the DataStore where the results of work of this
constructor will be put.public int onEnd()
onEnd
in class FSMBehaviour
protected void putModel(DataModel model)
model
- is the result model of construction.protected void putError(InternalSystemError error)
error
- is the error encounter during constructing process.protected SHA_process_user_request getAction()
protected UserRequest getUserRequest()
protected String getActionName()
protected OntModel getTemplatesDB()
protected Session getCurrentSession()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |