public interface IdentityTypeDefinition
IdentityType
wraps configuration which in future can be used to
convert also this interface to be stateful and so configurable.Modifier and Type | Method and Description |
---|---|
pl.edu.icm.unity.types.basic.IdentityParam |
convertFromString(String stringRepresentation,
String remoteIdp,
String translationProfile)
Creates an IdentityParam from a string representation.
|
pl.edu.icm.unity.types.basic.Identity |
createNewIdentity(String realm,
String target,
long entityId)
Tries to create a new identity.
|
List<pl.edu.icm.unity.types.basic.Attribute> |
extractAttributes(String from,
Map<String,String> toExtract)
Extract provided attributes.
|
Set<pl.edu.icm.unity.types.basic.AttributeType> |
getAttributesSupportedForExtraction() |
String |
getComparableValue(String from,
String realm,
String target)
Comparable value must be guaranteed to be unique for the type, i.e.
|
String |
getDefaultDescription() |
String |
getHumanFriendlyDescription(pl.edu.icm.unity.MessageSource msg) |
String |
getHumanFriendlyName(pl.edu.icm.unity.MessageSource msg) |
String |
getId() |
boolean |
isDynamic() |
boolean |
isEmailVerifiable() |
boolean |
isExpired(pl.edu.icm.unity.types.basic.Identity identity)
Checks if the identity is expired.
|
boolean |
isRemovable() |
boolean |
isTargeted() |
String |
toHumanFriendlyString(pl.edu.icm.unity.MessageSource msg,
pl.edu.icm.unity.types.basic.IdentityParam from) |
String |
toPrettyString(pl.edu.icm.unity.types.basic.IdentityParam from)
Similar to
#toString() , but allows for less verbose
and more user-friendly output. |
String |
toPrettyStringNoPrefix(pl.edu.icm.unity.types.basic.IdentityParam from)
Similar to
#toPrettyString() , but doesn't return id type prefix. |
String |
toString(pl.edu.icm.unity.types.basic.IdentityParam from) |
void |
validate(String value)
Checks if the value is valid
|
String getId()
String getDefaultDescription()
boolean isDynamic()
boolean isRemovable()
boolean isTargeted()
getComparableValue(String, String, String)
.boolean isEmailVerifiable()
boolean isExpired(pl.edu.icm.unity.types.basic.Identity identity)
identity
- to be checkedSet<pl.edu.icm.unity.types.basic.AttributeType> getAttributesSupportedForExtraction()
void validate(String value) throws pl.edu.icm.unity.exceptions.IllegalIdentityValueException
value
- pl.edu.icm.unity.exceptions.IllegalIdentityValueException
String getComparableValue(String from, String realm, String target) throws pl.edu.icm.unity.exceptions.IllegalIdentityValueException
from
- mandatory raw identity valuerealm
- realm value, can be nulltarget
- target for which the identity is going to be used, can be nullpl.edu.icm.unity.exceptions.IllegalIdentityValueException
- if some parameters are null and the implementation
requires them to create a comparable value.List<pl.edu.icm.unity.types.basic.Attribute> extractAttributes(String from, Map<String,String> toExtract)
toExtract
- map: the keys are attribute names as returned by the
getAttributesSupportedForExtraction()
. Values are actual names of attribute names to be used
for each extracted.String toPrettyString(pl.edu.icm.unity.types.basic.IdentityParam from)
#toString()
, but allows for less verbose
and more user-friendly output.String toPrettyStringNoPrefix(pl.edu.icm.unity.types.basic.IdentityParam from)
#toPrettyString()
, but doesn't return id type prefix.String toString(pl.edu.icm.unity.types.basic.IdentityParam from)
String toHumanFriendlyString(pl.edu.icm.unity.MessageSource msg, pl.edu.icm.unity.types.basic.IdentityParam from)
msg
- from
- String getHumanFriendlyName(pl.edu.icm.unity.MessageSource msg)
msg
- String getHumanFriendlyDescription(pl.edu.icm.unity.MessageSource msg)
msg
- pl.edu.icm.unity.types.basic.Identity createNewIdentity(String realm, String target, long entityId)
realm
- authentication realm identifier or null if no realm is definedtarget
- null or the receiver of the created identityentityId
- entityId to be set in the returned identityIllegalStateException
- if the creation failed: typically when used on a static type.pl.edu.icm.unity.types.basic.IdentityParam convertFromString(String stringRepresentation, String remoteIdp, String translationProfile) throws pl.edu.icm.unity.exceptions.IllegalIdentityValueException
IdentityTaV.getValue()
, remoteIdp and profile is set to the arguments
and type to getId()
), but it can also perform additional parsing to set
for instance the confirmation information.stringRepresentation
- pl.edu.icm.unity.exceptions.IllegalIdentityValueException
Copyright © 2018 Unity. All rights reserved.