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
ConstructorDescriptionOptions
(@Nullable OwnerResolver customOwnerResolver, @Nullable SecurityEnforcer.LogCollector logCollector, @Nullable Consumer<Authorization> applicableAutzConsumer, boolean failOnNoAccess) Creates an instance of aOptions
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Consumer<Authorization>
Returns the value of theapplicableAutzConsumer
record component.static SecurityEnforcer.Options
create()
@Nullable OwnerResolver
Returns the value of thecustomOwnerResolver
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thefailOnNoAccess
record component.final int
hashCode()
Returns a hash code value for this object.@Nullable SecurityEnforcer.LogCollector
Returns the value of thelogCollector
record component.final String
toString()
Returns a string representation of this record class.@NotNull SecurityEnforcer.Options
withApplicableAutzConsumer
(Consumer<Authorization> applicableAutzConsumer) Sends all the applicable authorizations to the specified consumer.@NotNull SecurityEnforcer.Options
withCustomOwnerResolver
(OwnerResolver resolver) Custom owner resolver to be used for this operation.@NotNull SecurityEnforcer.Options
withLogCollector
(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 aOptions
record class.- Parameters:
customOwnerResolver
- the value for thecustomOwnerResolver
record componentlogCollector
- the value for thelogCollector
record componentapplicableAutzConsumer
- the value for theapplicableAutzConsumer
record componentfailOnNoAccess
- the value for thefailOnNoAccess
record 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 thecustomOwnerResolver
record component.- Returns:
- the value of the
customOwnerResolver
record component
-
logCollector
Returns the value of thelogCollector
record component.- Returns:
- the value of the
logCollector
record component
-
applicableAutzConsumer
Returns the value of theapplicableAutzConsumer
record component.- Returns:
- the value of the
applicableAutzConsumer
record component
-
failOnNoAccess
public boolean failOnNoAccess()Returns the value of thefailOnNoAccess
record component.- Returns:
- the value of the
failOnNoAccess
record component
-