source: geniuswebcore/geniusweb/actions/Action.py@ 69

Last change on this file since 69 was 67, checked in by Bart Vastenhouw, 3 years ago

Added SAOP and simplerunner to GeniusWebPython. Several minor fixes.

File size: 897 bytes
Line 
1from abc import ABC, abstractmethod
2
3from pyson.JsonSubTypes import JsonSubTypes
4from pyson.JsonTypeInfo import Id, As
5from pyson.JsonTypeInfo import JsonTypeInfo
6
7from geniusweb.actions.PartyId import PartyId
8
9
10@JsonSubTypes(["geniusweb.actions.EndNegotiation.EndNegotiation",\
11 "geniusweb.actions.Offer.Offer",\
12 "geniusweb.actions.Accept.Accept",\
13 "geniusweb.actions.LearningDone.LearningDone",\
14 "geniusweb.actions.Vote.Vote",\
15 "geniusweb.actions.Votes.Votes",\
16 ])
17@JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
18class Action (ABC):
19 '''
20 An action represents a "promise" made by a participant in the negotiation. It
21 can not be retracted and is immutable. But it can be followed by other
22 actions that override it or make it outdated.
23 HACK for now this just extends dict intead of defining proper subclasses
24 '''
25 @abstractmethod
26 def getActor(self) -> PartyId:
27 pass
28
Note: See TracBrowser for help on using the repository browser.