Record Class Actor
java.lang.Object
java.lang.Record
com.iantapply.orchestra.security.Actor
- Record Components:
id- stable principal identifierrole- authorization role
-
Constructor Summary
Constructors -
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.voidrequire(Permission permission) Requires this actor to hold a permission.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Actor
-
-
Method Details
-
require
Requires this actor to hold a permission.- Parameters:
permission- required permission- Throws:
SecurityException- when the role does not allow it
-
toString
-
hashCode
-
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). -
id
-
role
-