Package github.priyatam.springrest.domain

Examples of github.priyatam.springrest.domain.BaseDomain


    Object retVal = pjp.proceed();

    ResponseEntity entity = (ResponseEntity) retVal;
    HttpHeaders headers = new HttpHeaders();
    BaseDomain resource = (BaseDomain) entity.getBody();
    if (resource == null) { // async operation?
      return retVal;
    }

    Object key = ReflectionUtils.findMethod(resource.getClass(), "getPolicy").invoke(resource);
    headers.add("Location",
        ServletUriComponentsBuilder.fromRequest(request).path("/{policyNum}").build().expand(key.toString())
            .toString());

    return new ResponseEntity(null, headers, entity.getStatusCode());
View Full Code Here


    HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
        .getRequest();
    ResponseEntity responseEntity = (ResponseEntity) pjp.proceed();
    String url = ServletUriComponentsBuilder.fromRequest(request).build().toString();
    HttpHeaders headers = new HttpHeaders();
    BaseDomain domain = (BaseDomain) responseEntity.getBody();
    String newTag = eTagHelper.update(url, domain);
    headers.add("Etag", newTag);
    return new ResponseEntity(responseEntity.getBody(), headers, responseEntity.getStatusCode());
  }
View Full Code Here

TOP

Related Classes of github.priyatam.springrest.domain.BaseDomain

Copyright © 2018 www.massapicom. 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.