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

    Constructors
    Constructor
    Description
    FeatureKeyClient(com.atlassian.jira.testkit.client.JIRAEnvironmentData environmentData)
    Constructs a new FeatureKeyClient for a JIRA instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected jakarta.ws.rs.client.WebTarget
    Returns a WebResource for site dark features.
    protected jakarta.ws.rs.client.WebTarget
    Returns a WebResource for site dark features for the given key.
    Map<?,?>
    get()
    GETs all the defined feature flags
    com.atlassian.jira.testkit.client.restclient.DarkFeature
    get(String featureKey)
    GETs the dark feature with the given key.
    com.atlassian.jira.testkit.client.restclient.ParsedResponse
    GETs all the defined feature flags returning a Response object.
    com.atlassian.jira.testkit.client.restclient.ParsedResponse
    getResponse(String featureKey)
    GETs the featureKey, returning a Response object.
    void
    put(String featureKey, boolean enabled)
    PUTs the feature key and enablement
    com.atlassian.jira.testkit.client.restclient.ParsedResponse
    putResponse(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void put(String featureKey, boolean enabled) throws jakarta.ws.rs.WebApplicationException
      PUTs the feature key and enablement
      Parameters:
      featureKey - feature key
      enabled - 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 key
      enabled - whether to enable or disable the dark feature
      Returns:
      a Response
    • get

      public Map<?,?> get() throws jakarta.ws.rs.WebApplicationException
      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

      public com.atlassian.jira.testkit.client.restclient.ParsedResponse getResponse(String featureKey)
      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

      protected jakarta.ws.rs.client.WebTarget featureFlagWithKey(String featureKey)
      Returns a WebResource for site dark features for the given key.
      Parameters:
      featureKey - feature key
      Returns:
      a WebResource