@@ -0,0 +1,2550 @@
+package com.github.sbugat.gfmconverter;%0A%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.io.Reader;%0Aimport java.nio.charset.StandardCharsets;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.util.Properties;%0A%0Apublic class GFMMassConverterConfiguration %7B%0A%0A%09private static final String GFM_GITHUB_USER = %22gfm.github.user%22;%0A%09private static final String GFM_GITHUB_REPOSITORY = %22gfm.github.repository%22;%0A%09private static final String GFM_AUTHENTICATION_TOKEN = %22gfm.authentication.token%22;%0A%09private static final String GFM_FILE_ENCODING_PROPERTY = %22gfm.file.encoding%22;%0A%09private static final String GFM_FILE_ENCODING_PROPERTY_DEFAULT_VALUE = StandardCharsets.UTF_8.name();%0A%0A%09private static final String GFM_MASS_CONVERTER_PROPERTIES_FILE = %22gfm-mass-converter.properties%22;%0A%0A%09private final String gFMGitHubUser;%0A%0A%09private final String gFMGitHubRepository;%0A%0A%09private final String gFMAuthenticationToken;%0A%0A%09private final String gFMFileEncoding;%0A%0A%09public GFMMassConverterConfiguration() throws IOException %7B%0A%0A%09%09//Configuration loading%0A%09%09final Path propertyFile = Paths.get( GFM_MASS_CONVERTER_PROPERTIES_FILE );%0A%09%09if( ! Files.exists( propertyFile ) )%7B%0A%0A%09%09%09throw new FileNotFoundException( GFM_MASS_CONVERTER_PROPERTIES_FILE );%0A%09%09%7D%0A%0A%09%09//Load the configuration file and extract properties%0A%09%09final Properties properties = new Properties();%0A%09%09try( final Reader propertyFileReader = Files.newBufferedReader( propertyFile, StandardCharsets.UTF_8 ) ) %7B%0A%09%09%09properties.load( propertyFileReader );%0A%09%09%7D%0A%0A%09%09gFMGitHubUser = properties.getProperty( GFM_GITHUB_USER );%0A%09%09gFMGitHubRepository = properties.getProperty( GFM_GITHUB_REPOSITORY );%0A%0A%09%09gFMAuthenticationToken = properties.getProperty( GFM_AUTHENTICATION_TOKEN );%0A%09%09gFMFileEncoding = getOptionnalProperty( properties, GFM_FILE_ENCODING_PROPERTY, GFM_FILE_ENCODING_PROPERTY_DEFAULT_VALUE );%0A%09%7D%0A%0A%09private static String getOptionnalProperty( final Properties properties, final String propertyName, final String propertyDefaultValue ) %7B%0A%0A%09%09final String propertyValue = properties.getProperty( propertyName, propertyDefaultValue );%0A%0A%09%09if( null == propertyValue %7C%7C propertyValue.isEmpty() ) %7B%0A%09%09%09return propertyDefaultValue;%0A%09%09%7D%0A%0A%09%09return propertyValue;%0A%09%7D%0A%0A%09public String getGFMGitHubUser() %7B%0A%09%09return gFMGitHubUser;%0A%09%7D%0A%0A%09public String getGFMGitHubRepository() %7B%0A%09%09return gFMGitHubRepository;%0A%09%7D%0A%0A%09public String getGFMAuthenticationToken() %7B%0A%09%09return gFMAuthenticationToken;%0A%09%7D%0A%0A%09public String getGFMFileEncoding() %7B%0A%09%09return gFMFileEncoding;%0A%09%7D%0A%7D%0A

Add configuration loading class