Package org.ametys.core.right
Record Class AccessExplanation
java.lang.Object
java.lang.Record
org.ametys.core.right.AccessExplanation
- Record Components:
accessControllerId- the controller idaccessResult- the access resultexplanation- The explanation as aI18nizableText
- All Implemented Interfaces:
Comparable<AccessExplanation>
public record AccessExplanation(String accessControllerId, AccessController.AccessResult accessResult, I18nizableText explanation)
extends Record
implements Comparable<AccessExplanation>
Explanation of an
AccessController.AccessResult provided by an AccessController-
Constructor Summary
ConstructorsConstructorDescriptionAccessExplanation(String accessControllerId, AccessController.AccessResult accessResult, I18nizableText explanation) Creates an instance of aAccessExplanationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessControllerIdrecord component.Returns the value of theaccessResultrecord component.intstatic I18nizableTextelementsToI18nizableText(List<String> elements) Helper to build aI18nizableTextfor a list of Stringfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplanationrecord component.static I18nizableTextgroupsToI18nizableText(Set<Group> groups) Helper to build aI18nizableTextfor groupsfinal inthashCode()Returns a hash code value for this object.static I18nizableTextprofilesToI18nizableText(Set<Profile> profiles) Helper to build aI18nizableTextfor profilesfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AccessExplanation
public AccessExplanation(String accessControllerId, AccessController.AccessResult accessResult, I18nizableText explanation) Creates an instance of aAccessExplanationrecord class.- Parameters:
accessControllerId- the value for theaccessControllerIdrecord componentaccessResult- the value for theaccessResultrecord componentexplanation- the value for theexplanationrecord component
-
-
Method Details
-
profilesToI18nizableText
Helper to build aI18nizableTextfor profiles- Parameters:
profiles- the profile- Returns:
- the
I18nizableText
-
groupsToI18nizableText
Helper to build aI18nizableTextfor groups- Parameters:
groups- the profile- Returns:
- the
I18nizableText
-
elementsToI18nizableText
Helper to build aI18nizableTextfor a list of String- Parameters:
elements- the strings- Returns:
- the
I18nizableText
-
compareTo
- Specified by:
compareToin interfaceComparable<AccessExplanation>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
accessControllerId
Returns the value of theaccessControllerIdrecord component.- Returns:
- the value of the
accessControllerIdrecord component
-
accessResult
Returns the value of theaccessResultrecord component.- Returns:
- the value of the
accessResultrecord component
-
explanation
Returns the value of theexplanationrecord component.- Returns:
- the value of the
explanationrecord component
-