Class IdentityItem
- java.lang.Object
-
- com.adobe.marketing.mobile.edge.identity.IdentityItem
-
public final class IdentityItem extends Object
Identity is used to clearly distinguish people that are interacting with digital experiences. AnIdentityItemis intended to be included in an instance ofIdentityMap.- See Also:
- Identity Item Schema
-
-
Constructor Summary
Constructors Constructor Description IdentityItem(IdentityItem item)Creates a copy of item.IdentityItem(String id)Creates a newIdentityItemwith default valuesauthenticatedState) is set to AMBIGUOUS (@code primaryis set to false AnIdentityItemshould not have an empty or nullidvalue.IdentityItem(String id, AuthenticatedState authenticatedState, boolean primary)Creates a newIdentityItem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)AuthenticatedStategetAuthenticatedState()The state this identity is authenticated.StringgetId()Identity of the consumer in the related namespace.inthashCode()booleanisPrimary()Indicates if this identity is the preferred identity.StringtoString()
-
-
-
Constructor Detail
-
IdentityItem
public IdentityItem(@NonNull String id, @Nullable AuthenticatedState authenticatedState, boolean primary)Creates a newIdentityItem. AnIdentityItemshould not have an empty or nullidvalue. AnIdentityMapwill rejectIdentityItems with null or empty identifiers.- Parameters:
id- id for the item; should not be nullauthenticatedState-AuthenticatedStatefor the item; if none is providedAuthenticatedState.AMBIGUOUSis used as defaultprimary- primary flag for the item- Throws:
IllegalArgumentException- ifidis null
-
IdentityItem
public IdentityItem(@NonNull String id)Creates a newIdentityItemwith default valuesauthenticatedState) is set to AMBIGUOUS (@code primaryis set to false AnIdentityItemshould not have an empty or nullidvalue. AnIdentityMapwill rejectIdentityItems with null or empty identifiers.- Parameters:
id- the id for thisIdentityItem; should not be null- Throws:
IllegalArgumentException- ifidis null
-
IdentityItem
public IdentityItem(@NonNull IdentityItem item)Creates a copy of item.- Parameters:
item- AIdentityItemto be copied; should not be null
-
-
Method Detail
-
getId
@NonNull public String getId()
Identity of the consumer in the related namespace.- Returns:
- The id for this identity item
-
getAuthenticatedState
@NonNull public AuthenticatedState getAuthenticatedState()
The state this identity is authenticated.- Returns:
- Current
AuthenticatedStatefor this item
-
isPrimary
public boolean isPrimary()
Indicates if this identity is the preferred identity. Is used as a hint to help systems better organize how identities are queried.- Returns:
- true if this item is primary, false otherwise
-
-