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 booleanequals(IEnumKeyValueConfigurationBinaryObject other)Equalsbooleanequals(java.lang.Object obj)java.lang.StringgetData()Get the datajava.lang.StringgetMimetype()Get the mime typejava.lang.StringgetName()Get the namejava.time.InstantgetTimestamp()Get the timestampinthashCode()voidmerge(IEnumKeyValueConfigurationBinaryObject enumKeyValueConfigurationBinaryObject)Set all properties which are null or empty from the current with the information from the given object.voidsetData(java.lang.String data)Set the datavoidsetMimetype(java.lang.String mimetype)Set the mime typevoidsetName(java.lang.String name)Set the namevoidsetTimestamp(java.time.Instant timestamp)Set the timestampjava.lang.StringtoString()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:IEnumKeyValueConfigurationBinaryObjectGet the name- Specified by:
getNamein 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:IEnumKeyValueConfigurationBinaryObjectGet the timestamp- Specified by:
getTimestampin 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:IEnumKeyValueConfigurationBinaryObjectGet the mime type- Specified by:
getMimetypein 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:IEnumKeyValueConfigurationBinaryObjectGet the data- Specified by:
getDatain 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:
hashCodein 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:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
Description copied from interface:IEnumKeyValueConfigurationBinaryObjectThe 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:
toStringin interfaceIEnumKeyValueConfigurationBinaryObject- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation
- See Also:
Object.toString()
-
-