Record Class ContentTransformResult
java.lang.Object
java.lang.Record
org.alfresco.elasticsearch.batchindexing.domain.transform.ContentTransformResult
public record ContentTransformResult(Optional<String> text, Optional<ContentTransformFailure> failure)
extends Record
Outcome of a single
ContentTransformClient.transformContent(Long) call. Three shapes:
ofText(String)— 200 OK with a non-empty body; index it.empty()— 200 OK with an empty body. Documented as "no content" (not a failure); writer moves on and no DLQ entry is produced.ofFailure(ContentTransformFailure)— non-retryable HTTP error (e.g. 4xx). Writer skips the item and forwards the failure to the optional DLQ bridge.
-
Constructor Summary
ConstructorsConstructorDescriptionContentTransformResult(Optional<String> text, Optional<ContentTransformFailure> failure) Creates an instance of aContentTransformResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ContentTransformResultempty()final booleanIndicates whether some other object is "equal to" this one.failure()Returns the value of thefailurerecord component.final inthashCode()Returns a hash code value for this object.static ContentTransformResultofFailure(ContentTransformFailure failure) static ContentTransformResulttext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContentTransformResult
Creates an instance of aContentTransformResultrecord class.- Parameters:
text- the value for thetextrecord componentfailure- the value for thefailurerecord component
-
-
Method Details
-
ofText
-
empty
-
ofFailure
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
failure
Returns the value of thefailurerecord component.- Returns:
- the value of the
failurerecord component
-