Package com.xebialabs.deployit.plugin.api.udm.lookup

# Class SimpleLookupValueProvider

java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.deployit.plugin.api.udm.lookup.SimpleLookupValueProvider

All Implemented Interfaces:
  `ConfigurationItem`, `LookupValueProvider`, `Serializable`, `Comparable<BaseConfigurationItem>`

@Metadata(root=CONFIGURATION, description="A LookupValueProvider that stores values in the database.") public class SimpleLookupValueProvider extends BaseConfigurationItem implements LookupValueProvider

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `allowEncryptedForNonPassword`
  `protected Map<String,String>`
  `encryptedEntries`
  `protected Map<String,String>`
  `entries`

  ### Fields inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem

  `id, syntheticProperties, type`

  ### Fields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem

  `SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleLookupValueProvider()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `lookup(String key, boolean password)`
  Lookup an external value by key.

  ### Methods inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem

  `compareTo, equals, get$ciAttributes, get$directoryReference, get$externalProperties, get$internalId, get$referenceId, get$securedCi, get$securedDirectoryReference, get$token, get$validationMessages, getId, getName, getProperty, getPropertyDescriptor, getType, hashCode, hasProperty, set$ciAttributes, set$directoryReference, set$externalProperties, set$internalId, set$referenceId, set$securedCi, set$securedDirectoryReference, set$token, set$validationMessages, setId, setProperty, setType, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem

  `get$directoryReference, get$internalId, get$referenceId, get$securedCi, get$securedDirectoryReference, get$validationMessages, getId, getName, getProperty, getType, hasProperty, setId, setProperty`

  ### Methods inherited from interface com.xebialabs.deployit.plugin.api.udm.lookup.LookupValueProvider

  `isHealthy`

- ## Field Details

  - ### entries

    @Property(description="The lookup value entries", required=false) protected Map<String,String> entries

  - ### encryptedEntries

    @Property(description="The encrypted lookup value entries", required=false, password=true) protected Map<String,String> encryptedEntries

  - ### allowEncryptedForNonPassword

    @Property(description="Allow encrypted entries for non password properties.", defaultValue="false") protected boolean allowEncryptedForNonPassword

- ## Constructor Details

  - ### SimpleLookupValueProvider

    public SimpleLookupValueProvider()

- ## Method Details

  - ### lookup

    public String lookup(String key, boolean password) throws Exception
    Description copied from interface: `LookupValueProvider`
    Lookup an external value by key.
    Specified by:
      `lookup` in interface `LookupValueProvider`
    Parameters:
      `key` - The key to find
      `password` - Whether it is used for a password property.
    Returns:
      The value found
    Throws:
      `Exception` - when the lookup cannot be performed or the provider cannot provide a value, e.g. when a secret is requested for a non password field.