Mercurial > pub > Impl
comparison _test/Resources/sample.xml @ 224:e6c050db7d98
resources schema update
author | sergey |
---|---|
date | Wed, 29 Aug 2012 17:28:13 +0400 |
parents | edf011437be8 |
children | a1e868b0fba9 |
comparison
equal
deleted
inserted
replaced
223:edf011437be8 | 224:e6c050db7d98 |
---|---|
5 <root> | 5 <root> |
6 <get expr="model" /> | 6 <get expr="model" /> |
7 | 7 |
8 <resource> | 8 <resource> |
9 <name>projects</name> | 9 <name>projects</name> |
10 <model expr="model"/> | 10 <model expr="model" /> |
11 <get expr="model.projects" /> | 11 <get expr="model.projects" /> |
12 | 12 |
13 <post expr="model.CreateProject(project)"> | 13 <post expr="model.CreateProject(project)"> |
14 <var name="project" expr="BindModel()"/> | 14 <var name="project"> |
15 <response xsi:type="RedirectResponse"> | 15 <transform class="IMPL::Web::Transform::BindModel" /> |
16 <locatorRef ref="projects-locator" /> | 16 </var> |
17 <response> | |
18 <redirect> | |
19 <location locator="projects-locator" /> | |
20 </redirect> | |
17 </response> | 21 </response> |
18 </post> | 22 </post> |
19 | 23 |
20 <resource> | 24 <resource> |
21 <match>(\w+)</match> | 25 <match>(\w+)</match> |
22 <model expr="model.GetProject(resourceId)"/> | 26 <model expr="model.GetProject(resourceId)" /> |
23 | 27 |
24 <get expr="model"/> | 28 <get expr="model" /> |
25 <put expr="model.update(data)"> | 29 <put expr="model.update(data)"> |
26 </put> | 30 </put> |
27 | 31 |
28 <resource> | 32 <resource> |
29 <name>library</name> | 33 <name>library</name> |
30 <model expr="model"/> | 34 <model expr="model" /> |
31 <get expr="model"/> | 35 <get expr="model" /> |
32 </resource> | 36 </resource> |
33 <resource> | 37 <resource> |
34 <name>sources</name> | 38 <name>sources</name> |
35 <model expr="model"/> | 39 <model expr="model" /> |
36 <get expr="model"/> | 40 <get expr="model" /> |
37 </resource> | 41 </resource> |
38 </resource> | 42 </resource> |
39 </resource> | 43 </resource> |
40 </root> | 44 </root> |
41 <contracts> | 45 <contracts> |
42 <contract id="project-contract"> | 46 <contract id="project-contract"> |
43 <modelType>Benzin::Model::Project</modelType> | 47 <modelType>Benzin::Model::Project</modelType> |
44 <get/> | 48 <get expr="model"/> |
45 </contract> | 49 </contract> |
46 </contracts> | 50 </contracts> |
47 <locators> | |
48 <locator name="relative-locator"> | |
49 <var name="id" expr="model.id" /> | |
50 <var name="parent" expr="parent.location" /> | |
51 <template>$parent/$id</template> | |
52 </locator> | |
53 <locator name="projects-locator"> | |
54 <var name="id" expr="model.id" /> | |
55 <var name="projects" expr="application.locate('projects')" /> | |
56 <template>$projects/$id</template> | |
57 </locator> | |
58 </locators> | |
59 </resources> | 51 </resources> |