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 nameresource
- relative link to resource to be displayed or null if item is category without pageembedded
- 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 componentskeywords
- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncategory()
Returns the value of thecategory
record component.boolean
embedded()
Returns the value of theembedded
record component.static AdminPanelItem
embeddedChild
(String key, String parentCategory, String name, String resource) static AdminPanelItem
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.keywords()
Returns the value of thekeywords
record component.name()
Returns the value of thename
record component.boolean
Returns the value of thenavigationOnly
record component.static AdminPanelItem
static AdminPanelItem
resource()
Returns the value of theresource
record component.static AdminPanelItem
simpleCategory
(String key, String parentCategory, String name) static AdminPanelItem
simplePage
(String key, String parentCategory, String name, String resource) static AdminPanelItem
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AdminPanelItem
public AdminPanelItem(String key, String category, String name, String resource, boolean embedded, boolean navigationOnly, String keywords) Creates an instance of aAdminPanelItem
record class.- Parameters:
key
- the value for thekey
record componentcategory
- the value for thecategory
record componentname
- the value for thename
record componentresource
- the value for theresource
record componentembedded
- the value for theembedded
record componentnavigationOnly
- the value for thenavigationOnly
record componentkeywords
- the value for thekeywords
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
-
simplePage
-
simpleCategory
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
category
Returns the value of thecategory
record component.- Returns:
- the value of the
category
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
embedded
public boolean embedded()Returns the value of theembedded
record component.- Returns:
- the value of the
embedded
record component
-
keywords
Returns the value of thekeywords
record component.- Returns:
- the value of the
keywords
record component
-