Package dk.mada.jaxrs.model.api
Record Class ContentSelector.ContentContext
java.lang.Object
java.lang.Record
dk.mada.jaxrs.model.api.ContentSelector.ContentContext
- Record Components:
resourcePath- the resource path where the content needs lookup. Used for error output only.statuscode- the status code of the context (HTTP_DEFAULT for requests)isRequired- true if the content is requiredlocation- the location of the contentsyntheticMultipart- flag to communicate this context will get a synthetic multipart DTO created
- Enclosing class:
ContentSelector
public static record ContentSelector.ContentContext(String resourcePath, StatusCode statuscode, boolean isRequired, ContentSelector.Location location, boolean syntheticMultipart)
extends Record
The context of a content lookup.
-
Constructor Summary
ConstructorsConstructorDescriptionContentContext(String resourcePath, StatusCode statuscode, boolean isRequired, ContentSelector.Location location, boolean syntheticMultipart) Creates an instance of aContentContextrecord class. -
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.booleanReturns the value of theisRequiredrecord component.location()Returns the value of thelocationrecord component.Returns the value of theresourcePathrecord component.Returns the value of thestatuscoderecord component.booleanReturns the value of thesyntheticMultipartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContentContext
public ContentContext(String resourcePath, StatusCode statuscode, boolean isRequired, ContentSelector.Location location, boolean syntheticMultipart) Creates an instance of aContentContextrecord class.- Parameters:
resourcePath- the value for theresourcePathrecord componentstatuscode- the value for thestatuscoderecord componentisRequired- the value for theisRequiredrecord componentlocation- the value for thelocationrecord componentsyntheticMultipart- the value for thesyntheticMultipartrecord component
-
-
Method Details
-
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 '=='. -
resourcePath
Returns the value of theresourcePathrecord component.- Returns:
- the value of the
resourcePathrecord component
-
statuscode
Returns the value of thestatuscoderecord component.- Returns:
- the value of the
statuscoderecord component
-
isRequired
public boolean isRequired()Returns the value of theisRequiredrecord component.- Returns:
- the value of the
isRequiredrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
syntheticMultipart
public boolean syntheticMultipart()Returns the value of thesyntheticMultipartrecord component.- Returns:
- the value of the
syntheticMultipartrecord component
-