Class Attachment
- java.lang.Object
-
- de.bmiag.tapir.execution.attachment.Attachment
-
public final class Attachment extends java.lang.Object
Container for a tapir attachment. Attachments have to be published by callingAttachmentListenerNotifier.notifyListeners(java.util.function.Consumer)
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Attachment.Builder
Builds instances of typeAttachment
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Attachment
build(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<Attachment.Builder> init)
Creates an immutable instance of Attachment.Attachment
copy(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<Attachment.Builder> init)
Creates an immutable copy of this instance.boolean
equals(java.lang.Object obj)
java.util.Optional<java.nio.charset.Charset>
getCharset()
byte[]
getContent()
org.springframework.util.MimeType
getMimeType()
java.lang.String
getName()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- The value of the
name
attribute
-
getMimeType
public org.springframework.util.MimeType getMimeType()
- Returns:
- The value of the
mimeType
attribute
-
getContent
public byte[] getContent()
- Returns:
- The value of the
content
attribute
-
getCharset
public java.util.Optional<java.nio.charset.Charset> getCharset()
- Returns:
- The value of the
charset
attribute
-
equals
@Pure public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
@Pure public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
@Pure public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
build
public static Attachment build(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<Attachment.Builder> init)
Creates an immutable instance of Attachment. The values can be initialized by using the init parameter.- Parameters:
init
- The initializer- Returns:
- An immutable Attachment instance
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
copy
public Attachment copy(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<Attachment.Builder> init)
Creates an immutable copy of this instance. Uses accessors to get values to initialize the new immutable instance. The values can be modified by using the init parameter.- Parameters:
init
- The initializer- Returns:
- A copied immutable Attachment instance
-
-