Permalink
Browse files

Merge pull request #92 from gcheng/dev

Dev
  • Loading branch information...
2 parents 2ba8f9b + 31e4afd commit 73a0309f18c661738a5cba512137e583a104999a Albert Cheng committed Jan 9, 2013
Showing with 405 additions and 11 deletions.
  1. +1 −0 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/Exports.java
  2. +2 −4 .../src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
  3. +1 −1 ...i/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java
  4. +8 −0 ...src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java
  5. +13 −0 .../java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java
  6. +15 −0 ...api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java
  7. +15 −0 ...-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java
  8. +15 −0 ...api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java
  9. +15 −0 ...re-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java
  10. +15 −0 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java
  11. +15 −0 ...pi/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java
  12. +15 −0 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java
  13. +15 −0 ...azure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java
  14. +15 −0 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java
  15. +15 −0 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java
  16. +15 −0 ...pi/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java
  17. +15 −0 ...e-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java
  18. +15 −0 ...e-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java
  19. +15 −0 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java
  20. +15 −0 ...zure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java
  21. +15 −0 ...api/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java
  22. +15 −1 ...c/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java
  23. +15 −0 ...java/com/microsoft/windowsazure/services/media/implementation/entities/EntityDeleteOperation.java
  24. +2 −1 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java
  25. +15 −0 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java
  26. +15 −0 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java
  27. +15 −0 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java
  28. +0 −1 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java
  29. +1 −0 .../test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java
  30. +1 −0 ...rc/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java
  31. +15 −0 ...src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java
  32. +15 −0 ...st/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java
  33. +15 −0 ...pi/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java
  34. +15 −0 ...azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java
  35. +1 −3 ...soft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java
@@ -52,6 +52,7 @@ public void register(Builder.Registry registry) {
registry.add(VersionHeadersFilter.class);
registry.alter(ClientConfig.class, new Builder.Alteration<ClientConfig>() {
+ @SuppressWarnings("rawtypes")
@Override
public ClientConfig alter(ClientConfig instance, Builder builder, Map<String, Object> properties) {
@@ -49,6 +49,7 @@
import com.microsoft.windowsazure.services.media.models.Job;
import com.microsoft.windowsazure.services.media.models.JobInfo;
import com.microsoft.windowsazure.services.media.models.Task;
+import com.microsoft.windowsazure.services.media.models.TaskInfo;
import com.microsoft.windowsazure.services.table.implementation.InputStreamDataSource;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.UniformInterfaceException;
@@ -298,7 +299,6 @@ private DataSource createBatchCreateEntityPart(String verb, String entityName, E
* @throws ServiceException
* the service exception
*/
- @SuppressWarnings("rawtypes")
public void parseBatchResult(ClientResponse response) throws IOException, ServiceException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
InputStream inputStream = response.getEntityInputStream();
@@ -316,7 +316,6 @@ public void parseBatchResult(ClientResponse response) throws IOException, Servic
entityBatchOperations.size()), response);
}
- ArrayList<Object> result = new ArrayList<Object>();
for (int i = 0; i < parts.size(); i++) {
DataSource ds = parts.get(i);
EntityBatchOperation entityBatchOperation = entityBatchOperations.get(i);
@@ -352,9 +351,8 @@ else if (entityBatchOperation instanceof Job.CreateBatchOperation) {
}
}
else if (entityBatchOperation instanceof Task.CreateBatchOperation) {
- EntryType entryType = null;
try {
- entryType = oDataAtomUnmarshaller.unmarshalEntry(content);
+ oDataAtomUnmarshaller.unmarshalEntry(content, TaskInfo.class);
}
catch (JAXBException e) {
throw new ServiceException(e);
@@ -104,7 +104,7 @@ public void marshalEntryType(EntryType entryType, OutputStream stream) throws JA
new JAXBElement<EntryType>(new QName(Constants.ATOM_NS, "entry"), EntryType.class, entryType), stream);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
private JAXBElement<EntryType> createEntry(Object content) {
ContentType atomContent = new ContentType();
EntryType atomEntry = new EntryType();
@@ -75,6 +75,7 @@ public ODataAtomUnmarshaller() throws JAXBException {
* @throws JAXBException
* @throws ServiceException
*/
+ @SuppressWarnings("rawtypes")
public <T extends ODataEntity> ListResult<T> unmarshalFeed(InputStream stream, Class<T> contentType)
throws JAXBException, ServiceException {
validateNotNull(stream, "stream");
@@ -105,6 +106,7 @@ public ODataAtomUnmarshaller() throws JAXBException {
* @throws JAXBException
* @throws ServiceException
*/
+ @SuppressWarnings("rawtypes")
public <T extends ODataEntity> T unmarshalEntry(InputStream stream, Class<T> contentType) throws JAXBException,
ServiceException {
validateNotNull(stream, "stream");
@@ -116,6 +118,7 @@ public ODataAtomUnmarshaller() throws JAXBException {
return contentFromEntry(contentType, marshallingContentType, entry);
}
+ @SuppressWarnings("rawtypes")
private <T extends ODataEntity> T contentFromEntry(Class<T> contentType, Class<?> marshallingContentType,
EntryType entry) throws JAXBException, ServiceException {
unmarshalODataContent(entry, contentType);
@@ -126,6 +129,7 @@ public ODataAtomUnmarshaller() throws JAXBException {
private EntryType asEntry(Object o) {
if (o instanceof JAXBElement) {
+ @SuppressWarnings("rawtypes")
JAXBElement e = (JAXBElement) o;
if (e.getDeclaredType() == EntryType.class) {
return (EntryType) e.getValue();
@@ -154,6 +158,7 @@ private void unmarshalEntryActions(EntryType entry) throws JAXBException {
}
}
+ @SuppressWarnings("rawtypes")
private void unmarshalEntryContent(EntryType entry, Class<?> contentType) throws JAXBException {
Class<?> marshallingContentType = getMarshallingContentType(contentType);
ContentType contentElement = getFirstOfType(ContentType.class, entry.getEntryChildren());
@@ -170,9 +175,11 @@ private void unmarshalEntryContent(EntryType entry, Class<?> contentType) throws
}
}
+ @SuppressWarnings("unchecked")
private <T> T getFirstOfType(Class<T> targetType, List<Object> collection) {
for (Object c : collection) {
if (c instanceof JAXBElement) {
+ @SuppressWarnings("rawtypes")
JAXBElement e = (JAXBElement) c;
if (e.getDeclaredType() == targetType) {
return (T) e.getValue();
@@ -182,6 +189,7 @@ private void unmarshalEntryContent(EntryType entry, Class<?> contentType) throws
return null;
}
+ @SuppressWarnings("rawtypes")
private <T extends ODataEntity> T constructResultObject(Class<T> contentType, EntryType entry, Object contentObject)
throws ServiceException {
Class<?> marshallingType = getMarshallingContentType(contentType);
@@ -1,6 +1,18 @@
/**
+ * 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.media.implementation;
import java.io.IOException;
@@ -34,6 +46,7 @@ public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotati
return ODataEntity.isODataEntityCollectionType(type, genericType);
}
+ @SuppressWarnings("unchecked")
@Override
public ListResult<ODataEntity<?>> readFrom(Class<ListResult<ODataEntity<?>>> type, Type genericType,
Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders,
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
@@ -1,3 +1,18 @@
+/**
+ * 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.
+ */
+
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
Oops, something went wrong.

0 comments on commit 73a0309

Please sign in to comment.