Package jetbrains.buildServer.push
Class SecuredMessageWithMap<K,V>
- java.lang.Object
-
- jetbrains.buildServer.push.SecuredMessageWithMap<K,V>
-
- All Implemented Interfaces:
TopicMessage
public class SecuredMessageWithMap<K,V> extends Object implements TopicMessage
-
-
Constructor Summary
Constructors Constructor Description SecuredMessageWithMap(Map<K,V> unsecuredMap, BiFunction<SUser,K,Boolean> permissionCheckerByKey)Map-based topic message with permission checks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringserialize(Subscription subscription)This method is invoked multiple times - for each subscription of the topic.
-
-
-
Constructor Detail
-
SecuredMessageWithMap
public SecuredMessageWithMap(@NotNull Map<K,V> unsecuredMap, @NotNull BiFunction<SUser,K,Boolean> permissionCheckerByKey)Map-based topic message with permission checks. Before serialization given map will be filtered on a key basis with a permission checker.- Type Parameters:
K- Key type.V- Value type.
-
-
Method Detail
-
serialize
@Nullable public String serialize(@NotNull Subscription subscription)
Description copied from interface:TopicMessageThis method is invoked multiple times - for each subscription of the topic. Invocation for subscription is performed when security context contains the user corresponding to this subscription (seeSubscription.getUser(). So implementations can serialize message differently depending on the user who will receive this message. If null is returned, then message will not be pushed to the corresponding subscription.- Specified by:
serializein interfaceTopicMessage
-
-