File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
marklogic-data-hub/src/main/java/com/marklogic/hub/deploy Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 77import com .marklogic .appdeployer .command .modules .AllButAssetsModulesFinder ;
88import com .marklogic .appdeployer .command .modules .AssetModulesFinder ;
99import com .marklogic .client .DatabaseClient ;
10+ import com .marklogic .client .document .DocumentWriteSet ;
1011import com .marklogic .client .document .JSONDocumentManager ;
1112import com .marklogic .client .document .XMLDocumentManager ;
1213import com .marklogic .client .io .DocumentMetadataHandle ;
14+ import com .marklogic .client .io .Format ;
1315import com .marklogic .client .io .StringHandle ;
1416import com .marklogic .client .modulesloader .Modules ;
1517import com .marklogic .client .modulesloader .impl .*;
@@ -165,9 +167,14 @@ public void execute(CommandContext context) {
165167 // load Flow Definitions
166168 List <Flow > flows = flowManager .getLocalFlows ();
167169 XMLDocumentManager documentManager = hubConfig .newModulesDbClient ().newXMLDocumentManager ();
170+ DocumentWriteSet documentWriteSet = documentManager .newWriteSet ();
171+
168172 for (Flow flow : flows ) {
169- documentManager .write (flow .getFlowDbPath (), new StringHandle (flow .serialize ()));
173+ StringHandle handle = new StringHandle (flow .serialize ());
174+ handle .setFormat (Format .XML );
175+ documentWriteSet .add (flow .getFlowDbPath (), handle );
170176 }
177+ documentManager .write (documentWriteSet );
171178
172179 Files .walkFileTree (startPath , new SimpleFileVisitor <Path >() {
173180 @ Override
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public boolean accept(File f) {
1313 boolean result = f != null &&
1414 !f .getName ().startsWith ("." ) &&
1515 !f .getName ().endsWith ("entity.json" ) &&
16- !f .getName ().equals (f .getParent () + ".properties" ) &&
16+ !f .getName ().equals (f .getParentFile (). getName () + ".properties" ) &&
1717 !f .toString ().matches (".*[/\\ \\ ]REST[/\\ \\ ].*" ) &&
1818
1919 // ignore vim files ending in ~
You can’t perform that action at this time.
0 commit comments