Record Class AdminPanelItem

java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.api.plugins.web.page.ui.AdminPanelItem
Record Components:
key - unique (under the same category) page key used to identify element. It is used to create URL address of page (conflict may cause unexpected effects). It can have special value '*' (match all) which makes it to match all addresses under category address. NOTE: match all value must be always be embedded (embedded set to true) and is hidden from navigation.
category - category under which element will be displayed. Category is hierarchical and contains of other elements - slash character '/' is used to separate categories levels.
name - translation key for name
resource - relative link to resource to be displayed or null if item is category without page
embedded - valid only for react components. Tells react app to render component as child of component rendered by category resource. If false component will be rendered in place of parent category component. Leave false for non-react components
keywords - list of keywords (or translation keys for keywords) to be used for quick search functionality

public record AdminPanelItem(String key, String category, String name, String resource, boolean embedded, boolean navigationOnly, String keywords) extends Record
Represents single page that will be navigable and will be display in admin panel sidebar nav.

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

  • Constructor Details

    • AdminPanelItem

      public AdminPanelItem(String key, String category, String name, String resource, boolean embedded, boolean navigationOnly, String keywords)
      Creates an instance of a AdminPanelItem 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
      resource - the value for the resource record component
      embedded - the value for the embedded record component
      navigationOnly - the value for the navigationOnly record component
      keywords - the value for the keywords record component
  • Method Details

    • simplePage

      public static AdminPanelItem simplePage(String key, String parentCategory, String name, String resource)
    • embeddedChild

      public static AdminPanelItem embeddedChild(String key, String parentCategory, String name, String resource)
    • embeddedChild

      public static AdminPanelItem embeddedChild(String key, String parentCategory, String name, String resource, String keywords)
    • simplePage

      public static AdminPanelItem simplePage(String key, String parentCategory, String name, String resource, String keywords)
    • simpleCategory

      public static AdminPanelItem simpleCategory(String key, String parentCategory, String name)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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
    • resource

      public String resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • embedded

      public boolean embedded()
      Returns the value of the embedded record component.
      Returns:
      the value of the embedded record component
    • keywords

      public String keywords()
      Returns the value of the keywords record component.
      Returns:
      the value of the keywords record component