Class GenericObjectTransformer

java.lang.Object
io.deephaven.enterprise.acl.transform.GenericObjectTransformer
All Implemented Interfaces:
TicketTransformer

public final class GenericObjectTransformer extends Object implements TicketTransformer
A Transformer for handling ACLs on generic objects. It uses a low priority so that it can be superseded by transformers for more specific types as they are added.
  • Method Details

    • get

      public static GenericObjectTransformer get(@NotNull @NotNull GroupProvider groupProvider)
      Get the singleton instance of this transformer.
      Parameters:
      groupProvider - the GroupProvider object for fetching user data
      Returns:
      the single GenericObjectTransformer instance
    • addAcl

      public static void addAcl(String group, Object value)
      Add visibility for the specified object to the specified group.
      Parameters:
      group - the group
      value - the object
    • priority

      public int priority()
      Description copied from interface: TicketTransformer
      The relative priority of the transformer. Lower numbers are higher priority, 0 is the lowest allowed value.
      Specified by:
      priority in interface TicketTransformer
      Returns:
      the priority of the transformer
    • canTransform

      public <T> boolean canTransform(@Nullable T value)
      Description copied from interface: TicketTransformer
      Check if this transformer can apply a transformation to the specified value.
      Specified by:
      canTransform in interface TicketTransformer
      Type Parameters:
      T - the type
      Parameters:
      value - the value to transform
      Returns:
      true if this transformer can apply a transformation
    • transform

      public <T> T transform(@NotNull @NotNull DheAuthContext authContext, @Nullable T value)
      Description copied from interface: TicketTransformer
      Transform the specified object using the auth context.
      Specified by:
      transform in interface TicketTransformer
      Type Parameters:
      T - The type.
      Parameters:
      authContext - the authentication context
      value - the value to transform
      Returns:
      the transformed value
    • getAllowedGroups

      public <T> Set<String> getAllowedGroups(@Nullable T value)
      Description copied from interface: TicketTransformer
      Get a set of groups that may access the specified object.
      Specified by:
      getAllowedGroups in interface TicketTransformer
      Type Parameters:
      T - The type
      Parameters:
      value - the object.
      Returns:
      a set of groups that is allowed to access the object.