public static class AddonQuery.Builder extends Object implements QueryBuilderProperties.AccessToken<AddonQuery.Builder>, QueryBuilderProperties.ApplicationCriteria<AddonQuery.Builder>, QueryBuilderProperties.Bounds<AddonQuery.Builder>, QueryBuilderProperties.Cost<AddonQuery.Builder>, QueryBuilderProperties.Hosting<AddonQuery.Builder>, QueryBuilderProperties.WithVersion<AddonQuery.Builder>
AddonQuery. Use AddonQuery.builder() to create an instance.| Constructor and Description |
|---|
AddonQuery.Builder() |
| Modifier and Type | Method and Description |
|---|---|
AddonQuery.Builder |
accessToken(com.atlassian.fugue.Option<String> accessToken)
Optionally includes an access token in the query, allowing access to any private add-on
that has such a token.
|
AddonQuery.Builder |
appBuildNumber(com.atlassian.fugue.Option<Integer> appBuildNumber)
Restricts the query to add-ons that are compatible with the specified application version.
|
AddonQuery.Builder |
application(com.atlassian.fugue.Option<ApplicationKey> application)
Restricts the query to add-ons that are compatible with the specified application.
|
AddonQuery.Builder |
bounds(QueryBounds bounds)
Sets the starting offset and/or the maximum result page size for the query, from a
QueryBounds instance. |
AddonQuery |
build()
Returns an immutable
AddonQuery based on the current builder properties. |
AddonQuery.Builder |
categoryNames(Iterable<String> categoryNames)
Restricts the query to add-ons that belong to one of the specified categories.
|
AddonQuery.Builder |
cost(com.atlassian.fugue.Option<Cost> cost)
Restricts the query to add-ons/products that match the given
Cost criteria. |
AddonQuery.Builder |
forThisUserOnly(boolean forThisUserOnly)
Specifies whether to query only the addons associated with the current authenticated user's vendor(s).
|
AddonQuery.Builder |
hosting(com.atlassian.fugue.Option<HostingType> hosting)
Restricts the query to add-ons that support the given hosting type.
|
AddonQuery.Builder |
includeHidden(com.atlassian.fugue.Option<AddonQuery.IncludeHiddenType> includeHidden)
Specifies whether to include special "hidden" add-ons in the results.
|
AddonQuery.Builder |
includePrivate(boolean includePrivate)
Specifies whether to include private add-ons in the results.
|
AddonQuery.Builder |
label(com.atlassian.fugue.Option<String> label)
Restricts the query to add-ons that have been tagged with the specified label string.
|
AddonQuery.Builder |
searchText(com.atlassian.fugue.Option<String> searchText)
Restricts the query to add-ons that have the specified text somewhere in their name or
description.
|
AddonQuery.Builder |
treatPartlyFreeAs(com.atlassian.fugue.Option<AddonQuery.TreatPartlyFreeAs> treatPartlyFreeAs)
Specify how partly free, paid via Atlassian add-ons (those with a free tier) should be treated.
|
AddonQuery.Builder |
view(com.atlassian.fugue.Option<AddonQuery.View> view)
Specifies an
AddonQuery.View which determines the overall sort order and/or subset of
add-ons to be queried. |
AddonQuery.Builder |
withVersion(boolean withVersion)
Specifies whether the result set should include version-level properties.
|
public AddonQuery build()
AddonQuery based on the current builder properties.public AddonQuery.Builder accessToken(com.atlassian.fugue.Option<String> accessToken)
QueryBuilderProperties.AccessTokenaccessToken in interface QueryBuilderProperties.AccessToken<AddonQuery.Builder>accessToken - an access token string, or Option.none()QueryProperties.AccessToken.getAccessToken()public AddonQuery.Builder application(com.atlassian.fugue.Option<ApplicationKey> application)
QueryBuilderProperties.ApplicationCriteriaapplication in interface QueryBuilderProperties.ApplicationCriteria<AddonQuery.Builder>application - an ApplicationKey, or Option.none() for no application filterQueryBuilderProperties.ApplicationCriteria.application(Option)public AddonQuery.Builder appBuildNumber(com.atlassian.fugue.Option<Integer> appBuildNumber)
QueryBuilderProperties.ApplicationCriteriaQueryBuilderProperties.ApplicationCriteria.application(com.atlassian.fugue.Option<com.atlassian.marketplace.client.api.ApplicationKey>).appBuildNumber in interface QueryBuilderProperties.ApplicationCriteria<AddonQuery.Builder>appBuildNumber - the application build number, or Option.none() for no application
version filterQueryBuilderProperties.ApplicationCriteria.appBuildNumber(Option)public AddonQuery.Builder categoryNames(Iterable<String> categoryNames)
AddonCategories.categoryNames - category names to search for, or an empty Iterable if you do
not want to filter by add-on categoryAddonQuery.getCategoryNames()public AddonQuery.Builder cost(com.atlassian.fugue.Option<Cost> cost)
QueryBuilderProperties.CostCost criteria.cost in interface QueryBuilderProperties.Cost<AddonQuery.Builder>cost - a Cost value, or Option.none() for no cost filterpublic AddonQuery.Builder forThisUserOnly(boolean forThisUserOnly)
forThisUserOnly - true to query only addons associated with the current
authenticated user; false (the default) to query add-ons from any vendor.AddonQuery.isForThisUserOnly()public AddonQuery.Builder hosting(com.atlassian.fugue.Option<HostingType> hosting)
QueryBuilderProperties.Hostinghosting in interface QueryBuilderProperties.Hosting<AddonQuery.Builder>hosting - a HostingType constant, or Option.none() for no hosting filterpublic AddonQuery.Builder includeHidden(com.atlassian.fugue.Option<AddonQuery.IncludeHiddenType> includeHidden)
includeHidden - the type of hidden add-ons to include, or Option.none() (the default)
to exclude them allAddonQuery.getIncludeHidden()public AddonQuery.Builder includePrivate(boolean includePrivate)
includePrivate - true to include private add-ons; false (the default) to include only public
add-onsAddonQuery.isIncludePrivate()public AddonQuery.Builder label(com.atlassian.fugue.Option<String> label)
label - label string to search for, or Option.none() for no label searchAddonQuery.getLabel()public AddonQuery.Builder treatPartlyFreeAs(com.atlassian.fugue.Option<AddonQuery.TreatPartlyFreeAs> treatPartlyFreeAs)
treatPartlyFreeAs - how to treat partly free, PvA add-ons in queriespublic AddonQuery.Builder searchText(com.atlassian.fugue.Option<String> searchText)
searchText - text to search for, or Option.none() for no text searchAddonQuery.getSearchText()public AddonQuery.Builder view(com.atlassian.fugue.Option<AddonQuery.View> view)
AddonQuery.View which determines the overall sort order and/or subset of
add-ons to be queried.view - an AddonQuery.View value, or Option.none() for the default viewAddonQuery.getView()public AddonQuery.Builder withVersion(boolean withVersion)
QueryBuilderProperties.WithVersionwithVersion in interface QueryBuilderProperties.WithVersion<AddonQuery.Builder>withVersion - true if the result set should include version datapublic AddonQuery.Builder bounds(QueryBounds bounds)
QueryBuilderProperties.BoundsQueryBounds instance.bounds in interface QueryBuilderProperties.Bounds<AddonQuery.Builder>bounds - a QueryBounds specifying an offset and/or limitCopyright © 2016 Atlassian. All rights reserved.