Class AbstractUser

java.lang.Object
io.openems.common.session.AbstractUser
Direct Known Subclasses:
User, User

public abstract class AbstractUser extends Object
Represents a User; shared by OpenEMS Backend ('io.openems.backend.common.metadata.User') and Edge ('io.openems.edge.common.user.User').
  • Constructor Details

  • Method Details

    • getId

      public String getId()
    • getName

      public String getName()
    • getLanguage

      public Language getLanguage()
      Gets the user language.
      Returns:
      the language
    • setLanguage

      public void setLanguage(Language language)
      Sets the user language.
      Parameters:
      language - the Language
    • getEdgeRoles

      public NavigableMap<String,Role> getEdgeRoles()
      Gets all Roles for Edge-IDs.
      Returns:
      the map of Roles
    • getGlobalRole

      public Role getGlobalRole()
      Gets the global Role.
      Returns:
      Role
    • getRole

      public Optional<Role> getRole(String edgeId)
      Gets the Role for a given Edge-ID.
      Parameters:
      edgeId - the Edge-ID
      Returns:
      the Role
    • setRole

      public void setRole(String edgeId, Role role)
      Sets the Role for a given Edge-ID.
      Parameters:
      edgeId - the Edge-ID
      role - the Role
    • getSettings

      public com.google.gson.JsonObject getSettings()
      Gets the settings for this user.
      Returns:
      the Role
    • hasMultipleEdges

      public abstract boolean hasMultipleEdges()
      Gets the Number of Devices, that the user is allowed to see.
      Returns:
      the numberOfDevices