This repository was archived by the owner on Sep 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
main/java/com/marklogic/mgmt
java/com/marklogic/appdeployer/command/databases
resources/sample-app/db-only-config/databases Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ public void deleteAsSecurityUser(String path) {
319319 */
320320 public HttpEntity <String > buildJsonEntity (String json ) {
321321 HttpHeaders headers = new HttpHeaders ();
322- headers .setContentType (MediaType .APPLICATION_JSON );
322+ headers .setContentType (MediaType .APPLICATION_JSON_UTF8 );
323323 if (manageConfig != null && manageConfig .isCleanJsonPayloads ()) {
324324 json = cleanJsonPayload (json );
325325 }
Original file line number Diff line number Diff line change 11package com .marklogic .appdeployer .command .databases ;
22
3+ import com .marklogic .mgmt .api .API ;
4+ import com .marklogic .mgmt .api .database .Database ;
5+ import com .marklogic .mgmt .mapper .DefaultResourceMapper ;
36import org .junit .After ;
47import org .junit .Test ;
58
@@ -25,5 +28,10 @@ public void test() {
2528 // Just smoke-testing these to make sure they don't blow up
2629 mgr .mergeDatabase (appConfig .getContentDatabaseName ());
2730 mgr .reindexDatabase (appConfig .getContentDatabaseName ());
31+
32+ String json = mgr .getPropertiesAsJson (appConfig .getContentDatabaseName ());
33+ System .out .println (json );
34+ Database db = new DefaultResourceMapper (new API (manageClient )).readResource (json , Database .class );
35+ assertEquals ("ÉÉÉ" , db .getRangeElementIndex ().get (0 ).getLocalname ());
2836 }
2937}
Original file line number Diff line number Diff line change 11{
2- "database-name" : " %%DATABASE%%"
2+ "database-name" : " %%DATABASE%%" ,
3+ "range-element-index" : [
4+ {
5+ "collation" : " http://marklogic.com/collation/" ,
6+ "invalid-values" : " reject" ,
7+ "localname" : " ÉÉÉ" ,
8+ "namespace-uri" : " " ,
9+ "range-value-positions" : false ,
10+ "scalar-type" : " string"
11+ }
12+ ]
313}
You can’t perform that action at this time.
0 commit comments