cz.cuni.pogamut.shed.presenter
Interface IPresenterFactory

Package class diagram package IPresenterFactory
All Known Implementing Classes:
ShedPresenterFactory

public interface IPresenterFactory

Interface for factory creating the presenters for yaposh scene. Presenters are responsible for updating the scene according to underlying changes of the plan. Be careful when implementing the presenters, you can't store LapPath in them, because stuff can move around.

Author:
Honza

Method Summary
 IPresenter createActionPatternPresenter(LapPath actionPatternPath, ShedWidget actionPatternWidget)
          Create presenter for action pattern widget.
 IPresenter createActionPresenter(LapPath actionPath, ShedWidget actionWidget)
          Create presenter for primitive action.
 IPresenter createActionsPresenter(LapPath actionPatternPath, ShedActionsEnvelope actionsEnvelope)
          Create presenter that will take care about keeping adding/moving/removing expanded actions in the ShedActionsEnvelope for ActionPattern.
 IPresenter createChoicePresenter(LapPath choicePath, ShedWidget choiceWidget)
          Create presenter for choice widget, only the widget, not its trigger nor action.
 IPresenter createChoicesPresenter(LapPath competencePath, ShedChoicesEnvelope choicesEnvelope)
          Create presenter responsible for adding, moving and removing choices widgets in the ShedChoicesEnvelope.
 IPresenter createCompetencePresenter(LapPath competencePath, ShedWidget competenceWidget)
          Create presenter for competence widget.
 IPresenter createDriveCollectionPresenter(LapPath driveCollectionPath)
          Create presenter for drive collection, responsible for keeping track of added/moved/removed drives.
 IPresenter createDrivePresenter(LapPath drivePath, ShedWidget widget)
          Create presenter for drive widget.
 IPresenter createExpandedActionPresenter(LapPath actionPath, ExpandedActionEnvelope envelope)
          Create presenter for expanded action, i.e.
 IPresenter createSensePresenter(LapPath sensePath, ShedSenseWidget senseWidget)
          Create presenter for sense at @sensePath that will present the sense in the @senseWidget.
<TRIGGER_PARENT extends PoshElement>
IPresenter
createTriggerPresenter(LapPath triggerOwnerPath, ShedTriggerEnvelope triggerEnvelope)
          Create presenter for trigger, it is responsible for keepeing track of added/moved/removed senses.
 

Method Detail

createActionPresenter

IPresenter createActionPresenter(LapPath actionPath,
                                 ShedWidget actionWidget)
Create presenter for primitive action. The action doesn't have any children. Presenter reflects changes in name and arguments of action.

Parameters:
actionPath - Path to the action in the plan, ends with ../A:?.
actionWidget - The widget that represents the @action in the scene.
Returns:
Presenter for action

createExpandedActionPresenter

IPresenter createExpandedActionPresenter(LapPath actionPath,
                                         ExpandedActionEnvelope envelope)
Create presenter for expanded action, i.e. the whole expanded structure that can happen from unknown reference. The presenter for expanded action should handle when the action is changed (the name of referenced action). ExpandedActionEnvelope is container for one widget: AttachmentEnvelope — the widget that really contains expanded action. When action reference changes its name, the whole AttachmentEnvelope in the ExpandedActionEnvelope is removed and replaced with new one.

Parameters:
actionPath - Path to the @action.
envelope - Envelope that contains expanded action in the scene
Returns:
Presenter for expanded action.

createSensePresenter

IPresenter createSensePresenter(LapPath sensePath,
                                ShedSenseWidget senseWidget)
Create presenter for sense at @sensePath that will present the sense in the @senseWidget. Presenter should reflect changes in name and arguments of the sense.

Parameters:
sensePath - Path to the sense in the plan we want to present.
senseWidget - Widget that represents the sense in the scene.
Returns:
Presenter of sense

createTriggerPresenter

<TRIGGER_PARENT extends PoshElement> IPresenter createTriggerPresenter(LapPath triggerOwnerPath,
                                                                       ShedTriggerEnvelope triggerEnvelope)
Create presenter for trigger, it is responsible for keepeing track of added/moved/removed senses.

Type Parameters:
TRIGGER_PARENT - Owner of the trigger, e.g. for a trigger of a drive, the drive would be the owner.
Parameters:
triggerOwnerPath - Path to the node the trigger belongs to.
triggerEnvelope - Envelope representing the trigger in the scene.
Returns:

createDriveCollectionPresenter

IPresenter createDriveCollectionPresenter(LapPath driveCollectionPath)
Create presenter for drive collection, responsible for keeping track of added/moved/removed drives.

Parameters:
driveCollectionPath - Path to the DC
Returns:

createActionPatternPresenter

IPresenter createActionPatternPresenter(LapPath actionPatternPath,
                                        ShedWidget actionPatternWidget)
Create presenter for action pattern widget. This doesn't affect anything else(APs actions...), only the @actionPatternWidget. The presenter should update widget when its properties, e.g. parameters are changed. The presenter will take referencing action and the AP object from the

Parameters:
actionPatternPath - Path to the action pattern, path ends with ../A:?/AP:?
actionPatternWidget - Widget representing the AP.
Returns:

createCompetencePresenter

IPresenter createCompetencePresenter(LapPath competencePath,
                                     ShedWidget competenceWidget)
Create presenter for competence widget. The presenter is responsible only for the widget of competence, not for its choices ect. It should for example update the widget when arguments or parameters of link are changed.

Parameters:
competencePath - Path to the competence, path ends with ../A:?/C:?
competenceWidget - Widget representing the competence in the scene.
Returns:

createChoicePresenter

IPresenter createChoicePresenter(LapPath choicePath,
                                 ShedWidget choiceWidget)
Create presenter for choice widget, only the widget, not its trigger nor action. Basically it is responsible only for showing changes of choice name in the widget.

Parameters:
choicePath - Path to the choice, it will end with ../A:?/C:?/CE:?
choiceWidget - Widget representing the choice in the scene.
Returns:

createDrivePresenter

IPresenter createDrivePresenter(LapPath drivePath,
                                ShedWidget widget)
Create presenter for drive widget. It reflects only changes of drive widget, not its trigger or action. Overall it only reflects chganges of name.

Parameters:
drivePath - Path to drive, ../DE:?
widget - Widget representing the drive in the scene.
Returns:

createActionsPresenter

IPresenter createActionsPresenter(LapPath actionPatternPath,
                                  ShedActionsEnvelope actionsEnvelope)
Create presenter that will take care about keeping adding/moving/removing expanded actions in the ShedActionsEnvelope for ActionPattern.

Parameters:
actionPatternPath - Path to the action pattern, ends with ../AP:?.
actionsEnvelope - Envelope that contains representations of the actions.
Returns:

createChoicesPresenter

IPresenter createChoicesPresenter(LapPath competencePath,
                                  ShedChoicesEnvelope choicesEnvelope)
Create presenter responsible for adding, moving and removing choices widgets in the ShedChoicesEnvelope.

Parameters:
competencePath - Path to the competence whose choices are managed. Ends with ../A:?/C:?.
choicesEnvelope - Envelope containing the representations of presented choices.


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.