Class AbstractUser

  • Direct Known Subclasses:
    User, User

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

      Constructors 
      Modifier Constructor Description
      protected AbstractUser​(java.lang.String id, java.lang.String name, Role globalRole, java.util.NavigableMap<java.lang.String,​Role> roles)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.NavigableMap<java.lang.String,​Role> getEdgeRoles()
      Gets all Roles for Edge-IDs.
      Role getGlobalRole()
      Gets the global Role.
      java.lang.String getId()  
      java.lang.String getName()  
      java.util.Optional<Role> getRole​(java.lang.String edgeId)
      Gets the Role for a given Edge-ID.
      void setRole​(java.lang.String edgeId, Role role)
      Sets the Role for a given Edge-ID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractUser

        protected AbstractUser​(java.lang.String id,
                               java.lang.String name,
                               Role globalRole,
                               java.util.NavigableMap<java.lang.String,​Role> roles)
    • Method Detail

      • getId

        public java.lang.String getId()
      • getName

        public java.lang.String getName()
      • getEdgeRoles

        public java.util.NavigableMap<java.lang.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 java.util.Optional<Role> getRole​(java.lang.String edgeId)
        Gets the Role for a given Edge-ID.
        Parameters:
        edgeId - the Edge-ID
        Returns:
        the Role
      • setRole

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