Record Class AccountSettingsMenuElement

java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.api.plugins.web.page.ui.AccountSettingsMenuElement
Record Components:
key - unique setting key used to identify element (conflict may cause unexpected effects)
category - category under which element will be displayed (Rarog will use this name as translation key). Empty string for no category.
name - translation key for name
resources - list of relative urls to js script that should be loaded when menu item is selected. Exactly one item should be module that returns react component.

public record AccountSettingsMenuElement(String key, String category, String name, List<String> resources) extends Record
Represents single menu element that will be presented on account settings page for users.

NOTE: elements are showed in alphabetical order under each category and categories are also sort alphabetically

  • Constructor Details

    • AccountSettingsMenuElement

      public AccountSettingsMenuElement(String key, String category, String name, List<String> resources)
      Creates an instance of a AccountSettingsMenuElement record class.
      Parameters:
      key - the value for the key record component
      category - the value for the category record component
      name - the value for the name record component
      resources - the value for the resources record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • category

      public String category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • resources

      public List<String> resources()
      Returns the value of the resources record component.
      Returns:
      the value of the resources record component