Class EnumKeyValueConfigurationBinaryObject
- java.lang.Object
-
- com.github.toolarium.enumeration.configuration.dto.EnumKeyValueConfigurationBinaryObject
-
- All Implemented Interfaces:
IEnumKeyValueConfigurationBinaryObject
,java.io.Serializable
public class EnumKeyValueConfigurationBinaryObject extends java.lang.Object implements IEnumKeyValueConfigurationBinaryObject, java.io.Serializable
Defines the binary object- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnumKeyValueConfigurationBinaryObject()
Constructor for EnumKeyValueConfigurationBinaryObjectEnumKeyValueConfigurationBinaryObject(IEnumKeyValueConfigurationBinaryObject enumKeyValueConfigurationBinaryObject)
Constructor for EnumKeyValueConfigurationBinaryObjectEnumKeyValueConfigurationBinaryObject(java.lang.String name, java.time.Instant timestamp, java.lang.String mimetype, java.lang.String data)
Constructor for EnumKeyValueConfigurationBinaryObject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(IEnumKeyValueConfigurationBinaryObject other)
Equalsboolean
equals(java.lang.Object obj)
java.lang.String
getData()
Get the datajava.lang.String
getMimetype()
Get the mime typejava.lang.String
getName()
Get the namejava.time.Instant
getTimestamp()
Get the timestampint
hashCode()
void
merge(IEnumKeyValueConfigurationBinaryObject enumKeyValueConfigurationBinaryObject)
Set all properties which are null or empty from the current with the information from the given object.void
setData(java.lang.String data)
Set the datavoid
setMimetype(java.lang.String mimetype)
Set the mime typevoid
setName(java.lang.String name)
Set the namevoid
setTimestamp(java.time.Instant timestamp)
Set the timestampjava.lang.String
toString()
The strign representation of the binary type: Format:[name]|[timestamp]|{mime-type}[content base64 encoded].
The name, timestamp (according to RFC 3339), mime-type and the content (base64 encoded content) are optional values.
-
-
-
Constructor Detail
-
EnumKeyValueConfigurationBinaryObject
public EnumKeyValueConfigurationBinaryObject()
Constructor for EnumKeyValueConfigurationBinaryObject
-
EnumKeyValueConfigurationBinaryObject
public EnumKeyValueConfigurationBinaryObject(IEnumKeyValueConfigurationBinaryObject enumKeyValueConfigurationBinaryObject)
Constructor for EnumKeyValueConfigurationBinaryObject- Parameters:
enumKeyValueConfigurationBinaryObject
- the enum key value configuration
-
EnumKeyValueConfigurationBinaryObject
public EnumKeyValueConfigurationBinaryObject(java.lang.String name, java.time.Instant timestamp, java.lang.String mimetype, java.lang.String data)
Constructor for EnumKeyValueConfigurationBinaryObject- Parameters:
name
- the nametimestamp
- the timestampmimetype
- the mime typedata
- the data
-
-
Method Detail
-
merge
public void merge(IEnumKeyValueConfigurationBinaryObject enumKeyValueConfigurationBinaryObject)
Set all properties which are null or empty from the current with the information from the given object. The data will always be taken from the given object except it empty!- Parameters:
enumKeyValueConfigurationBinaryObject
- the data to merge
-
getName
public java.lang.String getName()
Description copied from interface:IEnumKeyValueConfigurationBinaryObject
Get the name- Specified by:
getName
in interfaceIEnumKeyValueConfigurationBinaryObject
- Returns:
- the name
- See Also:
IEnumKeyValueConfigurationBinaryObject.getName()
-
setName
public void setName(java.lang.String name)
Set the name- Parameters:
name
- the name
-
getTimestamp
public java.time.Instant getTimestamp()
Description copied from interface:IEnumKeyValueConfigurationBinaryObject
Get the timestamp- Specified by:
getTimestamp
in interfaceIEnumKeyValueConfigurationBinaryObject
- Returns:
- the timestamp
- See Also:
IEnumKeyValueConfigurationBinaryObject.getTimestamp()
-
setTimestamp
public void setTimestamp(java.time.Instant timestamp)
Set the timestamp- Parameters:
timestamp
- the timestamp
-
getMimetype
public java.lang.String getMimetype()
Description copied from interface:IEnumKeyValueConfigurationBinaryObject
Get the mime type- Specified by:
getMimetype
in interfaceIEnumKeyValueConfigurationBinaryObject
- Returns:
- the mime type
- See Also:
IEnumKeyValueConfigurationBinaryObject.getMimetype()
-
setMimetype
public void setMimetype(java.lang.String mimetype)
Set the mime type- Parameters:
mimetype
- the mime type
-
getData
public java.lang.String getData()
Description copied from interface:IEnumKeyValueConfigurationBinaryObject
Get the data- Specified by:
getData
in interfaceIEnumKeyValueConfigurationBinaryObject
- Returns:
- the data
- See Also:
IEnumKeyValueConfigurationBinaryObject.getData()
-
setData
public void setData(java.lang.String data)
Set the data- Parameters:
data
- the data
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
equals
public boolean equals(IEnumKeyValueConfigurationBinaryObject other)
Equals- Parameters:
other
- the element to compare- Returns:
- true if equals
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
Description copied from interface:IEnumKeyValueConfigurationBinaryObject
The strign representation of the binary type: Format:[name]|[timestamp]|{mime-type}[content base64 encoded].
The name, timestamp (according to RFC 3339), mime-type and the content (base64 encoded content) are optional values. If the name, timestamp or content are present, they must be separated by a pipe character (|). The mime-type can be declared as header of the content. If there is no pipe character it's assumed its the content part. e.g.myfile.txt|2021-03-15T08:59:22.123Z|{text/plain}VGV4dAo=
ormyfile.txt|2021-03-15T08:59:22.123Z|{text/plain}
ormyfile.txt|2021-03-15T08:59:22.123Z|VGV4dAo=
or2021-03-15T08:59:22.123Z|{text/plain}VGV4dAo=
or2021-03-15T08:59:22.123Z|{text/plain}
or2021-03-15T08:59:22.123Z|VGV4dAo=
ormyfile.txt|{text/plain}VGV4dAo=
ormyfile.txt|{text/plain}
ormyfile.txt|VGV4dAo=
or{text/plain}VGV4dAo=
or{text/plain}
orVGV4dAo=
- Specified by:
toString
in interfaceIEnumKeyValueConfigurationBinaryObject
- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string representation
- See Also:
Object.toString()
-
-