gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r759920 - in /gump/mvnrepo/trunk: ./ src/java/org/apache/gump/mvnrepoproxy/ src/java/org/apache/gump/mvnrepoproxy/resources/
Date Mon, 30 Mar 2009 11:13:28 GMT
Author: bodewig
Date: Mon Mar 30 11:13:28 2009
New Revision: 759920

URL: http://svn.apache.org/viewvc?rev=759920&view=rev
Log:
fix some Restlet upgrade related warnings

Modified:
    gump/mvnrepo/trunk/build.xml
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/ArtifactsForm.java
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/GumpArtifact.java
    gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java

Modified: gump/mvnrepo/trunk/build.xml
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/build.xml?rev=759920&r1=759919&r2=759920&view=diff
==============================================================================
--- gump/mvnrepo/trunk/build.xml (original)
+++ gump/mvnrepo/trunk/build.xml Mon Mar 30 11:13:28 2009
@@ -14,6 +14,7 @@
 
   <target name="compile" depends="init">
     <javac srcdir="src/java" destdir="${classes.dir}" source="5"
+           deprecation="true"
            target="5" debug="true">
       <classpath>
         <fileset dir="lib"/>

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java?rev=759920&r1=759919&r2=759920&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/Main.java Mon Mar 30 11:13:28
2009
@@ -33,6 +33,7 @@
 import org.restlet.Router;
 import org.restlet.data.Protocol;
 import org.restlet.service.TunnelService;
+import org.restlet.util.Variable;
 
 /**
  * Main entry point
@@ -87,16 +88,18 @@
     public static Component getRepositoryComponent() {
         final Component component = new Component();
         
-        Application repoApp = new Application(component.getContext()) {
+        Application repoApp = new Application(component.getContext()
+                                              .createChildContext()) {
 
                 @Override public Restlet createRoot() {
-                    Router router = new Router(getContext());
+                    Router router = new Router(getContext()
+                                               .createChildContext());
 
                     // known artifacts or proxy requests for jars
-                    router.attach(Constants.JAR_ARTIFACT_TEMPLATE,
-                                  Jar.class);
-                    router.attach(Constants.CHECKSUM_ARTIFACT_TEMPLATE,
-                                  Checksum.class);
+                    Route r = router.attach(Constants.JAR_ARTIFACT_TEMPLATE,
+                                            Jar.class);
+                    r = router.attach(Constants.CHECKSUM_ARTIFACT_TEMPLATE,
+                                      Checksum.class);
 
                     // other resources
                     router.attach("/proxyLog.html", LogFile.class);
@@ -104,8 +107,9 @@
                     router.attach("/addartifact.html", ArtifactsForm.class);
 
                     // Restlet that registers artifacts
-                    Route r = router.attach("/addartifact",
-                                            new ArtifactAdder(getContext()));
+                    r = router.attach("/addartifact",
+                                      new ArtifactAdder(getContext()
+                                                        .createChildContext()));
                     r.extractEntity(Constants.GROUP_ID,
                                     Constants.GROUP_ID, true);
                     r.extractEntity(Constants.ARTIFACT_ID,
@@ -114,10 +118,13 @@
                                     Constants.FILE_NAME, true);
 
                     // Restlet that stops the server
-                    router.attach("/stop", new Stop(getContext(), component));
+                    router.attach("/stop", new Stop(getContext()
+                                                    .createChildContext(),
+                                                    component));
 
                     // catch all - proxy to real repository
-                    router.attach("/", new Proxy(getContext(),
+                    router.attach("/", new Proxy(getContext()
+                                                 .createChildContext(),
                                                  Constants.MVN_REPO_HOST
                                                  + "/{rr}"));
 

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/ArtifactsForm.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/ArtifactsForm.java?rev=759920&r1=759919&r2=759920&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/ArtifactsForm.java
(original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/ArtifactsForm.java
Mon Mar 30 11:13:28 2009
@@ -49,7 +49,7 @@
     }
 
     @Override
-    public Representation getRepresentation(Variant v) {
+    public Representation represent(Variant v) {
         return new StringRepresentation(FORM, MediaType.TEXT_HTML);
     }
 }
\ No newline at end of file

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/GumpArtifact.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/GumpArtifact.java?rev=759920&r1=759919&r2=759920&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/GumpArtifact.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/GumpArtifact.java Mon
Mar 30 11:13:28 2009
@@ -58,7 +58,7 @@
      * The local file or a proxied request
      */
     @Override
-    public Representation getRepresentation(Variant v) {
+    public Representation represent(Variant v) {
         served.add(new LogEntry(fileName != null
                                 ? ArtifactState.FROM_FILE
                                 : ArtifactState.PROXIED,

Modified: gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java
URL: http://svn.apache.org/viewvc/gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java?rev=759920&r1=759919&r2=759920&view=diff
==============================================================================
--- gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java (original)
+++ gump/mvnrepo/trunk/src/java/org/apache/gump/mvnrepoproxy/resources/LogFile.java Mon Mar
30 11:13:28 2009
@@ -85,7 +85,7 @@
     }
 
     @Override
-    public Representation getRepresentation(Variant v) {
+    public Representation represent(Variant v) {
 	StringBuilder result = new StringBuilder(HEAD);
 	int i = 1;
 	for (LogEntry entry : GumpArtifact.getServedArtifacts()) {



Mime
View raw message