destinationArn = getText();
} else {
parseConfig(name);
}
} else if (in("NotificationConfiguration")) {
NotificationConfiguration configuration = null;
if (name.equals("TopicConfiguration")) {
configuration = new com.amazonaws.services.s3.model.TopicConfiguration(
destinationArn, events.toArray(new String[events
.size()]));
configuration.withObjectPrefixes(prefixes
.toArray(new String[prefixes.size()]));
} else if (name.equals("QueueConfiguration")) {
configuration = new QueueConfiguration(destinationArn,
events.toArray(new String[events.size()]));
configuration.withObjectPrefixes(prefixes
.toArray(new String[prefixes.size()]));
} else if (name.equals("CloudFunctionConfiguration")) {
configuration = new CloudFunctionConfiguration(
invocationRole, destinationArn,
events.toArray(new String[events.size()]));
configuration.withObjectPrefixes(prefixes
.toArray(new String[prefixes.size()]));
}
if (configuration != null) {
// TODO : The below condition needs to be removed when the