Class UserInputs

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Cloneable , java.util.Map

    
    public class UserInputs
    extends HashMap<K, V>
                        

    User Input contains a list of each provider and the providers ProviderInput As each provider requires input, the loader will pass its ProviderInput data.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      UserInputs() Constructs an empty UserInputs object.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static UserInputs parseJson(@Nullable() String userInputsJson) Parse a JSON string into a UserInputs object.
      static UserInputs parseJson(@Nullable() String userInputsJson, @NonNull() Array<ProviderIdentifier> knownProviders) Parse a JSON string into a UserInputs object.
      static UserInputs parseJson(@Nullable() String userInputsJson, @NonNull() Array<ProviderIdentifier> knownProviders, @NonNull() Array<ProviderIdentifier> excludedProviders) Parse a JSON string into a UserInputs object excluding any providers present in the excludedProviders list.
      void addProvider(@NonNull() ProviderIdentifier providerId, @Nullable() ProviderInputs providerInputs) Adds the specified ProviderInputs for the specified provider to this UserInputs object.
      ProviderInputs getInputs(@NonNull() ProviderIdentifier providerId) Retrieves the ProviderInputs corresponding to the specified provider from this UserInputs object.
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.util.Map

        copyOf, entry, of, ofEntries
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UserInputs

        UserInputs()
        Constructs an empty UserInputs object.
    • Method Detail

      • parseJson

        @NonNull() static UserInputs parseJson(@Nullable() String userInputsJson)

        Parse a JSON string into a UserInputs object. Inputs for the JsonProvider will be ignored because they are not secure. Inputs for custom providers will also be ignored.

        Parameters:
        userInputsJson - A JSON string that can be parsed into the desired UserInputs object.
        Returns:

        A UserInputs object the represents the supplied JSON string excluding the JsonProvider if present.

      • parseJson

        @NonNull() static UserInputs parseJson(@Nullable() String userInputsJson, @NonNull() Array<ProviderIdentifier> knownProviders)

        Parse a JSON string into a UserInputs object. Inputs for the JsonProvider will be ignored because they are not secure.

        Parameters:
        userInputsJson - A JSON string that can be parsed into the desired UserInputs object.
        knownProviders - An array of ProviderIdentifier objects which specify all of the existing configuration providers including custom providers.
        Returns:

        A UserInputs object the represents the supplied JSON string excluding the JsonProvider if present.

      • parseJson

        @NonNull() static UserInputs parseJson(@Nullable() String userInputsJson, @NonNull() Array<ProviderIdentifier> knownProviders, @NonNull() Array<ProviderIdentifier> excludedProviders)

        Parse a JSON string into a UserInputs object excluding any providers present in the excludedProviders list. It is recommended that the JsonProvider be excluded because it can be insecure if exposed to the outside world.

        Parameters:
        userInputsJson - A JSON string that can be parsed into the desired UserInputs object.
        knownProviders - An array of ProviderIdentifier objects which specify all of the existing configuration providers including custom providers.
        excludedProviders - An array of ProviderIdentifier objects, which indicate corresponding ProviderInputs object to be excluded from the resulting UserInput object.
        Returns:

        A UserInputs object the represents the supplied JSON string excluding any providers present in the excludedProviders array.