Permalink
Browse files

final touch on the action DCR.

  • Loading branch information...
1 parent e15f49f commit aa8609bb8361db25d06a172b7c69c752cbc3da04 Albert Cheng committed Jan 9, 2013
@@ -55,6 +55,13 @@
*/
Object getRequestContents();
- DefaultActionOperation setContentType(MediaType contentType);
+ /**
+ * Sets the content type.
+ *
+ * @param contentType
+ * the content type
+ * @return the default action operation
+ */
+ EntityActionOperation setContentType(MediaType contentType);
}
@@ -165,7 +165,6 @@ public void delete(EntityDeleteOperation deleter) throws ServiceException {
/* (non-Javadoc)
* @see com.microsoft.windowsazure.services.media.implementation.entities.EntityContract#action(com.microsoft.windowsazure.services.media.implementation.entities.EntityActionOperation)
*/
- @SuppressWarnings("unchecked")
@Override
public <T> T action(EntityTypeActionOperation<T> entityTypeActionOperation) throws ServiceException {
entityTypeActionOperation.setProxyData(createProxyData());
@@ -174,7 +173,7 @@ public void delete(EntityDeleteOperation deleter) throws ServiceException {
.accept(entityTypeActionOperation.getAcceptType()).accept(MediaType.APPLICATION_XML_TYPE)
.entity(entityTypeActionOperation.getRequestContents(), MediaType.APPLICATION_XML_TYPE);
ClientResponse clientResponse = webResource.method(entityTypeActionOperation.getVerb(), ClientResponse.class);
- return (T) entityTypeActionOperation.processResponse(clientResponse);
+ return entityTypeActionOperation.processTypeResponse(clientResponse);
}
/* (non-Javadoc)

0 comments on commit aa8609b

Please sign in to comment.