Class GameOptionsService
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.service.GameOptionsService
-
public class GameOptionsService extends java.lang.Object
Helper service for common option tasks.- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 27, 2014
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.eventbus.AsyncEventBus
clientServerEventBus
private org.springframework.context.ApplicationContext
context
private LoadAndSaveService
loadAndSave
private Locale
locale
private LocalStorage
localStorage
private org.springframework.context.MessageSource
messageSource
private static java.lang.String
SAVEGAME_FILE_EXTENSTION
private java.io.File
savegameDir
private com.google.common.eventbus.AsyncEventBus
timerEventBus
-
Constructor Summary
Constructors Constructor Description GameOptionsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getGameSpeedList()
Compile a list of game speedsjava.util.List<OpenPatricianSpinnerOptionDataModel>
getSavegames()
Retrieve the list of savegames.private void
init()
void
load(java.lang.String savegameName)
void
save(java.lang.String savegameName)
-
-
-
Field Detail
-
SAVEGAME_FILE_EXTENSTION
private static final java.lang.String SAVEGAME_FILE_EXTENSTION
- See Also:
- Constant Field Values
-
locale
@Autowired private Locale locale
-
messageSource
@Autowired private org.springframework.context.MessageSource messageSource
-
loadAndSave
@Autowired private LoadAndSaveService loadAndSave
-
savegameDir
private java.io.File savegameDir
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
timerEventBus
@Autowired @Qualifier("timerEventBus") private com.google.common.eventbus.AsyncEventBus timerEventBus
-
context
@Autowired private org.springframework.context.ApplicationContext context
-
localStorage
@Autowired private LocalStorage localStorage
-
-
Method Detail
-
init
@PostConstruct private void init()
-
getGameSpeedList
public java.util.List<java.lang.String> getGameSpeedList()
Compile a list of game speeds- Returns:
- List of the localized game speeds.
-
getSavegames
public java.util.List<OpenPatricianSpinnerOptionDataModel> getSavegames()
Retrieve the list of savegames.- Returns:
- List for the savegame spinner
-
save
public void save(java.lang.String savegameName)
-
load
public void load(java.lang.String savegameName)
-
-