tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r632870 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java
Date Sun, 02 Mar 2008 23:23:33 GMT
Author: hlship
Date: Sun Mar  2 15:23:32 2008
New Revision: 632870

URL: http://svn.apache.org/viewvc?rev=632870&view=rev
Log:
TAPESTRY-1612: Allow access to the PageTester registry

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java?rev=632870&r1=632869&r2=632870&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/test/PageTester.java
Sun Mar  2 15:23:32 2008
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007 The Apache Software Foundation
+// Copyright 2006, 2007, 2008 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -114,6 +114,26 @@
     public void shutdown()
     {
         _registry.shutdown();
+    }
+
+
+    /**
+     * Returns the Registry that was created for the application.
+     */
+    public Registry getRegistry()
+    {
+        return _registry;
+    }
+
+    /**
+     * Allows a service to be retrieved via its service interface.  Use {@link #getRegistry()}
for more complicated
+     * queries.
+     *
+     * @param serviceInterface used to select the service
+     */
+    public <T> T getService(Class<T> serviceInterface)
+    {
+        return _registry.getService(serviceInterface);
     }
 
     /**



Mime
View raw message