├── src
├── test
│ ├── resources
│ │ ├── sample-app
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── ml-schemas
│ │ │ │ │ ├── .do-not-load
│ │ │ │ │ ├── x.xsd
│ │ │ │ │ └── my.rules
│ │ │ │ │ ├── ml-modules
│ │ │ │ │ ├── ext
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ ├── test2.xqy
│ │ │ │ │ │ │ └── test.xqy
│ │ │ │ │ │ └── sample-lib.xqy
│ │ │ │ │ ├── options
│ │ │ │ │ │ └── sample-app-options.xml
│ │ │ │ │ └── services
│ │ │ │ │ │ └── sql.xqy
│ │ │ │ │ ├── ml-data
│ │ │ │ │ ├── child
│ │ │ │ │ │ ├── test3.txt
│ │ │ │ │ │ ├── test2.xml
│ │ │ │ │ │ ├── collections.properties
│ │ │ │ │ │ └── permissions.properties
│ │ │ │ │ └── test1.json
│ │ │ │ │ ├── more-data
│ │ │ │ │ └── test4.json
│ │ │ │ │ └── ml-config
│ │ │ │ │ ├── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── triggers-database.json
│ │ │ │ │ └── content-database.json
│ │ │ │ │ ├── groups
│ │ │ │ │ └── sample-app-group.json
│ │ │ │ │ ├── servers
│ │ │ │ │ ├── rest-api-server.json
│ │ │ │ │ └── odbc-server.json
│ │ │ │ │ ├── security
│ │ │ │ │ ├── query-rolesets
│ │ │ │ │ │ └── queryset-1.json
│ │ │ │ │ ├── credentials
│ │ │ │ │ │ ├── credentials-aws.json
│ │ │ │ │ │ └── credentials-azure.xml
│ │ │ │ │ ├── privileges
│ │ │ │ │ │ ├── privilege-2.json
│ │ │ │ │ │ └── privilege-1.json
│ │ │ │ │ ├── roles
│ │ │ │ │ │ ├── sample-app-role2.xml
│ │ │ │ │ │ └── sample-app-role1.json
│ │ │ │ │ ├── users
│ │ │ │ │ │ ├── john.json
│ │ │ │ │ │ └── jane.json
│ │ │ │ │ ├── amps
│ │ │ │ │ │ ├── amp-1.json
│ │ │ │ │ │ └── amp-2.xml
│ │ │ │ │ ├── protected-collections
│ │ │ │ │ │ ├── collection-1.json
│ │ │ │ │ │ └── collection-2.xml
│ │ │ │ │ ├── protected-paths
│ │ │ │ │ │ └── path-1.json
│ │ │ │ │ ├── secure-credentials
│ │ │ │ │ │ └── secure-credentials-1.json
│ │ │ │ │ ├── external-security
│ │ │ │ │ │ └── external-security-1.xml
│ │ │ │ │ ├── certificate-templates
│ │ │ │ │ │ └── template-1.xml
│ │ │ │ │ └── certificate-authorities
│ │ │ │ │ │ └── server.crt
│ │ │ │ │ ├── mimetypes
│ │ │ │ │ └── ditamap.json
│ │ │ │ │ ├── task-servers
│ │ │ │ │ └── task-server.json
│ │ │ │ │ ├── forests
│ │ │ │ │ └── content-forest.json
│ │ │ │ │ ├── temporal
│ │ │ │ │ ├── collections
│ │ │ │ │ │ ├── temporal-collection.json
│ │ │ │ │ │ └── lsqt
│ │ │ │ │ │ │ └── temporal-collection-lsqt.json
│ │ │ │ │ └── axis
│ │ │ │ │ │ ├── temporal-valid-axis.json
│ │ │ │ │ │ └── temporal-system-axis.json
│ │ │ │ │ ├── rest-api.json
│ │ │ │ │ ├── cpf
│ │ │ │ │ ├── domains
│ │ │ │ │ │ ├── domain-1.json
│ │ │ │ │ │ └── domain-2.xml
│ │ │ │ │ ├── cpf-configs
│ │ │ │ │ │ └── sample-app-cpf-config.json
│ │ │ │ │ └── pipelines
│ │ │ │ │ │ └── pipeline-1.json
│ │ │ │ │ ├── tasks
│ │ │ │ │ └── task-1.json
│ │ │ │ │ └── triggers
│ │ │ │ │ └── my-trigger.json
│ │ │ ├── static-check-modules
│ │ │ │ └── ext
│ │ │ │ │ └── bad.xqy
│ │ │ ├── cluster-test
│ │ │ │ └── clusters
│ │ │ │ │ └── local-cluster.json
│ │ │ ├── multiple-schema-databases
│ │ │ │ ├── ml-schemas
│ │ │ │ │ └── default-schema.xsd
│ │ │ │ └── ml-config
│ │ │ │ │ └── databases
│ │ │ │ │ ├── sample-app-schemas1
│ │ │ │ │ └── schemas
│ │ │ │ │ │ └── schema1.xsd
│ │ │ │ │ ├── sample-app-schemas2
│ │ │ │ │ └── schemas
│ │ │ │ │ │ └── schema2.xsd
│ │ │ │ │ ├── sample-app-schemas1.json
│ │ │ │ │ └── sample-app-schemas2.json
│ │ │ ├── default-databases
│ │ │ │ └── databases
│ │ │ │ │ ├── fab-database.json
│ │ │ │ │ └── content-database.json
│ │ │ ├── custom-forests
│ │ │ │ ├── databases
│ │ │ │ │ └── content-database.json
│ │ │ │ └── forests
│ │ │ │ │ └── sample-app-content
│ │ │ │ │ ├── single-custom-forest.json
│ │ │ │ │ └── custom-forests.json
│ │ │ ├── users-to-not-undeploy
│ │ │ │ └── security
│ │ │ │ │ ├── users
│ │ │ │ │ ├── nobody-user.json
│ │ │ │ │ └── custom-user.json
│ │ │ │ │ └── roles
│ │ │ │ │ ├── testRole.json
│ │ │ │ │ └── admin.json
│ │ │ ├── alert-config
│ │ │ │ ├── databases
│ │ │ │ │ ├── content-database.json
│ │ │ │ │ ├── other-database.json
│ │ │ │ │ ├── other-sample-app-content
│ │ │ │ │ │ └── alert
│ │ │ │ │ │ │ └── configs
│ │ │ │ │ │ │ ├── other-alert-config-actions
│ │ │ │ │ │ │ └── other-alert-action.json
│ │ │ │ │ │ │ ├── other-alert-config.json
│ │ │ │ │ │ │ └── other-alert-config-rules
│ │ │ │ │ │ │ └── other-rule.xml
│ │ │ │ │ └── unknown-database
│ │ │ │ │ │ └── alert
│ │ │ │ │ │ └── configs
│ │ │ │ │ │ └── should-be-ignored-alert-config.json
│ │ │ │ └── alert
│ │ │ │ │ └── configs
│ │ │ │ │ ├── my-alert-config-actions
│ │ │ │ │ └── my-alert-action.json
│ │ │ │ │ ├── my-alert-config.json
│ │ │ │ │ └── my-alert-config-rules
│ │ │ │ │ └── my-rule.xml
│ │ │ ├── partitions
│ │ │ │ └── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── sample-app-content
│ │ │ │ │ └── partitions
│ │ │ │ │ │ ├── partition2.xml
│ │ │ │ │ │ └── partition1.xml
│ │ │ │ │ └── content-database.json
│ │ │ ├── roles-with-dependencies
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ ├── role3.json
│ │ │ │ │ ├── role1.json
│ │ │ │ │ ├── role2.xml
│ │ │ │ │ ├── role5.json
│ │ │ │ │ ├── role0.json
│ │ │ │ │ └── role4.xml
│ │ │ ├── subdatabases
│ │ │ │ └── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── triggers-database.json
│ │ │ │ │ ├── subdatabases
│ │ │ │ │ ├── mysuperdb
│ │ │ │ │ │ ├── mysuperdb-subdb01.json
│ │ │ │ │ │ └── mysuperdb-subdb02.json
│ │ │ │ │ └── sample-app-content
│ │ │ │ │ │ ├── sample-app-content-subdb01.json
│ │ │ │ │ │ └── sample-app-content-subdb02.json
│ │ │ │ │ ├── my-super-db.json
│ │ │ │ │ └── content-database.json
│ │ │ ├── view-schemas
│ │ │ │ ├── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── other-database.json
│ │ │ │ │ ├── other-sample-app-content
│ │ │ │ │ │ └── view-schemas
│ │ │ │ │ │ │ ├── view-schema-1.json
│ │ │ │ │ │ │ └── main-views
│ │ │ │ │ │ │ └── view-1.json
│ │ │ │ │ └── content-database.json
│ │ │ │ └── view-schemas
│ │ │ │ │ ├── view-schema-1.json
│ │ │ │ │ └── main-views
│ │ │ │ │ └── view-1.json
│ │ │ ├── flexrep-combined
│ │ │ │ ├── databases
│ │ │ │ │ ├── triggers-database.json
│ │ │ │ │ └── content-database.json
│ │ │ │ └── flexrep
│ │ │ │ │ ├── master
│ │ │ │ │ ├── cpf
│ │ │ │ │ │ ├── cpf-configs
│ │ │ │ │ │ │ └── master-cpf-config.json
│ │ │ │ │ │ └── domains
│ │ │ │ │ │ │ └── master-domain.json
│ │ │ │ │ ├── flexrep
│ │ │ │ │ │ └── configs
│ │ │ │ │ │ │ ├── master-config.xml
│ │ │ │ │ │ │ └── master-domain-targets
│ │ │ │ │ │ │ └── master-target.xml
│ │ │ │ │ └── servers
│ │ │ │ │ │ └── master-flexrep-server.xml
│ │ │ │ │ └── replica
│ │ │ │ │ ├── cpf
│ │ │ │ │ ├── cpf-configs
│ │ │ │ │ │ └── replica-cpf-config.json
│ │ │ │ │ └── domains
│ │ │ │ │ │ └── replica-domain.json
│ │ │ │ │ ├── flexrep
│ │ │ │ │ └── configs
│ │ │ │ │ │ ├── replica-config.xml
│ │ │ │ │ │ └── replica-domain-targets
│ │ │ │ │ │ └── replica-target.xml
│ │ │ │ │ └── servers
│ │ │ │ │ └── replica-flexrep-server.xml
│ │ │ ├── flexrep-config
│ │ │ │ ├── databases
│ │ │ │ │ ├── triggers-database.json
│ │ │ │ │ ├── content-database.json
│ │ │ │ │ ├── other-database.json
│ │ │ │ │ └── other-sample-app-content
│ │ │ │ │ │ └── flexrep
│ │ │ │ │ │ ├── pulls
│ │ │ │ │ │ └── test-pull.json
│ │ │ │ │ │ └── configs
│ │ │ │ │ │ ├── flexrep-config-1.xml
│ │ │ │ │ │ └── sample-app-domain-1-targets
│ │ │ │ │ │ └── target-1.xml
│ │ │ │ ├── cpf
│ │ │ │ │ ├── cpf-configs
│ │ │ │ │ │ └── sample-app-cpf-config.json
│ │ │ │ │ └── domains
│ │ │ │ │ │ └── domain-1.json
│ │ │ │ └── flexrep
│ │ │ │ │ └── configs
│ │ │ │ │ ├── flexrep-config-1.xml
│ │ │ │ │ └── sample-app-domain-1-targets
│ │ │ │ │ └── target-1.xml
│ │ │ ├── lots-of-databases
│ │ │ │ ├── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── triggers-database.json
│ │ │ │ │ ├── other-schemas-database.json
│ │ │ │ │ ├── other-triggers-database.json
│ │ │ │ │ ├── content-database.json
│ │ │ │ │ ├── ignored-database.json
│ │ │ │ │ ├── other-content-database.json
│ │ │ │ │ └── more-content-db-config.json
│ │ │ │ └── rest-api.json
│ │ │ ├── other-group
│ │ │ │ ├── groups
│ │ │ │ │ └── sample-app-other-group.json
│ │ │ │ └── servers
│ │ │ │ │ ├── http-server.json
│ │ │ │ │ └── other-http-server.json
│ │ │ ├── partition-queries
│ │ │ │ └── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── sample-app-content
│ │ │ │ │ ├── partitions
│ │ │ │ │ │ ├── partition1.json
│ │ │ │ │ │ └── partition2.json
│ │ │ │ │ └── partition-queries
│ │ │ │ │ │ ├── partition-query2.xml
│ │ │ │ │ │ └── partition-query1.xml
│ │ │ │ │ └── content-database.json
│ │ │ ├── rest-api-other-group
│ │ │ │ ├── groups
│ │ │ │ │ └── group.json
│ │ │ │ └── rest-api.json
│ │ │ ├── tde-validation
│ │ │ │ └── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── content-database.json
│ │ │ │ │ └── sample-app-schemas
│ │ │ │ │ └── schemas
│ │ │ │ │ └── tde
│ │ │ │ │ └── bad-template.json
│ │ │ ├── temporal-config
│ │ │ │ ├── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ └── content-database.json
│ │ │ │ └── temporal
│ │ │ │ │ ├── collections
│ │ │ │ │ └── temporal-collection.json
│ │ │ │ │ └── axes
│ │ │ │ │ ├── temporal-valid-axis.json
│ │ │ │ │ └── temporal-system-axis.json
│ │ │ ├── default-modules-database-config
│ │ │ │ ├── databases
│ │ │ │ │ └── content-database.json
│ │ │ │ └── rest-api.json
│ │ │ ├── uni-temporal-config
│ │ │ │ ├── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ └── content-database.json
│ │ │ │ └── temporal
│ │ │ │ │ ├── collections
│ │ │ │ │ └── uni-temporal-collection.json
│ │ │ │ │ └── axes
│ │ │ │ │ └── temporal-system-axis.json
│ │ │ ├── default-servers
│ │ │ │ └── servers
│ │ │ │ │ ├── manage-server.json
│ │ │ │ │ └── xdbc-server.json
│ │ │ ├── even-more-roles-with-dependencies
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ ├── xyz-reader.json
│ │ │ │ │ ├── abc-login-role.json
│ │ │ │ │ ├── abc-ui-developer.json
│ │ │ │ │ ├── xyz-writer.json
│ │ │ │ │ ├── abc-ui-offline-user.json
│ │ │ │ │ ├── abc-ui-admin.json
│ │ │ │ │ ├── abc-ui-offline-admin.json
│ │ │ │ │ ├── xyz-admin.json
│ │ │ │ │ └── abc-sss-ui-role.json
│ │ │ ├── roles-with-permissions
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ ├── sampleapp-modules.json
│ │ │ │ │ └── sampleapp-install.json
│ │ │ ├── temporal-config-with-lsqt
│ │ │ │ ├── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ ├── other-schemas-database.json
│ │ │ │ │ ├── other-sample-app-content
│ │ │ │ │ │ └── temporal
│ │ │ │ │ │ │ ├── collections
│ │ │ │ │ │ │ ├── lsqt
│ │ │ │ │ │ │ │ └── temporal-collection.json
│ │ │ │ │ │ │ └── temporal-collection.json
│ │ │ │ │ │ │ └── axes
│ │ │ │ │ │ │ ├── temporal-valid-axis.json
│ │ │ │ │ │ │ └── temporal-system-axis.json
│ │ │ │ │ ├── content-database.json
│ │ │ │ │ └── other-database.json
│ │ │ │ └── temporal
│ │ │ │ │ ├── collections
│ │ │ │ │ ├── lsqt
│ │ │ │ │ │ └── temporal-collection.json
│ │ │ │ │ └── temporal-collection.json
│ │ │ │ │ └── axes
│ │ │ │ │ ├── temporal-valid-axis.json
│ │ │ │ │ └── temporal-system-axis.json
│ │ │ ├── dhf-db-ordering
│ │ │ │ └── databases
│ │ │ │ │ ├── final-schemas-database.json
│ │ │ │ │ ├── final-triggers-database.json
│ │ │ │ │ ├── modules-database.json
│ │ │ │ │ └── final-database.json
│ │ │ ├── multiple-config-paths
│ │ │ │ ├── path2
│ │ │ │ │ ├── databases
│ │ │ │ │ │ ├── two-database.json
│ │ │ │ │ │ ├── z-triggers-database.json
│ │ │ │ │ │ ├── subdatabases
│ │ │ │ │ │ │ └── sample-app-one-database
│ │ │ │ │ │ │ │ ├── subdb01.json
│ │ │ │ │ │ │ │ └── subdb02.json
│ │ │ │ │ │ ├── content-database.json
│ │ │ │ │ │ └── another-one-database.json
│ │ │ │ │ ├── security
│ │ │ │ │ │ ├── roles
│ │ │ │ │ │ │ ├── other-role2.json
│ │ │ │ │ │ │ └── other-role1.xml
│ │ │ │ │ │ ├── users
│ │ │ │ │ │ │ └── jane.json
│ │ │ │ │ │ └── privileges
│ │ │ │ │ │ │ └── other-privilege1.json
│ │ │ │ │ └── servers
│ │ │ │ │ │ └── same-server.json
│ │ │ │ └── path1
│ │ │ │ │ ├── databases
│ │ │ │ │ ├── z-schemas-database.json
│ │ │ │ │ ├── other-content-database.json
│ │ │ │ │ └── one-database.json
│ │ │ │ │ ├── security
│ │ │ │ │ ├── roles
│ │ │ │ │ │ ├── role1.json
│ │ │ │ │ │ └── role2.json
│ │ │ │ │ ├── privileges
│ │ │ │ │ │ └── privilege1.json
│ │ │ │ │ └── users
│ │ │ │ │ │ └── xml-jane.xml
│ │ │ │ │ └── servers
│ │ │ │ │ └── server.json
│ │ │ ├── multiple-triggers-databases
│ │ │ │ ├── databases
│ │ │ │ │ ├── triggers-database.json
│ │ │ │ │ ├── other-triggers-database.json
│ │ │ │ │ ├── third-triggers-database.json
│ │ │ │ │ ├── content-database.json
│ │ │ │ │ ├── other-content-database.json
│ │ │ │ │ ├── other-sample-app-triggers
│ │ │ │ │ │ └── triggers
│ │ │ │ │ │ │ └── other-trigger.json
│ │ │ │ │ └── third-triggers-database
│ │ │ │ │ │ └── triggers
│ │ │ │ │ │ └── third-trigger.json
│ │ │ │ └── triggers
│ │ │ │ │ └── my-trigger.json
│ │ │ ├── other-servers
│ │ │ │ └── servers
│ │ │ │ │ ├── rest-api-server.json
│ │ │ │ │ ├── odbc-server.json
│ │ │ │ │ └── xdbc-server.json
│ │ │ ├── tasks-in-child-dir
│ │ │ │ ├── groups
│ │ │ │ │ └── group1-task.json
│ │ │ │ └── tasks
│ │ │ │ │ ├── default-group-task.json
│ │ │ │ │ └── sampleAppGroup1
│ │ │ │ │ └── group1-task.json
│ │ │ ├── more-roles-with-dependencies
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ ├── role0.json
│ │ │ │ │ ├── role2.json
│ │ │ │ │ ├── role1.json
│ │ │ │ │ └── role3.json
│ │ │ ├── rest-api-custom-filename
│ │ │ │ ├── my-custom-rest-api-update.json
│ │ │ │ └── my-custom-rest-api.json
│ │ │ ├── bad-modules
│ │ │ │ └── options
│ │ │ │ │ └── invalid-options.xml
│ │ │ ├── rest-api-different-rewriter
│ │ │ │ ├── servers
│ │ │ │ │ └── rest-api-server.json
│ │ │ │ └── rest-api.json
│ │ │ ├── roles-with-circular-dependencies
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ ├── role0.json
│ │ │ │ │ └── role1.json
│ │ │ ├── databases-in-order
│ │ │ │ └── databases
│ │ │ │ │ ├── database-B.json
│ │ │ │ │ ├── database-C.json
│ │ │ │ │ └── database-A.json
│ │ │ ├── privileges-with-roles
│ │ │ │ └── security
│ │ │ │ │ ├── privileges
│ │ │ │ │ ├── privilege-3.json
│ │ │ │ │ ├── privilege-1.json
│ │ │ │ │ └── privilege-2.xml
│ │ │ │ │ └── roles
│ │ │ │ │ └── sample-app-role1.json
│ │ │ ├── role-with-privilege-config
│ │ │ │ └── security
│ │ │ │ │ ├── privileges
│ │ │ │ │ └── privilege-1.json
│ │ │ │ │ └── roles
│ │ │ │ │ └── sample-app-role1.json
│ │ │ ├── other-modules
│ │ │ │ └── root
│ │ │ │ │ └── other-lib.xqy
│ │ │ ├── host-certificates
│ │ │ │ └── security
│ │ │ │ │ └── certificate-templates
│ │ │ │ │ ├── host-certificates
│ │ │ │ │ └── sample-app-certificate-template
│ │ │ │ │ │ └── README.md
│ │ │ │ │ └── template-1.xml
│ │ │ ├── role-refers-to-itself
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ ├── sample-json-role.json
│ │ │ │ │ └── sample-xml-role.xml
│ │ │ ├── real-amp
│ │ │ │ └── security
│ │ │ │ │ ├── amps
│ │ │ │ │ └── get-host-status.json
│ │ │ │ │ └── users
│ │ │ │ │ └── jane.xml
│ │ │ ├── single-server
│ │ │ │ └── servers
│ │ │ │ │ └── http-server.json
│ │ │ ├── databases-in-order-xml
│ │ │ │ └── databases
│ │ │ │ │ ├── database-B.xml
│ │ │ │ │ ├── database-C.xml
│ │ │ │ │ └── database-A.xml
│ │ │ ├── cma
│ │ │ │ └── configurations
│ │ │ │ │ ├── config1.json
│ │ │ │ │ └── config1.xml
│ │ │ ├── tasks-with-same-path
│ │ │ │ └── tasks
│ │ │ │ │ ├── task-4.json
│ │ │ │ │ ├── task-2.json
│ │ │ │ │ ├── task-1.json
│ │ │ │ │ └── task-3.json
│ │ │ ├── db-only-config
│ │ │ │ └── databases
│ │ │ │ │ └── content-database.json
│ │ │ ├── tasks-disabled
│ │ │ │ └── tasks
│ │ │ │ │ └── disabled-task.json
│ │ │ ├── qbac-json-role
│ │ │ │ └── security
│ │ │ │ │ └── roles
│ │ │ │ │ └── a-qbac-role.json
│ │ │ └── qbac-xml-role
│ │ │ │ └── security
│ │ │ │ └── roles
│ │ │ │ └── a-qbac-xml-role.xml
│ │ ├── schemas-marklogic9
│ │ │ ├── x.tdej
│ │ │ ├── x.tdex
│ │ │ └── to-be-ignored
│ │ │ │ └── test.xml
│ │ ├── non-admin-test
│ │ │ ├── ml-modules
│ │ │ │ └── ext
│ │ │ │ │ └── hello-lib.xqy
│ │ │ └── ml-config
│ │ │ │ └── security
│ │ │ │ ├── users
│ │ │ │ ├── sample-app-rest-admin.json
│ │ │ │ └── sample-app-manage-admin.json
│ │ │ │ └── roles
│ │ │ │ └── sample-app-role.json
│ │ ├── cma-project
│ │ │ ├── databases
│ │ │ │ ├── schema-database.json
│ │ │ │ ├── modules-database.json
│ │ │ │ ├── triggers-database.json
│ │ │ │ └── content-database.json
│ │ │ ├── security
│ │ │ │ ├── query-rolesets
│ │ │ │ │ └── roleset1.json
│ │ │ │ ├── users
│ │ │ │ │ ├── jane.json
│ │ │ │ │ └── john.xml
│ │ │ │ ├── privileges
│ │ │ │ │ ├── privilege1.json
│ │ │ │ │ └── privilege2.json
│ │ │ │ ├── roles
│ │ │ │ │ ├── role3.json
│ │ │ │ │ ├── role1.xml
│ │ │ │ │ └── role2.json
│ │ │ │ ├── amps
│ │ │ │ │ ├── amp-1.json
│ │ │ │ │ └── amp-2.xml
│ │ │ │ └── protected-paths
│ │ │ │ │ └── path-1.json
│ │ │ └── servers
│ │ │ │ ├── http1.json
│ │ │ │ ├── http2.json
│ │ │ │ └── http3.json
│ │ ├── token-test
│ │ │ ├── ml-modules
│ │ │ │ └── root
│ │ │ │ │ └── hello.xqy
│ │ │ └── ml-config
│ │ │ │ └── rest-api.json
│ │ ├── plugin-project
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── ml-plugins
│ │ │ │ └── variance
│ │ │ │ │ └── .gitignore
│ │ │ │ └── ml-config
│ │ │ │ └── databases
│ │ │ │ └── content-database.json
│ │ ├── schemas-project
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── ml-config
│ │ │ │ └── databases
│ │ │ │ │ ├── schemas-database.json
│ │ │ │ │ └── content-database.json
│ │ │ │ ├── more-schemas
│ │ │ │ ├── qbv
│ │ │ │ │ └── example.sjs
│ │ │ │ └── tde
│ │ │ │ │ └── template2.json
│ │ │ │ └── ml-schemas
│ │ │ │ └── tde
│ │ │ │ └── template1.json
│ │ ├── payload-properties-test
│ │ │ ├── json
│ │ │ │ └── ml-config
│ │ │ │ │ └── databases
│ │ │ │ │ └── content-database.json
│ │ │ └── xml
│ │ │ │ └── content-database.xml
│ │ ├── logback.xml
│ │ └── test.properties
│ └── java
│ │ └── com
│ │ └── marklogic
│ │ ├── junit
│ │ ├── README.md
│ │ └── NamespaceProvider.java
│ │ ├── mgmt
│ │ ├── resource
│ │ │ ├── security
│ │ │ │ └── TestManager.java
│ │ │ └── forests
│ │ │ │ └── GetMapOfPrimaryForestsTest.java
│ │ ├── admin
│ │ │ └── AdminManagerTest.java
│ │ └── api
│ │ │ ├── ConnectTest.java
│ │ │ └── AbstractApiTest.java
│ │ └── appdeployer
│ │ ├── command
│ │ ├── security
│ │ │ └── DeployRolesWithDependenciesViaCmaTest.java
│ │ ├── SortOrderConstantsTest.java
│ │ └── admin
│ │ │ └── RequireAtLeastMl8Test.java
│ │ └── cli
│ │ └── DeployerDebug.java
└── main
│ └── java
│ └── com
│ └── marklogic
│ ├── mgmt
│ ├── util
│ │ ├── PropertySource.java
│ │ ├── SystemPropertySource.java
│ │ └── ObjectNodesSorter.java
│ ├── ManageConfigFactory.java
│ ├── admin
│ │ ├── ActionRequiringRestart.java
│ │ └── AdminConfigFactory.java
│ ├── selector
│ │ ├── ResourceSelector.java
│ │ ├── PrefixResourceSelector.java
│ │ └── RegexResourceSelector.java
│ ├── template
│ │ ├── TemplateBuilder.java
│ │ ├── security
│ │ │ └── RoleTemplateBuilder.java
│ │ └── group
│ │ │ └── GroupTemplateBuilder.java
│ ├── resource
│ │ ├── cpf
│ │ │ ├── DomainManager.java
│ │ │ └── CpfConfigManager.java
│ │ ├── security
│ │ │ ├── UserManager.java
│ │ │ ├── SecureCredentialsManager.java
│ │ │ └── PrivilegeManager.java
│ │ └── hosts
│ │ │ └── HostNameProvider.java
│ ├── api
│ │ ├── server
│ │ │ ├── HttpServer.java
│ │ │ ├── OdbcServer.java
│ │ │ ├── XdbcServer.java
│ │ │ ├── package-info.java
│ │ │ ├── ManageServer.java
│ │ │ ├── UsingNamespace.java
│ │ │ └── AppServicesServer.java
│ │ ├── forest
│ │ │ └── package-info.java
│ │ ├── group
│ │ │ └── package-info.java
│ │ ├── mimetypes
│ │ │ └── package-info.java
│ │ ├── security
│ │ │ ├── package-info.java
│ │ │ ├── queryroleset
│ │ │ │ └── package-info.java
│ │ │ └── protectedpath
│ │ │ │ └── package-info.java
│ │ ├── trigger
│ │ │ ├── DocumentScope.java
│ │ │ ├── package-info.java
│ │ │ ├── CollectionScope.java
│ │ │ ├── PropertyContent.java
│ │ │ └── DirectoryScope.java
│ │ └── database
│ │ │ ├── package-info.java
│ │ │ ├── DefaultRuleset.java
│ │ │ ├── IncludedElement.java
│ │ │ ├── FieldIndex.java
│ │ │ └── PathIndex.java
│ ├── mapper
│ │ └── ResourceMapper.java
│ └── DeleteReceipt.java
│ ├── appdeployer
│ ├── AppConfigFactory.java
│ ├── cli
│ │ └── CommandArray.java
│ ├── command
│ │ ├── ResourceDirFinder.java
│ │ ├── databases
│ │ │ ├── DefaultDeployDatabaseCommandFactory.java
│ │ │ └── DeployDatabaseCommandFactory.java
│ │ ├── modules
│ │ │ ├── ModulesLoaderFactory.java
│ │ │ └── AssetModulesFinder.java
│ │ ├── ResourceFileManager.java
│ │ ├── IncrementalFilenameFilter.java
│ │ ├── PayloadTokenReplacer.java
│ │ ├── AbstractUndoableCommand.java
│ │ └── forests
│ │ │ └── DefaultForestNamingStrategy.java
│ ├── util
│ │ └── SimplePropertiesSource.java
│ └── export
│ │ └── ResourceExporter.java
│ └── rest
│ └── util
│ ├── HttpClientBuilderConfigurer.java
│ └── configurer
│ └── UseSystemPropertiesConfigurer.java
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── CODEOWNERS
├── .editorconfig
├── .gitignore
├── README.md
└── gradle.properties
/src/test/resources/sample-app/src/main/ml-schemas/.do-not-load:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/test/resources/schemas-marklogic9/x.tdej:
--------------------------------------------------------------------------------
1 | { "template": {} }
--------------------------------------------------------------------------------
/src/test/resources/schemas-marklogic9/x.tdex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/test/resources/schemas-marklogic9/to-be-ignored/test.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-modules/ext/lib/test2.xqy:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-data/child/test3.txt:
--------------------------------------------------------------------------------
1 | Hello world.
2 |
--------------------------------------------------------------------------------
/src/test/resources/non-admin-test/ml-modules/ext/hello-lib.xqy:
--------------------------------------------------------------------------------
1 | world
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-data/child/test2.xml:
--------------------------------------------------------------------------------
1 | world
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/more-data/test4.json:
--------------------------------------------------------------------------------
1 | {
2 | "more": "data"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/static-check-modules/ext/bad.xqy:
--------------------------------------------------------------------------------
1 | let $x :=
2 | return ()
3 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/cluster-test/clusters/local-cluster.json:
--------------------------------------------------------------------------------
1 | {"ssl-fips-enabled":false}
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-data/test1.json:
--------------------------------------------------------------------------------
1 | {
2 | "hello": "%%TOKEN_TEST%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-schema-databases/ml-schemas/default-schema.xsd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-schemas/x.xsd:
--------------------------------------------------------------------------------
1 |
2 | %%replaceMe%%
3 |
4 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/databases/schema-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/default-databases/databases/fab-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "Fab"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/token-test/ml-modules/root/hello.xqy:
--------------------------------------------------------------------------------
1 |
2 | %%sample-token%%
3 |
4 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/databases/modules-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%MODULES_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/plugin-project/src/main/ml-plugins/variance/.gitignore:
--------------------------------------------------------------------------------
1 | *.dylib
2 | *.o
3 | *.zip
4 | manifest.xml
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/custom-forests/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-data/child/collections.properties:
--------------------------------------------------------------------------------
1 | test2.xml=xml-data
2 | test3.txt=text-data
3 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/users-to-not-undeploy/security/users/nobody-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name": "nobody"
3 | }
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic/ml-app-deployer/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/databases/other-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partitions/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-dependencies/security/roles/role3.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role3"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-data/child/permissions.properties:
--------------------------------------------------------------------------------
1 | test3.txt=%%roleName%%,read,%%roleName%%,update
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/default-databases/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-schema-databases/ml-config/databases/sample-app-schemas1/schemas/schema1.xsd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-schema-databases/ml-config/databases/sample-app-schemas2/schemas/schema2.xsd:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-group/groups/sample-app-other-group.json:
--------------------------------------------------------------------------------
1 | {
2 | "group-name": "sample-app-other-group"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partition-queries/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/rest-api-other-group/groups/group.json:
--------------------------------------------------------------------------------
1 | {
2 | "group-name": "ml-app-deployer-other-group"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tde-validation/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/default-modules-database-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/uni-temporal-config/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/schemas-project/src/main/ml-config/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/default-servers/servers/manage-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "Manage",
3 | "server-type": "http"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/xyz-reader.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "xyz-reader"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/other-schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-sample-app-schemas"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-permissions/security/roles/sampleapp-modules.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "sampleapp-modules"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%SCHEMAS_DATABASE%%"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/query-rolesets/roleset1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": [
3 | "view-admin",
4 | "flexrep-user"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/dhf-db-ordering/databases/final-schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%mlFinalSchemasDbName%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/dhf-db-ordering/databases/final-triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%mlFinalTriggersDbName%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/abc-login-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "abc-login-role"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/other-triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-sample-app-triggers"
3 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/databases/two-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-two-database"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%TRIGGERS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/abc-ui-developer.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "abc-ui-developer"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-servers/servers/rest-api-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%",
3 | "authentication": "basic"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-in-child-dir/groups/group1-task.json:
--------------------------------------------------------------------------------
1 | {
2 | "group-name": "sampleAppGroup1",
3 | "metering-enabled": false
4 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/databases/z-schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-schema-database"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/databases/z-triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-triggers-database"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-schema-databases/ml-config/databases/sample-app-schemas1.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-schemas1"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-schema-databases/ml-config/databases/sample-app-schemas2.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-schemas2"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/groups/sample-app-group.json:
--------------------------------------------------------------------------------
1 | {
2 | "group-name": "sample-app-group",
3 | "metering-enabled": false
4 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/servers/rest-api-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%",
3 | "authentication": "basic"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-schemas-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%SCHEMAS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/other-triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%TRIGGERS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/third-triggers-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "third-%%TRIGGERS_DATABASE%%"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/more-roles-with-dependencies/security/roles/role0.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "more-roles-role0",
3 | "role" : [ "app-user" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/query-rolesets/queryset-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": [
3 | "view-admin",
4 | "flexrep-user"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-modules/ext/lib/test.xqy:
--------------------------------------------------------------------------------
1 |
2 | @ml.COLOR
3 | @ml.DESCRIPTION
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%"
4 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/more-roles-with-dependencies/security/roles/role2.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "more-roles-role2",
3 | "role" : [ "more-roles-role0"]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/rest-api-custom-filename/my-custom-rest-api-update.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "my-custom-rest-api",
3 | "default-error-format": "json"
4 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/mimetypes/ditamap.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"application/ditamap+xml",
3 | "extension":["ditamap"],
4 | "format":"xml"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/users-to-not-undeploy/security/users/custom-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name": "ml-app-deployer-test-user",
3 | "password": "changeme"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%"
4 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/more-roles-with-dependencies/security/roles/role1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "more-roles-role1",
3 | "role" : [ "more-roles-role3" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/more-roles-with-dependencies/security/roles/role3.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "more-roles-role3",
3 | "role" : [ "more-roles-role0" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/security/roles/role1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role1",
3 | "role": [
4 | "rest-reader"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/security/roles/role2.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role2",
3 | "role": [
4 | "rest-writer"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tde-validation/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name" : "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/databases/other-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/bad-modules/options/invalid-options.xml:
--------------------------------------------------------------------------------
1 |
2 | invalid
3 |
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/databases/other-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%DATABASE%%",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/rest-api-different-rewriter/servers/rest-api-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%",
3 | "url-rewriter": "/my/custom/rewriter.xml"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/xyz-writer.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "xyz-writer",
3 | "role" : [ "xyz-reader", "app-user" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/databases/subdatabases/sample-app-one-database/subdb01.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-one-database-subdb01"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/databases/subdatabases/sample-app-one-database/subdb02.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-one-database-subdb02"
3 | }
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/security/roles/other-role2.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role2",
3 | "role": [
4 | "sample-app-role1"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-circular-dependencies/security/roles/role0.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role0",
3 | "role": [
4 | "sample-app-role1"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-circular-dependencies/security/roles/role1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role1",
3 | "role": [
4 | "sample-app-role0"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/schemas-project/src/main/ml-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/credentials/credentials-aws.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "aws",
3 | "access-key": "AWS-ACCESS-KEY",
4 | "secret-key": "SECRET-KEY"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/task-servers/task-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "threads": 32,
3 | "log-errors": false,
4 | "debug-allow": false,
5 | "profile-allow": false
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/users/jane.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name":"sample-app-jane",
3 | "password": "password",
4 | "role": [
5 | "manage-user", "sample-app-role2"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/databases-in-order/databases/database-B.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%NAME%%-B",
3 | "schema-database": "%%NAME%%-C",
4 | "triggers-database": "Triggers"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/databases-in-order/databases/database-C.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%NAME%%-C",
3 | "schema-database": "Schemas",
4 | "triggers-database": "Triggers"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/dhf-db-ordering/databases/modules-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%mlModulesDbName%%",
3 | "collection-lexicon": true,
4 | "uri-lexicon": true
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/abc-ui-offline-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "abc-ui-offline-user",
3 | "role" : [ "abc-sss-ui-role" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/forests/content-forest.json:
--------------------------------------------------------------------------------
1 | {
2 | "forest-name": "%%FOREST_NAME%%",
3 | "host": "%%FOREST_HOST%%",
4 | "database": "%%DATABASE%%"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/databases-in-order/databases/database-A.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%NAME%%-A",
3 | "schema-database": "%%NAME%%-C",
4 | "triggers-database": "%%NAME%%-B"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/abc-ui-admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "abc-ui-admin",
3 | "role" : [ "abc-ui-offline-admin", "flexrep-admin" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/abc-ui-offline-admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "abc-ui-offline-admin",
3 | "role" : [ "abc-ui-offline-user" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/xyz-admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "xyz-admin",
3 | "role" : [ "xyz-reader", "xyz-writer", "qconsole-user" ]
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-dependencies/security/roles/role1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role1",
3 | "role": [
4 | "sample-app-role2",
5 | "sample-app-role3"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/payload-properties-test/json/ml-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "triggers-database": "Triggers",
4 | "triple-index" : "false"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/security/users/jane.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name":"sample-app-jane",
3 | "password": "password",
4 | "role": [
5 | "manage-user"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/other-content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%DATABASE%%",
3 | "triggers-database": "other-%%TRIGGERS_DATABASE%%"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/privileges/privilege-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-2",
3 | "action": "urn:sample-app:privilege:2",
4 | "kind":"execute"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config/temporal/collections/temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection-name": "temporal-collection",
3 | "system-axis": "system",
4 | "valid-axis": "valid"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/users-to-not-undeploy/security/roles/testRole.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "ml-app-deployer-test-role",
3 | "description": "This is here to make sure we can delete it"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/schemas-project/src/main/more-schemas/qbv/example.sjs:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const op = require('/MarkLogic/optic');
3 | op.fromView('Example2', 'default').generateView('qbv', 'example')
4 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%",
4 | "triggers-database": "%%TRIGGERS_DATABASE%%"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/privileges/privilege-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-1",
3 | "action": "urn:sample-app:privilege:1",
4 | "kind":"execute"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/roles/sample-app-role2.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-role2
3 |
4 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/users/john.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name":"sample-app-john",
3 | "password": "password",
4 | "description": "CUSTOM_TOKEN_FOR_JOHN_DESCRIPTION"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/temporal/collections/temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection-name": "temporal-collection",
3 | "system-axis": "system",
4 | "valid-axis": "valid"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/non-admin-test/ml-config/security/users/sample-app-rest-admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name" : "sample-app-rest-admin",
3 | "password" : "sample-app-rest-admin",
4 | "role" : [ "sample-app-role" ]
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/custom-forests/forests/sample-app-content/single-custom-forest.json:
--------------------------------------------------------------------------------
1 | {
2 | "forest-name": "sample-app-content-custom-3",
3 | "enabled": true,
4 | "database": "%%DATABASE%%"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/privileges-with-roles/security/privileges/privilege-3.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name": "sample-app-execute-3",
3 | "action": "urn:sample-app:privilege:3",
4 | "kind": "execute"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/role-with-privilege-config/security/privileges/privilege-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-1",
3 | "action": "urn:sample-app:privilege:1",
4 | "kind":"execute"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/temporal/collections/lsqt/temporal-collection-lsqt.json:
--------------------------------------------------------------------------------
1 | {
2 | "lsqt-enabled": true,
3 | "automation": {
4 | "enabled": true,
5 | "period": 5000
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/temporal/collections/lsqt/temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "lsqt-enabled": true,
3 | "automation": {
4 | "enabled": true,
5 | "period": 5000
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/temporal/collections/temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection-name": "temporal-collection",
3 | "system-axis": "system",
4 | "valid-axis": "valid"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/uni-temporal-config/temporal/collections/uni-temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection-name": "uni-temporal-collection",
3 | "system-axis": "system",
4 | "option": ["updates-safe"]
5 | }
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/privileges/privilege1.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-1",
3 | "action": "sample-app-execute-1",
4 | "kind":"execute",
5 | "role": [
6 | "rest-reader"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/privileges/privilege2.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-2",
3 | "action": "sample-app-execute-2",
4 | "kind":"execute",
5 | "role": [
6 | "rest-reader"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/roles/role3.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role3",
3 | "permission": [
4 | {
5 | "role-name": "sample-app-role3",
6 | "capability": "read"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%",
4 | "schema-database": "%%SCHEMAS_DATABASE%%"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/roles/sample-app-role1.json:
--------------------------------------------------------------------------------
1 | {
2 | /* Test */
3 | "role-name": "sample-app-role1"
4 | // Another test
5 |
6 | /* Even more
7 |
8 |
9 | testing */
10 | }
11 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Lines starting with '#' are comments.
2 | # Each line is a file pattern followed by one or more owners.
3 |
4 | # These owners will be the default owners for everything in the repo.
5 | * @anu3990 @billfarber @rjrudin
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/ignored-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "ignored-content",
3 | "triggers-database": "other-sample-app-triggers",
4 | "schema-database": "other-sample-app-schemas"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/roles/role1.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-role1
3 |
4 | manage-user
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/test/resources/non-admin-test/ml-config/security/users/sample-app-manage-admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name" : "sample-app-manage-admin",
3 | "password" : "sample-app-manage-admin",
4 | "role" : [ "manage-admin", "rest-admin"]
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/users-to-not-undeploy/security/roles/admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "admin",
3 | "description": "Not clear why someone would try to modify this role, but just in case, we don't want to delete it on undeploy"
4 | }
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/other-content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-sample-app-content",
3 | "triggers-database": "other-sample-app-triggers",
4 | "schema-database": "other-sample-app-schemas"
5 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-modules/root/other-lib.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace other = "urn:sampleapp:other";
4 |
5 | declare function hello($str as xs:string?) as xs:string
6 | {
7 | "Hello: " || $str
8 | };
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "lsqt-enabled": true,
3 | "automation": {
4 | "enabled": true,
5 | "period": 5000
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/temporal-collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection-name": "temporal-collection",
3 | "system-axis": "system",
4 | "valid-axis": "valid"
5 | }
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/security/privileges/privilege1.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-1",
3 | "action": "urn:sample-app:privilege:1",
4 | "kind":"execute",
5 | "role": [
6 | "rest-reader"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/host-certificates/security/certificate-templates/host-certificates/sample-app-certificate-template/README.md:
--------------------------------------------------------------------------------
1 | The host2.marklogic.com.crt file exists to verify that no error occurs when a corresponding
2 | key file cannot be found.
3 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/security/privileges/other-privilege1.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name":"sample-app-execute-1",
3 | "action": "urn:sample-app:privilege:1",
4 | "kind":"execute",
5 | "role": [
6 | "manage-user"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/role-refers-to-itself/security/roles/sample-json-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-json-role",
3 | "permission": [
4 | {
5 | "role-name": "sample-app-json-role",
6 | "capability": "read"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-dependencies/security/roles/role2.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-role2
3 |
4 | sample-app-role3
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-dependencies/security/roles/role5.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role5",
3 | "role": [
4 | "sample-app-role1",
5 | "sample-app-role2",
6 | "sample-app-role3",
7 | "sample-app-role4"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/junit/README.md:
--------------------------------------------------------------------------------
1 | The classes in this package were copied from the rjrudin/ml-junit repository so that this project no longer
2 | needs to depend on the deprecated com.marklogic:ml-junit library which will not be published to Maven Central.
3 |
--------------------------------------------------------------------------------
/src/test/resources/payload-properties-test/xml/content-database.xml:
--------------------------------------------------------------------------------
1 |
2 | %%DATABASE%%
3 | %%TRIGGERS_DATABASE%%
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/security/roles/other-role1.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-role1
3 |
4 | manage-user
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/amps/amp-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "namespace": "org:example",
3 | "local-name": "function1",
4 | "document-uri": "/module/path/name1",
5 | "modules-database": "%%MODULES_DATABASE%%",
6 | "role": [
7 | "rest-reader"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/real-amp/security/amps/get-host-status.json:
--------------------------------------------------------------------------------
1 | {
2 | "namespace": "urn:sampleapp",
3 | "local-name": "get-host-status",
4 | "document-uri": "/ext/sample-lib.xqy",
5 | "modules-database": "%%MODULES_DATABASE%%",
6 | "role": ["admin"]
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/amps/amp-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "namespace": "http://example.com/uri",
3 | "local-name": "ml-app-deployer-test-1",
4 | "document-uri": "/module/path/name",
5 | "modules-database": "Modules",
6 | "role": ["app-user"]
7 | }
8 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/protected-collections/collection-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "sample-app-collection#stuff",
3 | "permission": [
4 | {
5 | "role-name": "view-admin",
6 | "capability": "read"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-dependencies/security/roles/role0.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role0",
3 | "role": [
4 | "sample-app-role1",
5 | "sample-app-role2",
6 | "sample-app-role3",
7 | "sample-app-role4",
8 | "sample-app-role5"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Mar 22 14:27:38 EDT 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
7 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/servers/http1.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-server1",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "Default",
6 | "port": 8041,
7 | "modules-database": "%%MODULES_DATABASE%%",
8 | "content-database": "%%DATABASE%%"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/servers/http2.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-server2",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "Default",
6 | "port": 8042,
7 | "modules-database": "%%MODULES_DATABASE%%",
8 | "content-database": "%%DATABASE%%"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/servers/http3.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-server3",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "Default",
6 | "port": 8043,
7 | "modules-database": "%%MODULES_DATABASE%%",
8 | "content-database": "%%DATABASE%%"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/alert/configs/my-alert-config-actions/my-alert-action.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xdmp:log2",
3 | "description": "log to ErrorLog.txt1",
4 | "module": "/alert-action.xqy",
5 | "module-db": "Modules",
6 | "module-root": "/",
7 | "option": []
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/alert/configs/my-alert-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "uri": "my-alert-config",
3 | "name": "My Alerting App",
4 | "description": "Alerting config for my app",
5 | "trigger": [],
6 | "domain": [],
7 | "action": [],
8 | "option": []
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/privileges-with-roles/security/privileges/privilege-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "privilege-name": "sample-app-execute-1",
3 | "action": "urn:sample-app:privilege:1",
4 | "kind": "execute",
5 | "role": [
6 | "sample-app-role1",
7 | "manage-user"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/security/users/xml-jane.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-jane
3 | password
4 |
5 | rest-reader
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/users/john.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-john
3 | password
4 |
5 | rest-reader
6 | sample-app-role1
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/default-servers/servers/xdbc-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%-xdbc",
3 | "server-type": "xdbc",
4 | "root": "/",
5 | "group-name": "%%GROUP%%",
6 | "port": 8049,
7 | "modules-database": "Modules",
8 | "content-database": "Documents"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-servers/servers/odbc-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%-odbc",
3 | "server-type": "odbc",
4 | "root": "/",
5 | "group-name": "%%GROUP%%",
6 | "port": 8048,
7 | "modules-database": "Modules",
8 | "content-database": "Documents"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-servers/servers/xdbc-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%-xdbc",
3 | "server-type": "xdbc",
4 | "root": "/",
5 | "group-name": "%%GROUP%%",
6 | "port": 8049,
7 | "modules-database": "Modules",
8 | "content-database": "Documents"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partition-queries/databases/sample-app-content/partitions/partition1.json:
--------------------------------------------------------------------------------
1 | {
2 | "partition-name": "tier1",
3 | "partition-number": "1",
4 | "forests-per-host": 1,
5 | "host": [
6 | "mlHostName1"
7 | ],
8 | "option": [
9 | "failover=none"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partition-queries/databases/sample-app-content/partitions/partition2.json:
--------------------------------------------------------------------------------
1 | {
2 | "partition-name": "tier2",
3 | "partition-number": "2",
4 | "forests-per-host": 1,
5 | "host": [
6 | "mlHostName1"
7 | ],
8 | "option": [
9 | "failover=none"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-group/servers/http-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-other-server",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "Default",
6 | "port": 8048,
7 | "modules-database": "Modules",
8 | "content-database": "Documents"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/privileges-with-roles/security/roles/sample-app-role1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role1",
3 | "privilege": [
4 | {
5 | "privilege-name": "sample-app-execute-1",
6 | "action": "urn:sample-app:privilege:1",
7 | "kind": "execute"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/single-server/servers/http-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%-http",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "%%GROUP%%",
6 | "port": %%HTTP_PORT%%,
7 | "modules-database": "Modules",
8 | "content-database": "Documents"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/servers/odbc-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "%%NAME%%-odbc",
3 | "server-type": "odbc",
4 | "root": "/",
5 | "group-name": "%%GROUP%%",
6 | "port": 8048,
7 | "modules-database": "Modules",
8 | "content-database": "%%DATABASE%%"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/even-more-roles-with-dependencies/security/roles/abc-sss-ui-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "abc-sss-ui-role",
3 | "role" : [ "xyz-reader", "xyz-writer" ],
4 | "permission": [
5 | {
6 | "role-name": "abc-sss-ui-role",
7 | "capability": "read"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/roles/role2.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role2",
3 | "role": [
4 | "sample-app-role1"
5 | ],
6 | "privilege": [
7 | {
8 | "privilege-name": "sample-app-execute-1",
9 | "action": "sample-app-execute-1",
10 | "kind": "execute"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/role-with-privilege-config/security/roles/sample-app-role1.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "sample-app-role1",
3 | "privilege": [
4 | {
5 | "privilege-name": "sample-app-execute-1",
6 | "action": "urn:sample-app:privilege:1",
7 | "kind":"execute"
8 | }
9 | ]
10 | }
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = tab
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [*.java]
16 | indent_size = 4
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/other-group/servers/other-http-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-other-server",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "sample-app-other-group",
6 | "port": 8049,
7 | "modules-database": "Modules",
8 | "content-database": "Documents"
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/databases/other-sample-app-content/alert/configs/other-alert-config-actions/other-alert-action.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xdmp:log3",
3 | "description": "log to ErrorLog.txt1",
4 | "module": "/alert-action.xqy",
5 | "module-db": "Modules",
6 | "module-root": "/",
7 | "option": []
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/databases-in-order-xml/databases/database-B.xml:
--------------------------------------------------------------------------------
1 |
2 | %%NAME%%-B
3 | Triggers
4 | %%NAME%%-C
5 |
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/databases-in-order-xml/databases/database-C.xml:
--------------------------------------------------------------------------------
1 |
2 | %%NAME%%-C
3 | Triggers
4 | Schemas
5 |
6 |
--------------------------------------------------------------------------------
/src/test/resources/token-test/ml-config/rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "%%NAME%%",
4 | "group": "%%GROUP%%",
5 | "database": "%%DATABASE%%",
6 | "modules-database": "%%MODULES_DATABASE%%",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": %%xdbcEnabled%%,
9 | "error-format": "json"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/databases/other-sample-app-content/alert/configs/other-alert-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "uri": "other-alert-config",
3 | "name": "Other Alerting App",
4 | "description": "Alerting config for other app",
5 | "trigger": [],
6 | "domain": [],
7 | "action": [],
8 | "option": []
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/databases-in-order-xml/databases/database-A.xml:
--------------------------------------------------------------------------------
1 |
2 | %%NAME%%-A
3 | %%NAME%%-B
4 | %%NAME%%-C
5 |
6 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "%%NAME%%",
4 | "group": "%%GROUP%%",
5 | "database": "%%DATABASE%%",
6 | "modules-database": "%%MODULES_DATABASE%%",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": true,
9 | "error-format": "json"
10 | }
11 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-dependencies/security/roles/role4.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-role4
3 |
4 | sample-app-role1
5 | sample-app-role2
6 | sample-app-role3
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/users/jane.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name":"sample-app-jane",
3 | "password": "password",
4 | "description": "temporal-admin is granted so the user can hit /v1/eval, as that grants the xdbc-eval privilege",
5 | "role": ["rest-reader", "rest-extension-user", "temporal-admin"]
6 | }
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/view-schemas/view-schema-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "view-schema-name": "main",
3 | "permission": [
4 | {
5 | "role-name": "rest-reader",
6 | "capability": "read"
7 | },
8 | {
9 | "role-name": "rest-writer",
10 | "capability": "update"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/credentials/credentials-azure.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AZURE-STORAGE-ACCOUNT
4 | STORAGE-KEY
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/custom-forests/forests/sample-app-content/custom-forests.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "forest-name": "sample-app-content-custom-1",
4 | "enabled": true,
5 | "database": "%%DATABASE%%"
6 | },
7 | {
8 | "forest-name": "sample-app-content-custom-2",
9 | "enabled": true,
10 | "database": "%%DATABASE%%"
11 | }
12 | ]
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/default-modules-database-config/rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "%%NAME%%",
4 | "group": "%%GROUP%%",
5 | "database": "%%DATABASE%%",
6 | "modules-database": "%%MODULES_DATABASE%%",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": true,
9 | "error-format": "json"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-modules/ext/sample-lib.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace sample = "urn:sampleapp";
4 |
5 | declare function echo($str as xs:string?) as xs:string
6 | {
7 | "You said: " || $str
8 | };
9 |
10 | declare function get-host-status()
11 | {
12 | xdmp:host-status(xdmp:host())
13 | };
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/databases/other-sample-app-content/flexrep/pulls/test-pull.json:
--------------------------------------------------------------------------------
1 | {
2 | "pull-name": "docs2go",
3 | "domain-id": "%%flexrep-domains-id-sample-app-domain-1%%",
4 | "target-id": "%%flexrep-targets-id-sample-app-domain-1-target%%",
5 | "enabled": true,
6 | "url": [
7 | "http://localhost:8076"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/dhf-db-ordering/databases/final-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%mlFinalDbName%%",
3 | "range-element-index": [],
4 | "schema-database": "%%mlFinalSchemasDbName%%",
5 | "triggers-database": "%%mlFinalTriggersDbName%%",
6 | "triple-index": true,
7 | "collection-lexicon": true,
8 | "uri-lexicon": true
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/cpf/cpf-configs/sample-app-cpf-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "sample-app-domain-1",
3 | "restart-user-name": "admin",
4 | "eval-module": "Modules",
5 | "eval-root": "/",
6 | "conversion-enabled": false,
7 | "permission": [{
8 | "role-name": "app-user",
9 | "capability": "read"
10 | }]
11 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/amps/amp-2.xml:
--------------------------------------------------------------------------------
1 |
2 | ml-app-deployer-test-2
3 | /module/path/name2
4 | http://example.com/uri
5 |
6 | app-user
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/master/cpf/cpf-configs/master-cpf-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "master-domain",
3 | "restart-user-name": "admin",
4 | "eval-module": "Modules",
5 | "eval-root": "/",
6 | "conversion-enabled": false,
7 | "permission": [{
8 | "role-name": "app-user",
9 | "capability": "read"
10 | }]
11 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/databases/other-sample-app-content/view-schemas/view-schema-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "view-schema-name": "main",
3 | "permission": [
4 | {
5 | "role-name": "rest-reader",
6 | "capability": "read"
7 | },
8 | {
9 | "role-name": "rest-writer",
10 | "capability": "update"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/cma/configurations/config1.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ml-app-deployer-test-config",
3 | "config": [
4 | {
5 | "forest": [
6 | {
7 | "forest-name": "cma-test-f1"
8 | },
9 | {
10 | "forest-name": "cma-test-f2"
11 | },
12 | {
13 | "forest-name": "cma-test-f3"
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/replica/cpf/cpf-configs/replica-cpf-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "replica-domain",
3 | "restart-user-name": "admin",
4 | "eval-module": "Modules",
5 | "eval-root": "/",
6 | "conversion-enabled": false,
7 | "permission": [{
8 | "role-name": "app-user",
9 | "capability": "read"
10 | }]
11 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "%%NAME%%",
4 | "group": "%%GROUP%%",
5 | "database": "%%DATABASE%%",
6 | "modules-database": "%%MODULES_DATABASE%%",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": true,
9 | "forests-per-host": 3,
10 | "error-format": "json"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/plugin-project/src/main/ml-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "range-element-index": [
4 | {
5 | "collation": "",
6 | "invalid-values": "reject",
7 | "localname": "amount",
8 | "namespace-uri": "",
9 | "range-value-positions": false,
10 | "scalar-type": "double"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-with-same-path/tasks/task-4.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/query.xqy",
4 | "task-root":"/differentPath",
5 | "task-type":"weekly",
6 | "task-period":3,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Modules",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config/temporal/axes/temporal-valid-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "valid",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "validStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "validEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | .gradle
3 | .settings
4 | /build/
5 | /out/
6 | .project
7 | .classpath
8 | .idea
9 | src/test/resources/user.properties
10 | setenv.bat
11 | src/test/resources/scaffold-test/
12 | .DS_Store
13 | src/test/resources/entity-services-project/src
14 | *.iml
15 | target
16 | gradle-local.properties
17 | snyk
18 | .vscode
19 | src/test/resources/sample-app/build
20 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/rest-api-different-rewriter/rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "%%NAME%%",
4 | "group": "%%GROUP%%",
5 | "database": "%%DATABASE%%",
6 | "modules-database": "%%MODULES_DATABASE%%",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": true,
9 | "forests-per-host": 1,
10 | "error-format": "json"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/role-refers-to-itself/security/roles/sample-xml-role.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-xml-role
3 |
4 |
5 | sample-app-xml-role
6 | read
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/temporal/axis/temporal-valid-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "valid",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "validStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "validEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config/temporal/axes/temporal-system-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "system",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "systemStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "systemEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/uni-temporal-config/temporal/axes/temporal-system-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "system",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "systemStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "systemEnd"
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/amps/amp-2.xml:
--------------------------------------------------------------------------------
1 |
2 | function2
3 | /module/path/name2
4 | org:example
5 | %%MODULES_DATABASE%%
6 |
7 | rest-writer
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/cma-project/security/protected-paths/path-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "path-expression": "/test:element",
3 | "path-namespace": [
4 | {
5 | "prefix": "test",
6 | "namespace-uri": "http://marklogic.com"
7 | }
8 | ],
9 | "permission": [
10 | {
11 | "role-name": "view-admin",
12 | "capability": "read"
13 | }
14 | ],
15 | "path-set": "the path set"
16 | }
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/temporal/axis/temporal-system-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "system",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "systemStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "systemEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/temporal/axes/temporal-valid-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "valid",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "validStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "validEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/rest-api-custom-filename/my-custom-rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "my-custom-rest-api",
4 | "group": "%%GROUP%%",
5 | "database": "my-custom-content",
6 | "modules-database": "my-custom-modules",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": true,
9 | "forests-per-host": 1,
10 | "error-format": "xml"
11 | }
12 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/rest-api-other-group/rest-api.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-api": {
3 | "name": "%%NAME%%",
4 | "group": "ml-app-deployer-other-group",
5 | "database": "%%DATABASE%%",
6 | "modules-database": "%%MODULES_DATABASE%%",
7 | "port": "%%PORT%%",
8 | "xdbc-enabled": true,
9 | "forests-per-host": 1,
10 | "error-format": "json"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/cpf/domains/domain-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "sample-app-domain-1",
3 | "description": "Test domain for sample app",
4 | "scope": "directory",
5 | "uri": "/sample-app-1/",
6 | "depth": "infinity",
7 | "eval-module": "%%MODULES_DATABASE%%",
8 | "eval-root": "/",
9 | "pipeline":["sample-app-pipeline-1"]
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-with-same-path/tasks/task-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/query.xqy",
4 | "task-root":"/",
5 | "task-type":"weekly",
6 | "task-period":2,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Modules",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/temporal/axes/temporal-system-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "system",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "systemStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "systemEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/db-only-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
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 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/cpf/domains/domain-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "sample-app-domain-1",
3 | "description": "Test domain for sample app",
4 | "scope": "directory",
5 | "uri": "/sample-app-1/",
6 | "depth": "infinity",
7 | "eval-module": "Modules",
8 | "eval-root": "/",
9 | "pipeline": ["Status Change Handling", "Flexible Replication"]
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/tasks/task-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/query.xqy",
4 | "task-root":"/",
5 | "task-type":"weekly",
6 | "task-period":2,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Documents",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-with-same-path/tasks/task-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/query.xqy",
4 | "task-root":"/",
5 | "task-type":"weekly",
6 | "task-period":2,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Documents",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-with-same-path/tasks/task-3.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/query.xqy",
4 | "task-root":"/differentPath",
5 | "task-type":"weekly",
6 | "task-period":2,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Modules",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partitions/databases/sample-app-content/partitions/partition2.xml:
--------------------------------------------------------------------------------
1 |
2 | myDate-2012
3 | 2012-01-01
4 | 2012-12-31
5 | 1
6 |
7 | mlHostName1
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/real-amp/security/users/jane.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-jane
3 | password
4 |
5 | rest-admin
6 |
7 | temporal-admin
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/cpf/cpf-configs/sample-app-cpf-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "sample-app-domain-1",
3 | "restart-user-name": "admin",
4 | "eval-module": "%%MODULES_DATABASE%%",
5 | "eval-root": "/",
6 | "conversion-enabled": false,
7 | "permission": [{
8 | "role-name": "app-user",
9 | "capability": "read"
10 | }]
11 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/master/cpf/domains/master-domain.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "master-domain",
3 | "description": "Test domain for sample app",
4 | "scope": "directory",
5 | "uri": "/master/",
6 | "depth": "infinity",
7 | "eval-module": "Modules",
8 | "eval-root": "/",
9 | "pipeline": ["Status Change Handling", "Flexible Replication"]
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/servers/server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-server",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "Default",
6 | "port": 8048,
7 | "modules-database": "Modules",
8 | "content-database": "Modules",
9 | "namespace": [
10 | {
11 | "prefix": "test1",
12 | "namespace-uri": "test1"
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/protected-paths/path-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "path-expression": "/test:element",
3 | "path-namespace": [
4 | {
5 | "prefix": "test",
6 | "namespace-uri": "http://marklogic.com"
7 | }
8 | ],
9 | "permission": [
10 | {
11 | "role-name": "view-admin",
12 | "capability": "read"
13 | }
14 | ],
15 | "path-set": "the path set"
16 | }
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-modules/options/sample-app-options.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | sample-app-docs
5 |
6 |
7 | unfiltered
8 | 0
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-disabled/tasks/disabled-task.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled": false,
3 | "task-path": "/this/should/be/disabled.xqy",
4 | "task-root": "/",
5 | "task-type": "weekly",
6 | "task-period": 2,
7 | "task-day": [
8 | "tuesday"
9 | ],
10 | "task-start-time": "12:00:00",
11 | "task-database": "Documents",
12 | "task-modules": "",
13 | "task-user": "nobody"
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-in-child-dir/tasks/default-group-task.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/query.xqy",
4 | "task-root":"/",
5 | "task-type":"weekly",
6 | "task-period":2,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Documents",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/replica/cpf/domains/replica-domain.json:
--------------------------------------------------------------------------------
1 | {
2 | "domain-name": "replica-domain",
3 | "description": "Test domain for sample app",
4 | "scope": "directory",
5 | "uri": "/replica/",
6 | "depth": "infinity",
7 | "eval-module": "Modules",
8 | "eval-root": "/",
9 | "pipeline": ["Status Change Handling", "Flexible Replication"]
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/servers/same-server.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name": "sample-app-server",
3 | "server-type": "http",
4 | "root": "/",
5 | "group-name": "Default",
6 | "port": 8048,
7 | "modules-database": "Documents",
8 | "content-database": "Documents",
9 | "namespace": [
10 | {
11 | "prefix": "test2",
12 | "namespace-uri": "test2"
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/privileges-with-roles/security/privileges/privilege-2.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-xml-privilege
3 | urn:sample-app:privilege:xml
4 | execute
5 |
6 | sample-app-role1
7 | rest-admin
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/databases/other-content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "range-element-index": [
4 | {
5 | "collation": "http://marklogic.com/collation/",
6 | "invalid-values": "reject",
7 | "localname": "id",
8 | "namespace-uri": "",
9 | "range-value-positions": false,
10 | "scalar-type": "string"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "range-element-index": [
4 | {
5 | "collation": "http://marklogic.com/collation/",
6 | "invalid-values": "reject",
7 | "localname": "otherId",
8 | "namespace-uri": "",
9 | "range-value-positions": false,
10 | "scalar-type": "string"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-modules/services/sql.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace service = "http://marklogic.com/rest-api/resource/sql";
4 |
5 | declare function get(
6 | $context as map:map,
7 | $params as map:map
8 | ) as document-node()*
9 | {
10 | document {
11 | xdmp:sql(
12 | map:get($params, "query"),
13 | "array"
14 | )
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tasks-in-child-dir/tasks/sampleAppGroup1/group1-task.json:
--------------------------------------------------------------------------------
1 | {
2 | "task-enabled":true,
3 | "task-path":"/path/to/other-query.xqy",
4 | "task-root":"/",
5 | "task-type":"weekly",
6 | "task-period":2,
7 | "task-day":["tuesday"],
8 | "task-start-time":"12:00:00",
9 | "task-database":"Documents",
10 | "task-modules":"",
11 | "task-user":"nobody"
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/axes/temporal-valid-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "valid",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "validStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "validEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Archive notice
2 |
3 | This repository has been archived as the code has been migrated to the
4 | [ml-gradle repository](https://github.com/marklogic/ml-gradle/tree/dev/ml-app-deployer) as part of the
5 | ml-gradle 5.0.0 release.
6 |
7 | The [Wiki pages in this repository](https://github.com/marklogic/ml-app-deployer/wiki) are still valid as
8 | documentation but may soon be folded into the ml-gradle documentation.
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/axes/temporal-system-axis.json:
--------------------------------------------------------------------------------
1 | {
2 | "axis-name": "system",
3 | "axis-start": {
4 | "element-reference": {
5 | "namespace-uri": "",
6 | "localname": "systemStart"
7 | }
8 | },
9 | "axis-end": {
10 | "element-reference": {
11 | "namespace-uri": "",
12 | "localname": "systemEnd"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/databases/unknown-database/alert/configs/should-be-ignored-alert-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "uri": "should-be-ignored-alert-config",
3 | "name": "Should Be Ignored Alerting App",
4 | "description": "This should be ignored since the parent directory of 'unknown-database' doesn't match an existing ML database",
5 | "trigger": [],
6 | "domain": [],
7 | "action": [],
8 | "option": []
9 | }
10 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/flexrep/configs/flexrep-config-1.xml:
--------------------------------------------------------------------------------
1 |
3 | sample-app-domain-1
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/schemas-project/src/main/ml-schemas/tde/template1.json:
--------------------------------------------------------------------------------
1 | {
2 | "template": {
3 | "context": "/example",
4 | "collections": [
5 | "example"
6 | ],
7 | "rows": [
8 | {
9 | "schemaName": "Example",
10 | "viewName": "default",
11 | "columns": [
12 | {
13 | "name": "Id",
14 | "scalarType": "string",
15 | "val": "Id"
16 | }
17 | ]
18 | }
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partition-queries/databases/sample-app-content/partition-queries/partition-query2.xml:
--------------------------------------------------------------------------------
1 |
2 | 2
3 |
4 |
5 | Hello World
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/resources/schemas-project/src/main/more-schemas/tde/template2.json:
--------------------------------------------------------------------------------
1 | {
2 | "template": {
3 | "context": "/example2",
4 | "collections": [
5 | "example2"
6 | ],
7 | "rows": [
8 | {
9 | "schemaName": "Example2",
10 | "viewName": "default",
11 | "columns": [
12 | {
13 | "name": "Id",
14 | "scalarType": "string",
15 | "val": "Id"
16 | }
17 | ]
18 | }
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/master/flexrep/configs/master-config.xml:
--------------------------------------------------------------------------------
1 |
3 | master-domain
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/replica/flexrep/configs/replica-config.xml:
--------------------------------------------------------------------------------
1 |
3 | replica-domain
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/lots-of-databases/databases/more-content-db-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "maintain-last-modified": true,
3 | "range-element-index": [
4 | {
5 | "collation": "http://marklogic.com/collation/",
6 | "invalid-values": "reject",
7 | "localname": "anotherElement",
8 | "namespace-uri": "urn:sampleapp",
9 | "range-value-positions": false,
10 | "scalar-type": "string"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/cpf/domains/domain-2.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-domain-2
3 | Test domain for sample app
4 | directory
5 | /sample-app-2/
6 | infinity
7 | %%MODULES_DATABASE%%
8 | /
9 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/view-schemas/main-views/view-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "view-name": "ordertable",
3 | "schema-name": "main",
4 | "element-scope": {"namespace-uri":"", "localname":"order"},
5 | "column": [
6 | {
7 | "column-name": "amount",
8 | "element-reference": {
9 | "namespace-uri": "",
10 | "localname": "amount",
11 | "scalar-type": "int"
12 | }
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/databases/other-sample-app-content/flexrep/configs/flexrep-config-1.xml:
--------------------------------------------------------------------------------
1 |
3 | sample-app-domain-1
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/alert/configs/my-alert-config-rules/my-rule.xml:
--------------------------------------------------------------------------------
1 |
2 | my-rule
3 | log to ErrorLog.txt
4 | admin
5 |
6 |
7 | Yorick
8 |
9 |
10 | xdmp:log2
11 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path1/databases/one-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-one-database",
3 | "triple-index": false,
4 | "schema-database": "sample-app-schema-database",
5 | "range-element-index": [
6 | {
7 | "collation": "http://marklogic.com/collation/",
8 | "invalid-values": "reject",
9 | "localname": "id",
10 | "namespace-uri": "",
11 | "range-value-positions": false,
12 | "scalar-type": "string"
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/databases/other-sample-app-content/view-schemas/main-views/view-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "view-name": "ordertable",
3 | "schema-name": "main",
4 | "element-scope": {"namespace-uri":"", "localname":"order"},
5 | "column": [
6 | {
7 | "column-name": "amount",
8 | "element-reference": {
9 | "namespace-uri": "",
10 | "localname": "amount",
11 | "scalar-type": "int"
12 | }
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-config-paths/path2/databases/another-one-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-one-database",
3 | "triple-index": true,
4 | "triggers-database": "sample-app-triggers-database",
5 | "range-element-index": [
6 | {
7 | "collation": "http://marklogic.com/collation/",
8 | "invalid-values": "reject",
9 | "localname": "otherId",
10 | "namespace-uri": "",
11 | "range-value-positions": false,
12 | "scalar-type": "string"
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/roles-with-permissions/security/roles/sampleapp-install.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "sampleapp-install",
3 | "permission" : [ {
4 | "role-name" : "sampleapp-modules",
5 | "capability" : "execute"
6 | }, {
7 | "role-name" : "sampleapp-install",
8 | "capability" : "update"
9 | }, {
10 | "role-name" : "sampleapp-install",
11 | "capability" : "insert"
12 | }, {
13 | "role-name" : "sampleapp-modules",
14 | "capability" : "read"
15 | } ]
16 | }
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/master/servers/master-flexrep-server.xml:
--------------------------------------------------------------------------------
1 |
2 | master-flexrep-server
3 | Default
4 | http
5 | FlexRep
6 | 8121
7 | /error-handler.xqy
8 | /rewriter.xml
9 | Documents
10 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Define this via gradle-local.properties or on the command line when running snyk-test
2 | snykToken=
3 |
4 | # Define these on the command line to publish to OSSRH
5 | # See https://central.sonatype.org/publish/publish-gradle/#credentials for more information
6 | mavenCentralUsername=
7 | mavenCentralPassword=
8 | mavenCentralUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2/
9 | #signing.keyId=YourKeyId
10 | #signing.password=YourPublicKeyPassword
11 | #signing.secretKeyRingFile=PathToYourKeyRingFile
12 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/cma/configurations/config1.xml:
--------------------------------------------------------------------------------
1 |
2 | ml-app-deployer-test-config
3 |
4 |
5 |
6 |
7 | cma-test-f1
8 |
9 |
10 | cma-test-f2
11 |
12 |
13 | cma-test-f3
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/replica/servers/replica-flexrep-server.xml:
--------------------------------------------------------------------------------
1 |
2 | replica-flexrep-server
3 | Default
4 | http
5 | FlexRep
6 | 8122
7 | /error-handler.xqy
8 | /rewriter.xml
9 | Documents
10 |
--------------------------------------------------------------------------------
/src/test/resources/non-admin-test/ml-config/security/roles/sample-app-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "sample-app-role",
3 | "role" : [ "rest-admin", "rest-writer", "rest-reader" ],
4 | "privilege": [
5 | {
6 | "privilege-name": "xdmp:eval-in",
7 | "action": "http://marklogic.com/xdmp/privileges/xdmp-eval-in",
8 | "kind": "execute"
9 | },
10 | {
11 | "privilege-name": "any-uri",
12 | "action": "http://marklogic.com/xdmp/privileges/any-uri",
13 | "kind": "execute"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/alert-config/databases/other-sample-app-content/alert/configs/other-alert-config-rules/other-rule.xml:
--------------------------------------------------------------------------------
1 |
2 | other-rule
3 | other log to ErrorLog.txt
4 | admin
5 |
6 |
7 | Yorick
8 |
9 |
10 | xdmp:log3
11 |
12 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partition-queries/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%",
4 | "locking": "strict",
5 | "range-element-index": [
6 | {
7 | "scalar-type": "date",
8 | "namespace-uri": "",
9 | "localname": "myDate",
10 | "collation": "",
11 | "range-value-positions": false,
12 | "invalid-values": "reject"
13 | }
14 | ],
15 | "assignment-policy": {
16 | "assignment-policy-name": "query",
17 | "default-partition": 2
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/protected-collections/collection-2.xml:
--------------------------------------------------------------------------------
1 |
2 | http://example.org
3 |
4 |
5 | domain-management
6 | update
7 |
8 |
9 | domain-management
10 | read
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/triggers/my-trigger.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-trigger",
3 | "description": "my trigger",
4 | "event": {
5 | "data-event": {
6 | "directory-scope": {
7 | "uri": "/myDir/",
8 | "depth": "1"
9 | },
10 | "document-content": {
11 | "update-kind": "create"
12 | },
13 | "when": "post-commit"
14 | }
15 | },
16 | "module": "/test.xqy",
17 | "module-db": "Modules",
18 | "module-root": "/modules/",
19 | "enabled": true,
20 | "recursive": true,
21 | "task-priority": "normal"
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-schemas/my.rules:
--------------------------------------------------------------------------------
1 | # Copyright 2014-2016 MarkLogic Corporation. All Rights Reserved.
2 |
3 | prefix rdf:
4 | prefix rdfs:
5 |
6 | tbox {
7 | ?p rdfs:domain ?c .
8 | }
9 |
10 | rule "domain axioms" construct {
11 | rdfs:domain rdfs:domain rdf:Property .
12 | rdfs:domain rdfs:range rdfs:Class .
13 | } {}
14 |
15 | rule "domain rdfs2" construct {
16 | ?x a ?c
17 | } {
18 | ?x ?p ?y .
19 | ?p rdfs:domain ?c
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/qbac-json-role/security/roles/a-qbac-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name": "a-qbac-role",
3 | "description": "testing",
4 | "capability-query": [
5 | {
6 | "capability": "read",
7 | "query": {
8 | "word-query": {
9 | "text": {
10 | "lang": "en",
11 | "_value": "hello"
12 | }
13 | }
14 | }
15 | },
16 | {
17 | "capability": "update",
18 | "query": {
19 | "word-query": {
20 | "text": {
21 | "lang": "en",
22 | "_value": "world"
23 | }
24 | }
25 | }
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partition-queries/databases/sample-app-content/partition-queries/partition-query1.xml:
--------------------------------------------------------------------------------
1 |
2 | 1
3 |
4 |
5 |
6 | Manager
7 |
8 |
9 | Engineer
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/secure-credentials/secure-credentials-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sec-creds1",
3 | "description": "Secure Credentials",
4 | "username": "sample-app-jane",
5 | "password": "password",
6 | "signing": false,
7 | "target": [
8 | {
9 | "uri-pattern": "http://.*:8080/test/",
10 | "authentication": "basic"
11 | },
12 | {
13 | "uri-pattern": "https://.*:443/test/",
14 | "authentication": "basic"
15 | }
16 | ],
17 | "permission": [
18 | {
19 | "role-name": "rest-reader",
20 | "capability": "read"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/triggers/my-trigger.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-trigger",
3 | "description": "my trigger",
4 | "event": {
5 | "data-event": {
6 | "directory-scope": {
7 | "uri": "/myDir/",
8 | "depth": "1"
9 | },
10 | "document-content": {
11 | "update-kind": "create"
12 | },
13 | "when": "post-commit"
14 | }
15 | },
16 | "module": "/test.xqy",
17 | "module-db": "Modules",
18 | "module-root": "/modules/",
19 | "enabled": true,
20 | "recursive": true,
21 | "task-priority": "normal"
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/other-sample-app-triggers/triggers/other-trigger.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "other-trigger",
3 | "description": "other trigger",
4 | "event": {
5 | "data-event": {
6 | "directory-scope": {
7 | "uri": "/otherDir/",
8 | "depth": "1"
9 | },
10 | "document-content": {
11 | "update-kind": "create"
12 | },
13 | "when": "post-commit"
14 | }
15 | },
16 | "module": "/test.xqy",
17 | "module-db": "Modules",
18 | "module-root": "/modules/",
19 | "enabled": true,
20 | "recursive": true,
21 | "task-priority": "normal"
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/multiple-triggers-databases/databases/third-triggers-database/triggers/third-trigger.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "third-trigger",
3 | "description": "third trigger",
4 | "event": {
5 | "data-event": {
6 | "directory-scope": {
7 | "uri": "/thirdDir/",
8 | "depth": "1"
9 | },
10 | "document-content": {
11 | "update-kind": "create"
12 | },
13 | "when": "post-commit"
14 | }
15 | },
16 | "module": "/test.xqy",
17 | "module-db": "Modules",
18 | "module-root": "/modules/",
19 | "enabled": true,
20 | "recursive": true,
21 | "task-priority": "normal"
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partitions/databases/sample-app-content/partitions/partition1.xml:
--------------------------------------------------------------------------------
1 |
2 | myDate-2011
3 | 2011-01-01
4 | 2011-12-31
5 | 1
6 |
7 | mlHostName1
8 |
9 |
17 |
18 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/external-security/external-security-1.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-external-security
3 |
4 | ldap
5 | 300
6 | internal
7 | ldap://localhost:389
8 | base
9 | ou
10 | guest
11 | password
12 | MD5
13 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/partitions/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%",
4 | "locking": "strict",
5 | "range-element-index": [
6 | {
7 | "scalar-type": "date",
8 | "namespace-uri": "",
9 | "localname": "myDate",
10 | "collation": "",
11 | "range-value-positions": false,
12 | "invalid-values": "reject"
13 | }
14 | ],
15 | "assignment-policy": {
16 | "assignment-policy-name": "range",
17 | "partition-key": {
18 | "element-reference": {
19 | "namespace-uri": "",
20 | "localname": "myDate",
21 | "scalar-type": "date"
22 | }
23 | },
24 | "lower-bound-included": true
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/resources/test.properties:
--------------------------------------------------------------------------------
1 | # Properties for connecting to the Mgmt API; port 8002 is assumed
2 | # Can override these files via a gitignored "user.properties" file in this same directory
3 | mlHost=localhost
4 |
5 | # When testing MarkLogic Cloud manually, comment these out for a more realistic test (it's fine to leave them
6 | # uncommented, as they'll be ignored, it's just more realistic to comment them out).
7 | mlUsername=admin
8 | mlPassword=admin
9 | mlManagePort=8002
10 | mlAdminPort=8001
11 |
12 | # When testing MarkLogic Cloud manually, you'll need to set these in user.properties:
13 | # mlHost=the name of the host
14 | # mlCloudApiKey=the key value
15 | # mlBasePath=the base path for the Manage app server
16 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/subdatabases/mysuperdb/mysuperdb-subdb01.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "mysuperdb-subdb01",
3 | "range-element-index" : [
4 | {
5 | "invalid-values" : "reject",
6 | "collation" : "http://marklogic.com/collation/",
7 | "localname" : "FirstName",
8 | "namespace-uri" : "http://person",
9 | "range-value-positions" : false,
10 | "scalar-type" : "string"
11 | },
12 | {
13 | "invalid-values" : "reject",
14 | "collation" : "",
15 | "localname" : "BirthDate",
16 | "namespace-uri" : "http://person",
17 | "range-value-positions" : false,
18 | "scalar-type" : "dateTime"
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/subdatabases/mysuperdb/mysuperdb-subdb02.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "mysuperdb-subdb02",
3 | "range-element-index" : [
4 | {
5 | "invalid-values" : "reject",
6 | "collation" : "http://marklogic.com/collation/",
7 | "localname" : "FirstName",
8 | "namespace-uri" : "http://person",
9 | "range-value-positions" : false,
10 | "scalar-type" : "string"
11 | },
12 | {
13 | "invalid-values" : "reject",
14 | "collation" : "",
15 | "localname" : "BirthDate",
16 | "namespace-uri" : "http://person",
17 | "range-value-positions" : false,
18 | "scalar-type" : "dateTime"
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/qbac-xml-role/security/roles/a-qbac-xml-role.xml:
--------------------------------------------------------------------------------
1 |
2 | a-qbac-xml-role
3 |
4 |
5 | read
6 |
7 |
8 | hello
9 |
10 |
11 |
12 |
13 | update
14 |
15 |
16 | world
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/subdatabases/sample-app-content/sample-app-content-subdb01.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-content-subdb01",
3 | "range-element-index" : [
4 | {
5 | "invalid-values" : "reject",
6 | "collation" : "http://marklogic.com/collation/",
7 | "localname" : "FirstName",
8 | "namespace-uri" : "http://person",
9 | "range-value-positions" : false,
10 | "scalar-type" : "string"
11 | },
12 | {
13 | "invalid-values" : "reject",
14 | "collation" : "",
15 | "localname" : "BirthDate",
16 | "namespace-uri" : "http://person",
17 | "range-value-positions" : false,
18 | "scalar-type" : "dateTime"
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/subdatabases/sample-app-content/sample-app-content-subdb02.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "sample-app-content-subdb02",
3 | "range-element-index" : [
4 | {
5 | "invalid-values" : "reject",
6 | "collation" : "http://marklogic.com/collation/",
7 | "localname" : "FirstName",
8 | "namespace-uri" : "http://person",
9 | "range-value-positions" : false,
10 | "scalar-type" : "string"
11 | },
12 | {
13 | "invalid-values" : "reject",
14 | "collation" : "",
15 | "localname" : "BirthDate",
16 | "namespace-uri" : "http://person",
17 | "range-value-positions" : false,
18 | "scalar-type" : "dateTime"
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/view-schemas/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "range-element-index": [
4 | {
5 | "collation": "http://marklogic.com/collation/",
6 | "invalid-values": "reject",
7 | "localname": "id",
8 | "namespace-uri": "urn:sampleapp",
9 | "range-value-positions": false,
10 | "scalar-type": "string"
11 | },
12 | {
13 | "collation": "",
14 | "invalid-values": "reject",
15 | "localname": "amount",
16 | "namespace-uri": "",
17 | "range-value-positions": false,
18 | "scalar-type": "int"
19 | }
20 | ],
21 | "triple-index":true,
22 | "collection-lexicon":true,
23 | "schema-database": "%%SCHEMAS_DATABASE%%"
24 | }
25 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/tde-validation/databases/sample-app-schemas/schemas/tde/bad-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "template": {
3 | "context": "/example",
4 | "description": "This is a description with quotes in it '\"",
5 | "collections": [
6 | "example"
7 | ],
8 | "rows": [
9 | {
10 | "schemaName": "Example",
11 | "viewName": "default",
12 | "columns": [
13 | {
14 | "name": "Id",
15 | "scalarType": "string",
16 | "val": "Id"
17 | },
18 | {
19 | "name": "DuplicateColumn",
20 | "scalarType": "string",
21 | "val": "DuplicateColumn"
22 | },
23 | {
24 | "name": "DuplicateColumn",
25 | "scalarType": "string",
26 | "val": "DuplicateColumn"
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/certificate-templates/template-1.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-template
3 | Sample description
4 | rsa
5 |
6 |
7 | 0
8 |
9 | US
10 | VA
11 | McLean
12 | MarkLogic
13 | Consulting
14 | nobody@marklogic.com
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/my-super-db.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "mysuperdb",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%",
4 | "schema-database": "%%SCHEMAS_DATABASE%%",
5 | "range-element-index" : [
6 | {
7 | "invalid-values" : "reject",
8 | "collation" : "http://marklogic.com/collation/",
9 | "localname" : "FirstName",
10 | "namespace-uri" : "http://person",
11 | "range-value-positions" : false,
12 | "scalar-type" : "string"
13 | },
14 | {
15 | "invalid-values" : "reject",
16 | "collation" : "",
17 | "localname" : "BirthDate",
18 | "namespace-uri" : "http://person",
19 | "range-value-positions" : false,
20 | "scalar-type" : "dateTime"
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/subdatabases/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "triggers-database": "%%TRIGGERS_DATABASE%%",
4 | "schema-database": "%%SCHEMAS_DATABASE%%",
5 | "range-element-index" : [
6 | {
7 | "invalid-values" : "reject",
8 | "collation" : "http://marklogic.com/collation/",
9 | "localname" : "FirstName",
10 | "namespace-uri" : "http://person",
11 | "range-value-positions" : false,
12 | "scalar-type" : "string"
13 | },
14 | {
15 | "invalid-values" : "reject",
16 | "collation" : "",
17 | "localname" : "BirthDate",
18 | "namespace-uri" : "http://person",
19 | "range-value-positions" : false,
20 | "scalar-type" : "dateTime"
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/host-certificates/security/certificate-templates/template-1.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-app-certificate-template
3 | Sample description
4 | rsa
5 |
6 |
7 | 0
8 |
9 | US
10 | VA
11 | McLean
12 | MarkLogic
13 | Consulting
14 | nobody@marklogic.com
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "range-element-index": [
4 | {
5 | "collation": "http://marklogic.com/collation/",
6 | "invalid-values": "reject",
7 | "localname": "id",
8 | "namespace-uri": "urn:sampleapp",
9 | "range-value-positions": false,
10 | "scalar-type": "string"
11 | },
12 | {
13 | "collation": "",
14 | "invalid-values": "reject",
15 | "localname": "amount",
16 | "namespace-uri": "",
17 | "range-value-positions": false,
18 | "scalar-type": "int"
19 | }
20 | ],
21 | "triple-index":true,
22 | "collection-lexicon":true,
23 | "triggers-database": "%%TRIGGERS_DATABASE%%",
24 | "schema-database": "%%SCHEMAS_DATABASE%%"
25 | }
--------------------------------------------------------------------------------
/src/test/resources/sample-app/uni-temporal-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%",
4 | "range-element-index": [
5 | {
6 | "collation": "",
7 | "invalid-values": "reject",
8 | "localname": "systemStart",
9 | "namespace-uri": "",
10 | "range-value-positions": false,
11 | "scalar-type": "dateTime"
12 | }
13 | ,
14 | {
15 | "collation": "",
16 | "invalid-values": "reject",
17 | "localname": "systemEnd",
18 | "namespace-uri": "",
19 | "range-value-positions": false,
20 | "scalar-type": "dateTime"
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/util/PropertySource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.util;
17 |
18 | public interface PropertySource {
19 |
20 | String getProperty(String name);
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/AppConfigFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer;
17 |
18 | public interface AppConfigFactory {
19 |
20 | public AppConfig newAppConfig();
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/ManageConfigFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt;
17 |
18 | public interface ManageConfigFactory {
19 |
20 | public ManageConfig newManageConfig();
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/admin/ActionRequiringRestart.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.admin;
17 |
18 | public interface ActionRequiringRestart {
19 |
20 | public boolean execute();
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/admin/AdminConfigFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.admin;
17 |
18 | public interface AdminConfigFactory {
19 |
20 | public AdminConfig newAdminConfig();
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/cli/CommandArray.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.cli;
17 |
18 | import com.marklogic.appdeployer.command.Command;
19 |
20 | public interface CommandArray {
21 |
22 | Command[] getCommands();
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/selector/ResourceSelector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.selector;
17 |
18 | import com.marklogic.mgmt.ManageClient;
19 |
20 | public interface ResourceSelector {
21 |
22 | ResourceSelection selectResources(ManageClient manageClient);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/flexrep/configs/sample-app-domain-1-targets/target-1.xml:
--------------------------------------------------------------------------------
1 |
4 | sample-app-domain-1-target
5 | 60
6 | 300
7 | true
8 | 1
9 | false
10 | true
11 |
12 |
13 | http://localhost:8076/
14 |
15 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/master/flexrep/configs/master-domain-targets/master-target.xml:
--------------------------------------------------------------------------------
1 |
4 | master-domain-target
5 | 60
6 | 300
7 | true
8 | 1
9 | false
10 | true
11 |
12 |
13 | http://localhost:8076/
14 |
15 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-combined/flexrep/replica/flexrep/configs/replica-domain-targets/replica-target.xml:
--------------------------------------------------------------------------------
1 |
4 | replica-domain-target
5 | 60
6 | 300
7 | true
8 | 1
9 | false
10 | true
11 |
12 |
13 | http://localhost:8076/
14 |
15 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/template/TemplateBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.template;
17 |
18 | import com.marklogic.mgmt.api.Resource;
19 |
20 | import java.util.Map;
21 |
22 | public interface TemplateBuilder {
23 |
24 | Resource buildTemplate(Map propertyMap);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/util/SystemPropertySource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.util;
17 |
18 | public class SystemPropertySource implements PropertySource {
19 |
20 | @Override
21 | public String getProperty(String name) {
22 | return System.getProperty(name);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/flexrep-config/databases/other-sample-app-content/flexrep/configs/sample-app-domain-1-targets/target-1.xml:
--------------------------------------------------------------------------------
1 |
4 | sample-app-domain-1-target
5 | 60
6 | 300
7 | true
8 | 1
9 | false
10 | true
11 |
12 |
13 | http://localhost:8076/
14 |
15 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/junit/NamespaceProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.junit;
17 |
18 | import org.jdom2.Namespace;
19 |
20 | /**
21 | * Provides an array of Namespace objects that can be registered with JDOM for use in XPath expressions.
22 | */
23 | public interface NamespaceProvider {
24 |
25 | Namespace[] getNamespaces();
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/mgmt/resource/security/TestManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.security;
17 |
18 | import com.marklogic.mgmt.AbstractManager;
19 |
20 | public class TestManager extends AbstractManager {
21 |
22 | @Override
23 | protected boolean useSecurityUser() {
24 | return super.useSecurityUser();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/resource/cpf/DomainManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.cpf;
17 |
18 | import com.marklogic.mgmt.ManageClient;
19 |
20 | public class DomainManager extends AbstractCpfResourceManager {
21 |
22 | public DomainManager(ManageClient client, String databaseIdOrName) {
23 | super(client, databaseIdOrName);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/ResourceDirFinder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command;
17 |
18 | import com.marklogic.appdeployer.ConfigDir;
19 |
20 | import java.io.File;
21 |
22 | /**
23 | * Exists solely for the "findResourceDirs" method in AbstractResourceCommand.
24 | */
25 | public interface ResourceDirFinder {
26 | File getResourceDir(ConfigDir configDir);
27 | }
28 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/cpf/pipelines/pipeline-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "pipeline-name": "sample-app-pipeline-1",
3 | "pipeline-description": "Sample app pipeline",
4 | "success-action": {
5 | "module": "/MarkLogic/cpf/actions/success-action.xqy"
6 | },
7 | "failure-action": {
8 | "module": "/marklogic/cpf/actions/failure-action.xqy"
9 | },
10 | "status-transition": [
11 | {
12 | "annotation": "Currently just a copy of the first transition in Status Change Handling",
13 | "status": "created",
14 | "on-success": "http://marklogic.com/states/initial",
15 | "priority": 500,
16 | "default-action": {
17 | "module": "/marklogic/cpf/actions/set-updated-action.xqy"
18 | },
19 | "execute": [
20 | {
21 | "condition": {
22 | "module": "/marklogic/cpf/actions/changed-type-condition.xqy"
23 | },
24 | "action": {
25 | "module": "/marklogic/cpf/actions/success-action.xqy"
26 | }
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%",
4 | "range-element-index": [
5 | {
6 | "collation": "",
7 | "invalid-values": "reject",
8 | "localname": "validStart",
9 | "namespace-uri": "",
10 | "range-value-positions": false,
11 | "scalar-type": "dateTime"
12 | }
13 | ,
14 | {
15 | "collation": "",
16 | "invalid-values": "reject",
17 | "localname": "validEnd",
18 | "namespace-uri": "",
19 | "range-value-positions": false,
20 | "scalar-type": "dateTime"
21 | }
22 | ,
23 | {
24 | "collation": "",
25 | "invalid-values": "reject",
26 | "localname": "systemStart",
27 | "namespace-uri": "",
28 | "range-value-positions": false,
29 | "scalar-type": "dateTime"
30 | }
31 | ,
32 | {
33 | "collation": "",
34 | "invalid-values": "reject",
35 | "localname": "systemEnd",
36 | "namespace-uri": "",
37 | "range-value-positions": false,
38 | "scalar-type": "dateTime"
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/appdeployer/command/security/DeployRolesWithDependenciesViaCmaTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.security;
17 |
18 | import org.junit.jupiter.api.BeforeEach;
19 |
20 | public class DeployRolesWithDependenciesViaCmaTest extends DeployRolesWithDependenciesTest {
21 |
22 | @BeforeEach
23 | public void setup() {
24 | appConfig.getCmaConfig().setDeployRoles(true);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "%%DATABASE%%",
3 | "schema-database": "%%SCHEMAS_DATABASE%%",
4 | "range-element-index": [
5 | {
6 | "collation": "",
7 | "invalid-values": "reject",
8 | "localname": "validStart",
9 | "namespace-uri": "",
10 | "range-value-positions": false,
11 | "scalar-type": "dateTime"
12 | }
13 | ,
14 | {
15 | "collation": "",
16 | "invalid-values": "reject",
17 | "localname": "validEnd",
18 | "namespace-uri": "",
19 | "range-value-positions": false,
20 | "scalar-type": "dateTime"
21 | }
22 | ,
23 | {
24 | "collation": "",
25 | "invalid-values": "reject",
26 | "localname": "systemStart",
27 | "namespace-uri": "",
28 | "range-value-positions": false,
29 | "scalar-type": "dateTime"
30 | }
31 | ,
32 | {
33 | "collation": "",
34 | "invalid-values": "reject",
35 | "localname": "systemEnd",
36 | "namespace-uri": "",
37 | "range-value-positions": false,
38 | "scalar-type": "dateTime"
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name": "other-%%DATABASE%%",
3 | "schema-database": "other-%%SCHEMAS_DATABASE%%",
4 | "range-element-index": [
5 | {
6 | "collation": "",
7 | "invalid-values": "reject",
8 | "localname": "validStart",
9 | "namespace-uri": "",
10 | "range-value-positions": false,
11 | "scalar-type": "dateTime"
12 | }
13 | ,
14 | {
15 | "collation": "",
16 | "invalid-values": "reject",
17 | "localname": "validEnd",
18 | "namespace-uri": "",
19 | "range-value-positions": false,
20 | "scalar-type": "dateTime"
21 | }
22 | ,
23 | {
24 | "collation": "",
25 | "invalid-values": "reject",
26 | "localname": "systemStart",
27 | "namespace-uri": "",
28 | "range-value-positions": false,
29 | "scalar-type": "dateTime"
30 | }
31 | ,
32 | {
33 | "collation": "",
34 | "invalid-values": "reject",
35 | "localname": "systemEnd",
36 | "namespace-uri": "",
37 | "range-value-positions": false,
38 | "scalar-type": "dateTime"
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/HttpServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.server;
17 |
18 | import com.marklogic.mgmt.api.API;
19 |
20 | import javax.xml.bind.annotation.XmlRootElement;
21 |
22 | @XmlRootElement(name = "http-server-properties")
23 | public class HttpServer extends Server {
24 |
25 | public HttpServer() {
26 | }
27 |
28 | public HttpServer(API api, String serverName) {
29 | super(api, serverName);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/OdbcServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.server;
17 |
18 | import com.marklogic.mgmt.api.API;
19 |
20 | import javax.xml.bind.annotation.XmlRootElement;
21 |
22 | @XmlRootElement(name = "odbc-server-properties")
23 | public class OdbcServer extends Server {
24 |
25 | public OdbcServer() {
26 | }
27 |
28 | public OdbcServer(API api, String serverName) {
29 | super(api, serverName);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/XdbcServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.server;
17 |
18 | import com.marklogic.mgmt.api.API;
19 |
20 | import javax.xml.bind.annotation.XmlRootElement;
21 |
22 | @XmlRootElement(name = "xdbc-server-properties")
23 | public class XdbcServer extends Server {
24 |
25 | public XdbcServer() {
26 | }
27 |
28 | public XdbcServer(API api, String serverName) {
29 | super(api, serverName);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/databases/DefaultDeployDatabaseCommandFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.databases;
17 |
18 | import java.io.File;
19 |
20 | public class DefaultDeployDatabaseCommandFactory implements DeployDatabaseCommandFactory {
21 |
22 | @Override
23 | public DeployDatabaseCommand newDeployDatabaseCommand(File databaseFile) {
24 | return new DeployDatabaseCommand(databaseFile);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/rest/util/HttpClientBuilderConfigurer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.rest.util;
17 |
18 | import org.apache.http.impl.client.HttpClientBuilder;
19 |
20 | /**
21 | * @deprecated since 4.5.0; OkHttp is now the preferred client
22 | */
23 | @Deprecated
24 | public interface HttpClientBuilderConfigurer {
25 |
26 | HttpClientBuilder configureHttpClientBuilder(RestConfig restConfig, HttpClientBuilder httpClientBuilder);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/forest/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.forest;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/group/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.group;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.server;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/mimetypes/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.mimetypes;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/security/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.security;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/selector/PrefixResourceSelector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.selector;
17 |
18 | public class PrefixResourceSelector extends AbstractNameMatchingResourceSelector {
19 |
20 | private String prefix;
21 |
22 | public PrefixResourceSelector(String prefix) {
23 | this.prefix = prefix;
24 | }
25 |
26 | @Override
27 | protected boolean nameMatches(String resourceName) {
28 | return resourceName.startsWith(prefix);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/mgmt/admin/AdminManagerTest.java:
--------------------------------------------------------------------------------
1 | package com.marklogic.mgmt.admin;
2 |
3 | import org.junit.jupiter.api.Test;
4 |
5 | import static org.junit.jupiter.api.Assertions.assertThrows;
6 | import static org.junit.jupiter.api.Assertions.assertTrue;
7 |
8 | public class AdminManagerTest {
9 |
10 | @Test
11 | void invalidConfig() {
12 | // As of 4.5.1, this should no longer throw an error as the connection to MarkLogic should
13 | // be lazily constructed.
14 | AdminManager mgr = new AdminManager(new AdminConfig("localhost", 8001, null, null));
15 |
16 | RuntimeException ex = assertThrows(RuntimeException.class, () -> mgr.getRestTemplate());
17 | assertTrue(ex.getMessage().contains("username must be of type String"),
18 | "The call to get a RestTemplate is expected to fail because no username/password has been " +
19 | "provided, and digest auth is used by default. Prior to 4.5.1, this failed when the AdminManager " +
20 | "was instantiated, which proved problematic in 4.5.0 when the user tried to run an ml-gradle task " +
21 | "without providing any credentials.");
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/trigger/DocumentScope.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.trigger;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 |
21 | @XmlAccessorType(XmlAccessType.FIELD)
22 | public class DocumentScope {
23 |
24 | private String uri;
25 |
26 | public String getUri() {
27 | return uri;
28 | }
29 |
30 | public void setUri(String uri) {
31 | this.uri = uri;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/util/ObjectNodesSorter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.util;
17 |
18 | import com.fasterxml.jackson.databind.node.ObjectNode;
19 |
20 | import java.util.List;
21 |
22 | /**
23 | * Strategy interface for sorting a list of ObjectNode objects. Initially created to hide how Role objects must be
24 | * sorted.
25 | */
26 | public interface ObjectNodesSorter {
27 |
28 | List sortObjectNodes(List objectNodes);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/trigger/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage/trigger/properties",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage/trigger/properties")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.trigger;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/resource/security/UserManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.security;
17 |
18 | import com.marklogic.mgmt.ManageClient;
19 | import com.marklogic.mgmt.resource.AbstractResourceManager;
20 |
21 | public class UserManager extends AbstractResourceManager {
22 |
23 | public UserManager(ManageClient client) {
24 | super(client);
25 | }
26 |
27 | @Override
28 | protected boolean useSecurityUser() {
29 | return true;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/database/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage/database/properties",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "m", namespaceURI = "http://marklogic.com/manage/database/properties")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.database;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/database/DefaultRuleset.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.database;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 |
21 | @XmlAccessorType(XmlAccessType.FIELD)
22 | public class DefaultRuleset {
23 |
24 | private String location;
25 |
26 | public String getLocation() {
27 | return location;
28 | }
29 |
30 | public void setLocation(String location) {
31 | this.location = location;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/resource/hosts/HostNameProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.hosts;
17 |
18 | import java.util.List;
19 |
20 | /**
21 | * This interface exists primarily to facilitate unit testing of classes that determine what hosts forests should be
22 | * assigned to without having to connect to a real MarkLogic instance.
23 | */
24 | public interface HostNameProvider {
25 |
26 | List getHostNames();
27 |
28 | List getGroupHostNames(String groupName);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/modules/ModulesLoaderFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.modules;
17 |
18 | import com.marklogic.appdeployer.AppConfig;
19 | import com.marklogic.client.ext.modulesloader.ModulesLoader;
20 |
21 | /**
22 | * Interface for objects that can construct a ModulesLoader based on the configuration information in the given
23 | * AppConfig instance.
24 | */
25 | public interface ModulesLoaderFactory {
26 |
27 | ModulesLoader newModulesLoader(AppConfig appConfig);
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/util/SimplePropertiesSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.util;
17 |
18 | import com.marklogic.client.ext.tokenreplacer.PropertiesSource;
19 |
20 | import java.util.Properties;
21 |
22 | public class SimplePropertiesSource implements PropertiesSource {
23 |
24 | private Properties props;
25 |
26 | public SimplePropertiesSource(Properties props) {
27 | this.props = props;
28 | }
29 |
30 | @Override
31 | public Properties getProperties() {
32 | return props;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/database/IncludedElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.database;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 |
21 | @XmlAccessorType(XmlAccessType.FIELD)
22 | public class IncludedElement extends ExcludedElement {
23 |
24 | private Double weight;
25 |
26 | public Double getWeight() {
27 | return weight;
28 | }
29 |
30 | public void setWeight(Double weight) {
31 | this.weight = weight;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/mgmt/api/ConnectTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api;
17 |
18 | import org.junit.jupiter.api.Test;
19 |
20 | public class ConnectTest extends AbstractApiTest {
21 |
22 | /**
23 | * Just smoke testing that we can use the connect method to connect to the same host as before.
24 | */
25 | @Test
26 | public void test() {
27 | api.connect(manageConfig.getHost(), manageConfig);
28 | api.getDb().list();
29 |
30 | api.connect(manageConfig.getHost());
31 | api.getDb().list();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/test/resources/sample-app/src/main/ml-config/security/certificate-authorities/server.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIC3TCCAkYCCQCJtpKDQbobyTANBgkqhkiG9w0BAQsFADCBsjELMAkGA1UEBhMC
3 | VVMxCzAJBgNVBAgMAlRYMQ8wDQYDVQQHDAZBdXN0aW4xHjAcBgNVBAoMFU1hcmtM
4 | b2dpYyBDb3Jwb3JhdGlvbjEXMBUGA1UECwwOVFggRW5naW5lZXJpbmcxITAfBgNV
5 | BAMMGE1hcmtMb2dpYyBUWCBFbmdpbmVlcmluZzEpMCcGCSqGSIb3DQEJARYabm9y
6 | bWFuLndhbHNoQG1hcmtsb2dpYy5jb20wHhcNMTQwODI3MTkyMzQyWhcNMTUwODI3
7 | MTkyMzQyWjCBsjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlRYMQ8wDQYDVQQHDAZB
8 | dXN0aW4xHjAcBgNVBAoMFU1hcmtMb2dpYyBDb3Jwb3JhdGlvbjEXMBUGA1UECwwO
9 | VFggRW5naW5lZXJpbmcxITAfBgNVBAMMGE1hcmtMb2dpYyBUWCBFbmdpbmVlcmlu
10 | ZzEpMCcGCSqGSIb3DQEJARYabm9ybWFuLndhbHNoQG1hcmtsb2dpYy5jb20wgZ8w
11 | DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJSo3wFMDvTV7Q+4NDDMu9aJZ6uK4l8b
12 | ACIk5/Ug+MoST+CuIfeBlb2Y6dxNCwkADwVPpykslDcHYFygxFIcnHHVhgqZ0xzu
13 | LPXBagXmHyj+mb6im1tkbqAxQ7gj/SDeCnQYRIwNRlGgWZJFViaYJH3CC8G/f16F
14 | IhDyQS3h28W3AgMBAAEwDQYJKoZIhvcNAQELBQADgYEAWbidV4huPlf8Ac0c3Cbs
15 | Nx2xogODSjNPKqwug0Y3jKx33uxeY7i9oParWSnVFkG0JYUZEfrO5fmtS6JSA1Lk
16 | e3BioC9xgclEYFiDoZSARasL8hdNvu7v+EYZEnS43rR4M7CQiq/Tf50o4VjiVM9S
17 | I0Bo+VZSaShQKipBEHS8sP8=
18 | -----END CERTIFICATE-----
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/security/queryroleset/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage/query-roleset/properties",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "qr", namespaceURI = "http://marklogic.com/manage/query-roleset/properties")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.security.queryroleset;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/selector/RegexResourceSelector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.selector;
17 |
18 | import java.util.regex.Pattern;
19 |
20 | public class RegexResourceSelector extends AbstractNameMatchingResourceSelector {
21 |
22 | private Pattern pattern;
23 |
24 | public RegexResourceSelector(String regex) {
25 | this.pattern = Pattern.compile(regex);
26 | }
27 |
28 | @Override
29 | protected boolean nameMatches(String resourceName) {
30 | return pattern.matcher(resourceName).matches();
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/security/protectedpath/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | @XmlSchema(
17 | namespace = "http://marklogic.com/manage/protected-path/properties",
18 | elementFormDefault = XmlNsForm.QUALIFIED,
19 | xmlns = {
20 | @XmlNs(prefix = "mpp", namespaceURI = "http://marklogic.com/manage/protected-path/properties")
21 | }
22 | )
23 | package com.marklogic.mgmt.api.security.protectedpath;
24 |
25 | import javax.xml.bind.annotation.XmlNs;
26 | import javax.xml.bind.annotation.XmlNsForm;
27 | import javax.xml.bind.annotation.XmlSchema;
28 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/template/security/RoleTemplateBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.template.security;
17 |
18 | import com.marklogic.mgmt.api.security.Role;
19 | import com.marklogic.mgmt.template.GenericTemplateBuilder;
20 |
21 | public class RoleTemplateBuilder extends GenericTemplateBuilder {
22 |
23 | public RoleTemplateBuilder() {
24 | super(Role.class);
25 | addDefaultPropertyValue("role-name", "CHANGEME-name-of-role");
26 | addDefaultPropertyValue("description", "CHANGEME description of role");
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/appdeployer/command/SortOrderConstantsTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command;
17 |
18 | import static org.junit.jupiter.api.Assertions.*;
19 | import org.junit.jupiter.api.Test;
20 |
21 | public class SortOrderConstantsTest {
22 |
23 | @Test
24 | public void undeployMimetypesBeforeUsers() {
25 | assertTrue(SortOrderConstants.DELETE_MIMETYPES < SortOrderConstants.DELETE_USERS,
26 | "Mimetypes need to be undeployed before users since the user doing the deleting may be deleted when users are undeployed");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/modules/AssetModulesFinder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.modules;
17 |
18 | import com.marklogic.client.ext.modulesloader.Modules;
19 | import com.marklogic.client.ext.modulesloader.impl.BaseModulesFinder;
20 |
21 | public class AssetModulesFinder extends BaseModulesFinder {
22 |
23 | @Override
24 | protected Modules findModulesWithResolvedBaseDir(String baseDir) {
25 | Modules modules = new Modules();
26 | addAssetDirectories(modules, baseDir);
27 | return modules;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/template/group/GroupTemplateBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.template.group;
17 |
18 | import com.marklogic.mgmt.api.group.Group;
19 | import com.marklogic.mgmt.template.GenericTemplateBuilder;
20 |
21 | public class GroupTemplateBuilder extends GenericTemplateBuilder {
22 |
23 | public GroupTemplateBuilder() {
24 | super(Group.class);
25 | addDefaultPropertyValue("group-name", "CHANGEME-name-of-group");
26 | addDefaultPropertyValue("metering-enabled", "true");
27 | addDefaultPropertyValue("meters-database", "Meters");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/mgmt/resource/forests/GetMapOfPrimaryForestsTest.java:
--------------------------------------------------------------------------------
1 | package com.marklogic.mgmt.resource.forests;
2 |
3 | import com.marklogic.mgmt.AbstractMgmtTest;
4 | import com.marklogic.mgmt.api.forest.Forest;
5 | import org.junit.jupiter.api.Test;
6 |
7 | import java.util.List;
8 | import java.util.Map;
9 | import java.util.Set;
10 |
11 | import static org.junit.jupiter.api.Assertions.assertTrue;
12 |
13 | public class GetMapOfPrimaryForestsTest extends AbstractMgmtTest {
14 |
15 | /**
16 | * Simple test for verifying this method works for a couple OOTB databases. It is expected that the app-deployer
17 | * tests will stress this method given that CMA is used by a default, and thus this method will be used anytime
18 | * a database is being deployed.
19 | */
20 | @Test
21 | void test() {
22 | Map> mapOfPrimaryForests = new ForestManager(manageClient).getMapOfPrimaryForests();
23 |
24 | Set dbNames = mapOfPrimaryForests.keySet();
25 | assertTrue(dbNames.contains("App-Services"));
26 | assertTrue(dbNames.contains("Documents"));
27 | assertTrue(mapOfPrimaryForests.get("App-Services").size() > 0);
28 | assertTrue(mapOfPrimaryForests.get("Documents").size() > 0);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/databases/DeployDatabaseCommandFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.databases;
17 |
18 | import java.io.File;
19 |
20 | /**
21 | * Abstracts how a DeployDatabaseCommand is instantiated so that Data Hub Framework can provide in its
22 | * own implementation with DHF-specific functionality in it.
23 | */
24 | public interface DeployDatabaseCommandFactory {
25 |
26 | /**
27 | * @param databaseFile can be null
28 | * @return
29 | */
30 | DeployDatabaseCommand newDeployDatabaseCommand(File databaseFile);
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/ManageServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.server;
17 |
18 | public class ManageServer extends Server {
19 | public static final String MANAGE_SERVER_NAME = "Manage";
20 |
21 | public ManageServer() {
22 | setServerName(MANAGE_SERVER_NAME);
23 | setServerType("http");
24 | setRoot("Apps/");
25 | setPort(8002);
26 | setContentDatabase("App-Services");
27 | setErrorHandler("manage/error-handler.xqy");
28 | setUrlRewriter("manage/rewriter.xqy");
29 | setPrivilege("http://marklogic.com/xdmp/privileges/manage");
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/trigger/CollectionScope.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.trigger;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 |
21 | @XmlAccessorType(XmlAccessType.FIELD)
22 | public class CollectionScope {
23 |
24 | private String uri;
25 |
26 | public CollectionScope() {
27 | }
28 |
29 | public CollectionScope(String uri) {
30 | this.uri = uri;
31 | }
32 |
33 | public String getUri() {
34 | return uri;
35 | }
36 |
37 | public void setUri(String uri) {
38 | this.uri = uri;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/ResourceFileManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command;
17 |
18 | import java.io.File;
19 |
20 | /**
21 | * Defines operations for whether a resource file should be processed or not during a deployment.
22 | */
23 | public interface ResourceFileManager {
24 |
25 | /**
26 | * Give the implementor a chance to initialize itself - e.g. loading data from a properties file or other resource.
27 | */
28 | void initialize();
29 |
30 | /**
31 | * @param file
32 | * @return
33 | */
34 | boolean shouldResourceFileBeProcessed(File file);
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/database/FieldIndex.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.database;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 | import javax.xml.bind.annotation.XmlElement;
21 |
22 | @XmlAccessorType(XmlAccessType.FIELD)
23 | public class FieldIndex extends Index {
24 |
25 | @XmlElement(name = "field-name")
26 | private String fieldName;
27 |
28 | public String getFieldName() {
29 | return fieldName;
30 | }
31 |
32 | public void setFieldName(String fieldName) {
33 | this.fieldName = fieldName;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/resource/cpf/CpfConfigManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.cpf;
17 |
18 | import com.marklogic.mgmt.ManageClient;
19 |
20 | public class CpfConfigManager extends AbstractCpfResourceManager {
21 |
22 | public CpfConfigManager(ManageClient client, String databaseIdOrName) {
23 | super(client, databaseIdOrName);
24 | }
25 |
26 | @Override
27 | protected String getIdFieldName() {
28 | return "domain-name";
29 | }
30 |
31 | @Override
32 | protected String getResourceName() {
33 | return "cpf-config";
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/IncrementalFilenameFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command;
17 |
18 | import java.io.FilenameFilter;
19 |
20 | /**
21 | * Extends FilenameFilter to add support for incremental deployments, where only resources that are new or modified since
22 | * a previous deployment will be deployed.
23 | */
24 | public interface IncrementalFilenameFilter extends FilenameFilter {
25 |
26 | /**
27 | * Toggle whether this file performs any incremental check.
28 | *
29 | * @param incrementalMode
30 | */
31 | void setIncrementalMode(boolean incrementalMode);
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/UsingNamespace.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.server;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 | import javax.xml.bind.annotation.XmlElement;
21 |
22 | @XmlAccessorType(XmlAccessType.FIELD)
23 | public class UsingNamespace {
24 |
25 | @XmlElement(name = "namespace-uri")
26 | private String namespaceUri;
27 |
28 | public String getNamespaceUri() {
29 | return namespaceUri;
30 | }
31 |
32 | public void setNamespaceUri(String namespaceUri) {
33 | this.namespaceUri = namespaceUri;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/resource/security/SecureCredentialsManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.security;
17 |
18 | import com.marklogic.mgmt.ManageClient;
19 | import com.marklogic.mgmt.resource.AbstractResourceManager;
20 |
21 | public class SecureCredentialsManager extends AbstractResourceManager {
22 | public SecureCredentialsManager(ManageClient client) {
23 | super(client);
24 | }
25 |
26 | @Override
27 | public String getResourcesPath() {
28 | return "/manage/v2/credentials/secure";
29 | }
30 |
31 | @Override
32 | protected String getIdFieldName() {
33 | return "name";
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/PayloadTokenReplacer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command;
17 |
18 | import com.marklogic.appdeployer.AppConfig;
19 |
20 | /**
21 | * Used by commands to replace tokens in configuration files that are dependent on names of resources in the application.
22 | * Typically, the tokens are replaced by values in the AppConfig instance. This allows for configuration files to be
23 | * reused across applications with different names.
24 | */
25 | public interface PayloadTokenReplacer {
26 |
27 | String replaceTokens(String payload, AppConfig appConfig, boolean isTestResource);
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/database/PathIndex.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.database;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 | import javax.xml.bind.annotation.XmlElement;
21 |
22 | @XmlAccessorType(XmlAccessType.FIELD)
23 | public class PathIndex extends Index {
24 |
25 | @XmlElement(name = "path-expression")
26 | private String pathExpression;
27 |
28 | public String getPathExpression() {
29 | return pathExpression;
30 | }
31 |
32 | public void setPathExpression(String pathExpression) {
33 | this.pathExpression = pathExpression;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/trigger/PropertyContent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.trigger;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 | import javax.xml.bind.annotation.XmlElement;
21 |
22 | @XmlAccessorType(XmlAccessType.FIELD)
23 | public class PropertyContent {
24 |
25 | @XmlElement(name = "property-name")
26 | private PropertyName propertyName;
27 |
28 | public PropertyName getPropertyName() {
29 | return propertyName;
30 | }
31 |
32 | public void setPropertyName(PropertyName propertyName) {
33 | this.propertyName = propertyName;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/trigger/DirectoryScope.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.trigger;
17 |
18 | import javax.xml.bind.annotation.XmlAccessType;
19 | import javax.xml.bind.annotation.XmlAccessorType;
20 |
21 | @XmlAccessorType(XmlAccessType.FIELD)
22 | public class DirectoryScope {
23 |
24 | private String uri;
25 | private String depth;
26 |
27 | public String getUri() {
28 | return uri;
29 | }
30 |
31 | public void setUri(String uri) {
32 | this.uri = uri;
33 | }
34 |
35 | public String getDepth() {
36 | return depth;
37 | }
38 |
39 | public void setDepth(String depth) {
40 | this.depth = depth;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/mgmt/api/AbstractApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api;
17 |
18 | import org.junit.jupiter.api.BeforeEach;
19 |
20 | import com.marklogic.mgmt.AbstractMgmtTest;
21 |
22 | public abstract class AbstractApiTest extends AbstractMgmtTest {
23 |
24 | protected API api;
25 |
26 | @BeforeEach
27 | public void setup() {
28 | api = new API(manageClient);
29 | }
30 |
31 | protected void deleteIfExists(Resource... resources) {
32 | for (Resource r : resources) {
33 | if (r != null && r.exists()) {
34 | r.delete();
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/mapper/ResourceMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.mapper;
17 |
18 | import com.marklogic.mgmt.api.Resource;
19 |
20 | /**
21 | * The eventual plan is for this to have both read and write methods. Immediate need is only for a read method.
22 | */
23 | public interface ResourceMapper {
24 |
25 | /**
26 | * The payload is defined as a string so that the implementation can easily determine whether the payload is
27 | * JSON or XML.
28 | *
29 | * @param payload
30 | * @param type
31 | * @param
32 | * @return
33 | */
34 | T readResource(String payload, Class type);
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/api/server/AppServicesServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.api.server;
17 |
18 | public class AppServicesServer extends Server {
19 | public static final String APP_SERVICES_SERVER_NAME = "App-Services";
20 |
21 | public AppServicesServer() {
22 | setServerName(APP_SERVICES_SERVER_NAME);
23 | setServerType("http");
24 | setRoot("/");
25 | setPort(8000);
26 | setModulesDatabase("Modules");
27 | setContentDatabase("Documents");
28 | setErrorHandler("/MarkLogic/rest-api/8000-error-handler.xqy");
29 | setUrlRewriter("/MarkLogic/rest-api/8000-rewriter.xml");
30 | setRewriteResolvesGlobally(true);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/AbstractUndoableCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command;
17 |
18 | /**
19 | * Useful base class for implementing UndoableCommand, allowing you to configure the undo sort order easily.
20 | */
21 | public abstract class AbstractUndoableCommand extends AbstractCommand implements UndoableCommand {
22 |
23 | private int undoSortOrder = Integer.MAX_VALUE;
24 |
25 | @Override
26 | public Integer getUndoSortOrder() {
27 | return undoSortOrder;
28 | }
29 |
30 | public void setUndoSortOrder(int undoSortOrder) {
31 | this.undoSortOrder = undoSortOrder;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/command/forests/DefaultForestNamingStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.forests;
17 |
18 | import com.marklogic.appdeployer.AppConfig;
19 |
20 | public class DefaultForestNamingStrategy implements ForestNamingStrategy {
21 |
22 | @Override
23 | public String getForestName(String databaseName, int forestNumber, AppConfig appConfig) {
24 | return databaseName + "-" + forestNumber;
25 | }
26 |
27 | @Override
28 | public String getReplicaName(String databaseName, String forestName, int forestReplicaNumber, AppConfig appConfig) {
29 | return forestName + "-replica-" + forestReplicaNumber;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/appdeployer/command/admin/RequireAtLeastMl8Test.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.command.admin;
17 |
18 | import org.junit.jupiter.api.Test;
19 | import org.junit.jupiter.api.AfterEach;
20 |
21 | import com.marklogic.appdeployer.AbstractAppDeployerTest;
22 |
23 | public class RequireAtLeastMl8Test extends AbstractAppDeployerTest {
24 |
25 | @Test
26 | public void testThatNoExceptionIsThrown() {
27 | initializeAppDeployer(new RequireAtLeastMl8Command());
28 | appDeployer.deploy(appConfig);
29 | }
30 |
31 | @AfterEach
32 | public void teardown() {
33 | undeploySampleApp();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/appdeployer/export/ResourceExporter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.export;
17 |
18 | import java.io.File;
19 |
20 | /**
21 | * Interface for exporting one or more MarkLogic resources via the Management API to disk.
22 | *
23 | * This is located in the appdeployer package because of an assumed dependency on the ConfigDir class, which defines
24 | * where resources should be exported to.
25 | */
26 | public interface ResourceExporter {
27 |
28 | String FORMAT_XML = "xml";
29 | String FORMAT_JSON = "json";
30 |
31 | /**
32 | * @param baseDir
33 | * @return
34 | */
35 | ExportedResources exportResources(File baseDir);
36 | }
37 |
--------------------------------------------------------------------------------
/src/test/java/com/marklogic/appdeployer/cli/DeployerDebug.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.appdeployer.cli;
17 |
18 | public class DeployerDebug {
19 |
20 | public static void main(String[] args) throws Exception {
21 | args = new String[]{
22 | "-l", "info",
23 | "-PmlAppName=cli",
24 | "-PmlContentForestsPerHost=1",
25 | "-PmlConfigPath=src/test/resources/sample-app/db-only-config",
26 | "mlDeployContentDatabases"
27 | };
28 |
29 | // args = new String[]{
30 | // "-f", "build/deployer.properties",
31 | // "-u",
32 | // "-l", "INFO",
33 | // "mlDeployContentDatabases"
34 | // };
35 | //args = new String[]{};
36 | Main.main(args);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/DeleteReceipt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt;
17 |
18 | public class DeleteReceipt {
19 |
20 | private String resourceId;
21 | private String path;
22 | private boolean deleted;
23 |
24 | public DeleteReceipt(String resourceId, String path, boolean deleted) {
25 | this.resourceId = resourceId;
26 | this.path = path;
27 | this.deleted = deleted;
28 | }
29 |
30 | public String getResourceId() {
31 | return resourceId;
32 | }
33 |
34 | public String getPath() {
35 | return path;
36 | }
37 |
38 | public boolean isDeleted() {
39 | return deleted;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/mgmt/resource/security/PrivilegeManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.mgmt.resource.security;
17 |
18 | import com.marklogic.mgmt.resource.AbstractResourceManager;
19 | import com.marklogic.mgmt.ManageClient;
20 |
21 | public class PrivilegeManager extends AbstractResourceManager {
22 |
23 | public PrivilegeManager(ManageClient client) {
24 | super(client);
25 | }
26 |
27 | @Override
28 | protected boolean useSecurityUser() {
29 | return true;
30 | }
31 |
32 | @Override
33 | protected String[] getUpdateResourceParams(String payload) {
34 | return new String[] { "kind", payloadParser.getPayloadFieldValue(payload, "kind") };
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/marklogic/rest/util/configurer/UseSystemPropertiesConfigurer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 MarkLogic Corporation
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.marklogic.rest.util.configurer;
17 |
18 | import com.marklogic.rest.util.HttpClientBuilderConfigurer;
19 | import com.marklogic.rest.util.RestConfig;
20 | import org.apache.http.impl.client.HttpClientBuilder;
21 |
22 | /**
23 | * @deprecated since 4.5.0; OkHttp is now the preferred client
24 | */
25 | @Deprecated
26 | public class UseSystemPropertiesConfigurer implements HttpClientBuilderConfigurer {
27 |
28 | @Override
29 | public HttpClientBuilder configureHttpClientBuilder(RestConfig restConfig, HttpClientBuilder httpClientBuilder) {
30 | return httpClientBuilder.useSystemProperties();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------