class PassengerLeavesShipOnArrival
extends ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.Date |
date |
private java.time.LocalDateTime |
deadline |
private ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateParameterSupplier |
dialogParameterSupplier |
private ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateFactory |
dialogTemplateFactory |
private ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType |
dialogTemplateType |
private ch.sahits.game.openpatrician.clientserverinterface.service.LinearDeadlinePremiumCalculator |
premiumCalculator |
private ch.sahits.game.openpatrician.model.IPlayer |
shipsOwner |
| Constructor and Description |
|---|
PassengerLeavesShipOnArrival(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer shipsOwner,
java.time.LocalDateTime deadline,
ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType dialogType,
ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateParameterSupplier dialogParameterSupplier,
ch.sahits.game.openpatrician.clientserverinterface.service.LinearDeadlinePremiumCalculator premiumCalculator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(ch.sahits.game.openpatrician.model.city.ICity city) |
private String |
getMessageBoardTitleKey(ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType templateType) |
private Object[] |
getMessageBoardTitleParameters(ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType templateType,
ch.sahits.game.openpatrician.model.city.ICity city) |
protected boolean |
ignoreEventCity()
If the deadline has passed, the passenger will leave the ship in the next port not the destination city.
|
private void |
initializeEventBus() |
private ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType |
resolveType(ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType baseType,
boolean successful) |
private void |
unregisterEventBus() |
@Autowired private ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateFactory dialogTemplateFactory
@Autowired private ch.sahits.game.openpatrician.model.Date date
private final ch.sahits.game.openpatrician.model.IPlayer shipsOwner
private final java.time.LocalDateTime deadline
private final ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType dialogTemplateType
private final ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateParameterSupplier dialogParameterSupplier
private final ch.sahits.game.openpatrician.clientserverinterface.service.LinearDeadlinePremiumCalculator premiumCalculator
public PassengerLeavesShipOnArrival(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer shipsOwner,
java.time.LocalDateTime deadline,
ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType dialogType,
ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateParameterSupplier dialogParameterSupplier,
ch.sahits.game.openpatrician.clientserverinterface.service.LinearDeadlinePremiumCalculator premiumCalculator)
@PostConstruct private void initializeEventBus()
@PreDestroy private void unregisterEventBus()
public boolean execute(ch.sahits.game.openpatrician.model.city.ICity city)
execute in class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListenerprivate Object[] getMessageBoardTitleParameters(ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType templateType, ch.sahits.game.openpatrician.model.city.ICity city)
private String getMessageBoardTitleKey(ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType templateType)
protected boolean ignoreEventCity()
ignoreEventCity in class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListenerprivate ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType resolveType(ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType baseType,
boolean successful)
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.