Skip to content

Commit d4d57d0

Browse files
committed
Merge pull request #1 from grechaw/master
Improved bootstrap, README
2 parents 1a46ba2 + ff552db commit d4d57d0

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ The Java API supports the following core features of the MarkLogic database:
1414
* Execute ACID modifications so the change either succeeds or throws an exception.
1515
* Execute multi-statement transactions so changes to multiple documents succeed or fail together.
1616

17+
### QuickStart
18+
19+
For people working with MarkLogic 8 EA
20+
21+
mvn test-compile
22+
sh src/test/resources/boot-test.sh
23+
mvn test
24+
1725
### Learning More
1826

1927
The following resources introduce and document the Java API:

src/test/resources/bootstrap.xqy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,17 +746,18 @@ declare function bootstrap:post(
746746
$input as document-node()*
747747
) as document-node()*
748748
{
749-
for $user in ("rest-admin", "rest-reader", "rest-writer", "valid")
749+
for $user in ("rest-admin", "rest-reader", "rest-writer", "valid")
750750
let $user-id :=
751751
try {
752752
xdmp:user($user)
753753
} catch($e) {
754+
xdmp:log("User "||$user||" not found.")
754755
}
755756
return
756-
if (exists($user-id)) then ()
757+
if (exists($user-id)) then xdmp:log("User "|| $user || ", id "||$user-id|| "already exists")
757758
else if ($user eq "valid")
758759
then bootstrap:security-config('sec:create-user("valid", "valid unprivileged user", "x", (), (), (), ())')
759-
else bootstrap:security-config('sec:create-user($user, $user||" user", "x", ($user), (), (), () )'),
760+
else bootstrap:security-config('sec:create-user("'||$user||'", "'||$user||' user", "x", ("'||$user||'"), (), (), () )'),
760761

761762
let $dbid := xdmp:database("java-unittest")
762763
return (

0 commit comments

Comments
 (0)