public ConfigurationDirectory getConfigurationDirectory(String directoryName, String propertiesDirectoryName) {
    ConfigurationDirectory configDirectory = null;
    File configDirFile = new File(directory.getAbsolutePath() + File.separator + directoryName);
    File propertiesDirFile = new File(directory.getAbsolutePath() + File.separator + propertiesDirectoryName);
    if (configDirFile.exists() && configDirFile.isDirectory())  {
      if(propertiesDirFile.exists() && propertiesDirFile.isDirectory()) {
        configDirectory = new ConfigurationDirectory(configDirFile.getAbsolutePath(), propertiesDirFile.getAbsolutePath());
      } else {
        configDirectory = new ConfigurationDirectory(configDirFile.getAbsolutePath(), null);
      }
    }
    return configDirectory;
  }
Obtain the configuration sub-directory instance for the specified path.

@param directoryName  name of the configuration directory
@return ConfigurationDirectory instance for the specified configuration directory name
ambari-server/src/main/java/org/apache/ambari/server/stack/StackDefinitionDirectory.java