Class User

    • Field Detail


        public static final java.lang.String DEFAULT_EDGE_ID
        Default-Edge-ID for User.
        See Also:
        Constant Field Values
    • Constructor Detail

      • User

        protected User​(java.lang.String id,
                       java.lang.String name,
                       Language language,
                       Role role)
        Constructs an User.
        id - the User-ID
        name - the name
        language - the Language
        role - the Role; used as global Role and assigned to DEFAULT_EDGE_ID.
    • Method Detail

      • getRole

        public Role getRole()
        Gets the Role (Global and Per-Edge-Role are the same for OpenEMS Edge User).
        the Role
      • assertRoleIsAtLeast

        public void assertRoleIsAtLeast​(java.lang.String resource,
                                        Role role)
                                 throws OpenemsError.OpenemsNamedException
        Throws an exception if the Role (Global and Per-Edge-Role are the same for OpenEMS Edge User) is equal or more privileged than the given Role.
        resource - a resource identifier; used for the exception
        role - the compared Role
        OpenemsError.OpenemsNamedException - if the global Role privileges are less
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object