Permalink
Browse files

Merge pull request #590 from gcheng/dev

Dev
  • Loading branch information...
2 parents 69d8659 + 5b6a9cf commit 0f400b3473f9d695739c596159f5dd06bb150fea Albert Cheng committed Jan 8, 2013
@@ -55,8 +55,8 @@
* Creates a media service configuration using the specified media service base URI, OAUTH URI,
* client ID, and client secret.
*
- * @param mediaServiceBaseUri
- * A <code>String</code> object that represents the media service base URI.
+ * @param mediaServiceUri
+ * A <code>String</code> object that represents the media service URI.
*
* @param oAuthUri
* A <code>String</code> object that represents the OAUTH URI.
@@ -75,10 +75,10 @@
* <code>MediaService</code> class.
*
*/
- public static Configuration configureWithOAuthAuthentication(String mediaServiceBaseUri, String oAuthUri,
+ public static Configuration configureWithOAuthAuthentication(String mediaServiceUri, String oAuthUri,
String clientId, String clientSecret, String scope) {
- return configureWithOAuthAuthentication(null, Configuration.getInstance(), mediaServiceBaseUri, oAuthUri,
- clientId, clientSecret, scope);
+ return configureWithOAuthAuthentication(null, Configuration.getInstance(), mediaServiceUri, oAuthUri, clientId,
+ clientSecret, scope);
}
/**
@@ -88,8 +88,8 @@ public static Configuration configureWithOAuthAuthentication(String mediaService
* @param configuration
* A previously instantiated <code>Configuration</code> object.
*
- * @param mediaServiceBaseUri
- * A <code>String</code> object that represents the base URI of Media service.
+ * @param mediaServiceUri
+ * A <code>String</code> object that represents the URI of media service.
*
* @param oAuthUri
* A <code>String</code> object that represents the URI of OAuth service.
@@ -108,10 +108,10 @@ public static Configuration configureWithOAuthAuthentication(String mediaService
* <code>MediaService</code> class.
*
*/
- public static Configuration configureWithOAuthAuthentication(Configuration configuration,
- String mediaServiceBaseUri, String oAuthUri, String clientId, String clientSecret, String scope) {
- return configureWithOAuthAuthentication(null, configuration, mediaServiceBaseUri, oAuthUri, clientId,
- clientSecret, scope);
+ public static Configuration configureWithOAuthAuthentication(Configuration configuration, String mediaServiceUri,
+ String oAuthUri, String clientId, String clientSecret, String scope) {
+ return configureWithOAuthAuthentication(null, configuration, mediaServiceUri, oAuthUri, clientId, clientSecret,
+ scope);
}
/**
@@ -124,8 +124,8 @@ public static Configuration configureWithOAuthAuthentication(Configuration confi
* @param configuration
* A previously instantiated <code>Configuration</code> object.
*
- * @param mediaServiceBaseUri
- * A <code>String</code> object that represents the base URI of media service.
+ * @param mediaServiceUri
+ * A <code>String</code> object that represents the URI of media service.
*
* @param oAuthUri
* A <code>String</code> object that represents the URI of OAUTH service.
@@ -145,7 +145,7 @@ public static Configuration configureWithOAuthAuthentication(Configuration confi
*
*/
public static Configuration configureWithOAuthAuthentication(String profile, Configuration configuration,
- String mediaServiceBaseUri, String oAuthUri, String clientId, String clientSecret, String scope) {
+ String mediaServiceUri, String oAuthUri, String clientId, String clientSecret, String scope) {
if (profile == null) {
profile = "";
@@ -154,7 +154,7 @@ else if (profile.length() != 0 && !profile.endsWith(".")) {
profile = profile + ".";
}
- configuration.setProperty(profile + URI, "https://" + mediaServiceBaseUri);
+ configuration.setProperty(profile + URI, mediaServiceUri);
configuration.setProperty(profile + OAUTH_URI, oAuthUri);
configuration.setProperty(profile + OAUTH_CLIENT_ID, clientId);
configuration.setProperty(profile + OAUTH_CLIENT_SECRET, clientSecret);
@@ -41,16 +41,16 @@
*/
public class EntityLinkOperation extends DefaultActionOperation {
- /** The master entity set. */
+ /** The primary entity set. */
private final String primaryEntitySet;
- /** The master entity id. */
+ /** The primary entity id. */
private final String primaryEntityId;
- /** The slave entity set. */
+ /** The secondary entity set. */
private final String secondaryEntitySet;
- /** The slave entity uri. */
+ /** The secondary entity uri. */
private final URI secondaryEntityUri;
/** The jaxb context. */
@@ -69,13 +69,13 @@
* Instantiates a new entity link operation.
*
* @param primaryEntitySet
- * the master entity set
+ * the primary entity set
* @param primaryEntityId
- * the master entity id
+ * the primary entity id
* @param secondaryEntitySet
- * the slave entity set
+ * the secondary entity set
* @param secondaryEntityUri
- * the slave entity uri
+ * the secondary entity uri
*/
public EntityLinkOperation(String primaryEntitySet, String primaryEntityId, String secondaryEntitySet,
URI secondaryEntityUri) {
@@ -178,8 +178,8 @@ public Creator setProtectionKeyType(ProtectionKeyType protectionKeyType) {
* id of content key to retrieve
* @return the operation
*/
- public static EntityGetOperation<ContentKeyInfo> get(String ContentKeyId) {
- return new DefaultGetOperation<ContentKeyInfo>(ENTITY_SET, ContentKeyId, ContentKeyInfo.class);
+ public static EntityGetOperation<ContentKeyInfo> get(String contentKeyId) {
+ return new DefaultGetOperation<ContentKeyInfo>(ENTITY_SET, contentKeyId, ContentKeyInfo.class);
}
/**
@@ -223,8 +223,8 @@ public Creator setProtectionKeyType(ProtectionKeyType protectionKeyType) {
* id of content key to delete
* @return the delete operation
*/
- public static EntityDeleteOperation delete(String ContentKeyId) {
- return new DefaultDeleteOperation(ENTITY_SET, ContentKeyId);
+ public static EntityDeleteOperation delete(String contentKeyId) {
+ return new DefaultDeleteOperation(ENTITY_SET, contentKeyId);
}
}
@@ -57,7 +57,7 @@ private void verifyJobProperties(String message, String testName, Integer priori
assertEquals(message + " Name", testName, actualJob.getName());
// comment out due to issue 464
// assertEquals(message + " Priority", priority, actualJob.getPriority());
- assertEquals(message + " RunningDuration", runningDuration, actualJob.getRunningDuration());
+ assertEquals(message + " RunningDuration", runningDuration, actualJob.getRunningDuration(), 0.001);
assertEquals(message + " State", state, actualJob.getState());
assertEqualsNullEmpty(message + " TemplateId", templateId, actualJob.getTemplateId());
@@ -300,7 +300,7 @@ public void canGetErrorDetailsFromTask() throws Exception {
JobInfo currentJobInfo = actualJob;
int retryCounter = 0;
- while (currentJobInfo.getState().getCode() < 3 && retryCounter < 20) {
+ while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) {
Thread.sleep(10000);
currentJobInfo = service.get(Job.get(actualJob.getId()));
retryCounter++;
@@ -28,8 +28,8 @@ public void createMediaConfigurationTestSuccess() {
// Arrange
// Act
- Configuration configuration = MediaConfiguration.configureWithOAuthAuthentication("testMediaServiceBaseUri",
- "testOAuthUri", "testClientId", "testClientSecret", "testScope");
+ Configuration configuration = MediaConfiguration.configureWithOAuthAuthentication(
+ "https://testMediaServiceBaseUri", "testOAuthUri", "testClientId", "testClientSecret", "testScope");
// Assert
assertEquals("https://testMediaServiceBaseUri", configuration.getProperty("media.uri"));
@@ -47,7 +47,7 @@ public void createMediaConfigurationPassingExistingConfigurationSuccess() {
// Act
Configuration configuration = MediaConfiguration.configureWithOAuthAuthentication(preConfiguration,
- "testMediaServiceBaseUri", "testOAuthUri", "testClientId", "testClientSecret", "testScope");
+ "https://testMediaServiceBaseUri", "testOAuthUri", "testClientId", "testClientSecret", "testScope");
// Assert
assertEquals("preexistingValue", configuration.getProperty("preexistingName"));
@@ -66,8 +66,8 @@ public void createMediaConfigurationWithProfileConfigurationSuccess() {
// Act
Configuration configuration = MediaConfiguration.configureWithOAuthAuthentication("testProfile",
- preConfiguration, "testMediaServiceBaseUri", "testOAuthUri", "testClientId", "testClientSecret",
- "testScope");
+ preConfiguration, "https://testMediaServiceBaseUri", "testOAuthUri", "testClientId",
+ "testClientSecret", "testScope");
// Assert
assertEquals("preexistingValue", configuration.getProperty("preexistingName"));

0 comments on commit 0f400b3

Please sign in to comment.