mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-24 13:44:33 +00:00
moved some more templates to template config
fixed usage of post target exceptions
This commit is contained in:
@@ -8,12 +8,10 @@ import java.util.List;
|
||||
public class PostTargetNotFoundException extends AbstractoRunTimeException implements Templatable {
|
||||
|
||||
private String postTargetKey;
|
||||
private List<String> availableTargets;
|
||||
|
||||
public PostTargetNotFoundException(String key, List<String> available) {
|
||||
public PostTargetNotFoundException(String key) {
|
||||
super("");
|
||||
this.postTargetKey = key;
|
||||
this.availableTargets = available;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -25,7 +23,6 @@ public class PostTargetNotFoundException extends AbstractoRunTimeException imple
|
||||
public Object getTemplateModel() {
|
||||
HashMap<String, String> param = new HashMap<>();
|
||||
param.put("key", this.postTargetKey);
|
||||
param.put("available", String.join(",", this.availableTargets));
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,17 @@ package dev.sheldan.abstracto.core.exception;
|
||||
import dev.sheldan.abstracto.templating.Templatable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class PostTargetNotValidException extends AbstractoRunTimeException implements Templatable {
|
||||
|
||||
private String postTargetKey;
|
||||
private List<String> availableTargets;
|
||||
|
||||
public PostTargetNotValidException(String key) {
|
||||
public PostTargetNotValidException(String key, List<String> available) {
|
||||
super("");
|
||||
this.postTargetKey = key;
|
||||
this.availableTargets = available;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -22,6 +25,7 @@ public class PostTargetNotValidException extends AbstractoRunTimeException imple
|
||||
public Object getTemplateModel() {
|
||||
HashMap<String, String> param = new HashMap<>();
|
||||
param.put("key", this.postTargetKey);
|
||||
param.put("available", String.join(",", this.availableTargets));
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user