Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
84c47af
Fix JavaDoc build warnings
jcookems Jan 23, 2013
f4d3d60
Fixing checkstyle errors for Media Services, issue #204.
jcookems Jan 23, 2013
a1f7bc6
Merge pull request #4 from jcookems/fixDocWarnings
jcookems Jan 23, 2013
3a63e0e
Update `settingTimeoutPrefixedFromConfigWorks` to test state of the c…
jcookems Jan 23, 2013
baaf794
Removing code to pre-clean tables, because the table names are now un…
jcookems Jan 23, 2013
bd8d7c1
Merge pull request #5 from jcookems/fixCheckStyle
jcookems Jan 23, 2013
84dc395
Convert readField from recursive to iterative.
jcookems Jan 23, 2013
c3a60fb
Merge pull request #6 from jcookems/fix210
jcookems Jan 23, 2013
64b3938
Merge pull request #211 from jcookems/dev
jcookems Jan 23, 2013
4e7c7d4
Updated ignore
Jan 30, 2013
16cd488
Merge branch 'master' of https://github.com/WindowsAzure/azure-sdk-fo…
Jan 30, 2013
68a61bc
Merge branch 'dev' of https://github.com/WindowsAzure/azure-sdk-for-j…
Jan 30, 2013
5679d73
First cut at base class for connection string parsing.
Jan 31, 2013
88a1f7a
Updated based on code review, rewrite parser based on grammar from Jason
Feb 1, 2013
702c26a
Added back in test that was accidentally removed
Feb 1, 2013
886535a
Merge pull request #5 from christav/servicebus-connection-strings
Feb 1, 2013
13ef42a
Merge pull request #212 from christav/dev
Feb 1, 2013
a98c882
Working towards connection string support in service bus
Feb 1, 2013
50929a6
Connection settings class fully plumbed through config
Feb 1, 2013
d010841
Switched tests to running off connection string instead of individual…
Feb 1, 2013
e001391
Fixed up exception reporting, fixed so tests actually use connection …
Feb 2, 2013
87d5ba9
Adding testing for various configuration permutations.
Feb 4, 2013
959a3c9
Made connection settings package visible rather than public.
Feb 4, 2013
ba3e0f3
Only replace sb:// at start of connection string value
Feb 4, 2013
0f4a168
Merge pull request #6 from christav/servicebus-connection-strings
Feb 5, 2013
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.project
target
node_modules
.idea
*.iml
6 changes: 5 additions & 1 deletion microsoft-azure-api/src/config/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@

