... |
... |
@@ -20,7
+20,7 @@ |
20 |
20 |
Durch Einbinden des Interfaces //IBundleProperties// können konfigurierbare Optionen in der Oberfläche von {{formcycle case="dat"/}} angezeigt werden. |
21 |
21 |
{{/figure}} |
22 |
22 |
|
23 |
|
-Das Interface //IBundleProperties //bietet mit der Schnittstellen-Methode //getConfigProperties()// die Möglichkeit Bundle-Properties |
|
23 |
+Das Interface //IBundleProperties //bietet mit der Schnittstellen-Methode //getConfigProperties()// die Möglichkeit Bundle-Properties |
24 |
24 |
vorzukonfigurieren. |
25 |
25 |
Die Methode muss eine Map mit Objekten vom Typ //IBundleConfigParam// zurückliefern. |
26 |
26 |
Es existieren zwei mögliche Implementierung von //IBundleConfigParam//: |
... |
... |
@@ -38,9
+38,17 @@ |
38 |
38 |
|
39 |
39 |
{{code language="java" title=""}} |
40 |
40 |
@SuppressWarnings("serial") |
41 |
|
-public class MyBundleProperties implements IBundleProperties, Serializable { |
42 |
|
- @Override |
43 |
|
- public Map<String, IBundleConfigParam> getConfigProperties() { |
|
41 |
+public class MyBundleProperties implements IBundleProperties { |
|
42 |
+ |
|
43 |
+ /** |
|
44 |
+ * Returns a map with definitions of bundle configuration parameters. Key is the parameter name, value is a bundle |
|
45 |
+ * parameter definition of type {@link IBundleConfigParam}. |
|
46 |
+ * @param resHelper ResourceHelper to determine i18n values from the plugin bundle, if they exists |
|
47 |
+ * @param currentLocale the current locale |
|
48 |
+ * @return {@link Map} with objects of type {@link IBundleConfigParam} or <code>null</code> |
|
49 |
+ */ |
|
50 |
+ @Override |
|
51 |
+ public Map<String, IBundleConfigParam> getConfigProperties(IPluginResourceHelper resHelper, Locale currentLocale) { |
44 |
44 |
Map<String, IBundleConfigParam> config = new LinkedHashMap<>(); |
45 |
45 |
config.put("Group", new BundleConfigGroupItem("Unterstützte Parameter:")); |
46 |
46 |
config.put("Parameter1", new BundleConfigParam("Parameter1", "Pflichtparameter im Scope des Plugins mit Defaultwert", true, "Defaultwert")); |
... |
... |
@@ -49,7
+49,9 @@ |
49 |
49 |
config.put("Parameter4", new BundleConfigParam("Parameter4", "Parameter im Scope des Plugins", false)); |
50 |
50 |
return config; |
51 |
51 |
} |
|
60 |
+ |
52 |
52 |
} |
|
62 |
+ |
53 |
53 |
{{/code}} |
54 |
54 |
|
55 |
55 |
== Zugriff auf Bundle-Properties innerhalb der Plugin-Logik == |