Record Class AuthorityExposurePolicy
java.lang.Object
java.lang.Record
zeroecho.pki.server.AuthorityExposurePolicy
- Record Components:
mode- exposure mode- exact exposed authorities for explicit mode- whether realm-scoped authority creation is permitted
public record AuthorityExposurePolicy(AuthorityExposurePolicy.Mode mode, Set<PkiId> authorityIds, boolean authorityCreationPermitted)
extends Record
Immutable process policy controlling which logical authorities one realm
context may expose.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumClosed authority-exposure modes. -
Constructor Summary
ConstructorsConstructorDescriptionAuthorityExposurePolicy(AuthorityExposurePolicy.Mode mode, Set<PkiId> authorityIds, boolean authorityCreationPermitted) Validates and defensively snapshots the exposure policy. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests process exposure for one canonical authority.booleanReturns the value of theauthorityCreationPermittedrecord component.Returns the value of theauthorityIdsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuthorityExposurePolicy
public AuthorityExposurePolicy(AuthorityExposurePolicy.Mode mode, Set<PkiId> authorityIds, boolean authorityCreationPermitted) Validates and defensively snapshots the exposure policy.
-
-
Method Details
-
allows
Tests process exposure for one canonical authority.- Parameters:
authorityId- authority to test- Returns:
- whether the process may expose 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
mode
-
authorityIds
Returns the value of theauthorityIdsrecord component.- Returns:
- the value of the
authorityIdsrecord component
-
authorityCreationPermitted
public boolean authorityCreationPermitted()Returns the value of theauthorityCreationPermittedrecord component.- Returns:
- the value of the
authorityCreationPermittedrecord component
-