java.lang.Object
io.openems.common.session.AbstractUser
io.openems.backend.common.metadata.User
Direct Known Subclasses:
MyUser

public class User extends AbstractUser
A User used by OpenEMS Backend.
  • Constructor Details

  • Method Details

    • getToken

      public String getToken()
      Gets the login token.
      Returns:
      the token
    • assertEdgeRoleIsAtLeast

      public Role assertEdgeRoleIsAtLeast(String resource, String edgeId, Role role) throws OpenemsError.OpenemsNamedException
      Throws an exception if the current Role is equal or more privileged than the given Role.
      Parameters:
      resource - a resource identifier; used for the exception
      edgeId - the Edge-ID
      role - the compared Role
      Returns:
      the current Role
      Throws:
      OpenemsError.OpenemsNamedException - if the current Role privileges are less
    • hasMultipleEdges

      public boolean hasMultipleEdges()
      Description copied from class: AbstractUser
      Gets the Number of Devices, that the user is allowed to see.
      Specified by:
      hasMultipleEdges in class AbstractUser
      Returns:
      the numberOfDevices