Class FeatureKeyClient
java.lang.Object
com.atlassian.jira.testkit.client.RestApiClient<FeatureKeyClient>
com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.FeatureKeyClient
public class FeatureKeyClient
extends com.atlassian.jira.testkit.client.RestApiClient<FeatureKeyClient>
Client for the site dark features resource.
- Since:
- v7.1
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.testkit.client.RestApiClient
com.atlassian.jira.testkit.client.RestApiClient.BackdoorLoggingFilter, com.atlassian.jira.testkit.client.RestApiClient.JsonMediaTypeFilter, com.atlassian.jira.testkit.client.RestApiClient.RestCall, com.atlassian.jira.testkit.client.RestApiClient.SessionlessConsistencyFilter -
Field Summary
Fields inherited from class com.atlassian.jira.testkit.client.RestApiClient
REST_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionFeatureKeyClient(com.atlassian.jira.testkit.client.JIRAEnvironmentData environmentData) Constructs a new FeatureKeyClient for a JIRA instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.ws.rs.client.WebTargetReturns a WebResource for site dark features.protected jakarta.ws.rs.client.WebTargetfeatureFlagWithKey(String featureKey) Returns a WebResource for site dark features for the given key.Map<?, ?> get()GETs all the defined feature flagscom.atlassian.jira.testkit.client.restclient.DarkFeatureGETs the dark feature with the given key.com.atlassian.jira.testkit.client.restclient.ParsedResponseGETs all the defined feature flags returning a Response object.com.atlassian.jira.testkit.client.restclient.ParsedResponsegetResponse(String featureKey) GETs the featureKey, returning a Response object.voidPUTs the feature key and enablementcom.atlassian.jira.testkit.client.restclient.ParsedResponseputResponse(String featureKey, boolean enabled) PUTs the featureKey and enablement, returning a Response object.Methods inherited from class com.atlassian.jira.testkit.client.RestApiClient
anonymous, authenticate, authoriseWithOAuth2, authoriseWithOAuth2, cleanUp, client, createResource, createResource, createResourceGadget, createResourceInternal, errorResponse, expanded, getCredentialsProvider, getEnvironmentData, loginAs, loginAs, registerResponse, resourceRoot, resourceRoot, setOf, toResponse, toResponse, toResponse, withCredentialsProvider
-
Constructor Details
-
FeatureKeyClient
public FeatureKeyClient(com.atlassian.jira.testkit.client.JIRAEnvironmentData environmentData) Constructs a new FeatureKeyClient for a JIRA instance.- Parameters:
environmentData- The JIRA environment data
-
-
Method Details
-
put
PUTs the feature key and enablement- Parameters:
featureKey- feature keyenabled- whether to enable or disable the dark feature- Throws:
jakarta.ws.rs.WebApplicationException- if there's a problem enabling the dark feature
-
putResponse
public com.atlassian.jira.testkit.client.restclient.ParsedResponse putResponse(String featureKey, boolean enabled) PUTs the featureKey and enablement, returning a Response object.- Parameters:
featureKey- feature keyenabled- whether to enable or disable the dark feature- Returns:
- a Response
-
get
GETs all the defined feature flags- Returns:
- the dark feature
- Throws:
jakarta.ws.rs.WebApplicationException- if there's a problem enabling the dark feature
-
getResponse
public com.atlassian.jira.testkit.client.restclient.ParsedResponse getResponse()GETs all the defined feature flags returning a Response object.- Returns:
- a Response
-
get
public com.atlassian.jira.testkit.client.restclient.DarkFeature get(String featureKey) throws jakarta.ws.rs.WebApplicationException GETs the dark feature with the given key.- Parameters:
featureKey- the feature key- Returns:
- the dark feature
- Throws:
jakarta.ws.rs.WebApplicationException- if there's a problem enabling the dark feature
-
getResponse
GETs the featureKey, returning a Response object.- Parameters:
featureKey- feature key- Returns:
- a Response
-
featureFlags
protected jakarta.ws.rs.client.WebTarget featureFlags()Returns a WebResource for site dark features.- Returns:
- a WebResource
-
featureFlagWithKey
Returns a WebResource for site dark features for the given key.- Parameters:
featureKey- feature key- Returns:
- a WebResource
-