Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Rodrigues committed Dec 17, 2013
2 parents 4401c51 + 8dc86a2 commit a742050
Show file tree
Hide file tree
Showing 224 changed files with 19,727 additions and 2,602 deletions.
38 changes: 37 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# Azure Tooling #
node_modules

# Eclipse #
*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# Other Tooling #
.classpath
.project
target
node_modules
.idea
*.iml

# Mac OS #
.DS_Store
.DS_Store?

# Windows #
Thumbs.db
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,20 @@ public String getRawResponseBody() {
public static ServiceException createFromXml(HttpRequest httpRequest, String requestContent, HttpResponse httpResponse, HttpEntity entity)
{
try {
// TODO: actually implement this
ServiceException serviceException = new ServiceException();
serviceException.setErrorMessage(EntityUtils.toString(entity));
return serviceException;
}
catch (IOException e) {
return new ServiceException();
}
}

public static ServiceException createFromJson(HttpRequest httpRequest, String requestContent, HttpResponse httpResponse, HttpEntity entity)
{
try {
// TODO: actually implement this
ServiceException serviceException = new ServiceException();
serviceException.setErrorMessage(EntityUtils.toString(entity));
return serviceException;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* 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;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;

public class TimeSpan8601Converter {
public static String format(Duration duration) {
return duration.toString();
}

public static Duration parse(String duration) {
try {
DatatypeFactory factory = DatatypeFactory.newInstance();
return factory.newDuration(duration);
}
catch (DatatypeConfigurationException e)
{
String msg = String.format("The value \"%s\" is not a valid ISO8601 duration.", duration);
throw new IllegalArgumentException(msg, e);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
com.microsoft.windowsazure.services.blob.Exports
com.microsoft.windowsazure.services.queue.Exports
com.microsoft.windowsazure.services.table.Exports
com.microsoft.windowsazure.services.serviceBus.Exports
com.microsoft.windowsazure.services.serviceBus.implementation.Exports
com.microsoft.windowsazure.services.core.utils.Exports
com.microsoft.windowsazure.services.core.utils.pipeline.Exports
com.microsoft.windowsazure.services.media.Exports
com.microsoft.windowsazure.services.management.Exports
com.microsoft.windowsazure.services.core.utils.pipeline.Exports

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a742050

Please sign in to comment.