Class PaginatedListRequest<T extends ContentRequest,C extends AssetObject>

java.lang.Object
com.oracle.content.sdk.request.core.ContentRequest<T,C>
com.oracle.content.sdk.request.core.PaginatedListRequest<T,C>
Direct Known Subclasses:
GetPublishChannelsRequest, GetTaxonomiesRequest, GetTaxonomyCategoriesRequest, SearchAssetsRequest

public abstract class PaginatedListRequest<T extends ContentRequest,C extends AssetObject> extends ContentRequest<T,C>
Base request for any paginated list request, such as SearchAssetsRequest
  • Field Details

    • limit

      protected Integer limit
    • offset

      protected Integer offset
    • sortByField

      protected String sortByField
    • sortOrderDescending

      protected Boolean sortOrderDescending
    • includeTotalCount

      protected Boolean includeTotalCount
    • fields

      protected String fields
    • expand

      protected String expand
  • Constructor Details

    • PaginatedListRequest

      public PaginatedListRequest(ContentDeliveryClient client, Class objectClass)
      Construct request to search for content items.
      Parameters:
      client - Valid delivery client
      objectClass - class for result object to deserialize
  • Method Details

    • limit

      public T limit(int limit)
      Maximum number of items that can come from the request.
      Parameters:
      limit - number of items to return
      Returns:
      this
    • totalResults

      public T totalResults(boolean includeTotalCount)
      Accepts a Boolean value. Setting it to true displays the total results field in the response The default is false.
      Parameters:
      includeTotalCount - true to include total result count in query
      Returns:
      this
    • offset

      public T offset(int offset)
      Starting offset to request items from
      Parameters:
      offset - Starting offset to request items
      Returns:
      this
    • sortByField

      public T sortByField(String sortField)
      The server will sort the results based on the field which can either by "name" or one of the custom data fields on the content item.
      Parameters:
      sortField - The string field to use for sorting on the server
      Returns:
      this
    • sortOrderDescending

      public T sortOrderDescending(boolean descending)
      Sort order, specified true for descending or false for ascending order. Use in conjunction with sortByField. Default sort order if not specified is ascending.
      Parameters:
      descending - set to true to set sort order to descending
      Returns:
      this
    • fields

      public T fields(String fields)
      Restrict the results to fields that match. This list can be a comma separated list of fields. It is recommended to use fields(List) to generate this list as it will prefix non-reserved field names with "fields." Note that "id" is always returned.
      Parameters:
      fields - Specify the fields to return in the query
      Returns:
      this
    • fields

      public T fields(List<String> fieldList)
      Will generate the comma-delimited list of fields based on a list of string field values.
      Parameters:
      fieldList - list of fields
      Returns:
      this
    • fieldsAll

      public T fieldsAll()
      Same as a call to fields specifying "HTTP", so all fields will be returned in search results.
      Returns:
      this
    • expand

      public T expand(String field)
      Specify whether to expand fields. Can be a value such as "fields.field_name" to expand a specific item reference. Note that by default this is not set. See also expandAll()
      Parameters:
      field - expand field value (e.g. "all") or null to not expand references
      Returns:
      Builder object
    • expand

      public T expand(List<String> expandFields)
      Specifies a list of fields to expand during the request.
      Parameters:
      expandFields - list of string fields to expand
      Returns:
      Builder object
    • expandAll

      public T expandAll()
      Just like calling expand with "all" as the parameter. Will expand all item reference fields.
      Returns:
      Builder object.
    • getOrderByParam

      protected String getOrderByParam(String sortByField)