Skip to content

Commit 080a89e

Browse files
committed
Added section SelectionRepositoryService
1 parent 3db5979 commit 080a89e

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,56 @@ Later...
2525

2626
## SelectionRepositoryService
2727

28+
**List<Map> list(String location, String username = null)**
29+
30+
List saved selections.
31+
32+
Parameter | Description
33+
--------- | -----------------
34+
location | Typically the root entity name for the query (com.foo.CustomerAddress -> customerAddress)
35+
username | Return only selections saved by a specific user
36+
37+
**URI get(Long id)**
38+
39+
Get the URI for a selection in the repository.
40+
41+
Parameter | Description
42+
--------- | -----------------
43+
id | Lookup selection based on it's primary key
44+
45+
46+
**URI put(URI selection, String location, String username, String name, String description = null)**
47+
48+
Save a selection in the repository.
49+
50+
Parameter | Description
51+
----------- | -----------------
52+
selection | The selection to save in the repository
53+
location | Typically the root entity name for the query (com.foo.CustomerAddress -> customerAddress)
54+
username | Save the selection in a specific user's repository. If not specified the selection will be available to all users
55+
name | A short name for the selection. This will typically be displayed in select menus
56+
description | A text that explains what the selection returns, for example "This query will find all customers in France"
57+
58+
**void delete(Long id)**
59+
60+
Remove a selection from the repository
61+
62+
Parameter | Description
63+
--------- | -----------------
64+
id | Primary key of the selection to remove
65+
66+
### Repository Object
67+
68+
The object returned by *list()* has the following properties:
69+
70+
Property | Description
71+
------------------ | ---------------
72+
String location | Typically the root entity name for the query (com.foo.CustomerAddress -> customerAddress)
73+
String username | User that saved the selection
74+
String name | Selection name given by the user
75+
String description | Selection description given by the user
76+
URI uri | The selection URI - this is the object you send to *selectionService.select(URI)* to execute the query
77+
2878
## GSP Tags
2979

3080
### listRepo
@@ -37,7 +87,7 @@ tenant | (optional) List only selections saved in a specific tenant. In a mul
3787
var | (optional) The name of the selection item, defaults to "it".
3888
status | (optional) The name of a variable to store the iteration index in.
3989

40-
The object available in the tag body via **var** has the following properties:
90+
The object available in the tag body via **var** is described in section **Repository Object** above.
4191

4292
Property | Description
4393
------------------ | ---------------

0 commit comments

Comments
 (0)