If all went well, typing help
should include our book:search
command in the listing:
g! help
book:search <-- this is our command!
felix:bundlelevel
felix:cd
felix:frameworklevel
felix:headers
felix:help
felix:inspect
felix:install
felix:lb
felix:log
felix:ls
...
Also check that the help command displays the command syntax as we have intended it to be:
-g! help search
search - Search books by rating
scope: book
parameters:
String username
String password
String search on attribute: rating
int lower rating limit (inclusive)
int upper rating limit (inclusive)
search - Search books by author, title, or category
scope: book
parameters:
String username
String password
String search on attribute: author, title, or category
String match like (use % at the beginning or end of <like> for wild-card)
Notice the two syntax help entries available for the search
command, as we had defined them in the service proxy previously— one that takes five parameters (the last two being integers), and the other that takes four Strings.
Let's give it a try with the books we've added during the activation of the bookshelf-service
. Search for authors ending with "Doe":
g! search admin admin author %Doe
Group 2: Book 3 Title from John Doe [0]
Group 2: Book 4 Title from Jane Doe [0]
Group 1: Book 1 Title from John Doe [0]
And a more restrictive search for authors starting with "John":
g! search admin admin author John%
Group 2: Book 3 Title from John Doe [0]
Group 1: Book 1 Title from John Doe [0]
The search
command works as expected.
3.149.228.138