Package com.sun.identity.liberty.ws.idpp
Class PPInteractionHelper
- java.lang.Object
-
- com.sun.identity.liberty.ws.idpp.PPInteractionHelper
-
public class PPInteractionHelper extends Object
The classPPInteractionHelperis a helper class for the Personal Profile Service for creating questions for Interaction for value and interaction for consent. The question key will always be of the following form in a properties file. Question:_Value_Question for interact for value Question: _Consent_Question for interfact for consent For e.g. CN_Value_Question or CN_Consent_Question. There will be a default question key for Consent if there's not one for the rquested attribute., but it's not true for interact for the value.
-
-
Constructor Summary
Constructors Constructor Description PPInteractionHelper(String lang)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetInteractForConsentQuestion(boolean isQuery, String ppElement)Gets the inquiry question for interaction for consent.MapgetInteractForValueQuestions(boolean isQuery, String ppElement)Gets Interact For value questions for an idpp element.StringgetPPAttribute(String key)Gets the Personal Profile DS Attribute from the attribute mapper.BigIntegergetTextMaxChars(String resource)Gets the text maxmimum characters for a given attribute.BigIntegergetTextMinChars(String resource)Gets the text minimum characters
-
-
-
Constructor Detail
-
PPInteractionHelper
public PPInteractionHelper(String lang)
Constructor- Parameters:
lang- Language for the properties file.
-
-
Method Detail
-
getInteractForConsentQuestion
public String getInteractForConsentQuestion(boolean isQuery, String ppElement)
Gets the inquiry question for interaction for consent. common question if it does'nt have one.- Parameters:
isQuery- true if this is aPPquery request, false if this is aPPmodify request.ppElement- leaf element inPPselect expresssion.- Returns:
- String inquiry question.
-
getInteractForValueQuestions
public Map getInteractForValueQuestions(boolean isQuery, String ppElement)
Gets Interact For value questions for an idpp element. There will be mutiple questions for a non leaf element.- Parameters:
isQuery- true if this is aPPquery request, false if this is aPPmodify request.ppElement- leaf element inPPselect expression.- Returns:
- Map map of
PPelement and question. key is the ppelement for e.g. CN value is the question for e.g. "What's the CN value?";
-
getPPAttribute
public String getPPAttribute(String key)
Gets the Personal Profile DS Attribute from the attribute mapper.- Parameters:
key- PP Attribute- Returns:
- String DS Attribute for the respective PP Attribute
-
getTextMinChars
public BigInteger getTextMinChars(String resource) throws NumberFormatException
Gets the text minimum characters- Parameters:
resource- a resource that's looking for minimum text chars.- Returns:
- BigInteger text minimum characters in BigInteger format
- Throws:
NumberFormatException- if it can not parse the number.
-
getTextMaxChars
public BigInteger getTextMaxChars(String resource) throws NumberFormatException
Gets the text maxmimum characters for a given attribute.- Parameters:
resource- an attribute that's looking for the max text chars.- Returns:
- BigInteger text maximum characters in BigInteger format
- Throws:
NumberFormatException- if it can not parse the number.
-
-