nextMarker = (nextMarker.equals("")) ? null : nextMarker; } else if (qName.equals("Container")) { containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified, currentETag, currentMetadata)); currentUrl = null;
/** *{@inheritDoc} */ @Override public int compareTo(ContainerProperties o) { return (this == o) ? 0 : getName().compareTo(o.getName()); } /**
nextMarker = (nextMarker.equals("")) ? null : nextMarker; } else if (qName.equals("Container")) { containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified, currentETag, currentMetadata)); currentUrl = null;
/** *{@inheritDoc} */ @Override public int compareTo(ContainerProperties o) { return (this == o) ? 0 : getName().compareTo(o.getName()); } /**
nextMarker = (nextMarker.equals("")) ? null : nextMarker; } else if (qName.equals("Container")) { containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified, currentETag, currentMetadata)); currentUrl = null;
/** *{@inheritDoc} */ @Override public int compareTo(ContainerProperties o) { return (this == o) ? 0 : getName().compareTo(o.getName()); } /**
throw propagate(use); containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified, currentETag, currentMetadata)); currentName = null;
/** *{@inheritDoc} */ @Override public int compareTo(ContainerProperties o) { return (this == o) ? 0 : getName().compareTo(o.getName()); } /**
throw propagate(use); containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified, currentETag, currentMetadata, currentPublicAccess)); currentName = null;
/** *{@inheritDoc} */ @Override public int compareTo(ContainerProperties o) { return (this == o) ? 0 : getName().compareTo(o.getName()); } /**
public void testApplyInputStreamWithOptions() { SortedSet<ContainerProperties> contents = Sets.newTreeSet(); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/audio"), dateService .rfc822DateParse("Wed, 13 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C6B1B2", Maps .<String, String> newHashMap())); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/images"), dateService .rfc822DateParse("Wed, 14 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C1EEEC", Maps .<String, String> newHashMap())); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/textfiles"), dateService .rfc822DateParse("Wed, 15 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7BACAC3", Maps .<String, String> newHashMap())); InputStream is = getClass().getResourceAsStream("/test_list_containers_options.xml"); BoundedSet<ContainerProperties> list = new BoundedHashSet<ContainerProperties>(contents, URI .create("http://myaccount.blob.core.windows.net"), "prefix", "marker", 1, "video"); BoundedSet<ContainerProperties> result = factory.create( injector.getInstance(AccountNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); } }
public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream("/test_list_containers.xml"); SortedSet<ContainerProperties> contents = Sets.newTreeSet(); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/audio"), dateService .rfc822DateParse("Wed, 13 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C6B1B2", Maps .<String, String> newHashMap())); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/images"), dateService .rfc822DateParse("Wed, 14 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C1EEEC", Maps .<String, String> newHashMap())); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/textfiles"), dateService .rfc822DateParse("Wed, 15 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7BACAC3", Maps .<String, String> newHashMap())); BoundedSet<ContainerProperties> list = new BoundedHashSet<ContainerProperties>(contents, URI .create("http://myaccount.blob.core.windows.net/"), null, null, 3, "video"); BoundedSet<ContainerProperties> result = factory.create( injector.getInstance(AccountNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); }
public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream("/test_list_containers.xml"); SortedSet<ContainerProperties> contents = Sets.newTreeSet(); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/audio"), dateService .rfc822DateParse("Wed, 13 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C6B1B2", Maps .<String, String> newHashMap(), PublicAccess.CONTAINER)); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/images"), dateService .rfc822DateParse("Wed, 14 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C1EEEC", Maps .<String, String> newHashMap(), PublicAccess.BLOB)); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/textfiles"), dateService .rfc822DateParse("Wed, 15 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7BACAC3", Maps .<String, String> newHashMap(), PublicAccess.PRIVATE)); BoundedSet<ContainerProperties> list = new BoundedHashSet<ContainerProperties>(contents, URI .create("http://myaccount.blob.core.windows.net/"), null, null, 3, "video"); BoundedSet<ContainerProperties> result = factory.create( injector.getInstance(AccountNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); }
public void testApplyInputStreamWithOptions() { SortedSet<ContainerProperties> contents = Sets.newTreeSet(); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/audio"), dateService .rfc822DateParse("Wed, 13 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C6B1B2", Maps .<String, String> newHashMap(), PublicAccess.CONTAINER)); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/images"), dateService .rfc822DateParse("Wed, 14 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7C1EEEC", Maps .<String, String> newHashMap(), PublicAccess.BLOB)); contents.add(new ContainerPropertiesImpl(URI .create("http://myaccount.blob.core.windows.net/textfiles"), dateService .rfc822DateParse("Wed, 15 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7BACAC3", Maps .<String, String> newHashMap(), PublicAccess.PRIVATE)); InputStream is = getClass().getResourceAsStream("/test_list_containers_options.xml"); BoundedSet<ContainerProperties> list = new BoundedHashSet<ContainerProperties>(contents, URI .create("http://myaccount.blob.core.windows.net"), "prefix", "marker", 1, "video"); BoundedSet<ContainerProperties> result = factory.create( injector.getInstance(AccountNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); } }