FormListRequestBuilder

public class FormListRequestBuilder

A builder utility for instances of FormListRequest.

Methods

build

public FormListRequest build()

Creates a new instance of FormListRequest with parameters represented by this builder.

Returns:the form list request

withAppVersion

public FormListRequestBuilder withAppVersion(String appVersion)

Sets the exact version of the CommCare application used to submit the form in the request being built.

Parameters:
  • appVersion – the app version
Returns:

this builder instance

withArchived

public FormListRequestBuilder withArchived(Boolean includeArchived)

Sets whether to include archived forms in the response.

Parameters:
  • includeArchived – true to include archived forms, false otherwise
Returns:

this builder instance

withNextPage

public FormListRequestBuilder withNextPage()

Increments the current page number. Will set the current page to 1 if it was null.

Returns:this builder instance

withPageNumber

public FormListRequestBuilder withPageNumber(Integer pageNumber)

Sets the number of the page to fetch in the request being built.

Parameters:
  • pageNumber – the page to fetch
Returns:

this builder instance

withPageSize

public FormListRequestBuilder withPageSize(Integer pageSize)

Sets the size of the page to fetch in the request being built.

Parameters:
  • pageSize – the size of the page
Returns:

this builder instance

withPreviousPage

public FormListRequestBuilder withPreviousPage()

Decrements the current page number.

Returns:this builder instance

withReceivedOnEnd

public FormListRequestBuilder withReceivedOnEnd(DateTime receivedOnEnd)

Sets the end boundary for the received on datetime field in the request being built.

Parameters:
  • receivedOnEnd – the end boundary for ‘received on’ in the request
Returns:

this builder instance

withReceivedOnStart

public FormListRequestBuilder withReceivedOnStart(DateTime receivedOnStart)

Sets the starting boundary for the received on datetime field in the request being built.

Parameters:
  • receivedOnStart – the starting boundary for ‘received on’ in the request
Returns:

this builder instance

withXmlns

public FormListRequestBuilder withXmlns(String xmlns)

Sets the form XML namespace for the request being built (optional). You can find this for any given form by going to your form -> Advanced -> View (Source xml) and look for the address in the header of your xform. It is also in the raw xml of any submitted form.

Parameters:
  • xmlns – the xmlns
Returns:

this builder instance