Interface UserDataProvider

All Superinterfaces:
Prioritizable, Supporter<String>
All Known Implementing Classes:
ContentUserDataProvider, DefaultImageUserDataProvider, FOUserPreferencesDataProvider, StoredUserDataProvider, UserPreferencesDataProvider

public interface UserDataProvider extends Prioritizable, Supporter<String>
Provide data for a user
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Maximum priority.
    static final int
    Minimum priority.
  • Method Summary

    Modifier and Type
    Method
    Description
    getValue(User user, String dataId)
    Get the value for a data and a user
    default boolean
    hasValue(User user, String dataId)
    Check if the value is present for this user

    Methods inherited from interface org.ametys.runtime.plugin.component.Prioritizable

    getPriority

    Methods inherited from interface org.ametys.runtime.plugin.component.Supporter

    supports
  • Field Details

  • Method Details

    • hasValue

      default boolean hasValue(User user, String dataId)
      Check if the value is present for this user
      Parameters:
      user - The user
      dataId - the data requested
      Returns:
      true if the user has a value for this data, false otherwise
    • getValue

      Object getValue(User user, String dataId)
      Get the value for a data and a user
      Parameters:
      user - The User
      dataId - The id of the data wanted
      Returns:
      The value of the data for the user, can be null