Class SubscriptionSubscriberMapBySubscriberType
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<SubscriberType,SubscriptionSubscriberList>
-
- org.silverpeas.core.subscription.util.SubscriptionSubscriberMapBySubscriberType
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<SubscriberType,SubscriptionSubscriberList>
public class SubscriptionSubscriberMapBySubscriberType extends HashMap<SubscriberType,SubscriptionSubscriberList>
Map to index subscription subscribers by their type.- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description SubscriptionSubscriberMapBySubscriberType(Collection<SubscriptionSubscriber> subscribers)
Initializing from a list ofSubscriptionSubscriber
.SubscriptionSubscriberMapBySubscriberType(SubscriptionSubscriber... subscribers)
Initializing from a list ofSubscriptionSubscriber
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SubscriptionSubscriber subscriber)
Adds the given subscriber into the current indexation.void
addAll(Collection<SubscriptionSubscriber> subscribers)
Adds elements from a list ofSubscriptionSubscriber
.void
addAll(SubscriptionSubscriberMapBySubscriberType subscribers)
Adds elements from a list ofSubscriptionSubscriber
.SubscriptionSubscriberMapBySubscriberType
filterOnDomainVisibilityFrom(UserDetail user)
Removes from this map the subscribers that have not the same domain visibility as the one of the given user.List<String>
getAllUserIds()
Retrieves from the indexed map all unique identifiers of user identifiers (so the users of groups are taken into account).-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
SubscriptionSubscriberMapBySubscriberType
public SubscriptionSubscriberMapBySubscriberType(SubscriptionSubscriber... subscribers)
Initializing from a list ofSubscriptionSubscriber
.- Parameters:
subscribers
- the list of subscription subscribers.
-
SubscriptionSubscriberMapBySubscriberType
public SubscriptionSubscriberMapBySubscriberType(Collection<SubscriptionSubscriber> subscribers)
Initializing from a list ofSubscriptionSubscriber
.- Parameters:
subscribers
- the list of subscription subscribers.
-
-
Method Detail
-
addAll
public void addAll(Collection<SubscriptionSubscriber> subscribers)
Adds elements from a list ofSubscriptionSubscriber
.- Parameters:
subscribers
- the list of subscription subscribers.
-
addAll
public void addAll(SubscriptionSubscriberMapBySubscriberType subscribers)
Adds elements from a list ofSubscriptionSubscriber
.- Parameters:
subscribers
- the list of subscription subscribers.
-
add
public void add(SubscriptionSubscriber subscriber)
Adds the given subscriber into the current indexation.- Parameters:
subscriber
- the subscriber to add.
-
getAllUserIds
public List<String> getAllUserIds()
Retrieves from the indexed map all unique identifiers of user identifiers (so the users of groups are taken into account).- Returns:
- the complete list of user identifiers (those of groups too).
-
filterOnDomainVisibilityFrom
public SubscriptionSubscriberMapBySubscriberType filterOnDomainVisibilityFrom(UserDetail user)
Removes from this map the subscribers that have not the same domain visibility as the one of the given user.- Parameters:
user
- the user that represents the visibility to verify.- Returns:
- itself.
-
-