org.voovan.docker.message.Image.ImageHistory Maven / Gradle / Ivy
Show all versions of JDocker Show documentation
package org.voovan.docker.message.Image;
import org.voovan.tools.json.JSONPath;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
*
* @author helyho
*
* DockerFly Framework.
* WebSite: https://git.oschina.net/helyho/JDocker
* Licence: Apache v2 License
*/
public class ImageHistory {
private String id;
private Long created;
private String createdBy;
private List tags;
private Long size;
private String comment;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Date getCreated() {
return new Date(created);
}
public void setCreated(Long created) {
this.created = created;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public static List load(String jsonStr) throws ParseException, ReflectiveOperationException {
JSONPath jsonPath = JSONPath.newInstance(jsonStr);
List imageHistories = jsonPath.listObject("/",ImageHistory.class,new ArrayList());
return imageHistories;
}
}