Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/rest/RestApp.java @ 88:69c84cf7c5d7
Added javadoc to the REST package of the artifact database (complete).
artifacts/trunk@840 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 26 Mar 2010 15:05:11 +0000 |
parents | 8447467cef86 |
children | 933bbc9fc11f |
comparison
equal
deleted
inserted
replaced
87:0f48188a6e02 | 88:69c84cf7c5d7 |
---|---|
9 import org.restlet.Restlet; | 9 import org.restlet.Restlet; |
10 | 10 |
11 import org.restlet.routing.Router; | 11 import org.restlet.routing.Router; |
12 | 12 |
13 /** | 13 /** |
14 * This is the core REST application that binds the serveral resources | |
15 * used to manage the artifact database to the HTTP server provided | |
16 * by the Restlet framework. | |
14 * | 17 * |
15 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | 18 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
16 */ | 19 */ |
17 public class RestApp | 20 public class RestApp |
18 extends Application | 21 extends Application |
19 { | 22 { |
23 /** | |
24 * The central artifact database instance to work with. | |
25 */ | |
20 protected ArtifactDatabase database; | 26 protected ArtifactDatabase database; |
21 | 27 |
28 /** | |
29 * Default constructor | |
30 */ | |
22 public RestApp() { | 31 public RestApp() { |
23 } | 32 } |
24 | 33 |
34 /** | |
35 * Constructor to create REST appliction bound to a specific | |
36 * artifact database. | |
37 * | |
38 * @param database The artifact database to be used. | |
39 */ | |
25 public RestApp(ArtifactDatabase database) { | 40 public RestApp(ArtifactDatabase database) { |
26 this.database = database; | 41 this.database = database; |
27 } | 42 } |
28 | 43 |
44 /** | |
45 * Overwrites the createRoot() method of Application to | |
46 * build the resource tree to form the exposed server URLs. | |
47 * | |
48 * @return The root of the URL tree exposed by the HTTP server. | |
49 */ | |
50 @Override | |
29 public Restlet createRoot() { | 51 public Restlet createRoot() { |
30 | 52 |
31 Context context = getContext(); | 53 Context context = getContext(); |
32 | 54 |
33 ConcurrentMap map = context.getAttributes(); | 55 ConcurrentMap map = context.getAttributes(); |