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

# Class Dictionary

java.lang.Object
com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
com.xebialabs.deployit.plugin.api.udm.AbstractDictionary
com.xebialabs.deployit.plugin.api.udm.Dictionary

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

Direct Known Subclasses:
  `EncryptedDictionary`

@Metadata(root=ENVIRONMENTS, description="A Dictionary contains key-value pairs that can be replaced") @TypeIcon("icons/types/udm.Dictionary.svg") public class Dictionary extends AbstractDictionary implements IEncryptedDictionary
A Dictionary is a CI that contains `Environment`-specific entries for placeholder resolution. A dictionary value can refer to another dictionary entry. This is accomplished by using the {{..}} placeholder syntax. For example: `MESSAGE Welcome to {{APP_NAME}}!`

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.xebialabs.deployit.plugin.api.udm.IDictionary

  `IDictionary.DictionaryContext`

- ## Field Summary

  ### 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
  `Dictionary()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,String>`
  `getEncryptedEntries()`
  `Map<String,String>`
  `getEntries()`
  `Set<Application>`
  `getRestrictToDistributions()`
  `String`
  `getValue(String key)`
  `boolean`
  `hasValue(String key)`
  `void`
  `setEncryptedEntries(Map<String,String> encryptedEntries)`
  `void`
  `setEntries(Map<String,String> dict)`

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

  `applyTo, getRestrictToApplications, getRestrictToContainers`

  ### 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.IDictionary

  `applyTo`

- ## Constructor Details

  - ### Dictionary

    public Dictionary()

- ## Method Details

  - ### setEntries

    public void setEntries(Map<String,String> dict)
    Parameters:
      `dict` - The dictionary entries.

  - ### getEntries

    public Map<String,String> getEntries()
    Specified by:
      `getEntries` in interface `IDictionary`
    Returns:
      The dictionary entries.

  - ### getEncryptedEntries

    public Map<String,String> getEncryptedEntries()
    Specified by:
      `getEncryptedEntries` in interface `IEncryptedDictionary`
    Returns:
      The encrypted dictionary entries

  - ### setEncryptedEntries

    public void setEncryptedEntries(Map<String,String> encryptedEntries)
    Parameters:
      `encryptedEntries` - The encrypted dictionary entries

  - ### getValue

    public String getValue(String key)
    Specified by:
      `getValue` in interface `IDictionary`
    Parameters:
      `key` - The key of a dictionary entry.
    Returns:
      The value associated with the given key.

  - ### hasValue

    public boolean hasValue(String key)
    Parameters:
      `key` - The key of a dictionary entry.
    Returns:
      Whether the dictionary contains the given key.

  - ### getRestrictToDistributions

    public Set<Application> getRestrictToDistributions()
    Returns:
      The set of `Application`s only for which the dictionary is applied.