aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java40
1 files changed, 21 insertions, 19 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
index 538e59401..dbeaf94e9 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
@@ -1,10 +1,10 @@
package at.gv.egovernment.moa.id.protocols.stork2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin;
-
import java.util.ArrayList;
import java.util.List;
+import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin;
+
/**
* A factory for creating AttributeProvider objects.
*/
@@ -34,9 +34,9 @@ public class AttributeProviderFactory {
* the simpleName for the providers class
* @return the attribute provider
*/
- public static AttributeProvider create(String shortname, String url) {
+ public static AttributeProvider create(String shortname, String url, String attributes) {
if (shortname.equals("StorkAttributeRequestProvider")) {
- return new StorkAttributeRequestProvider(url);
+ return new StorkAttributeRequestProvider(url, attributes);
} else if(shortname.equals("EHvdAttributeProvider")) {
return new EHvdAttributeProviderPlugin(url);
} else if(shortname.equals("SignedDocAttributeRequestProvider")) {
@@ -44,23 +44,25 @@ public class AttributeProviderFactory {
} else if (shortname.equals("MISAttributeProvider")) {
return new MISAttributeProvider(url);
} else {
+ return new EHvdAttributeProviderPlugin(url, attributes);
+ } else {
return null;
}
}
- /**
- * Gets fresh instances of the configured plugins.
- *
- * @param configuredAPs the configured a ps
- * @return the configured plugins
- */
- public static List<AttributeProvider> getConfiguredPlugins(
- List<AttributeProviderPlugin> configuredAPs) {
-
- List<AttributeProvider> result = new ArrayList<AttributeProvider>();
- for (AttributeProviderPlugin current : configuredAPs)
- result.add(create(current.getName(), current.getUrl()));
-
- return result;
- }
+ /**
+ * Gets fresh instances of the configured plugins.
+ *
+ * @param configuredAPs the configured a ps
+ * @return the configured plugins
+ */
+ public static List<AttributeProvider> getConfiguredPlugins(
+ List<AttributeProviderPlugin> configuredAPs) {
+
+ List<AttributeProvider> result = new ArrayList<AttributeProvider>();
+ for(AttributeProviderPlugin current : configuredAPs)
+ result.add(create(current.getName(), current.getUrl(), current.getAttributes()));
+
+ return result;
+ }
}