Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlp.rest.results
Interface Formatter

    public interface Formatter

Interface for classes that can format `RestResults`. There are two basic implementations of this interface that are currently implemented by the REST framework, one for XML formatting and the other for JSON formatting. In general, these are used by `RestResult` implementations to transform themselves into a particular format. `GenericRestResult` is aware of both of these types. If another format type is needed, a custom `RestResult` type will need to be implemented that knows about the custom `Formatter`.

Method Summary
`Object` | `format(RestResult restResult)` Transforms a `RestResult` into a formatted `Object` that can then be sent from the `RestServlet` back to the client.

Method Detail

### format

    Object format(RestResult restResult)

  Transforms a `RestResult` into a formatted `Object` that can then be sent from the `RestServlet` back to the client. This is typically simply a `String`, but, depending on the content type returned by the handling `RestResult`, can also be any arbitrary type.

  Parameters
    `restResult` - the `RestResult` to transform.
  Returns
    the formatted `RestResult`

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved