aboutsummaryrefslogtreecommitdiff
path: root/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java')
-rw-r--r--id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java49
1 files changed, 48 insertions, 1 deletions
diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java
index ffae4ae67..bdcf58fec 100644
--- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java
+++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java
@@ -109,6 +109,18 @@ public interface IAttributeListProcessor {
IPersonalAttributeList removeAPMandatoryAttributes(IPersonalAttributeList attrList, Map<String, Boolean> attributes);
/**
+ * Removes from attribute list the Stork list of attributes.
+ *
+ * @param attrList
+ * the requested attribute list
+ *
+ * @return the attribute list without rejected attributes.
+ *
+ * @see IPersonalAttributeList
+ */
+ IPersonalAttributeList removeAPRejectedAttributes(IPersonalAttributeList attrList);
+
+ /**
* Checks if mandate attribute exist in the requested Attribute List. Power attribute name to lookup is loaded by implementation.
*
* @param attrList
@@ -153,4 +165,39 @@ public interface IAttributeListProcessor {
*/
Map<String, Boolean> getNormalAttributesAdded();
-} \ No newline at end of file
+ /**
+ * Adds normal attributes to personal attribute list if exist in original list (allAttrList).
+ *
+ * @param attrList
+ * the list which will be updated
+ * @param allAttrList
+ * the list to check if attributes are to be included.
+ *
+ *
+ * @return the attributes list updated.
+ */
+ IPersonalAttributeList addNormalAttributes(IPersonalAttributeList attrList, IPersonalAttributeList allAttrList);
+
+ /**
+ * Updates list by filtering any attribute that must be requested instead of using a value obtained from cache (business and legal attrs)
+ *
+ * @param attrList
+ * the list which will be updated
+ * @return the filtered list
+ */
+ IPersonalAttributeList filterAttrList(IPersonalAttributeList attrList);
+
+ /**
+ * Updates the list of cached attrs by inserting the business and/or legal attrs requested by the user
+ *
+ * @param cachedAttrList
+ * @param requestedAttrsList
+ */
+ void updateAttrList(IPersonalAttributeList cachedAttrList, IPersonalAttributeList requestedAttrsList);
+
+ /**
+ * Verifies if normal attribute list contains any attribute that we must always request (usually business attributes)
+ */
+ boolean hasAlwaysRequestAttributes(IPersonalAttributeList attributeList);
+
+}