Class IdentityMap
- java.lang.Object
-
- com.adobe.marketing.mobile.edge.identity.IdentityMap
-
public class IdentityMap extends Object
Defines a map containing a set of end user identities, keyed on either namespace integration code or the namespace ID of the identity. Within each namespace, the identity is unique. The values of the map are an array, meaning that more than one identity of each namespace may be carried.- See Also:
- IdentityMap Schema
-
-
Constructor Summary
Constructors Constructor Description IdentityMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItem(IdentityItem item, String namespace)Add an identity item which is used to clearly distinguish entities that are interacting with digital experiences.List<IdentityItem>getIdentityItemsForNamespace(String namespace)Gets theIdentityItems for the namespace returns an empty list if noIdentityItems were found for the namespaceList<String>getNamespaces()Returns a list of all the namespaces contained in thisIdentityMap.booleanisEmpty()Determines if thisIdentityMaphas no identities.voidremoveItem(IdentityItem item, String namespace)Remove a singleIdentityItemfrom this map.StringtoString()
-
-
-
Method Detail
-
getIdentityItemsForNamespace
@NonNull public List<IdentityItem> getIdentityItemsForNamespace(@NonNull String namespace)
Gets theIdentityItems for the namespace returns an empty list if noIdentityItems were found for the namespace- Parameters:
namespace- namespace for the list of identities to retrieve- Returns:
- IdentityItem for the namespace
-
getNamespaces
@NonNull public List<String> getNamespaces()
Returns a list of all the namespaces contained in thisIdentityMap.- Returns:
- a list of all the namespaces for this
IdentityMap, or an empty string if thisIdentityMapis empty
-
addItem
public void addItem(@NonNull IdentityItem item, @NonNull String namespace)Add an identity item which is used to clearly distinguish entities that are interacting with digital experiences. AnIdentityItemwith an emptyidis not allowed and is ignored.- Parameters:
item-IdentityItemto be added to the givennamespace; should not be nullnamespace- the namespace integration code or namespace ID of the identity; should not be null
-
removeItem
public void removeItem(@NonNull IdentityItem item, @NonNull String namespace)Remove a singleIdentityItemfrom this map.- Parameters:
item-IdentityItemto be removed from the givennamespace; should not be nullnamespace- the namespace integration code or namespace ID of the identity; should not be null
-
isEmpty
public boolean isEmpty()
Determines if thisIdentityMaphas no identities.- Returns:
trueif thisIdentityMapcontains no identifiers
-
-