Enum GitServiceFeature

  • All Implemented Interfaces:
    Serializable, Comparable<GitServiceFeature>

    public enum GitServiceFeature
    extends Enum<GitServiceFeature>
    These are the constants representing the features that may or may not be supported by providers.
    When invoking an operation method against a provider and the operation is not supported then the method throws an UnsupportedOperationException.
    In order to safely know if an operation is supported you can query the service object via the supports method.
    • Enum Constant Detail

      • TOKEN_AUTHENTICATION

        public static final GitServiceFeature TOKEN_AUTHENTICATION
        When this feature is supported then the implementation class supports authentication with tokens (Personal Access Tokens, OAuth).
      • CUSTOM_ENDPOINT

        public static final GitServiceFeature CUSTOM_ENDPOINT
        When this feature is supported then the implementation class supports custom API endpoints (i.e. for on premises installations).
    • Method Detail

      • values

        public static GitServiceFeature[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GitServiceFeature c : GitServiceFeature.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GitServiceFeature valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isOptional

        public boolean isOptional()
        Returns true if the feature is optional.
        Returns:
        true if the feature is optional