* @return <tt>FlickrAPIProperties</tt> api properties for the given service address
*/
public FlickrAPIProperties getApiProperties(String serviceAddress){
synchronized(propertiesMap){
if(!propertiesMap.containsKey(serviceAddress)){
FlickrAPIProperties apiProperties;
String apiKey = prop.getProperty(serviceAddress+"_apiKey");
String sharedSecret = prop.getProperty(serviceAddress+"_sharedSecret");
String authStoreDir = prop.getProperty(serviceAddress+"_authStoreDir");
if(apiKey == null || sharedSecret == null || authStoreDir == null){
throw new IllegalArgumentException("Flickr API Properties not set for the given service : " + serviceAddress);
}
apiProperties = new FlickrAPIProperties(apiKey, sharedSecret,authStoreDir);
propertiesMap.put(serviceAddress, apiProperties);
logger.info("Setting APIKey: " + apiKey);
return apiProperties;
}
return propertiesMap.get(serviceAddress);