prompto.code.Module Maven / Gradle / Ivy
The newest version!
package prompto.code;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import prompto.error.PromptoError;
import prompto.intrinsic.PromptoBinary;
import prompto.intrinsic.PromptoVersion;
import prompto.intrinsic.PromptoStorableBase;
import prompto.runtime.Context;
import prompto.store.IStorable;
import prompto.store.IStore;
import prompto.store.IStored;
public abstract class Module extends PromptoStorableBase{
private String name;
private PromptoVersion version;
private String description;
private PromptoBinary image;
private List dependencies;
private ModuleStatus moduleStatus;
private Boolean parked;
public abstract ModuleType getType();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public PromptoVersion getVersion() {
return version;
}
public void setVersion(PromptoVersion version) {
this.version = version;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public PromptoBinary getImage() {
return image;
}
public void setImage(PromptoBinary image) {
this.image = image;
}
public IStorable collectStorables(Context context, IStore store, List storables) throws PromptoError {
IStorable storable = store.newStorable(getCategories(), getDbIdFactory());
storables.add(storable);
storable.setData("name", name);
storable.setData("version", version);
if(description!=null)
storable.setData("description", description);
if(image!=null)
storable.setData("image", image);
if(dependencies!=null) {
List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy