From 9648a8b9d03fce135b60f03379d92b628ff10a9a Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Thu, 12 May 2022 00:00:24 +0200 Subject: Custom container model Signed-off-by: Georg Pfuetzenreuter --- .../net/libertacasa/pubsh/web/MyContainer.java | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 src/main/java/net/libertacasa/pubsh/web/MyContainer.java (limited to 'src/main/java/net/libertacasa/pubsh/web') diff --git a/src/main/java/net/libertacasa/pubsh/web/MyContainer.java b/src/main/java/net/libertacasa/pubsh/web/MyContainer.java new file mode 100644 index 0000000..a7b9395 --- /dev/null +++ b/src/main/java/net/libertacasa/pubsh/web/MyContainer.java @@ -0,0 +1,90 @@ +package net.libertacasa.pubsh.web; + +import java.io.Serializable; +import java.time.Instant; + +import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.dockerjava.api.model.Container; + +//public class MyContainer extends Container implements Serializable { +public class MyContainer implements Serializable { + private static final long serialVersionUID = 5870179635916284739L; + + @Override + public String toString() { +// return ReflectionToStringBuilder.toString(this,ToStringStyle.SHORT_PREFIX_STYLE); + return new ReflectionToStringBuilder(this). + append("name", name). + append("id", id). + append("ExpirationDate", ExpirationDate). + append("image", image). + append("imageid", imageid). + append("status", status). + toString(); + } + + private String name; + + private String id; + + private Instant ExpirationDate; + + private String image; + + private String imageid; + + private String status; + + public void setName(String name) { + this.name = name; + } + + public void setId(String id) { + this.id = id; + } + + public void setExpirationDate(Instant ExpirationDate) { + this.ExpirationDate = ExpirationDate; + } + + public void setImage(String image) { + this.image = image; + } + + public void setImageId(String imageid) { + this.imageid = imageid; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getName() { + return name; + } + + public String getId() { + return id; + } + + public Instant getExpirationDate() { + return ExpirationDate; + } + + public String getImage() { + return image; + } + + public String getImageId() { + return imageid; + } + + public String getStatus() { + return status; + } + +} -- cgit v1.2.3