Definition of all resources' path » History » Version 1
Guanji Wang, 27/07/2017 16:17
1 | 1 | Guanji Wang | h1. Definition of the main resources' path |
---|---|---|---|
2 | 1 | Guanji Wang | |
3 | 1 | Guanji Wang | h2. 1. Application for managing projects dependencies : *Projects* |
4 | 1 | Guanji Wang | |
5 | 1 | Guanji Wang | h3. 1.a The java file position where the projects' dependencies are created : |
6 | 1 | Guanji Wang | |
7 | 1 | Guanji Wang | fr.cnes.sitools.core/src/fr/cnes/sitools/project/ProjectAdministration.java |
8 | 1 | Guanji Wang | |
9 | 1 | Guanji Wang | |
10 | 1 | Guanji Wang | h3. 1.b How the dependencies are created : |
11 | 1 | Guanji Wang | |
12 | 1 | Guanji Wang | By using org.restlet.routing.Router.Router(Context context) method: |
13 | 1 | Guanji Wang | |
14 | 1 | Guanji Wang | <pre><code class="java"> |
15 | 1 | Guanji Wang | |
16 | 1 | Guanji Wang | Router router = new Router(getContext()); |
17 | 1 | Guanji Wang | |
18 | 1 | Guanji Wang | router.attachDefault(ProjectCollectionResource.class); |
19 | 1 | Guanji Wang | |
20 | 1 | Guanji Wang | // attach dynamic resources |
21 | 1 | Guanji Wang | attachParameterizedResources(router); |
22 | 1 | Guanji Wang | |
23 | 1 | Guanji Wang | router.attach("/{projectId}", ProjectResource.class); |
24 | 1 | Guanji Wang | router.attach("/{projectId}/start", ActivationProjectResource.class); |
25 | 1 | Guanji Wang | router.attach("/{projectId}/stop", ActivationProjectResource.class); |
26 | 1 | Guanji Wang | router.attach("/{projectId}/startmaintenance", ActivationProjectResource.class); |
27 | 1 | Guanji Wang | router.attach("/{projectId}/stopmaintenance", ActivationProjectResource.class); |
28 | 1 | Guanji Wang | |
29 | 1 | Guanji Wang | // graph resource |
30 | 1 | Guanji Wang | router.attach("/{projectId}/graph", GraphResource.class); |
31 | 1 | Guanji Wang | |
32 | 1 | Guanji Wang | // graph resource |
33 | 1 | Guanji Wang | router.attach("/{projectId}/datasets", ProjectDatasetCollectionResource.class); |
34 | 1 | Guanji Wang | |
35 | 1 | Guanji Wang | // notification des modifications de resources liées au projet |
36 | 1 | Guanji Wang | router.attach("/{projectId}/notify", ProjectNotificationResource.class); |
37 | 1 | Guanji Wang | router.attach("/{projectId}/graph/notify", GraphNotificationResource.class); |
38 | 1 | Guanji Wang | |
39 | 1 | Guanji Wang | </code></pre> |
40 | 1 | Guanji Wang | |
41 | 1 | Guanji Wang | |
42 | 1 | Guanji Wang | |
43 | 1 | Guanji Wang | |
44 | 1 | Guanji Wang | h2. 2. Application for managing datasets dependencies : *Datasets* |
45 | 1 | Guanji Wang | |
46 | 1 | Guanji Wang | h3. 2.a The java file position where the datasets' dependencies are created : |
47 | 1 | Guanji Wang | |
48 | 1 | Guanji Wang | fr.cnes.sitools.core/src/fr/cnes/sitools/dataset/DataSetAdministration.java |
49 | 1 | Guanji Wang | |
50 | 1 | Guanji Wang | |
51 | 1 | Guanji Wang | h3. 2.b How the dependencies are created : |
52 | 1 | Guanji Wang | |
53 | 1 | Guanji Wang | By using org.restlet.routing.Router.Router(Context context) method: |
54 | 1 | Guanji Wang | |
55 | 1 | Guanji Wang | |
56 | 1 | Guanji Wang | |
57 | 1 | Guanji Wang | <pre><code class="java"> |
58 | 1 | Guanji Wang | Router router = new Router(getContext()); |
59 | 1 | Guanji Wang | |
60 | 1 | Guanji Wang | router.attachDefault(DataSetCollectionResource.class); |
61 | 1 | Guanji Wang | |
62 | 1 | Guanji Wang | // attach dynamic resources |
63 | 1 | Guanji Wang | attachParameterizedResources(router); |
64 | 1 | Guanji Wang | |
65 | 1 | Guanji Wang | router.attach("/{datasetId}", DataSetResource.class); |
66 | 1 | Guanji Wang | |
67 | 1 | Guanji Wang | router.attach("/{datasetId}/start", ActivationDataSetResource.class); |
68 | 1 | Guanji Wang | router.attach("/{datasetId}/getSqlString", ActivationDataSetResource.class); |
69 | 1 | Guanji Wang | router.attach("/{datasetId}/stop", ActivationDataSetResource.class); |
70 | 1 | Guanji Wang | router.attach("/{datasetId}/refresh", RefreshDataSetResource.class); |
71 | 1 | Guanji Wang | |
72 | 1 | Guanji Wang | router.attach("/{datasetId}/notify", DataSetNotificationResource.class); |
73 | 1 | Guanji Wang | router.attach("/{datasetId}/mappings", DataSetDictionaryMappingCollectionResource.class); |
74 | 1 | Guanji Wang | router.attach("/{datasetId}/mappings/{dictionaryId}", DataSetDictionaryMappingResource.class); |
75 | 1 | Guanji Wang | </code></pre> |