Class FeatureManagementHelpersRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.featuremanagement.FeatureManagementRequestBuilder
org.azd.helpers.featuremanagement.FeatureManagementHelpersRequestBuilder

public class FeatureManagementHelpersRequestBuilder extends FeatureManagementRequestBuilder
Helper request builder that combines multiple Apis to create logical helper methods for ease of use.
  • Constructor Details

    • FeatureManagementHelpersRequestBuilder

      public FeatureManagementHelpersRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • getFeatureState

      public Optional<Boolean> getFeatureState(String projectId, FeatureManagement feature) throws AzDException
      Call un-published API feature to fetch project service feature state. See FeatureManagement for current list of features. Besides an 'enabled' and 'disabled' state, there is also an undefined state, hence the Optional return wrapper
      Parameters:
      projectId - project identifier
      feature - FeatureManagement enum type for which to return state
      Returns:
      Optional wrapped boolean, empty if state is undefined
      Throws:
      AzDException - Default Api Exception handler
    • featureToggle

      public ProjectFeature featureToggle(String projectId, FeatureManagement feature, boolean state) throws AzDException
      Set project feature state for project service See FeatureManagement for list of features
      Parameters:
      projectId - project identifier
      feature - enum value for feature to enable or disable
      state - enable or disable feature
      Returns:
      object containing feature id and state
      Throws:
      AzDException - Default Api Exception handler