Class BadgeParams.Builder
- java.lang.Object
-
- com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder<P,B>
-
- com.cheetahdigital.corekit.rest.params.BaseListQueryParams.BaseListQueryBuilder<BadgeParams,BadgeParams.Builder>
-
- com.cheetahdigital.badges.core.api.BadgeParams.Builder
-
- Enclosing class:
- BadgeParams
public static class BadgeParams.Builder extends BaseListQueryParams.BaseListQueryBuilder<BadgeParams,BadgeParams.Builder>
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder
mQueryParams
-
-
Constructor Summary
Constructors Constructor Description Builder()
Default constructorBuilder(BadgeParams queryParams)
Create a builder class from an existingBadgeParams
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BadgeParams
createQueryParams()
Instantiates the implementation classBadgeParams.Builder
setBadgeType(java.lang.String type)
Set the type of the Badge to be retrieved.BadgeParams.Builder
setExpired(java.lang.Boolean isExpired)
Set the flag to show expired badges only in the resultBadgeParams.Builder
setResultWithCategories(java.lang.Boolean resultWithCategories)
Set the flag to show categories in the result.BadgeParams.Builder
setShowEarned(java.lang.Boolean isEarned)
Set flag to show Earned badges only-
Methods inherited from class com.cheetahdigital.corekit.rest.params.BaseListQueryParams.BaseListQueryBuilder
addCategories, addCategory, setItemsPerPage, setLayout, setPage, setSortBy, setSortOrder
-
Methods inherited from class com.cheetahdigital.corekit.rest.params.BaseParams.BaseBuilder
build, setId
-
-
-
-
Constructor Detail
-
Builder
public Builder()
Default constructor
-
Builder
public Builder(BadgeParams queryParams)
Create a builder class from an existingBadgeParams
- Parameters:
queryParams
- contains the query params
-
-
Method Detail
-
setBadgeType
public BadgeParams.Builder setBadgeType(@Nullable java.lang.String type)
Set the type of the Badge to be retrieved.- Parameters:
type
- type of Badge- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setShowEarned
public BadgeParams.Builder setShowEarned(@Nullable java.lang.Boolean isEarned)
Set flag to show Earned badges only- Parameters:
isEarned
-true
to show Earned badges only- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setResultWithCategories
public BadgeParams.Builder setResultWithCategories(@Nullable java.lang.Boolean resultWithCategories)
Set the flag to show categories in the result.- Parameters:
resultWithCategories
-true
to show categories in the result, otherwise,false
- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
setExpired
public BadgeParams.Builder setExpired(@Nullable java.lang.Boolean isExpired)
Set the flag to show expired badges only in the result- Parameters:
isExpired
-true
to show expired badges only, otherwise,false
- Returns:
- The Builder object to allow for chaining calls to set/add methods
-
createQueryParams
protected BadgeParams createQueryParams()
Description copied from class:BaseParams.BaseBuilder
Instantiates the implementation class- Specified by:
createQueryParams
in classBaseParams.BaseBuilder<BadgeParams,BadgeParams.Builder>
- Returns:
- implementation class of
BaseParams.BaseBuilder
-
-