public class ProfilesConfigFileLoader
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
ProfilesConfigFileLoader.ProfilesConfigFileLoaderHelper
Implementation of AbstractProfilesConfigFileScanner that groups profile
properties into a map while scanning through the credentials profile.
|
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
ProfilesConfigFileLoader() |
Modifier and Type | Method and Description |
---|---|
private static void |
assertParameterNotEmpty(java.lang.String parameterValue,
java.lang.String errorMessage)
Asserts that the specified parameter value is neither
empty
nor null, and if it is, throws an AmazonClientException with
the specified error message. |
private static Profile |
fromAssumeRole(java.lang.String profileName,
java.util.Map<java.lang.String,java.lang.String> properties,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> allProfileProperties,
ProfileCredentialsService profileCredentialsService) |
private static Profile |
fromStaticCredentials(java.lang.String profileName,
java.util.Map<java.lang.String,java.lang.String> properties) |
static java.util.Map<java.lang.String,Profile> |
loadProfiles(java.io.File file,
ProfileCredentialsService profileCredentialsService) |
private static java.util.Map<java.lang.String,Profile> |
loadProfiles(java.io.InputStream is,
ProfileCredentialsService profileCredentialsService)
Loads the credential profiles from the given input stream.
|
public static java.util.Map<java.lang.String,Profile> loadProfiles(java.io.File file, ProfileCredentialsService profileCredentialsService)
private static java.util.Map<java.lang.String,Profile> loadProfiles(java.io.InputStream is, ProfileCredentialsService profileCredentialsService) throws java.io.IOException
is
- input stream from where the profile details are read.java.io.IOException
private static Profile fromStaticCredentials(java.lang.String profileName, java.util.Map<java.lang.String,java.lang.String> properties)
private static Profile fromAssumeRole(java.lang.String profileName, java.util.Map<java.lang.String,java.lang.String> properties, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> allProfileProperties, ProfileCredentialsService profileCredentialsService)
private static void assertParameterNotEmpty(java.lang.String parameterValue, java.lang.String errorMessage)
Asserts that the specified parameter value is neither empty
nor null, and if it is, throws an AmazonClientException
with
the specified error message.
parameterValue
- The parameter value being checked.errorMessage
- The error message to include in the AmazonClientException if
the specified parameter value is empty.