Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #151

Merged
merged 62 commits into from
Sep 19, 2012
Merged

Dev #151

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ae59873
fixed merge issue and added new Changelog
Apr 11, 2012
62430e4
fixing merge conflict in Changelog.txt
joostdenijs May 2, 2012
3868b4e
Merge pull request #1 from WindowsAzure/dev
Jul 16, 2012
5df82a1
bug fixes.
Jul 19, 2012
e2ebe0c
test comment
Jul 19, 2012
22dbebe
removed test comment
Jul 19, 2012
3c48f1c
Updated docs in CloudTable.java
Jul 19, 2012
563fb79
address code review feedback.
Jul 21, 2012
a1652c7
support root container explicitly.
Jul 21, 2012
4ad59a4
issure #77, let get blob properties throws an exception when the if
Jul 25, 2012
8f8c6e3
Support range MD5 for get Blob request.
Jul 26, 2012
eac6dc2
Merge pull request #139 from gcheng/dev
Jul 27, 2012
0040bcf
Merge pull request #3 from gcheng/Jerusalem
Jul 27, 2012
a97379d
Merge pull request #4 from gcheng/London
Jul 27, 2012
1b76225
Return Etag for create*Blob and copyBlob
Jul 27, 2012
a542866
Merge branch 'Jerusalem' of https://github.com/gcheng/azure-sdk-for-j…
Jul 27, 2012
26ee763
add breaks in PipelineHelper/addOptionalSourceAccessContitionHeader
Jul 29, 2012
3c9be11
add PipelineHelpersTest unit test.
Jul 29, 2012
a118bfb
encode special characters when serializing entity to XML
Jul 30, 2012
796a21a
Merge pull request #8 from gcheng/Jerusalem
Jul 30, 2012
b18bd32
address code review feedback for returning ETag for create*Blob and
Jul 30, 2012
101b1e0
Merge pull request #6 from gcheng/Paris
Jul 30, 2012
5966f3b
Address code review feedback to add breaks in
Jul 30, 2012
36b1c3e
Merge branch 'dev' of https://github.com/gcheng/azure-sdk-for-java in…
Jul 30, 2012
e9830c4
Merge pull request #7 from gcheng/Beirut
Jul 30, 2012
54ff076
Internationalize the service bus for the dev-private branch.
Aug 1, 2012
333e2f3
address code review feedback for service bus internationalization.
Aug 1, 2012
3a646ab
Merge pull request #10 from gcheng/dev-private
Aug 1, 2012
bdbf460
Updated API docs
Aug 1, 2012
fe2c15e
Updated API docs
Aug 1, 2012
77c9e03
Updated API docs
Aug 1, 2012
4a759eb
address code review feedback regarding table encoding.
Aug 2, 2012
17cf30a
Merge pull request #9 from gcheng/Jerusalem
Aug 2, 2012
cbc5a38
Updated API docs
Aug 2, 2012
d7bb6c7
Updated API docs
Aug 2, 2012
f8c9ffe
Updated API docs
Aug 2, 2012
a9f00e0
Updated API docs
Aug 2, 2012
591c8e8
Updated API docs
Aug 3, 2012
4273cc8
Updated API docs
Aug 3, 2012
896cd9b
Updated API docs
Aug 3, 2012
eeb920d
Updated API docs
Aug 4, 2012
a9cd96e
Updated API docs
Aug 4, 2012
a946e3a
Updated API docs
Aug 4, 2012
04cad2e
Updated API docs
Aug 4, 2012
8c4afe2
Updated API docs
Aug 4, 2012
351ce2c
Merge pull request #143 from gcheng/dev
Aug 6, 2012
8b80a9f
Updated API docs
Aug 6, 2012
b8f2f88
Updated API docs
Aug 7, 2012
da443e2
Updated API docs
Aug 7, 2012
74c2b82
Updated API docs
Aug 7, 2012
811d1e1
Removed import statement that was accidentally added.
Aug 8, 2012
74d474c
Tech review fixes
Aug 17, 2012
6fe29be
Tech review fixes
Aug 17, 2012
ef7c5f2
Tech review fixes
Aug 17, 2012
a26c6ef
Tech review fixes
Aug 23, 2012
ab51ef6
Tech review fixes
Aug 23, 2012
348cebd
Merge pull request #146 from rwike77/javadocupdates
jcookems Sep 6, 2012
bcb60a8
updating README, Changelog and pom.xml for 0.3.1 release
joostdenijs Sep 11, 2012
eed17ba
correctly spelling special
joostdenijs Sep 11, 2012
a73fd38
Merge pull request #149 from joostdenijs/031-release
jcookems Sep 11, 2012
52503cf
fixing merge conflict in the README
joostdenijs Sep 19, 2012
be59df0
Merge pull request #152 from joostdenijs/README-FIX-031
jcookems Sep 19, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2012.09.11 Version 0.3.1
* Added Javadocs to 1.7 Storage Support from 0.3.0 release
* Fixed bug where getqueue for an invalid queue returns 200 and the exception is not wrapped in a ServiceException
* Fixed the error when deleting a blob snapshot in the Service Layer
* Changed the PageBlob length parameter from an int to a long
* Return an Etag for create and copy Blob in Service Layer
* Updated the BlobRestProxy.copyBlob to correctly honor source access conditions
* Updated the BlobRestProxy.getBlob to correctly honor setComputeRangeMD5 option
* Added international support for ServiceBus URIs
* Added encoding for special characters when serializing entity to XML in Table Service Layer

