if (in("InventoryConfiguration")) { if (name.equals("Id")) { configuration.setId(getText()); configuration.setEnabled("true".equals(getText())); configuration.setIncludedObjectVersions(getText()); } else if (in("InventoryConfiguration", "Destination")) { if ( name.equals("S3BucketDestination") ) { inventoryDestination.setS3BucketDestination(s3BucketDestination); } else if (in("InventoryConfiguration", "Destination", "S3BucketDestination")) { if (name.equals("AccountId")) { s3BucketDestination.setAccountId(getText()); } else if (name.equals("Bucket")) { s3BucketDestination.setBucketArn(getText()); } else if (name.equals("Format")) { s3BucketDestination.setFormat(getText()); } else if (name.equals("Prefix")) { s3BucketDestination.setPrefix(getText()); } else if (in("InventoryConfiguration", "Destination", "S3BucketDestination", "Encryption")) { if (name.equals(SSE_S3)) { s3BucketDestination.setEncryption(new ServerSideEncryptionS3()); } else if (name.equals(SSE_KMS)) { ServerSideEncryptionKMS kmsEncryption = new ServerSideEncryptionKMS().withKeyId(getText()); s3BucketDestination.setEncryption(kmsEncryption);
if (in("InventoryConfiguration")) { if (name.equals("Id")) { configuration.setId(getText()); configuration.setEnabled("true".equals(getText())); configuration.setIncludedObjectVersions(getText()); } else if (in("InventoryConfiguration", "Destination")) { if ( name.equals("S3BucketDestination") ) { inventoryDestination.setS3BucketDestination(s3BucketDestination); } else if (in("InventoryConfiguration", "Destination", "S3BucketDestination")) { if (name.equals("AccountId")) { s3BucketDestination.setAccountId(getText()); } else if (name.equals("Bucket")) { s3BucketDestination.setBucketArn(getText()); } else if (name.equals("Format")) { s3BucketDestination.setFormat(getText()); } else if (name.equals("Prefix")) { s3BucketDestination.setPrefix(getText()); } else if (in("InventoryConfiguration", "Destination", "S3BucketDestination", "Encryption")) { if (name.equals(SSE_S3)) { s3BucketDestination.setEncryption(new ServerSideEncryptionS3()); } else if (name.equals(SSE_KMS)) { ServerSideEncryptionKMS kmsEncryption = new ServerSideEncryptionKMS().withKeyId(getText()); s3BucketDestination.setEncryption(kmsEncryption);
@Override protected void doEndElement(String uri, String name, String qName) { if (in("InventoryConfiguration")) { if (name.equals("Id")) { configuration.setId(getText()); } else if (name.equals("Destination")) { configuration.setDestination(inventoryDestination); inventoryDestination = null; } else if (name.equals("IsEnabled")) { configuration.setEnabled("true".equals(getText())); } else if (name.equals("Filter")) { configuration.setInventoryFilter(filter); filter = null; } else if (name.equals("IncludedObjectVersions")) { configuration.setIncludedObjectVersions(getText()); } else if (name.equals("Schedule")) { configuration.setSchedule(inventorySchedule); } else if (in("InventoryConfiguration", "Destination")) { if (name.equals("S3BucketDestination")) { inventoryDestination.setS3BucketDestination(s3BucketDestination); s3BucketDestination = null; } else if (in("InventoryConfiguration", "Destination", "S3BucketDestination")) { if (name.equals("AccountId")) { s3BucketDestination.setAccountId(getText()); } else if (name.equals("Bucket")) { s3BucketDestination.setBucketArn(getText()); } else if (name.equals("Format")) { s3BucketDestination.setFormat(getText());
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("InventoryConfiguration")) { if (name.equals("Destination")) { inventoryDestination = new InventoryDestination(); } else if(name.equals("Filter")) { filter = new InventoryFilter(); } else if(name.equals("Schedule")) { inventorySchedule = new InventorySchedule(); } else if(name.equals("OptionalFields")) { optionalFields = new ArrayList<String>(); } } else if (in("InventoryConfiguration", "Destination")) { if (name.equals("S3BucketDestination")) { s3BucketDestination = new InventoryS3BucketDestination(); } } }
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("InventoryConfiguration")) { if (name.equals("Destination")) { inventoryDestination = new InventoryDestination(); } else if (name.equals("Filter")) { filter = new InventoryFilter(); } else if (name.equals("Schedule")) { inventorySchedule = new InventorySchedule(); } else if (name.equals("OptionalFields")) { optionalFields = new ArrayList<String>(); } } else if (in("InventoryConfiguration", "Destination")) { if (name.equals("S3BucketDestination")) { s3BucketDestination = new InventoryS3BucketDestination(); } } }
public GetBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception { return new XmlResponsesSaxParser().parseGetBucketInventoryConfigurationResponse(in).getResult(); } }
public GetBucketInventoryConfigurationHandler parseGetBucketInventoryConfigurationResponse(InputStream inputStream) throws IOException { GetBucketInventoryConfigurationHandler handler = new GetBucketInventoryConfigurationHandler(); parseXmlInputStream(handler, inputStream); return handler; }
public GetBucketInventoryConfigurationHandler parseGetBucketInventoryConfigurationResponse( InputStream inputStream) throws IOException { final GetBucketInventoryConfigurationHandler handler = new GetBucketInventoryConfigurationHandler(); parseXmlInputStream(handler, inputStream); return handler; }
@Override public GetBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception { return new XmlResponsesSaxParser().parseGetBucketInventoryConfigurationResponse(in) .getResult(); } }
@Override protected void doEndElement(String uri, String name, String qName) { if (in("InventoryConfiguration")) { if (name.equals("Id")) { configuration.setId(getText()); } else if (name.equals("Destination")) { configuration.setDestination(inventoryDestination); inventoryDestination = null; } else if (name.equals("IsEnabled")) { configuration.setEnabled("true".equals(getText())); } else if (name.equals("Filter")) { configuration.setInventoryFilter(filter); filter = null; } else if (name.equals("IncludedObjectVersions")) { configuration.setIncludedObjectVersions(getText()); } else if (name.equals("Schedule")) { configuration.setSchedule(inventorySchedule); } else if (in("InventoryConfiguration", "Destination")) { if (name.equals("S3BucketDestination")) { inventoryDestination.setS3BucketDestination(s3BucketDestination); s3BucketDestination = null; } else if (in("InventoryConfiguration", "Destination", "S3BucketDestination")) { if (name.equals("AccountId")) { s3BucketDestination.setAccountId(getText()); } else if (name.equals("Bucket")) { s3BucketDestination.setBucketArn(getText()); } else if (name.equals("Format")) { s3BucketDestination.setFormat(getText());
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("InventoryConfiguration")) { if (name.equals("Destination")) { inventoryDestination = new InventoryDestination(); } else if (name.equals("Filter")) { filter = new InventoryFilter(); } else if (name.equals("Schedule")) { inventorySchedule = new InventorySchedule(); } else if (name.equals("OptionalFields")) { optionalFields = new ArrayList<String>(); } } else if (in("InventoryConfiguration", "Destination")) { if (name.equals("S3BucketDestination")) { s3BucketDestination = new InventoryS3BucketDestination(); } } }
/** * @param resourceLocation * Location of resource containing XML to unmarshall * @return Marshalled response */ private GetBucketInventoryConfigurationResult parseGetBucketInventoryConfigurationResponse(String resourceLocation) throws Exception { return new XmlResponsesSaxParser() .parseGetBucketInventoryConfigurationResponse(getClass().getResourceAsStream(resourceLocation)) .getResult(); }
@Override public GetBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception { return new XmlResponsesSaxParser().parseGetBucketInventoryConfigurationResponse(in) .getResult(); } }
public GetBucketInventoryConfigurationHandler parseGetBucketInventoryConfigurationResponse( InputStream inputStream) throws IOException { final GetBucketInventoryConfigurationHandler handler = new GetBucketInventoryConfigurationHandler(); parseXmlInputStream(handler, inputStream); return handler; }
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("InventoryConfiguration")) { if (name.equals("Destination")) { inventoryDestination = new InventoryDestination(); } else if(name.equals("Filter")) { filter = new InventoryFilter(); } else if(name.equals("Schedule")) { inventorySchedule = new InventorySchedule(); } else if(name.equals("OptionalFields")) { optionalFields = new ArrayList<String>(); } } else if (in("InventoryConfiguration", "Destination")) { if (name.equals("S3BucketDestination")) { s3BucketDestination = new InventoryS3BucketDestination(); } } }
public GetBucketInventoryConfigurationHandler parseGetBucketInventoryConfigurationResponse(InputStream inputStream) throws IOException { GetBucketInventoryConfigurationHandler handler = new GetBucketInventoryConfigurationHandler(); parseXmlInputStream(handler, inputStream); return handler; }
public GetBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception { return new XmlResponsesSaxParser().parseGetBucketInventoryConfigurationResponse(in).getResult(); } }