@Override public Model getGETModel(Representation rep) { return super.getGETModel(rep); }
@Override public Model getCREATEModel(Representation rep) { return super.getCREATEModel(rep); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.MetadataDelegatingCrudResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = super.getCreatableProperties(); //description is set as optional on the superclass, we need to over ride that description.addRequiredProperty("description"); return description; }
@RepHandler(RefRepresentation.class) public SimpleObject convertToRef(T delegate) throws ConversionException { DelegatingResourceDescription rep = new DelegatingResourceDescription(); rep.addProperty("uuid"); rep.addProperty("display"); if (delegate.isRetired()) rep.addProperty("retired"); rep.addSelfLink(); return convertDelegateToRepresentation(delegate, rep); }
/** * Overridden here since the auditInfo is not on UserAndPassword directly, but on the User * * @see org.openmrs.module.webservices.rest.web.resource.impl.MetadataDelegatingCrudResource#getAuditInfo(java.lang.Object) */ @PropertyGetter("auditInfo") public SimpleObject getAuditInfo(UserAndPassword1_8 delegate) throws Exception { SimpleObject ret = super.getAuditInfo(delegate.getUser()); return ret; }
@Override public DelegatingResourceDescription getRepresentationDescription(Representation rep) { if (rep instanceof DefaultRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("operator"); description.addProperty("orderSetMembers", Representation.REF); return description; } else if (rep instanceof FullRepresentation) { DelegatingResourceDescription description = super.getRepresentationDescription(rep); description.addProperty("operator"); description.addProperty("orderSetMembers", Representation.DEFAULT); return description; } else { return null; } }
/** * Gets the display string, which is specific to {@link OpenmrsMetadata} * * @param delegate the meta-data object. * @return the display string. * @should return a localized message if specified * @should return the name property when no localized message is specified * @should return the empty string when no localized message is specified and the name property * is null */ @PropertyGetter("display") public String getDisplayString(T delegate) { String localization = getLocalization(delegate.getClass().getSimpleName(), delegate.getUuid()); if (localization != null) { return localization; } else { return StringUtils.isEmpty(delegate.getName()) ? "" : delegate.getName(); } }
@RepHandler(DefaultRepresentation.class) public SimpleObject asDefaultRep(T delegate) throws Exception { DelegatingResourceDescription rep = new DelegatingResourceDescription(); rep.addProperty("uuid"); rep.addProperty("display"); rep.addProperty("name"); rep.addProperty("description"); rep.addProperty("retired"); rep.addSelfLink(); rep.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL); return convertDelegateToRepresentation(delegate, rep); }
@Override public Model getGETModel(Representation rep) { return super.getGETModel(rep); }
@Override public Model getCREATEModel(Representation rep) { return super.getCREATEModel(rep); }
@Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription d = super.getCreatableProperties(); d.addProperty("operator"); d.addProperty("orderSetMembers"); return d; }
@RepHandler(FullRepresentation.class) public SimpleObject asFullRep(T delegate) throws Exception { DelegatingResourceDescription rep = new DelegatingResourceDescription(); rep.addProperty("uuid"); rep.addProperty("display"); rep.addProperty("name"); rep.addProperty("description"); rep.addProperty("retired"); rep.addProperty("auditInfo"); rep.addSelfLink(); return convertDelegateToRepresentation(delegate, rep); }
@Override public Model getGETModel(Representation rep) { return super.getGETModel(rep); }
@Override public Model getCREATEModel(Representation rep) { return super.getCREATEModel(rep); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription d = super.getCreatableProperties(); d.addRequiredProperty("javaClassName"); d.addProperty("parent"); d.addProperty("conceptClasses"); return d; }
@Override public Model getGETModel(Representation rep) { return super.getGETModel(rep); }
@Override public Model getCREATEModel(Representation rep) { return super.getCREATEModel(rep); //FIXME missing props }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = super.getCreatableProperties(); description.addRequiredProperty("name"); description.addRequiredProperty("description"); description.addProperty("hl7Code"); return description; }
@Override public Model getGETModel(Representation rep) { return super.getGETModel(rep); //FIXME }
@Override public Model getCREATEModel(Representation rep) { return super.getCREATEModel(rep); }