Examples of DelegatingResourceDescription


Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

  /**
   * @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties()
   */
  @Override
  public DelegatingResourceDescription getUpdatableProperties() {
    DelegatingResourceDescription description = getCreatableProperties();
    description.addProperty("seen");
    return description;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   * org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation)
   */
  @Override
  public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
    if (rep instanceof DefaultRepresentation) {
      DelegatingResourceDescription description = new DelegatingResourceDescription();
      description.addProperty("uuid");
      description.addProperty("display", findMethod("getDisplayString"));
      description.addProperty("name");
      description.addProperty("price");
      description.addProperty("cost");
      description.addProperty("description");
      description.addProperty("retired");
      description.addSelfLink();
      description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
      return description;
    } else if (rep instanceof FullRepresentation) {
      DelegatingResourceDescription description = new DelegatingResourceDescription();
      description.addProperty("uuid");
      description.addProperty("display", findMethod("getDisplayString"));
      description.addProperty("name");
      description.addProperty("description");
      description.addProperty("price");
      description.addProperty("cost");
      description.addProperty("retired");
      description.addProperty("auditInfo", findMethod("getAuditInfo"));
      description.addSelfLink();
      return description;
    }
    return null;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   * @see
   * org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties()
   */
  @Override
  public DelegatingResourceDescription getCreatableProperties() {
    DelegatingResourceDescription description = new DelegatingResourceDescription();
    description.addRequiredProperty("drug_id");
    description.addRequiredProperty("name");
    description.addRequiredProperty("description");
    return description;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   * @see
   * org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties()
   */
  @Override
  public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException {
    DelegatingResourceDescription description = new DelegatingResourceDescription();
    description.addProperty("description");
    return description;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

  }
 
  @Override
  public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
    if (rep instanceof DefaultRepresentation) {
      DelegatingResourceDescription description = new DelegatingResourceDescription();
      description.addProperty("uuid");
      description.addProperty("name");
      description.addProperty("providerId");
      description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
      return description;
    } else if (rep instanceof FullRepresentation) {
      DelegatingResourceDescription description = new DelegatingResourceDescription();
      description.addProperty("uuid");
      description.addProperty("name");
      description.addProperty("providerId");
     
      return description;
    }
    return null;
   
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   
  }
 
  @Override
  public DelegatingResourceDescription getCreatableProperties() {
    DelegatingResourceDescription description = new DelegatingResourceDescription();
    description.addRequiredProperty("name");
    description.addRequiredProperty("ProviderId");
    return description;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   * org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation)
   */
  @Override
  public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
    if (rep instanceof DefaultRepresentation) {
      DelegatingResourceDescription description = new DelegatingResourceDescription();
      description.addProperty("uuid");
      description.addProperty("display", findMethod("getDisplayString"));
      description.addProperty("name");
      description.addProperty("description");
      description.addProperty("searchQuery");
      description.addProperty("patients", Representation.REF);
      description.addProperty("retired");
      description.addSelfLink();
      description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
      return description;
    } else if (rep instanceof FullRepresentation) {
      DelegatingResourceDescription description = new DelegatingResourceDescription();
      description.addProperty("uuid");
      description.addProperty("display", findMethod("getDisplayString"));
      description.addProperty("name");
      description.addProperty("description");
      description.addProperty("searchQuery");
      description.addProperty("patients", Representation.DEFAULT);
      description.addProperty("retired");
      description.addProperty("auditInfo", findMethod("getAuditInfo"));
      description.addSelfLink();
      return description;
    }
    return null;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   * @see
   * org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getCreatableProperties()
   */
  @Override
  public DelegatingResourceDescription getCreatableProperties() {
    DelegatingResourceDescription description = new DelegatingResourceDescription();
    description.addRequiredProperty("name");
    description.addRequiredProperty("description");
    description.addProperty("searchQuery");
    return description;
  }
View Full Code Here

Examples of org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription

   * @see
   * org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getUpdatableProperties()
   */
  @Override
  public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoesNotSupportOperationException {
    DelegatingResourceDescription description = new DelegatingResourceDescription();
    description.addProperty("description");
    description.addProperty("searchQuery");
    return description;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.