refactored features to be components instead, so we have more runtime config (for example template config etc), this can be done, because features depend on the code anyway and do not need to be done via property files, the property files only define the default values when starting up

fixed feature disabled message not being templated and refactored the way condition checks are handled by the command received handler, so we do not use exceptions for this, this handled by a specified state in the result and a separate post execution handler
added separate config module to the commands
added command to see which features are available, and their current state
fixed scheduler test
This commit is contained in:
Sheldan
2020-04-26 11:38:27 +02:00
parent bd554537cc
commit 4800470f86
136 changed files with 950 additions and 332 deletions

View File

@@ -0,0 +1,15 @@
package dev.sheldan.abstracto.experience.config.features;
import dev.sheldan.abstracto.core.config.FeatureEnum;
import lombok.Getter;
@Getter
public enum ExperienceFeature implements FeatureEnum {
EXPERIENCE("experience");
private String key;
ExperienceFeature(String key) {
this.key = key;
}
}

View File

@@ -0,0 +1,16 @@
package dev.sheldan.abstracto.experience.config.features;
import dev.sheldan.abstracto.core.config.FeatureEnum;
import dev.sheldan.abstracto.core.config.FeatureDisplay;
import org.springframework.stereotype.Component;
@Component
public class ExperienceFeatureDisplay implements FeatureDisplay {
public static String EXPERIENCE = "experience";
@Override
public FeatureEnum getFeature() {
return ExperienceFeature.EXPERIENCE;
}
}