oracle.cloud.scanning.api.config

## Interface IFileConfiguration

- All Superinterfaces:
    IConfiguration

      public interface IFileConfiguration
      extends IConfiguration

  This interface can be used to check if a file can be packaged in the deployable archive. It can also be used to validate an XML file for its content.

  See Also:
    `ConfigurationFactory.getDefaultFileConfiguration()`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IArchiveConfiguration` | `checkArchiveConfiguration(String resourcePath)` check if there are any constraints for an archive at the resourcePath.
    `Result` | `checkFilePath(String resourcePath)` Checks if a file can be packaged
    `IPropertyFileConfiguration` | `checkPropertyFileConfiguration(String resourcePath)` Checks if there are any constraints for a property file packaged at the resourcePath
    `IXMLFileConfiguration` | `checkXMLFileConfiguration(String resourcePath)` Checks if there are any constraints for an XML file packaged at the resourcePath

    - ### Methods inherited from interface oracle.cloud.scanning.api.config.IConfiguration

      `getVersion`

- - ### Method Detail

    - #### checkFilePath

          Result checkFilePath(String resourcePath)

      Checks if a file can be packaged
      Parameters:
        `resourcePath` - the path resource in the jar, war or ear where the file is packaged.
      Returns:
        Result object that contains the status and the localized message when the resourcePath is not allowed.

    - #### checkArchiveConfiguration

          IArchiveConfiguration checkArchiveConfiguration(String resourcePath)

      check if there are any constraints for an archive at the resourcePath.

      Basically this is used to get scoped constraint for a war. For e.g) if weblogic.xml is not packaged, we can detect using this API.

      Parameters:
        `resourcePath` - the path of the resource (For e.g myaap-web.war)
      Returns:
        IArchiveConfiguration when there are any configruations against it.

             Note: Whether this path should be an archive  or not is determined by the
             configuration API. This method can be called for all the resource paths.

             When the method returns a valid IArchiveConfiguration, the path must be an archive  (jar, war or ear).
             This method will return null even for an archive file for which no constraints are defined.

    - #### checkXMLFileConfiguration

          IXMLFileConfiguration checkXMLFileConfiguration(String resourcePath)

      Checks if there are any constraints for an XML file packaged at the resourcePath
      Parameters:
        `resourcePath` - the path to the XML resource. (For e.g WEB-INF/weblogic.xml)
      Returns:
        IXMLFileConfiguration when there are constraints available to the XML file at the resourcePath, null if there is no restriction for the XML file.

             Note: Whether this path should be an XML file or not is determined by the
             configuration API. This method can be called for all the resource paths.

             When the method returns a valid IXMLFileConfiguration, the path must be an XML file.
             This method will return null even for XML files for which no constraints are defined.

    - #### checkPropertyFileConfiguration

          IPropertyFileConfiguration checkPropertyFileConfiguration(String resourcePath)

      Checks if there are any constraints for a property file packaged at the resourcePath
      Parameters:
        `resourcePath` - the path to the property file. (For e.g WEB-INF/classes/log4j.properties)
      Returns:
        IPropertyFileConfiguration when there are constraints available to the property file at the resourcePath, null if there is no restriction for the property file.

             Note: Whether this path should be a property file or not is determined by the
             configuration API. This method can be called for all the resource paths.

             When the method returns a valid IPropertyFileConfiguration, the path must be a property file.
             This method will return null even for property files for which no constraints are defined.

Copyright © 2018 Oracle. All rights reserved.