Record Class SecurityEnforcer.Options
java.lang.Object
java.lang.Record
com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer.Options
- Enclosing interface:
- SecurityEnforcer
public static record SecurityEnforcer.Options(@Nullable OwnerResolver customOwnerResolver, @Nullable SecurityEnforcer.LogCollector logCollector, @Nullable Consumer<Authorization> applicableAutzConsumer, boolean failOnNoAccess)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionOptions(@Nullable OwnerResolver customOwnerResolver, @Nullable SecurityEnforcer.LogCollector logCollector, @Nullable Consumer<Authorization> applicableAutzConsumer, boolean failOnNoAccess) Creates an instance of aOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Consumer<Authorization>Returns the value of theapplicableAutzConsumerrecord component.static SecurityEnforcer.Optionscreate()@Nullable OwnerResolverReturns the value of thecustomOwnerResolverrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefailOnNoAccessrecord component.final inthashCode()Returns a hash code value for this object.@Nullable SecurityEnforcer.LogCollectorReturns the value of thelogCollectorrecord component.final StringtoString()Returns a string representation of this record class.@NotNull SecurityEnforcer.OptionswithApplicableAutzConsumer(Consumer<Authorization> applicableAutzConsumer) Sends all the applicable authorizations to the specified consumer.@NotNull SecurityEnforcer.OptionswithCustomOwnerResolver(OwnerResolver resolver) Custom owner resolver to be used for this operation.@NotNull SecurityEnforcer.OptionswithLogCollector(SecurityEnforcer.LogCollector logCollector) Sends all the tracing messages also to the specified collector (besides logging them as usual).@NotNull SecurityEnforcer.Options
-
Constructor Details
-
Options
public Options(@Nullable @Nullable OwnerResolver customOwnerResolver, @Nullable @Nullable SecurityEnforcer.LogCollector logCollector, @Nullable @Nullable Consumer<Authorization> applicableAutzConsumer, boolean failOnNoAccess) Creates an instance of aOptionsrecord class.- Parameters:
customOwnerResolver- the value for thecustomOwnerResolverrecord componentlogCollector- the value for thelogCollectorrecord componentapplicableAutzConsumer- the value for theapplicableAutzConsumerrecord componentfailOnNoAccess- the value for thefailOnNoAccessrecord component
-
-
Method Details
-
create
-
withCustomOwnerResolver
Custom owner resolver to be used for this operation. If not specified, a default resolver (based on aMidPointPrincipalManager) is used. -
withLogCollector
@NotNull public @NotNull SecurityEnforcer.Options withLogCollector(SecurityEnforcer.LogCollector logCollector) Sends all the tracing messages also to the specified collector (besides logging them as usual). -
withApplicableAutzConsumer
@NotNull public @NotNull SecurityEnforcer.Options withApplicableAutzConsumer(Consumer<Authorization> applicableAutzConsumer) Sends all the applicable authorizations to the specified consumer. -
withNoFailOnNoAccess
-
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 '=='. -
customOwnerResolver
Returns the value of thecustomOwnerResolverrecord component.- Returns:
- the value of the
customOwnerResolverrecord component
-
logCollector
Returns the value of thelogCollectorrecord component.- Returns:
- the value of the
logCollectorrecord component
-
applicableAutzConsumer
Returns the value of theapplicableAutzConsumerrecord component.- Returns:
- the value of the
applicableAutzConsumerrecord component
-
failOnNoAccess
public boolean failOnNoAccess()Returns the value of thefailOnNoAccessrecord component.- Returns:
- the value of the
failOnNoAccessrecord component
-