com.strongloop.android.remoting.adapters

## Class RestContractItem

- java.lang.Object
- - com.strongloop.android.remoting.adapters.RestContractItem

    public class RestContractItem
    extends java.lang.Object

A single item within a larger SLRESTContract, encapsulation a single route's verb and pattern, e.g. GET /widgets/:id.

### Constructor Summary

Constructors
Constructor and Description
`RestContractItem(java.lang.String pattern)` Creates a new item encapsulating the given pattern and the default verb, `"POST"`.
`RestContractItem(java.lang.String pattern, java.lang.String verb)` Creates a new item encapsulating the given pattern and verb.

### Method Summary

Methods
`static RestContractItem` `createMultipart(java.lang.String pattern, java.lang.String verb)` Creates a new item encapsulating a route that expects multi-part request (e.g.
`com.strongloop.android.remoting.adapters.RestAdapter.ParameterEncoding` `getParameterEncoding()` Gets a boolean that indicates if the item is a multipart form mime type.
`java.lang.String` `getPattern()` Gets the pattern corresponding to this route, e.g.
`java.lang.String` `getVerb()` Gets the verb corresponding to this route, e.g.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RestContractItem

    public RestContractItem(java.lang.String pattern)

Creates a new item encapsulating the given pattern and the default verb, `"POST"`.

Parameters:
  `pattern` - The pattern corresponding to this route, e.g. `"/widgets/:id"`.

#### RestContractItem

    public RestContractItem(java.lang.String pattern,
                    java.lang.String verb)

Creates a new item encapsulating the given pattern and verb.

Parameters:
  `pattern` - The pattern corresponding to this route, e.g. `"/widgets/:id"`.
  `verb` - The verb corresponding to this route, e.g. `"GET"`.

### Method Detail

#### createMultipart

    public static RestContractItem createMultipart(java.lang.String pattern,
                                   java.lang.String verb)

Creates a new item encapsulating a route that expects multi-part request (e.g. file upload).

Parameters:
  `pattern` - The pattern corresponding to this route, e.g. `"/files/:id"`.
  `verb` - The verb corresponding to this route, e.g. `"POST"`.
Returns:
  The RestContractItem created.

#### getPattern

    public java.lang.String getPattern()

Gets the pattern corresponding to this route, e.g. `"/widgets/:id"`.

Returns:
  the pattern.

#### getVerb

    public java.lang.String getVerb()

Gets the verb corresponding to this route, e.g. `"GET"`.

Returns:
  the verb.

#### getParameterEncoding

    public com.strongloop.android.remoting.adapters.RestAdapter.ParameterEncoding getParameterEncoding()

Gets a boolean that indicates if the item is a multipart form mime type.

Returns:
  true if the item is multipart