RM-4162: fixed formatting

This commit is contained in:
Silviu Dinuta
2016-09-29 22:44:37 +03:00
parent 31c6b1e228
commit 39a8273063
2 changed files with 537 additions and 529 deletions

View File

@@ -96,6 +96,7 @@ public class DynamicAuthoritiesGet extends AbstractWebScript implements RecordsM
private static final String MESSAGE_PARTIAL_TEMPLATE = "Processed first {0} records.";
private static final String MESSAGE_NO_RECORDS_TO_PROCESS = "There where no records to be processed.";
/** services */
private PatchDAO patchDAO;
private NodeDAO nodeDAO;
@@ -262,8 +263,10 @@ public class DynamicAuthoritiesGet extends AbstractWebScript implements RecordsM
try
{
String mimetype = getContainer().getFormatRegistry().getMimeType(req.getAgent(), format);
if (mimetype == null) { throw new WebScriptException(
"Web Script format '" + format + "' is not registered"); }
if (mimetype == null)
{
throw new WebScriptException("Web Script format '" + format + "' is not registered");
}
// construct model for script / template
Status status = new Status();

View File

@@ -172,7 +172,8 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
}
/**
* Given that there are no nodes with the extended security aspect When the action is executed Nothing happens
* Given that there are no nodes with the extended security aspect
* When the action is executed Nothing happens
*
* @throws Exception
*/
@@ -205,8 +206,11 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
}
/**
* Given that there are records with the extended security aspect When the action is executed Then the aspect is
* removed And the dynamic authorities permissions are cleared And extended security is set via the updated API
* Given that there are records with the extended security aspect
* When the action is executed
* Then the aspect is removed
* And the dynamic authorities permissions are cleared
* And extended security is set via the updated API
*
* @throws Exception
*/
@@ -227,7 +231,6 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
.thenReturn((Serializable) Collections.emptyMap());
when(mockedNodeService.getProperty(nodeRef, PROP_WRITERS))
.thenReturn((Serializable) Collections.emptyMap());
});
// Set up parameters.
@@ -251,8 +254,9 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
}
/**
* Given that there are non-records with the extended security aspect When the web script is executed Then the
* aspect is removed And the dynamic authorities permissions are cleared
* Given that there are non-records with the extended security aspect
* When the web script is executed
* Then the aspect is removed And the dynamic authorities permissions are cleared
*
* @throws Exception
*/
@@ -273,7 +277,6 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
.thenReturn((Serializable) Collections.emptyMap());
when(mockedNodeService.getProperty(nodeRef, PROP_WRITERS))
.thenReturn((Serializable) Collections.emptyMap());
});
// Set up parameters.
@@ -285,6 +288,7 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
String expectedJSONString = "{\"responsestatus\":\"success\",\"message\":\"Processed 3 records.\"}";
assertEquals(mapper.readTree(expectedJSONString), mapper.readTree(actualJSONString));
verify(mockedNodeService, times(3)).getProperty(any(NodeRef.class), eq(PROP_READERS));
verify(mockedNodeService, times(3)).getProperty(any(NodeRef.class), eq(PROP_WRITERS));
verify(mockedNodeService, times(3)).removeAspect(any(NodeRef.class), eq(ASPECT_EXTENDED_SECURITY));
@@ -374,7 +378,6 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
.thenReturn((Serializable) Collections.emptyMap());
when(mockedNodeService.getProperty(nodeRef, PROP_WRITERS))
.thenReturn((Serializable) Collections.emptyMap());
});
// Set up parameters.
@@ -403,7 +406,6 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
.thenReturn((Serializable) Collections.emptyMap());
when(mockedNodeService.getProperty(nodeRef, PROP_WRITERS))
.thenReturn((Serializable) Collections.emptyMap());
});
// Set up parameters.
@@ -518,9 +520,10 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
}
/**
* Given I have records that require migration And I am interested in knowning which records are migrated When I run
* the migration tool Then I will be returned a CSV file containing the name and node reference of the record
* migrated
* Given I have records that require migration
* And I am interested in knowning which records are migrated
* When I run the migration tool
* Then I will be returned a CSV file containing the name and node reference of the record migrated
*
* @throws Exception
*/
@@ -558,8 +561,10 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
}
/**
* Given that I have record that require migration And I'm not interested in knowing which records were migrated
* When I run the migration tool And I will not be returned a CSV file of details.
* Given that I have record that require migration
* And I'm not interested in knowing which records were migrated
* When I run the migration tool
* Then I will not be returned a CSV file of details.
*
* @throws Exception
*/