Record Class ModelSecurity
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.model.part.ModelSecurity
- Record Components:
secure- whether the model endpoints require securitysecurityPolicy- the class handling security policiesrowSecurityHandlers- optional row-level security handler class names
public record ModelSecurity(boolean secure, Class<? extends CrudSecurityPolicy> securityPolicy, List<String> rowSecurityHandlers)
extends Record
Security-related configuration for a model.
-
Constructor Summary
ConstructorsConstructorDescriptionModelSecurity(boolean secure, Class<? extends CrudSecurityPolicy> securityPolicy, List<String> rowSecurityHandlers) Creates an instance of aModelSecurityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the class names that handle row-level security for this model, if any.Class<? extends CrudSecurityPolicy> Returns the class that handles security policies for this model.final inthashCode()Returns a hash code value for this object.booleanisSecure()Returns true if the model endpoints require security.Returns the value of therowSecurityHandlersrecord component.booleansecure()Returns the value of thesecurerecord component.Class<? extends CrudSecurityPolicy> Returns the value of thesecurityPolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelSecurity
public ModelSecurity(boolean secure, Class<? extends CrudSecurityPolicy> securityPolicy, List<String> rowSecurityHandlers) Creates an instance of aModelSecurityrecord class.- Parameters:
secure- the value for thesecurerecord componentsecurityPolicy- the value for thesecurityPolicyrecord componentrowSecurityHandlers- the value for therowSecurityHandlersrecord component
-
-
Method Details
-
isSecure
public boolean isSecure()Returns true if the model endpoints require security.- Returns:
- true if secure
-
getSecurityPolicy
Returns the class that handles security policies for this model.- Returns:
- the security policy class
-
getRowSecurityHandlers
Returns the class names that handle row-level security for this model, if any.- Returns:
- list of fully qualified row security handler class names
-
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 '=='. -
secure
public boolean secure()Returns the value of thesecurerecord component.- Returns:
- the value of the
securerecord component
-
securityPolicy
Returns the value of thesecurityPolicyrecord component.- Returns:
- the value of the
securityPolicyrecord component
-
rowSecurityHandlers
Returns the value of therowSecurityHandlersrecord component.- Returns:
- the value of the
rowSecurityHandlersrecord component
-