Skip to content

Commit

Permalink
Merge pull request Azure#127 from rpaquay/joe-merge
Browse files Browse the repository at this point in the history
ASK MODE: Updated with current formatting & Queue Documentation
  • Loading branch information
rpaquay committed Nov 28, 2011
2 parents aab2790 + 44fe4ef commit 6082ca6
Show file tree
Hide file tree
Showing 67 changed files with 3,582 additions and 3,295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ public void parseResponse() throws XMLStreamException, ParseException {
if (eventType == XMLStreamConstants.START_ELEMENT
&& name.equals(BlobConstants.SIGNED_IDENTIFIERS_ELEMENT)) {
this.readPolicies(xmlr);
} else if (eventType == XMLStreamConstants.END_ELEMENT
}
else if (eventType == XMLStreamConstants.END_ELEMENT
&& name.equals(BlobConstants.SIGNED_IDENTIFIERS_ELEMENT)) {
break;
}
} else if (eventType == XMLStreamConstants.END_DOCUMENT) {
}
else if (eventType == XMLStreamConstants.END_DOCUMENT) {
break;
}
}
Expand Down Expand Up @@ -120,7 +122,8 @@ private void readPolicies(final XMLStreamReader xmlr) throws XMLStreamException,
if (eventType == XMLStreamConstants.START_ELEMENT
&& name.equals(BlobConstants.SIGNED_IDENTIFIER_ELEMENT)) {
this.readSignedIdentifier(xmlr);
} else if (eventType == XMLStreamConstants.END_ELEMENT
}
else if (eventType == XMLStreamConstants.END_ELEMENT
&& name.equals(BlobConstants.SIGNED_IDENTIFIERS_ELEMENT)) {
break;
}
Expand Down Expand Up @@ -153,15 +156,18 @@ private SharedAccessPolicy readPolicyFromXML(final XMLStreamReader xmlr) throws
final String name = xmlr.getName().toString();

if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.PERMISSION)) {
retPolicy.setPermissions(SharedAccessPolicy.permissionsFromString(Utility
.readElementFromXMLReader(xmlr, BlobConstants.PERMISSION)));
} else if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.START)) {
retPolicy.setPermissions(SharedAccessPolicy.permissionsFromString(Utility.readElementFromXMLReader(
xmlr, BlobConstants.PERMISSION)));
}
else if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.START)) {
final String tempString = Utility.readElementFromXMLReader(xmlr, BlobConstants.START);
retPolicy.setSharedAccessStartTime(Utility.parseISO8061LongDateFromString(tempString));
} else if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.EXPIRY)) {
}
else if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.EXPIRY)) {
final String tempString = Utility.readElementFromXMLReader(xmlr, BlobConstants.EXPIRY);
retPolicy.setSharedAccessExpiryTime(Utility.parseISO8061LongDateFromString(tempString));
} else if (eventType == XMLStreamConstants.END_ELEMENT && name.equals(BlobConstants.ACCESS_POLICY)) {
}
else if (eventType == XMLStreamConstants.END_ELEMENT && name.equals(BlobConstants.ACCESS_POLICY)) {
break;
}
}
Expand Down Expand Up @@ -195,9 +201,11 @@ private void readSignedIdentifier(final XMLStreamReader xmlr) throws XMLStreamEx

