Mercurial > dive4elements > framework
diff 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 |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/RestApp.java Fri Mar 26 11:40:28 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/RestApp.java Fri Mar 26 15:05:11 2010 +0000 @@ -11,21 +11,43 @@ import org.restlet.routing.Router; /** + * This is the core REST application that binds the serveral resources + * used to manage the artifact database to the HTTP server provided + * by the Restlet framework. * * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class RestApp extends Application { + /** + * The central artifact database instance to work with. + */ protected ArtifactDatabase database; + /** + * Default constructor + */ public RestApp() { } + /** + * Constructor to create REST appliction bound to a specific + * artifact database. + * + * @param database The artifact database to be used. + */ public RestApp(ArtifactDatabase database) { this.database = database; } + /** + * Overwrites the createRoot() method of Application to + * build the resource tree to form the exposed server URLs. + * + * @return The root of the URL tree exposed by the HTTP server. + */ + @Override public Restlet createRoot() { Context context = getContext();