Package org.ametys.core.right
Record Class RightAssignmentContext.ContextInfo
java.lang.Object
java.lang.Record
org.ametys.core.right.RightAssignmentContext.ContextInfo
- Record Components:
rightAssignmentContextId
- the right assignment context idrightAssignmentContextLabel
- the right assignment context labelcontextId
- the context idcontextLabel
- the context labelisRootContext
- if the context is a root context
- Enclosing interface:
- RightAssignmentContext
public static record RightAssignmentContext.ContextInfo(String rightAssignmentContextId, I18nizableText rightAssignmentContextLabel, String contextId, I18nizableText contextLabel, boolean isRootContext)
extends Record
Record describing a context and its associated right assignment context
-
Constructor Summary
ConstructorDescriptionContextInfo
(String rightAssignmentContextId, I18nizableText rightAssignmentContextLabel, String contextId, I18nizableText contextLabel, boolean isRootContext) Creates an instance of aContextInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontextId
record component.Returns the value of thecontextLabel
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisRootContext
record component.Returns the value of therightAssignmentContextId
record component.Returns the value of therightAssignmentContextLabel
record component.toJSON()
Serialize the context info as a JSONfinal String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ContextInfo
public ContextInfo(String rightAssignmentContextId, I18nizableText rightAssignmentContextLabel, String contextId, I18nizableText contextLabel, boolean isRootContext) Creates an instance of aContextInfo
record class.- Parameters:
rightAssignmentContextId
- the value for therightAssignmentContextId
record componentrightAssignmentContextLabel
- the value for therightAssignmentContextLabel
record componentcontextId
- the value for thecontextId
record componentcontextLabel
- the value for thecontextLabel
record componentisRootContext
- the value for theisRootContext
record component
-
-
Method Details
-
toJSON
Serialize the context info as a JSON- Returns:
- a JSON map.
-
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
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 '=='. -
rightAssignmentContextId
Returns the value of therightAssignmentContextId
record component.- Returns:
- the value of the
rightAssignmentContextId
record component
-
rightAssignmentContextLabel
Returns the value of therightAssignmentContextLabel
record component.- Returns:
- the value of the
rightAssignmentContextLabel
record component
-
contextId
Returns the value of thecontextId
record component.- Returns:
- the value of the
contextId
record component
-
contextLabel
Returns the value of thecontextLabel
record component.- Returns:
- the value of the
contextLabel
record component
-
isRootContext
Returns the value of theisRootContext
record component.- Returns:
- the value of the
isRootContext
record component
-