218
|
1 <?xml version="1.0" encoding="UTF-8"?>
|
221
|
2 <resources xmlns="http://implab.org/schemas/resources"
|
|
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4 xsi:schemaLocation="http://implab.org/schemas/resources resources.xsd ">
|
|
5 <root>
|
223
|
6 <get expr="model" />
|
|
7
|
|
8 <resource>
|
|
9 <name>projects</name>
|
|
10 <model expr="model"/>
|
|
11 <get expr="model.projects" />
|
|
12
|
|
13 <post expr="model.CreateProject(project)">
|
|
14 <var name="project" expr="BindModel()"/>
|
|
15 <response xsi:type="RedirectResponse">
|
|
16 <locatorRef ref="projects-locator" />
|
|
17 </response>
|
|
18 </post>
|
221
|
19
|
223
|
20 <resource>
|
|
21 <match>(\w+)</match>
|
|
22 <model expr="model.GetProject(resourceId)"/>
|
|
23
|
|
24 <get expr="model"/>
|
|
25 <put expr="model.update(data)">
|
|
26 </put>
|
|
27
|
|
28 <resource>
|
|
29 <name>library</name>
|
|
30 <model expr="model"/>
|
|
31 <get expr="model"/>
|
|
32 </resource>
|
|
33 <resource>
|
|
34 <name>sources</name>
|
|
35 <model expr="model"/>
|
|
36 <get expr="model"/>
|
|
37 </resource>
|
|
38 </resource>
|
221
|
39 </resource>
|
|
40 </root>
|
223
|
41 <contracts>
|
|
42 <contract id="project-contract">
|
|
43 <modelType>Benzin::Model::Project</modelType>
|
|
44 <get/>
|
|
45 </contract>
|
|
46 </contracts>
|
221
|
47 <locators>
|
222
|
48 <locator name="relative-locator">
|
223
|
49 <var name="id" expr="model.id" />
|
|
50 <var name="parent" expr="parent.location" />
|
221
|
51 <template>$parent/$id</template>
|
|
52 </locator>
|
222
|
53 <locator name="projects-locator">
|
223
|
54 <var name="id" expr="model.id" />
|
|
55 <var name="projects" expr="application.locate('projects')" />
|
221
|
56 <template>$projects/$id</template>
|
|
57 </locator>
|
|
58 </locators>
|
218
|
59 </resources> |