Return-Path: Delivered-To: apmail-gump-commits-archive@www.apache.org Received: (qmail 86639 invoked from network); 30 Mar 2009 11:13:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Mar 2009 11:13:52 -0000 Received: (qmail 31290 invoked by uid 500); 30 Mar 2009 11:13:52 -0000 Mailing-List: contact commits-help@gump.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@gump.apache.org Delivered-To: mailing list commits@gump.apache.org Received: (qmail 31281 invoked by uid 99); 30 Mar 2009 11:13:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 11:13:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 11:13:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 250C723889F5; Mon, 30 Mar 2009 11:13:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@gump.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090330111329.250C723889F5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 @@ 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()) {