Class ListOffersRequest
- java.lang.Object
-
- com.day.cq.analytics.testandtarget.ListOffersRequest
-
public class ListOffersRequest extends Object
A request object used to retrieve a list of offers from Adobe Target. This class is currently a no-op, but it will be upgraded to support filtering when the Target API offers will support this
-
-
Constructor Summary
Constructors Constructor Description ListOffersRequest()
Constructs aListOffersRequest
using the default values (includeContent is false)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ListFilter>
getFilters()
Retrieves the list of filters of this request objectListSorter
getSorter()
Returns the sorter for this listboolean
includeContent()
Returns true if this offers request has been instructed to also retrieve the offer's contentListOffersRequest
includeContent(boolean include)
Sets the includeContent flag on this requestListOffersRequest
withFilter(ListFilter filter)
Adds a filter to this requests filter list.ListOffersRequest
withSorter(ListSorter sorter)
Adds a sorter to this request.
-
-
-
Constructor Detail
-
ListOffersRequest
public ListOffersRequest()
Constructs aListOffersRequest
using the default values (includeContent is false)
-
-
Method Detail
-
includeContent
public ListOffersRequest includeContent(boolean include)
Sets the includeContent flag on this request- Parameters:
include
- if set to true, the response object(s) will also include the content of the offers, otherwise they won't- Returns:
- the current
ListOffersRequest
object
-
includeContent
public boolean includeContent()
Returns true if this offers request has been instructed to also retrieve the offer's content- Returns:
- true if the includeContent flag is set, false otherwise.
-
withFilter
public ListOffersRequest withFilter(ListFilter filter)
Adds a filter to this requests filter list. This filter is used to generate a query string that searches for specific offers- Parameters:
filter
- aListFilter
object- Returns:
- a reference to this object
-
withSorter
public ListOffersRequest withSorter(ListSorter sorter)
Adds a sorter to this request. This sorter is used to generate the "sortBy" element of the query string- Parameters:
sorter
- aListSorter
object- Returns:
- an instance to this object
-
getFilters
public List<ListFilter> getFilters()
Retrieves the list of filters of this request object- Returns:
- a list of
ListFilter
objects
-
getSorter
public ListSorter getSorter()
Returns the sorter for this list- Returns:
- a
ListSorter
object
-
-