oracle.cloud.scanning.api.config

## Interface IPropertyFileConfiguration

-     public interface IPropertyFileConfiguration

  An interface that allows to check if a property or its value is allowed in a property file.

       Sample pseudo code
        IPropertyFileConfiguration prop = fileconfiguration.checkPropertyFileConfiguration(path);
        if (prop == null) {
          // success
        } else {
          // use the methods in the API to figure out if a key is allowed
        }

  The user of this interface is expected to parse the property file that has to pass the compliance check. Since the configuration is static, users can cache the result of a call for later use.

  See Also:
    `IFileConfiguration.checkPropertyFileConfiguration(java.lang.String)`, `ConfigurationFactory`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Result` | `checkKey(String k)` Checks if a key is allowed in the file
    `List<MissingPropertyResult>` | `checkMissingKeys(Collection<String> keys)` Checks if any key is missing in the property file.
    `Result` | `checkValue(String key, String val)` Checks if a value for a key is allowed

- - ### Method Detail

    - #### checkKey

          Result checkKey(String k)

      Checks if a key is allowed in the file
      Parameters:
        `k` - the XML key to be checked
      Returns:
        Result that indicates if the key is allowed
      See Also:
        `Result.isAllowed()`

    - #### checkMissingKeys

          List<MissingPropertyResult> checkMissingKeys(Collection<String> keys)

      Checks if any key is missing in the property file.
      Parameters:
        `keys` - the list of available keys.
      Returns:
        List that contains the list of errors related to missing keys.

        Some important keys may not be mandatory, those will be returned with appropriate severity levels. mandatory keys will have the severity level of ERROR.

    - #### checkValue

          Result checkValue(String key,
                          String val)

      Checks if a value for a key is allowed
      Parameters:
        `key` - the key name.
        `val` - the value of the key to be checked.
      Returns:
        Result object that contains the status and the localized message when the value is not allowed.

Copyright © 2018 Oracle. All rights reserved.