Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #38 from christav/renaming-entity-types

Renaming EntityCreationOperation to EntityCreateOperation
  • Loading branch information...
commit 72e3372c074028ec2e23243575464de572617654 2 parents a9db001 + 2825f3c
@christav christav authored
Showing with 39 additions and 40 deletions.
  1. +3 −3 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java
  2. +1 −1  ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/entities/EntityContract.java
  3. +2 −3 ...ure/services/media/implementation/entities/{EntityCreationOperation.java → EntityCreateOperation.java}
  4. +2 −2 ...re-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/entities/EntityRestProxy.java
  5. +3 −3 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java
  6. +3 −3 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java
  7. +2 −2 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java
  8. +3 −3 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java
  9. +4 −4 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java
  10. +4 −4 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java
  11. +2 −2 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java
  12. +2 −2 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java
  13. +2 −2 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java
  14. +6 −6 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java
View
6 ...-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java
@@ -26,7 +26,7 @@
import com.microsoft.windowsazure.services.media.MediaContract;
import com.microsoft.windowsazure.services.media.WritableBlobContainerContract;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityActionOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityListOperation;
@@ -92,10 +92,10 @@ private ServiceException processCatch(ServiceException e) {
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityContract#create(com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation)
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityContract#create(com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation)
*/
@Override
- public <T> T create(EntityCreationOperation<T> creator) throws ServiceException {
+ public <T> T create(EntityCreateOperation<T> creator) throws ServiceException {
try {
return service.create(creator);
}
View
2  ...-api/src/main/java/com/microsoft/windowsazure/services/media/implementation/entities/EntityContract.java
@@ -34,7 +34,7 @@
* @return
* The created entity
*/
- public abstract <T> T create(EntityCreationOperation<T> creator) throws ServiceException;
+ public abstract <T> T create(EntityCreateOperation<T> creator) throws ServiceException;
/**
* Retrieve an existing entity by id
View
5 ...lementation/entities/EntityCreationOperation.java → ...mplementation/entities/EntityCreateOperation.java
@@ -17,14 +17,13 @@
import com.microsoft.windowsazure.services.core.ServiceException;
-// TODO: Auto-generated Javadoc
/**
- * The Interface EntityCreationOperation.
+ * The Interface EntityCreateOperation.
*
* @param <T>
* the generic type
*/
-public interface EntityCreationOperation<T> extends EntityOperationSingleResult<T> {
+public interface EntityCreateOperation<T> extends EntityOperationSingleResult<T> {
/**
* Get the object to be sent to the server containing
View
4 ...api/src/main/java/com/microsoft/windowsazure/services/media/implementation/entities/EntityRestProxy.java
@@ -104,11 +104,11 @@ private Builder getResource(EntityOperation operation) throws ServiceException {
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityContract#create(com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation)
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityContract#create(com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation)
*/
@SuppressWarnings("unchecked")
@Override
- public <T> T create(EntityCreationOperation<T> creator) throws ServiceException {
+ public <T> T create(EntityCreateOperation<T> creator) throws ServiceException {
creator.setProxyData(createProxyData());
Object rawResponse = getResource(creator).post(creator.getResponseClass(),
creator.getRequestContents());
View
6 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java
@@ -23,7 +23,7 @@
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultListOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityOperationSingleResultBase;
@@ -51,13 +51,13 @@ private AccessPolicy() {
* permissions allowed by this access policy
* @return The operation
*/
- public static EntityCreationOperation<AccessPolicyInfo> create(String name, double durationInMinutes,
+ public static EntityCreateOperation<AccessPolicyInfo> create(String name, double durationInMinutes,
EnumSet<AccessPolicyPermission> permissions) {
return new Creator(name, durationInMinutes, permissions);
}
private static class Creator extends EntityOperationSingleResultBase<AccessPolicyInfo> implements
- EntityCreationOperation<AccessPolicyInfo> {
+ EntityCreateOperation<AccessPolicyInfo> {
private final String policyName;
private final double durationInMinutes;
private final EnumSet<AccessPolicyPermission> permissions;
View
6 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java
@@ -23,7 +23,7 @@
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultListOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityLinkOperation;
@@ -62,7 +62,7 @@ public static Creator create() {
* The Class Creator.
*/
public static class Creator extends EntityOperationSingleResultBase<AssetInfo> implements
- EntityCreationOperation<AssetInfo> {
+ EntityCreateOperation<AssetInfo> {
/** The name. */
private String name;
@@ -84,7 +84,7 @@ public Creator() {
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation#getRequestContents()
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation#getRequestContents()
*/
@Override
public Object getRequestContents() {
View
4 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java
@@ -25,7 +25,7 @@
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultListOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityActionOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityOperationBase;
@@ -46,7 +46,7 @@ public static Creator create(String parentAssetId, String name) {
}
public static class Creator extends EntityOperationSingleResultBase<AssetFileInfo> implements
- EntityCreationOperation<AssetFileInfo> {
+ EntityCreateOperation<AssetFileInfo> {
private final String parentAssetId;
private final String name;
private String contentChecksum;
View
6 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java
@@ -21,7 +21,7 @@
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultListOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityOperationSingleResultBase;
@@ -61,7 +61,7 @@ public static Creator create(String id, ContentKeyType contentKeyType, String en
* The Class Creator.
*/
public static class Creator extends EntityOperationSingleResultBase<ContentKeyInfo> implements
- EntityCreationOperation<ContentKeyInfo> {
+ EntityCreateOperation<ContentKeyInfo> {
/** The id. */
private final String id;
@@ -98,7 +98,7 @@ public Creator(String id, ContentKeyType contentKeyType, String encryptedContent
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation#getRequestContents()
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation#getRequestContents()
*/
@Override
public Object getRequestContents() {
View
8 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java
@@ -36,7 +36,7 @@
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultListOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityActionOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityBatchOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityOperationSingleResultBase;
@@ -74,7 +74,7 @@ public static Creator create() {
* The Class Creator.
*/
public static class Creator extends EntityOperationSingleResultBase<JobInfo> implements
- EntityCreationOperation<JobInfo> {
+ EntityCreateOperation<JobInfo> {
/** The name. */
private String name;
@@ -156,7 +156,7 @@ public Creator() {
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation#getRequestContents()
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation#getRequestContents()
*/
@Override
public Object getRequestContents() throws ServiceException {
@@ -176,7 +176,7 @@ public Class getResponseClass() {
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation#processResponse(java.lang.Object)
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation#processResponse(java.lang.Object)
*/
@Override
public Object processResponse(Object clientResponse) throws ServiceException {
View
8 microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java
@@ -22,7 +22,7 @@
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.DefaultListOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityOperationBase;
@@ -64,7 +64,7 @@ public static Creator create(String accessPolicyId, String assetId, LocatorType
* The Class Creator.
*/
public static class Creator extends EntityOperationSingleResultBase<LocatorInfo> implements
- EntityCreationOperation<LocatorInfo> {
+ EntityCreateOperation<LocatorInfo> {
/** The access policy id. */
private final String accessPolicyId;
@@ -108,7 +108,7 @@ protected Creator(String accessPolicyId, String assetId, LocatorType locatorType
}
/* (non-Javadoc)
- * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation#getRequestContents()
+ * @see com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation#getRequestContents()
*/
@Override
public Object getRequestContents() {
@@ -172,7 +172,7 @@ public Creator setContentAccessComponent(String contentAccessComponent) {
* the id
* @return the entity creation operation
*/
- public EntityCreationOperation<LocatorInfo> setId(String id) {
+ public EntityCreateOperation<LocatorInfo> setId(String id) {
this.id = id;
return this;
}
View
4 ...oft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java
@@ -25,7 +25,7 @@
import org.junit.Test;
import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityListOperation;
import com.sun.jersey.core.util.MultivaluedMapImpl;
@@ -49,7 +49,7 @@ public void createAccessPolicyProvidesExpectedPayload() throws Exception {
EnumSet<AccessPolicyPermission> permissions = EnumSet.of(AccessPolicyPermission.READ,
AccessPolicyPermission.LIST);
- EntityCreationOperation<AccessPolicyInfo> creator = AccessPolicy.create(name, duration, permissions);
+ EntityCreateOperation<AccessPolicyInfo> creator = AccessPolicy.create(name, duration, permissions);
AccessPolicyType payload = (AccessPolicyType) creator.getRequestContents();
View
4 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java
@@ -6,7 +6,7 @@
import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityActionOperation;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityGetOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityListOperation;
@@ -43,7 +43,7 @@ public void createWithOptionsSetsOptionsAsExpected() throws Exception {
Boolean expectedIsPrimary = true;
String expectedMimeType = "application/octet-stream";
- EntityCreationOperation<AssetFileInfo> creator = AssetFile.create(exampleAssetId, expectedName)
+ EntityCreateOperation<AssetFileInfo> creator = AssetFile.create(exampleAssetId, expectedName)
.setContentChecksum(expectedChecksum).setContentFileSize(expectedSize)
.setEncryptionKeyId(expectedEncryptionKey).setEncryptionScheme(expectedEncryptionScheme)
.setEncryptionVersion(expectedEncryptionVersion).setInitializationVector(expectedInitializationVector)
View
4 ...osoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java
@@ -24,7 +24,7 @@
import org.junit.Test;
import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityListOperation;
import com.sun.jersey.core.util.MultivaluedMapImpl;
@@ -46,7 +46,7 @@ public ContentKeyEntityTest() throws Exception {
@Test
public void createContentKeyHasCorrectUrl() throws Exception {
- EntityCreationOperation<ContentKeyInfo> creator = ContentKey.create(testContentKeyId, testContentKeyType,
+ EntityCreateOperation<ContentKeyInfo> creator = ContentKey.create(testContentKeyId, testContentKeyType,
testEncryptedContentKey);
assertEquals("ContentKeys", creator.getUri());
View
12 microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java
@@ -25,7 +25,7 @@
import org.junit.Test;
import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType;
-import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreationOperation;
+import com.microsoft.windowsazure.services.media.implementation.entities.EntityCreateOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityDeleteOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityListOperation;
import com.microsoft.windowsazure.services.media.implementation.entities.EntityUpdateOperation;
@@ -48,7 +48,7 @@ public LocatorEntityTest() throws Exception {
@Test
public void createLocatorHasCorrectUrl() throws Exception {
- EntityCreationOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
+ EntityCreateOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
LocatorType.SAS);
assertEquals("Locators", creator.getUri());
@@ -70,7 +70,7 @@ public void createLocatorHasCorrectPayload() throws Exception {
public void createLocatorCanSetStartTime() throws Exception {
Date now = new Date();
- EntityCreationOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
+ EntityCreateOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
LocatorType.SAS).setStartDateTime(now);
LocatorRestType locatorType = (LocatorRestType) creator.getRequestContents();
@@ -86,7 +86,7 @@ public void createLocatorCanSetPath() throws Exception {
String expectedPath = "testExpectedPath";
- EntityCreationOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
+ EntityCreateOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
LocatorType.SAS).setPath(expectedPath);
LocatorRestType locatorType = (LocatorRestType) creator.getRequestContents();
@@ -100,7 +100,7 @@ public void createLocatorCanSetBaseUri() throws Exception {
String expectedBaseUri = "testExpectedBaseUri";
- EntityCreationOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
+ EntityCreateOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
LocatorType.SAS).setBaseUri(expectedBaseUri);
LocatorRestType locatorType = (LocatorRestType) creator.getRequestContents();
@@ -114,7 +114,7 @@ public void createLocatorCanSetContentAccessComponent() throws Exception {
String expectedContentAccessComponent = "testExpectedContentAccessComponent";
- EntityCreationOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
+ EntityCreateOperation<LocatorInfo> creator = Locator.create(exampleAccessPolicyId, exampleAssetId,
LocatorType.SAS).setContentAccessComponent(expectedContentAccessComponent);
LocatorRestType locatorType = (LocatorRestType) creator.getRequestContents();
Please sign in to comment.
Something went wrong with that request. Please try again.