2012.06.02 Version 0.3.0
* Added 1.7 Storage Support
* Added Javadocs for com.microsoft.windowsazure.services.table
Expand Down
107 changes: 52 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ To get the source code of the SDK via git just type:
To get the binaries of this library as distributed by Microsoft, ready for use
within your project you can also have them installed by the Java package manager Maven.

```xml
<dependency>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-windowsazure-api</artifactId>
<version>0.3.0</version>
</dependency>
```
<dependency>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-windowsazure-api</artifactId>
<version>0.3.1</version>
</dependency>

##Minimum Requirements

Expand All @@ -64,63 +62,62 @@ deployment tools.
The following is a quick example on how to set up a Azure blob using the API
and uploading a file to it. For additional information on using the client libraries to access Azure services see the How To guides listed [here](http://www.windowsazure.com/en-us/develop/java/).

```java
import com.microsoft.windowsazure.services.core.storage.*;
import com.microsoft.windowsazure.services.blob.client.*;

public class BlobSample {
import com.microsoft.windowsazure.services.core.storage.*;
import com.microsoft.windowsazure.services.blob.client.*;

public static final String storageConnectionString =
public class BlobSample {
public static final String storageConnectionString =
"DefaultEndpointsProtocol=http;" +
"AccountName=your_account_name;" +
"AccountKey= your_account_name";

public static void main(String[] args)
{
try
{
CloudStorageAccount account;
CloudBlobClient serviceClient;
CloudBlobContainer container;
CloudBlockBlob blob;
public static void main(String[] args)
{
try
{
CloudStorageAccount account;
CloudBlobClient serviceClient;
CloudBlobContainer container;
CloudBlockBlob blob;

account = CloudStorageAccount.parse(storageConnectionString);
serviceClient = account.createCloudBlobClient();
// Container name must be lower case.
container = serviceClient.getContainerReference("blobsample");
container.createIfNotExist();
account = CloudStorageAccount.parse(storageConnectionString);
serviceClient = account.createCloudBlobClient();
// Container name must be lower case.
container = serviceClient.getContainerReference("blobsample");
container.createIfNotExist();

// Set anonymous access on the container.
BlobContainerPermissions containerPermissions;
containerPermissions = new BlobContainerPermissions();

// Upload an image file.
blob = container.getBlockBlobReference("image1.jpg");
File fileReference = new File ("c:\\myimages\\image1.jpg");
blob.upload(new FileInputStream(fileReference), fileReference.length());
}
catch (FileNotFoundException fileNotFoundException)
{
System.out.print("FileNotFoundException encountered: ");
System.out.println(fileNotFoundException.getMessage());
System.exit(-1);
}
catch (StorageException storageException)
{
System.out.print("StorageException encountered: ");
System.out.println(storageException.getMessage());
System.exit(-1);
}
catch (Exception e)
{
System.out.print("Exception encountered: ");
System.out.println(e.getMessage());
System.exit(-1);
}
// Set anonymous access on the container.
BlobContainerPermissions containerPermissions;
containerPermissions = new BlobContainerPermissions();

// Upload an image file.
blob = container.getBlockBlobReference("image1.jpg");
File fileReference = new File ("c:\\myimages\\image1.jpg");
blob.upload(new FileInputStream(fileReference), fileReference.length());
}
catch (FileNotFoundException fileNotFoundException)
{
System.out.print("FileNotFoundException encountered: ");
System.out.println(fileNotFoundException.getMessage());
System.exit(-1);
}
catch (StorageException storageException)
{
System.out.print("StorageException encountered: ");
System.out.println(storageException.getMessage());
System.exit(-1);
}
catch (Exception e)
{
System.out.print("Exception encountered: ");
System.out.println(e.getMessage());
System.exit(-1);
}

}
}
```
}
}


#Need Help?

Expand Down
12 changes: 11 additions & 1 deletion microsoft-azure-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-windowsazure-api</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<packaging>jar</packaging>

