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 thecategoryrecord component.booleanembedded()Returns the value of theembeddedrecord component.static AdminPanelItemembeddedChild(String key, String parentCategory, String name, String resource) static AdminPanelItemfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.keywords()Returns the value of thekeywordsrecord component.name()Returns the value of thenamerecord component.booleanReturns the value of thenavigationOnlyrecord component.static AdminPanelItemstatic AdminPanelItemresource()Returns the value of theresourcerecord component.static AdminPanelItemsimpleCategory(String key, String parentCategory, String name) static AdminPanelItemsimplePage(String key, String parentCategory, String name, String resource) static AdminPanelItemfinal StringtoString()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 aAdminPanelItemrecord class.- Parameters:
key- the value for thekeyrecord componentcategory- the value for thecategoryrecord componentname- the value for thenamerecord componentresource- the value for theresourcerecord componentembedded- the value for theembeddedrecord componentnavigationOnly- the value for thenavigationOnlyrecord componentkeywords- the value for thekeywordsrecord 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 thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
embedded
public boolean embedded()Returns the value of theembeddedrecord component.- Returns:
- the value of the
embeddedrecord component
-
keywords
Returns the value of thekeywordsrecord component.- Returns:
- the value of the
keywordsrecord component
-