aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java
index 761460971..bd1576020 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/EHvdAttributeProviderPlugin.java
@@ -52,8 +52,9 @@ import at.gv.egovernment.moa.logging.Logger;
import eu.stork.peps.auth.commons.IPersonalAttributeList;
import eu.stork.peps.auth.commons.PersonalAttribute;
import eu.stork.peps.auth.commons.PersonalAttributeList;
-import eu.stork.peps.complex.attributes.IsHealthCareProfessionalType;
-import eu.stork.peps.complex.attributes.ObjectFactory;
+import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType;
+import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.IsHealthCareProfessionalType;
+import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory;
/**
* Fetches the attribute IsHealthcareProfessional from the BAGDAD SOAP service
@@ -67,7 +68,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider {
* Instantiates a new e hvd attribute provider plugin.
*
* @param url the service url
- * @param attributes
+ * @param supportedAttributes
*/
public EHvdAttributeProviderPlugin(String url, String supportedAttributes) {
super(supportedAttributes);
@@ -183,7 +184,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider {
if (collection.get("IsHealthcareProfessional").equals("false") || !collection.get("Type").equals("Medical doctor")) {
// the citizen is no HCP
- acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList<String>(), "NotAvailable");
+ acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, new ArrayList<String>(), AttributeStatusType.NOT_AVAILABLE.value());
} else {
// go on and parse the data
IsHealthCareProfessionalType result = new IsHealthCareProfessionalType();
@@ -193,7 +194,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider {
result.setTypeOfHCP("physician");
result.setNameOfOrganisation(collection.get("NameOfOrganisation"));
- result.setTypeOfOrganisation("Unknown");
+ //result.setTypeOfOrganisation("Unknown"); // TODO used in previous version, check what to do with this
result.setAQAA(4);
@@ -206,7 +207,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider {
ArrayList<String> value = new ArrayList<String>();
value.add(stringWriter.toString());
- acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, value, "Available");
+ acquiredAttribute = new PersonalAttribute("isHealthCareProfessional", false, value, AttributeStatusType.AVAILABLE.value());
}
// pack and return the result
@@ -216,7 +217,7 @@ public class EHvdAttributeProviderPlugin extends AttributeProvider {
// add stork id for verification
ArrayList<String> value = new ArrayList<String>();
value.add(new BPKBuilder().buildStorkeIdentifier(authData.getIdentityLink(), moastorkRequest.getSpCountry()));
- result.add(new PersonalAttribute("eIdentifier", false, value, "Available"));
+ result.add(new PersonalAttribute("eIdentifier", false, value, AttributeStatusType.AVAILABLE.value()));
return result;
} catch (Exception e) {