<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MagicNumber">
<!-- Updated on 01/23/2013: -->
<!-- Added ignore list, to keep enums from triggering violations -->
<property name="ignoreNumbers" value="0, 1, 2, 3, 4, 5, 6, 7, 8"/>
</module>
<module name="MissingSwitchDefault"/>
<module name="RedundantThrows"/>
<module name="SimplifyBooleanExpression"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void setLeaseStatus(final LeaseStatus leaseStatus) {
/**
* Sets the lease status on the container. Reserved for internal use.
*
* @param LeaseState
* @param leaseState
* The lease state to set, as a <code>LeaseState</code> object.
*/
public void setLeaseState(final LeaseState leaseState) {
Expand All @@ -141,7 +141,7 @@ public void setLeaseState(final LeaseState leaseState) {
/**
* Sets the lease duration on the container. Reserved for internal use.
*
* @param LeaseDuration
* @param leaseDuration
* The lease duration to set, as a <code>LeaseDuration</code> object.
*/
public void setLeaseDuration(final LeaseDuration leaseDuration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public void setLeaseStatus(final LeaseStatus leaseStatus) {
/**
* Sets the lease state for the blob. Reserved for internal use.
*
* @param LeaseState
* @param leaseState
* The lease state to set, represented by a <code>LeaseState</code> object.
*/
public void setLeaseState(final LeaseState leaseState) {
Expand All @@ -344,7 +344,7 @@ public void setLeaseState(final LeaseState leaseState) {
/**
* Sets the lease duration for the blob. Reserved for internal use.
*
* @param LeaseDuration
* @param leaseDuration
* The lease duration value to set, represented by a <code>LeaseDuration</code> object.
*/
public void setLeaseDuration(final LeaseDuration leaseDuration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ public final void downloadRange(final long offset, final int length, final byte[
* the number of bytes to read
* @param buffer
* the byte buffer to write to.
* @param bufferOffet
* @param bufferOffset
* the offset in the byte buffer to begin writing.
* @param accessCondition
* An {@link AccessCondition} object that represents the access conditions for the blob.
Expand Down Expand Up @@ -1468,10 +1468,6 @@ else if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) {
* signature.
* @param groupPolicyIdentifier
* A <code>String</code> that represents the container-level access policy.
* @param opContext
* An {@link OperationContext} object that represents the context for the current operation. This object
* is used to track requests to the storage service, and to provide additional runtime information about
* the operation.
*
* @return A <code>String</code> that represents the shared access signature.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ public static UriQueryBuilder generateSharedAccessSignature(final SharedAccessQu
/**
* Get the complete query builder for creating the Shared Access Signature query.
*
* @param policy
* The shared access policy to hash.
* @param groupPolicyIdentifier
* An optional identifier for the policy.
* @param signature
* The signature to use.
* @return The finished query builder
Expand Down Expand Up @@ -285,7 +281,7 @@ public static String generateSharedAccessSignatureHash(final SharedAccessBlobPol
*
* @param policy
* The shared access policy to hash.
* @param groupPolicyIdentifier
* @param accessPolicyIdentifier
* An optional identifier for the policy.
* @param resourceName
* the resource name.
Expand Down Expand Up @@ -356,7 +352,7 @@ public static String generateSharedAccessSignatureHash(final String permissions,
*
* @param policy
* The shared access policy to hash.
* @param groupPolicyIdentifier
* @param accessPolicyIdentifier
* An optional identifier for the policy.
* @param resourceName
* the resource name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* Represents the options that may be set on a
* {@link BlobContract#createPageBlob(String, String, int, CreateBlobOptions) createPageBlob} or
* {@link BlobContract#createPageBlob(String, String, long, CreateBlobOptions) createPageBlob} or
* {@link BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions) createBlockBlob} request.
* These options include an optional server timeout for the operation, the MIME content type and content encoding for
* the blob, the content language, the MD5 hash, a cache control value, blob metadata, a blob lease ID, a sequence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* A wrapper class for the response returned from a Blob Service REST API Create Blob operation. This is returned by
* calls to implementations of {@link BlobContract#createPageBlob(String, String, long, CreateBlobOptions)} and
* {@link BlobContract#createBlockBlob(String, String, long, CreateBlobOptions)}.
* {@link BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions)}.
* <p>
* See the <a href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179451.aspx">Put Blob</a> documentation on
* MSDN for details of the underlying Blob Service REST API operation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.microsoft.windowsazure.services.core.utils;

public class ConnectionStringSyntaxException extends Exception {

public ConnectionStringSyntaxException(String message) {
super(message);
}

public ConnectionStringSyntaxException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.microsoft.windowsazure.services.core.utils;

import java.util.Map;

/**
* Helper functions useful when creating Exports classses.
*
*/
public abstract class ExportUtils {

private static String normalizeProfile(String profile) {
if (profile == null || profile.equals("")) {
return "";
}

if (profile.endsWith(".")) {
return profile;
}

return profile + ".";
}

/**
* Check if the given property exists under the given profile. If
* so, return the value, otherwise return null.
*
* @param profile profile to search
* @param properties the set of property values
* @param propertyName name of desired property
* @return the property value, or null if it is not set.
*/
public static Object getPropertyIfExists(String profile, Map<String, Object> properties, String propertyName) {
String fullPropertyName = normalizeProfile(profile) + propertyName;

if (properties.containsKey(fullPropertyName)) {
return properties.get(fullPropertyName);
}
return null;
}

}
Loading