@Override
public Model getGETModel(Representation rep) {
ModelImpl model = (ModelImpl) super.getGETModel(rep);
if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
model
.property("uuid", new StringProperty())
.property("display", new StringProperty())
.property("name", new StringProperty())
.property("description", new StringProperty())
.property("started", new BooleanProperty())
.property("startupErrorMessage", new StringProperty());
}
if (rep instanceof FullRepresentation) {
model
.property("packageName", new StringProperty())
.property("author", new StringProperty())
.property("version", new StringProperty())
.property("requireOpenmrsVersion", new StringProperty())
.property("awareOfModules", new ArrayProperty(new StringProperty()))
.property("requiredModules", new ArrayProperty(new StringProperty()));
} else if (rep instanceof RefRepresentation) {
model
.property("uuid", new StringProperty())
.property("display", new StringProperty());
}
return model;
}