mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Replication Definition deletion support + unit test
(Disabled) unit test for edit/save/load/edit/save of replication definitions, so that Derek can look at why the node service breaks for this git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21093 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -91,9 +91,14 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<NodeRef> getPayload() {
|
||||
// Retrieve the previous payload
|
||||
// Could be null, could be a list, or could be a single
|
||||
// NodeRef (if the list had one entry when saved)
|
||||
Object payloadO =
|
||||
getParameterValue(REPLICATION_DEFINITION_PAYLOAD);
|
||||
|
||||
// Ensure we always have a list, no matter what
|
||||
// we got back
|
||||
List<NodeRef> payload;
|
||||
if(payloadO == null) {
|
||||
payload = new ArrayList<NodeRef>();
|
||||
@@ -104,8 +109,11 @@ public class ReplicationDefinitionImpl extends ActionImpl implements Replication
|
||||
if(payloadO instanceof List) {
|
||||
payload = (List<NodeRef>)payloadO;
|
||||
} else {
|
||||
// Turn it into a list
|
||||
payload = new ArrayList<NodeRef>();
|
||||
payload.add((NodeRef)payloadO);
|
||||
// And switch to using the list from now on
|
||||
setParameterValue(REPLICATION_DEFINITION_PAYLOAD, (Serializable)payload);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user