Package com.onec.ui
Record Class UiLayout.Profile
java.lang.Object
java.lang.Record
com.onec.ui.UiLayout.Profile
- Enclosing class:
UiLayout
public static record UiLayout.Profile(String id, String title, String theme, List<String> roles, int priority, List<UiLayout.Section> sections, List<UiLayoutBuilder.WidgetConfig> widgets)
extends Record
A named persona bundle: its own navigation (
sections), home
(widgets), branding (title/theme) and the
roles that resolve into it. Higher priority wins when a
user matches several. A profile never widens access — it only shapes what
a cooperating client renders.-
Constructor Summary
ConstructorsConstructorDescriptionProfile(String id, String title, String theme, List<String> roles, int priority, List<UiLayout.Section> sections, List<UiLayoutBuilder.WidgetConfig> widgets) Creates an instance of aProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intpriority()Returns the value of thepriorityrecord component.roles()Returns the value of therolesrecord component.sections()Returns the value of thesectionsrecord component.theme()Returns the value of thethemerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.widgets()Returns the value of thewidgetsrecord component.
-
Constructor Details
-
Profile
public Profile(String id, String title, String theme, List<String> roles, int priority, List<UiLayout.Section> sections, List<UiLayoutBuilder.WidgetConfig> widgets) Creates an instance of aProfilerecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componenttheme- the value for thethemerecord componentroles- the value for therolesrecord componentpriority- the value for thepriorityrecord componentsections- the value for thesectionsrecord componentwidgets- the value for thewidgetsrecord component
-
-
Method Details
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
theme
Returns the value of thethemerecord component.- Returns:
- the value of the
themerecord component
-
roles
Returns the value of therolesrecord component.- Returns:
- the value of the
rolesrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
sections
Returns the value of thesectionsrecord component.- Returns:
- the value of the
sectionsrecord component
-
widgets
Returns the value of thewidgetsrecord component.- Returns:
- the value of the
widgetsrecord component
-