Class RVUserContext

java.lang.Object
io.revealbi.core.RVUserContext
All Implemented Interfaces:
IRequestContext, IRVUserContext

public class RVUserContext extends Object implements IRVUserContext
Default implementation of the IRVUserContext interface.
  • Constructor Details

    • RVUserContext

      public RVUserContext(String userId)
      Creates a new RVUserContext with the given user ID and no additional properties.
      Parameters:
      userId - A string that uniquely identifies the user.
    • RVUserContext

      public RVUserContext(String userId, Map<String,Object> properties)
      Creates a new RVUserContext with the given user ID and a map of additional properties.
      Parameters:
      userId - A string that uniquely identifies the user.
      properties - An optional map of additional properties associated with the user.
  • Method Details

    • getUserId

      public String getUserId()
      Returns the userId for this context.
      Specified by:
      getUserId in interface IRequestContext
      Returns:
      Returns the userId for this context.
    • getProperty

      public Object getProperty(String name)
      Returns the value for the given property or null if no property with that name is found.
      Parameters:
      name - Name of the property to return the value for.
      Returns:
      Property for the given key name.
    • getProperties

      public Map<String,Object> getProperties()
      Returns the map of additional properties associated with this user context.
      Specified by:
      getProperties in interface IRequestContext
      Returns:
      Returns the map of additional properties associated with this user context.