<name>Microsoft Windows Azure Client API</name>
Expand Down Expand Up @@ -236,6 +236,16 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions;
import com.microsoft.windowsazure.services.blob.models.ContainerACL;
import com.microsoft.windowsazure.services.blob.models.CopyBlobOptions;
import com.microsoft.windowsazure.services.blob.models.CopyBlobResult;
import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobPagesOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobPagesResult;
import com.microsoft.windowsazure.services.blob.models.CreateBlobResult;
import com.microsoft.windowsazure.services.blob.models.CreateBlobSnapshotOptions;
import com.microsoft.windowsazure.services.blob.models.CreateBlobSnapshotResult;
import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions;
Expand Down Expand Up @@ -429,7 +431,7 @@ void setContainerMetadata(String container, HashMap<String, String> metadata, Se
* @throws ServiceException
* if an error occurs accessing the storage service.
*/
void createPageBlob(String container, String blob, int length) throws ServiceException;
CreateBlobResult createPageBlob(String container, String blob, long length) throws ServiceException;

/**
* Creates a page blob of the specified maximum length, using the specified options.
Expand Down Expand Up @@ -457,7 +459,8 @@ void setContainerMetadata(String container, HashMap<String, String> metadata, Se
* @throws ServiceException
* if an error occurs accessing the storage service.
*/
void createPageBlob(String container, String blob, int length, CreateBlobOptions options) throws ServiceException;
CreateBlobResult createPageBlob(String container, String blob, long length, CreateBlobOptions options)
throws ServiceException;

/**
* Creates a block blob from a content stream.
Expand All @@ -473,7 +476,7 @@ void setContainerMetadata(String container, HashMap<String, String> metadata, Se
* @throws ServiceException
* if an error occurs accessing the storage service.
*/
void createBlockBlob(String container, String blob, InputStream contentStream) throws ServiceException;
CreateBlobResult createBlockBlob(String container, String blob, InputStream contentStream) throws ServiceException;

/**
* Creates a block blob from a content stream, using the specified options.
Expand All @@ -495,7 +498,7 @@ void setContainerMetadata(String container, HashMap<String, String> metadata, Se
* @throws ServiceException
* if an error occurs accessing the storage service.
*/
void createBlockBlob(String container, String blob, InputStream contentStream, CreateBlobOptions options)
CreateBlobResult createBlockBlob(String container, String blob, InputStream contentStream, CreateBlobOptions options)
throws ServiceException;

/**
Expand Down Expand Up @@ -1214,8 +1217,8 @@ CreateBlobSnapshotResult createBlobSnapshot(String container, String blob, Creat
* @throws ServiceException
* if an error occurs accessing the storage service.
*/
void copyBlob(String destinationContainer, String destinationBlob, String sourceContainer, String sourceBlob)
throws ServiceException;
CopyBlobResult copyBlob(String destinationContainer, String destinationBlob, String sourceContainer,
String sourceBlob) throws ServiceException;

/**
* Copies a source blob to a destination within the storage account, using the specified options.
Expand Down Expand Up @@ -1293,8 +1296,8 @@ void copyBlob(String destinationContainer, String destinationBlob, String source
* @throws ServiceException
* if an error occurs accessing the storage service.
*/
void copyBlob(String destinationContainer, String destinationBlob, String sourceContainer, String sourceBlob,
CopyBlobOptions options) throws ServiceException;
CopyBlobResult copyBlob(String destinationContainer, String destinationBlob, String sourceContainer,
String sourceBlob, CopyBlobOptions options) throws ServiceException;

/**
* Gets a new lease on a blob.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,74 @@ final class BlobAttributes {
public String snapshotID;

/**
* Holds the URI of the blob, Setting this is RESERVED for internal use.
* Holds the URI of the blob. RESERVED for internal use.
*/
protected URI uri;

/**
* Initializes a new instance of the BlobAttributes class
/**
* Initializes a new instance of the BlobAttributes class. RESERVED FOR INTERNAL USE.
*
* @param type
* The type of blob to set.
*/
public BlobAttributes(final BlobType type) {
this.setMetadata(new HashMap<String, String>());
this.setProperties(new BlobProperties(type));
}

/**
* Gets the metadata for the blob. RESERVED FOR INTERNAL USE.
*
* @return A <code>HashMap</code> object containing the metadata for the blob.
*/
public HashMap<String, String> getMetadata() {
return this.metadata;
}

/**
* Gets the copy state of the blob. RESERVED FOR INTERNAL USE.
*
* @return A <code>CopyState</code> object representing the copy state.
*/
public CopyState getCopyState() {
return this.copyState;
}

/**
* Gets the properties for the blob. RESERVED FOR INTERNAL USE.
*
* @return A <code>BlobProperties</code> object that represents the blob properties.
*/
public BlobProperties getProperties() {
return this.properties;
}

/**
* Sets the metadata for a blob. RESERVED FOR INTERNAL USE.
*
* @param metadata
* The blob meta data to set.
*/
protected void setMetadata(final HashMap<String, String> metadata) {
this.metadata = metadata;
}

/**
* Sets the properties for a blob. RESERVED FOR INTERNAL USE.
*
* @param properties
* The blob properties to set.
*/
protected void setProperties(final BlobProperties properties) {
this.properties = properties;
}

/**
* Sets the copy state for a blob. RESERVED FOR INTERNAL USE.
*
* @param copyState
* The blob copy state to set.
*/
public void setCopyState(final CopyState copyState) {
this.copyState = copyState;
}
Expand Down
Loading