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 aContentContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisRequired
record component.location()
Returns the value of thelocation
record component.Returns the value of theresourcePath
record component.Returns the value of thestatuscode
record component.boolean
Returns the value of thesyntheticMultipart
record component.final String
toString()
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 aContentContext
record class.- Parameters:
resourcePath
- the value for theresourcePath
record componentstatuscode
- the value for thestatuscode
record componentisRequired
- the value for theisRequired
record componentlocation
- the value for thelocation
record componentsyntheticMultipart
- the value for thesyntheticMultipart
record 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 theresourcePath
record component.- Returns:
- the value of the
resourcePath
record component
-
statuscode
Returns the value of thestatuscode
record component.- Returns:
- the value of the
statuscode
record component
-
isRequired
public boolean isRequired()Returns the value of theisRequired
record component.- Returns:
- the value of the
isRequired
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
syntheticMultipart
public boolean syntheticMultipart()Returns the value of thesyntheticMultipart
record component.- Returns:
- the value of the
syntheticMultipart
record component
-