mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-03 07:24:57 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user