/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#save(java.lang.Object) */ @SuppressWarnings("unchecked") @Override public Subclass save(Subclass delegate) { return (Subclass) getResource().save(delegate); }
/** * @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 DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription d = super.getCreatableProperties(); d.addProperty("operator"); d.addProperty("orderSetMembers"); return d; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addRequiredProperty("locale"); description.addProperty("localePreferred"); description.addProperty("conceptNameType"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addProperty("ingredient"); description.addProperty("strength"); description.addProperty("units"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties() */ @Override public DelegatingResourceDescription getUpdatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("person"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties() */ @Override public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription description = super.getUpdatableProperties(); //shouldn't be editing the patient description.removeProperty("personA"); description.removeProperty("personB"); description.addProperty("voided"); return description; }
@Override public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription updatableProperties = super.getUpdatableProperties(); updatableProperties.addProperty("startDate"); updatableProperties.addProperty("endDate"); updatableProperties.addProperty("voided"); return updatableProperties; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties() */ @Override public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription description = super.getUpdatableProperties(); description.addProperty("name"); description.addProperty("names"); description.addProperty("descriptions"); return description; }
/** * @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; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties() */ @Override public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException { DelegatingResourceDescription description = super.getUpdatableProperties(); //shouldn't be editing the patient description.removeProperty("patient"); return description; }
/** * Creates {@link Representation#DEFAULT}. * <p> * Calls {@link BaseDelegatingResource#asRepresentation(Object, Representation)} on the resource * with the given object. * * @return the representation * @throws Exception */ public SimpleObject newDefaultRepresentation() throws Exception { return getResource().asRepresentation(getObject(), Representation.DEFAULT); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#purge(java.lang.Object, * org.openmrs.module.webservices.rest.web.RequestContext) */ @Override public void purge(Subclass delegate, RequestContext context) throws ResponseException { getResource().purge(delegate, context); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addProperty("description"); description.addProperty("isHidden"); return description; }
/** * @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; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("source"); description.addRequiredProperty("sourceCode"); return description; }
/** * Creates {@link Representation#FULL}. * <p> * Calls {@link BaseDelegatingResource#asRepresentation(Object, Representation)} on the resource * with the given object. * * @return the representation * @throws Exception */ public SimpleObject getFullRepresentation() throws Exception { return getResource().asRepresentation(getObject(), Representation.FULL); }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = new DelegatingResourceDescription(); description.addRequiredProperty("name"); description.addProperty("description"); description.addProperty("retired"); description.addProperty("retireReason"); return description; }
/** * @see org.openmrs.module.webservices.rest.web.resource.impl.MetadataDelegatingCrudResource#getCreatableProperties() */ @Override public DelegatingResourceDescription getCreatableProperties() { DelegatingResourceDescription description = super.getCreatableProperties(); description.addRequiredProperty("fieldType"); description.addRequiredProperty("selectMultiple"); description.addProperty("concept"); description.addProperty("tableName"); description.addProperty("attributeName"); description.addProperty("defaultValue"); return description; }
/** * Creates {@link Representation#REF}. * <p> * Calls {@link BaseDelegatingResource#asRepresentation(Object, Representation)} on the resource * with the given object. * * @return the representation * @throws Exception */ public SimpleObject newRefRepresentation() throws Exception { return getResource().asRepresentation(getObject(), Representation.REF); }