/** * Creates a bean definition for the credentials object. This methods creates a bean definition instead of the direct * implementation to allow property place holder to change any place holder used for the access or secret key. * * @param credentialsProviderElement * - The element that contains the credentials attributes ACCESS_KEY_ATTRIBUTE_NAME and SECRET_KEY_ATTRIBUTE_NAME * @param parserContext * - Used to report any errors if there is no ACCESS_KEY_ATTRIBUTE_NAME or SECRET_KEY_ATTRIBUTE_NAME available with * a * valid value * @return - the bean definition with an {@link com.amazonaws.auth.BasicAWSCredentials} class */ private static BeanDefinition getCredentials(Element credentialsProviderElement, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition("com.amazonaws.auth.BasicAWSCredentials"); builder.addConstructorArgValue(getAttributeValue(ACCESS_KEY_ATTRIBUTE_NAME, credentialsProviderElement, parserContext)); builder.addConstructorArgValue(getAttributeValue(SECRET_KEY_ATTRIBUTE_NAME, credentialsProviderElement, parserContext)); return builder.getBeanDefinition(); }
/** * Creates a bean definition for the credentials object. This methods creates a bean definition instead of the direct * implementation to allow property place holder to change any place holder used for the access or secret key. * * @param credentialsProviderElement * - The element that contains the credentials attributes ACCESS_KEY_ATTRIBUTE_NAME and SECRET_KEY_ATTRIBUTE_NAME * @param parserContext * - Used to report any errors if there is no ACCESS_KEY_ATTRIBUTE_NAME or SECRET_KEY_ATTRIBUTE_NAME available with * a * valid value * @return - the bean definition with an {@link com.amazonaws.auth.BasicAWSCredentials} class */ private static BeanDefinition getCredentials(Element credentialsProviderElement, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition("com.amazonaws.auth.BasicAWSCredentials"); builder.addConstructorArgValue(getAttributeValue(ACCESS_KEY_ATTRIBUTE_NAME, credentialsProviderElement, parserContext)); builder.addConstructorArgValue(getAttributeValue(SECRET_KEY_ATTRIBUTE_NAME, credentialsProviderElement, parserContext)); return builder.getBeanDefinition(); }