Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.rest
Class DefaultHttpHeaders

    java.lang.Object
      org.apache.struts2.rest.DefaultHttpHeaders

All Implemented Interfaces:
  HttpHeaders

    public class DefaultHttpHeaders

extends Object
implements HttpHeaders

Default implementation of rest info that uses fluent-style construction

Constructor Summary
`DefaultHttpHeaders()`
`DefaultHttpHeaders(String result)`

Method Summary
`String` | `apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object target)` Applies the configured information to the response
`DefaultHttpHeaders` | `disableCaching()`
`String` | `getResultCode()` The result code to process
`int` | `getStatus()` The HTTP status code
`DefaultHttpHeaders` | `lastModified(Date date)`
`DefaultHttpHeaders` | `renderResult(String code)`
`DefaultHttpHeaders` | `setLocation(String loc)`
`DefaultHttpHeaders` | `setLocationId(Object id)`
`void` | `setStatus(int s)` The HTTP status code
`DefaultHttpHeaders` | `withETag(Object etag)`
`DefaultHttpHeaders` | `withNoETag()`
`DefaultHttpHeaders` | `withStatus(int code)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultHttpHeaders

    public DefaultHttpHeaders()

### DefaultHttpHeaders

    public DefaultHttpHeaders(String result)

Method Detail

### renderResult

    public DefaultHttpHeaders renderResult(String code)

### withStatus

    public DefaultHttpHeaders withStatus(int code)

### withETag

    public DefaultHttpHeaders withETag(Object etag)

### withNoETag

    public DefaultHttpHeaders withNoETag()

### setLocationId

    public DefaultHttpHeaders setLocationId(Object id)

### setLocation

    public DefaultHttpHeaders setLocation(String loc)

### lastModified

    public DefaultHttpHeaders lastModified(Date date)

### disableCaching

    public DefaultHttpHeaders disableCaching()

### apply

    public String apply(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        Object target)

  Description copied from interface: `HttpHeaders`
  Applies the configured information to the response

  Specified by:
    `apply` in interface `HttpHeaders`
  Parameters:
    `request` - The request
    `response` - The response
    `target` - The target object, usually the action
  Returns:
    The result code to process

### getStatus

    public int getStatus()

  Description copied from interface: `HttpHeaders`
  The HTTP status code

  Specified by:
    `getStatus` in interface `HttpHeaders`

### setStatus

    public void setStatus(int s)

  Description copied from interface: `HttpHeaders`
  The HTTP status code

  Specified by:
    `setStatus` in interface `HttpHeaders`

### getResultCode

    public String getResultCode()

  Description copied from interface: `HttpHeaders`
  The result code to process

  Specified by:
    `getResultCode` in interface `HttpHeaders`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.