chore(pom.xml): update version to 1.0.30
feat(StorageServiceAutoConfiguration): add FileSelectionDialogModule bean configuration refactor(FileSelectionDialogModule): remove unnecessary annotations and use constructor injection
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.extio</groupId>
|
||||
<artifactId>game-engine</artifactId>
|
||||
<version>1.0.29</version>
|
||||
<version>1.0.30</version>
|
||||
|
||||
<properties>
|
||||
<java.version>25</java.version>
|
||||
|
||||
@@ -3,8 +3,14 @@ package de.extio.game_engine.storage;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import de.extio.game_engine.event.EventService;
|
||||
import de.extio.game_engine.i18n.LocalizationService;
|
||||
import de.extio.game_engine.renderer.work.RenderingBoPool;
|
||||
import de.extio.game_engine.storage.dialog.FileSelectionDialogModule;
|
||||
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(name = "game-engine.storage.enabled", havingValue = "true", matchIfMissing = true)
|
||||
public class StorageServiceAutoConfiguration {
|
||||
@@ -14,4 +20,12 @@ public class StorageServiceAutoConfiguration {
|
||||
StorageService storageService() {
|
||||
return new StorageServiceImpl();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnProperty(name = "game-engine.storage.dialog.enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "game-engine.renderer.enabled", havingValue = "true", matchIfMissing = true)
|
||||
FileSelectionDialogModule fileSelectionDialog(final ApplicationContext applicationContext, final EventService eventService, final LocalizationService localizationService, final RenderingBoPool renderingBoPool, final StorageService storageService) {
|
||||
return new FileSelectionDialogModule(applicationContext, eventService, localizationService, renderingBoPool, storageService);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,7 @@ import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import de.extio.game_engine.event.Event;
|
||||
import de.extio.game_engine.event.EventService;
|
||||
@@ -40,7 +38,6 @@ import de.extio.game_engine.storage.StorageItemDescriptor;
|
||||
import de.extio.game_engine.storage.StorageResource;
|
||||
import de.extio.game_engine.storage.StorageService;
|
||||
|
||||
@Component
|
||||
public class FileSelectionDialogModule extends AbstractClientModule {
|
||||
|
||||
public enum FileSelectionMode {
|
||||
@@ -98,20 +95,23 @@ public class FileSelectionDialogModule extends AbstractClientModule {
|
||||
|
||||
private static final String BUTTON_CANCEL = "FileSelectionDialog_Button_Cancel";
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
private final ApplicationContext applicationContext;
|
||||
|
||||
@Autowired
|
||||
private EventService eventService;
|
||||
private final EventService eventService;
|
||||
|
||||
@Autowired
|
||||
private LocalizationService localizationService;
|
||||
private final LocalizationService localizationService;
|
||||
|
||||
@Autowired
|
||||
private RenderingBoPool renderingBoPool;
|
||||
private final RenderingBoPool renderingBoPool;
|
||||
|
||||
@Autowired
|
||||
private StorageService storageService;
|
||||
private final StorageService storageService;
|
||||
|
||||
public FileSelectionDialogModule(final ApplicationContext applicationContext, final EventService eventService, final LocalizationService localizationService, final RenderingBoPool renderingBoPool, final StorageService storageService) {
|
||||
this.applicationContext = applicationContext;
|
||||
this.eventService = eventService;
|
||||
this.localizationService = localizationService;
|
||||
this.renderingBoPool = renderingBoPool;
|
||||
this.storageService = storageService;
|
||||
}
|
||||
|
||||
private Window dialogWindow;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user