/** * Generates a file path warning for the key. */ private String generateFilePathWarning(String key) { return String.format(" as %s in %s.", getPropertyKey(key), this.configFilePath); }
/** * Generates a file path warning for the key. */ private String generateFilePathWarning(String key) { return String.format(" as %s in %s.", getPropertyKey(key), this.configFilePath); }
/** * Reads properties from the provided {@link Configuration} object * <br><br> * Understands the following properties suffixes: * <br><br> * <ul> * <li>refreshToken</li> * <li>clientId</li> * <li>clientSecret</li> * <li>jsonKeyFilePath</li> * </ul><br> * For example, the AdWords OAuth2 refresh token can be read from: * <code>api.adwords.refreshToken</code> * * @param config the configuration * @return Builder populated from the Configuration */ @Override public ForApiBuilder from(Configuration config) { this.refreshToken = config.getString(getPropertyKey("refreshToken"), null); this.clientId = config.getString(getPropertyKey("clientId"), null); this.clientSecret = config.getString(getPropertyKey("clientSecret"), null); this.jsonKeyFilePath = config.getString(getPropertyKey("jsonKeyFilePath"), null); this.serviceAccountUser = config.getString(getPropertyKey("serviceAccountUser"), null); return this; }
/** * Reads properties from the provided {@link Configuration} object * <br><br> * Understands the following properties suffixes: * <br><br> * <ul> * <li>refreshToken</li> * <li>clientId</li> * <li>clientSecret</li> * <li>jsonKeyFilePath</li> * </ul><br> * For example, the AdWords OAuth2 refresh token can be read from: * <code>api.adwords.refreshToken</code> * * @param config the configuration * @return Builder populated from the Configuration */ @Override public ForApiBuilder from(Configuration config) { this.refreshToken = config.getString(getPropertyKey("refreshToken"), null); this.clientId = config.getString(getPropertyKey("clientId"), null); this.clientSecret = config.getString(getPropertyKey("clientSecret"), null); this.jsonKeyFilePath = config.getString(getPropertyKey("jsonKeyFilePath"), null); this.serviceAccountUser = config.getString(getPropertyKey("serviceAccountUser"), null); return this; }