if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(Constants.ID)) {
id = Utility.readElementFromXMLReader(xmlr, Constants.ID);
} else if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.ACCESS_POLICY)) {
}
else if (eventType == XMLStreamConstants.START_ELEMENT && name.equals(BlobConstants.ACCESS_POLICY)) {
policy = this.readPolicyFromXML(xmlr);
} else if (eventType == XMLStreamConstants.END_ELEMENT
}
else if (eventType == XMLStreamConstants.END_ELEMENT
&& name.equals(BlobConstants.SIGNED_IDENTIFIER_ELEMENT)) {
this.policies.put(id, policy);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public static class QueryConstants {
/**
* The header that specifies blob content MD5.
*/
public static final String BLOB_CONTENT_MD5_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER + "blob-content-md5";
public static final String BLOB_CONTENT_MD5_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-md5";

/**
* XML element for a blob.
Expand All @@ -78,8 +78,8 @@ public static class QueryConstants {
/**
* The header that specifies public access to blobs.
*/
public static final String BLOB_PUBLIC_ACCESS_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER + "blob-public-access";
public static final String BLOB_PUBLIC_ACCESS_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-public-access";

/**
* XML element for a blob type.
Expand All @@ -88,8 +88,8 @@ public static class QueryConstants {
/**
* The header for the blob type.
*/
public static final String BLOB_TYPE_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER + "blob-type";
public static final String BLOB_TYPE_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-type";

/**
* XML element for blobs.
Expand Down Expand Up @@ -139,29 +139,26 @@ public static class QueryConstants {
/**
* The header that specifies blob content encoding.
*/
public static final String CONTENT_ENCODING_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-encoding";
public static final String CONTENT_ENCODING_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-encoding";

/**
* The header that specifies blob content language.
*/
public static final String CONTENT_LANGUAGE_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-language";
public static final String CONTENT_LANGUAGE_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-language";

/**
* The header that specifies blob content length.
*/
public static final String CONTENT_LENGTH_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-length";
public static final String CONTENT_LENGTH_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-length";

/**
* The header that specifies blob content type.
*/
public static final String CONTENT_TYPE_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER + "blob-content-type";
public static final String CONTENT_TYPE_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-type";

/**
* The number of default concurrent requests for parallel operation.
Expand All @@ -176,26 +173,22 @@ public static class QueryConstants {
/**
* The default write pages size, in bytes, used by blob stream for page blobs.
*/
public static final int DEFAULT_MINIMUM_PAGE_STREAM_WRITE_IN_BYTES =
4 * com.microsoft.windowsazure.services.core.storage.Constants.MB;
public static final int DEFAULT_MINIMUM_PAGE_STREAM_WRITE_IN_BYTES = 4 * com.microsoft.windowsazure.services.core.storage.Constants.MB;

/**
* The default minimum read size, in bytes, for streams.
*/
public static final int DEFAULT_MINIMUM_READ_SIZE_IN_BYTES =
4 * com.microsoft.windowsazure.services.core.storage.Constants.MB;
public static final int DEFAULT_MINIMUM_READ_SIZE_IN_BYTES = 4 * com.microsoft.windowsazure.services.core.storage.Constants.MB;

/**
* The default maximum size, in bytes, of a blob before it must be separated into blocks.
*/
public static final int DEFAULT_SINGLE_BLOB_PUT_THRESHOLD_IN_BYTES =
32 * com.microsoft.windowsazure.services.core.storage.Constants.MB;
public static final int DEFAULT_SINGLE_BLOB_PUT_THRESHOLD_IN_BYTES = 32 * com.microsoft.windowsazure.services.core.storage.Constants.MB;

/**
* The default write block size, in bytes, used by blob streams.
*/
public static final int DEFAULT_WRITE_BLOCK_SIZE_IN_BYTES =
4 * com.microsoft.windowsazure.services.core.storage.Constants.MB;
public static final int DEFAULT_WRITE_BLOCK_SIZE_IN_BYTES = 4 * com.microsoft.windowsazure.services.core.storage.Constants.MB;

/**
* XML element for the end time of an access policy.
Expand All @@ -220,8 +213,7 @@ public static class QueryConstants {
/**
* The maximum size, in bytes, of a blob before it must be separated into blocks.
*/
public static final int MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES =
64 * com.microsoft.windowsazure.services.core.storage.Constants.MB;
public static final int MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES = 64 * com.microsoft.windowsazure.services.core.storage.Constants.MB;

/**
* Specifies the page blob type.
Expand Down Expand Up @@ -251,8 +243,8 @@ public static class QueryConstants {
/**
* The header that specifies page write mode.
*/
public static final String PAGE_WRITE =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER + "page-write";
public static final String PAGE_WRITE = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "page-write";

/**
* XML element for the permission of an access policy.
Expand All @@ -267,9 +259,8 @@ public static class QueryConstants {
/**
* The header for specifying the sequence number.
*/
public static final String SEQUENCE_NUMBER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-sequence-number";
public static final String SEQUENCE_NUMBER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-sequence-number";

/**
* XML element for a signed identifier.
Expand All @@ -284,9 +275,8 @@ public static class QueryConstants {
/**
* The header for the blob content length.
*/
public static final String SIZE =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-length";
public static final String SIZE = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "blob-content-length";

/**
* XML element for the block length.
Expand All @@ -306,8 +296,8 @@ public static class QueryConstants {
/**
* The header for snapshots.
*/
public static final String SNAPSHOT_HEADER =
com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER + "snapshot";
public static final String SNAPSHOT_HEADER = com.microsoft.windowsazure.services.core.storage.Constants.PREFIX_FOR_STORAGE_HEADER
+ "snapshot";

/**
* Specifies only snapshots are to be included.
Expand Down
Loading

0 comments on commit 6082ca6

Please sign in to comment.