NIFI-1941:

- Ensuring child group contents are included in exported templates.
This commit is contained in:
Matt Gilman 2016-06-15 22:24:21 -04:00
parent 6e74c10f49
commit 3156220a57
1 changed files with 26 additions and 29 deletions

View File

@ -16,32 +16,6 @@
*/
package org.apache.nifi.web.api.dto;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TimeZone;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.ws.rs.WebApplicationException;
import org.apache.nifi.action.Action;
import org.apache.nifi.action.component.details.ComponentDetails;
import org.apache.nifi.action.component.details.ExtensionDetails;
@ -164,6 +138,31 @@ import org.apache.nifi.web.api.entity.FlowBreadcrumbEntity;
import org.apache.nifi.web.controller.ControllerFacade;
import org.apache.nifi.web.revision.RevisionManager;
import javax.ws.rs.WebApplicationException;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TimeZone;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Supplier;
public final class DtoFactory {
@SuppressWarnings("rawtypes")
@ -1556,9 +1555,6 @@ public final class DtoFactory {
}
for (final ProcessGroupDTO processGroup : snippet.getProcessGroups()) {
// clear the contents as we only return a single level/group at a time
processGroup.setContents(null);
final RevisionDTO revision = createRevisionDTO(revisionManager.getRevision(processGroup.getId()));
final AccessPolicyDTO accessPolicy = createAccessPolicyDto(group.getProcessGroup(processGroup.getId()));
final ProcessGroupStatusDTO status = getComponentStatus(
@ -2557,6 +2553,7 @@ public final class DtoFactory {
public ProcessGroupDTO copy(final ProcessGroupDTO original, final boolean deep) {
final ProcessGroupDTO copy = new ProcessGroupDTO();
copy.setComments(original.getComments());
copy.setContents(copy(original.getContents(), deep));
copy.setPosition(original.getPosition());
copy.setId(original.getId());
copy.setInputPortCount(original.getInputPortCount());