Enum Class OdooUserRole

java.lang.Object
java.lang.Enum<OdooUserRole>
io.openems.backend.metadata.odoo.odoo.OdooUserRole
All Implemented Interfaces:
Serializable, Comparable<OdooUserRole>, Constable

public enum OdooUserRole extends Enum<OdooUserRole>
  • Enum Constant Details

  • Method Details

    • values

      public static OdooUserRole[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OdooUserRole valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOdooRole

      public String getOdooRole()
      Get the Odoo role.
      Returns:
      Odoo role
    • getOdooGroups

      public OdooUserGroup[] getOdooGroups()
      Get the specified Odoo groups for the role.
      Returns:
      Groups for an Odoo role
    • toOdooIds

      public List<Integer> toOdooIds()
      Transform the specified Odoo group objects to a list of IDs.
      Returns:
      The Odoo groups as a list of IDs.
    • getRole

      public static OdooUserRole getRole(String role) throws OpenemsException
      Get the OdooUserRole for the given role as String.
      Parameters:
      role - as String to parse
      Returns:
      The Odoo role
      Throws:
      OpenemsException - if role does not exist
    • getRole

      public static OdooUserRole getRole(Role role) throws OpenemsException
      Get the OdooUserRole for the given Role.
      Parameters:
      role - given Role
      Returns:
      The OdooUserRole
      Throws:
      OpenemsException - if role does not exist