Changeset 748
- Timestamp:
- 2008-11-07 17:04:47 (5 years ago)
- Location:
- trunk
- Files:
-
- 85 edited
- 5 copied
- 6 moved
-
core/kauri-runtime-rapi/src/main/java/org/kauriproject/runtime/rapi/KauriModule.java (modified) (2 diffs)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/HelloWorldTest.java (modified) (1 diff)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/ServiceProtocolRemainingPartTest.java (moved) (moved from trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/KmRemainingPartTest.java) (2 diffs)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/ServiceProtocolToPublicTest.java (moved) (moved from trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/KmToPublicTest.java) (6 diffs)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/common/InternalRequestRestlet.java (modified) (1 diff)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/sprp (moved) (moved from trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/kmrp)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/sprp/ProxyRestlet.java (copied) (copied from trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/kmrp/ProxyRestlet.java) (1 diff)
-
core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/sprp/RpRestlet.java (copied) (copied from trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/kmrp/RpRestlet.java) (1 diff)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sprp (moved) (moved from trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/kmrp)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sprp/KAURI-INF (copied) (copied from trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/kmrp/KAURI-INF)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sprp/KAURI-INF/spring/kmrp-beans.xml (modified) (1 diff)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sptopublic1 (moved) (moved from trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/kmtopublic1)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sptopublic1/KAURI-INF (copied) (copied from trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/kmtopublic1/KAURI-INF)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sptopublic2 (moved) (moved from trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/kmtopublic2)
-
core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sptopublic2/KAURI-INF (copied) (copied from trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/kmtopublic2/KAURI-INF)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/Constants.java (modified) (2 diffs)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/build/ModuleBuilder.java (modified) (1 diff)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/ModuleClientDispatcher.java (modified) (2 diffs)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/RestserviceFacet.java (modified) (1 diff)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/RestserviceHandle.java (modified) (1 diff)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/RestserviceManager.java (modified) (1 diff)
-
core/kauri-runtime/src/main/java/org/kauriproject/runtime/rapi_impl/KauriModuleImpl.java (modified) (1 diff)
-
modules/kauri-dbresources/kauri-dbresources-impl/src/main/java/org/kauriproject/dbresources/DatabaseResource.java (modified) (1 diff)
-
modules/kauri-forms/kauri-forms-datejs/src/main/kauri/router.groovy (modified) (1 diff)
-
modules/kauri-forms/kauri-forms-framework/src/main/kauri/router.groovy (modified) (1 diff)
-
modules/kauri-forms/kauri-forms-jquery-ui/src/main/kauri/router.groovy (modified) (1 diff)
-
modules/kauri-forms/kauri-forms-jquery/src/main/kauri/router.groovy (modified) (1 diff)
-
modules/kauri-representation/kauri-representationbuilder-impl/src/main/java/org/kauriproject/representation/build/impl/RepresentationResolver.java (modified) (2 diffs)
-
modules/kauri-representation/kauri-representationbuilder-impl/src/main/resources/org/kauriproject/representation/build/impl/defaultrepresentations.groovy (modified) (1 diff)
-
modules/kauri-representation/kauri-representationbuilder-impl/src/test/java/org/kauriproject/representation/test/BuilderTest.java (modified) (1 diff)
-
modules/kauri-routing/kauri-routing-impl/src/main/java/org/kauriproject/routing/impl/components/PagesRestlet.java (modified) (1 diff)
-
modules/kauri-routing/kauri-routing-impl/src/main/java/org/kauriproject/routing/impl/groovybuild/GroovyKauriRouterBuilder.java (modified) (1 diff)
-
modules/kauri-routing/kauri-routing-impl/src/main/java/org/kauriproject/routing/impl/routing/KauriRouter.java (modified) (1 diff)
-
modules/kauri-routing/kauri-routing-impl/src/main/resources/org/kauriproject/routing/impl/groovybuild/defaultrouter.groovy (modified) (1 diff)
-
modules/kauri-routing/kauri-routing-impl/src/test/modulesrc/org/kauriproject/routing/test/testmodules/routing1/KAURI-INF/router.groovy (modified) (1 diff)
-
modules/kauri-security/kauri-security-impl/src/test/java/org/kauriproject/security/test/KauriSecurityTest.java (modified) (1 diff)
-
modules/kauri-security/kauri-security-impl/src/test/java/org/kauriproject/security/test/common/InternalRequestRestlet.java (modified) (1 diff)
-
modules/kauri-security/kauri-security-impl/src/test/modulesrc/org/kauriproject/security/test/testmodules/security/KAURI-INF/spring/security-beans.xml (modified) (1 diff)
-
modules/kauri-template/kauri-template-service-impl/src/main/java/org/kauriproject/template/service/impl/KauriFunctions.java (modified) (1 diff)
-
modules/kauri-template/kauri-template-service-impl/src/test/modulesrc/org/kauriproject/template/service/test/testmodules/template_ext/KAURI-INF/router.groovy (modified) (1 diff)
-
modules/kauri-upload/src/main/java/org/kauriproject/upload/UploadRestlet.java (modified) (1 diff)
-
modules/kauri-upload/src/main/kauri/router.groovy (modified) (2 diffs)
-
modules/kauri-upload/src/main/kauri/spring/upload-app-context.xml (modified) (1 diff)
-
pom.xml (modified) (1 diff)
-
samples/kauri-dbforms-sample/src/main/java/org/kauriproject/samples/dbforms/AddressValidationRestService.java (modified) (1 diff)
-
samples/kauri-dbforms-sample/src/main/java/org/kauriproject/samples/dbforms/BusinessRestlet.java (modified) (3 diffs)
-
samples/kauri-dbforms-sample/src/main/java/org/kauriproject/samples/dbforms/CrudRestlet.java (modified) (1 diff)
-
samples/kauri-dbforms-sample/src/main/kauri/public/address.xml (modified) (2 diffs)
-
samples/kauri-dbforms-sample/src/main/kauri/public/addresses.xml (modified) (2 diffs)
-
samples/kauri-dbforms-sample/src/main/kauri/public/index.xml (modified) (1 diff)
-
samples/kauri-dbforms-sample/src/main/kauri/public/person.xml (modified) (4 diffs)
-
samples/kauri-dbforms-sample/src/main/kauri/public/persons.xml (modified) (2 diffs)
-
samples/kauri-dbforms-sample/src/main/kauri/router.groovy (modified) (1 diff)
-
samples/kauri-dbresources-sample/src/main/java/org/kauriproject/samples/dbresources/CrudRestlet.java (modified) (1 diff)
-
samples/kauri-dbresources-sample/src/main/java/org/kauriproject/samples/dbresources/IndexRestlet.java (modified) (1 diff)
-
samples/kauri-dbresources-sample/src/main/kauri/public/index.xml (modified) (1 diff)
-
samples/kauri-forms-sample/src/main/java/org/kauriproject/samples/forms/DataFormRestService.java (modified) (4 diffs)
-
samples/kauri-forms-sample/src/main/kauri/router.groovy (modified) (2 diffs)
-
samples/kauri-forms-sample/src/main/kauri/spring/forms-sample-beans.xml (modified) (1 diff)
-
samples/kauri-forms-sample/src/main/kauri/templates/css.xml (modified) (1 diff)
-
samples/kauri-forms-sample/src/main/kauri/templates/data/sample-detail.xml (modified) (2 diffs)
-
samples/kauri-forms-sample/src/main/kauri/templates/data/sample-form-config.xml (modified) (2 diffs)
-
samples/kauri-forms-sample/src/main/kauri/templates/data/sample-form.xml (modified) (2 diffs)
-
samples/kauri-forms-sample/src/main/kauri/templates/data/sample-list.xml (modified) (3 diffs)
-
samples/kauri-forms-sample/src/main/kauri/templates/index.xml (modified) (4 diffs)
-
samples/kauri-jqgrid-sample/src/main/java/org/kauriproject/samples/grid/GridRestlet.java (modified) (1 diff)
-
samples/kauri-jqgrid-sample/src/main/java/org/kauriproject/samples/grid/TemplateRestlet.java (modified) (1 diff)
-
samples/kauri-jqgrid-sample/src/main/kauri/public/grid.xml (modified) (1 diff)
-
samples/kauri-jqgrid-sample/src/main/kauri/public/grid_edit.xml (modified) (1 diff)
-
samples/kauri-jqgrid-sample/src/main/kauri/public/grid_local.xml (modified) (1 diff)
-
samples/kauri-jqgrid-sample/src/main/kauri/public/index.xml (modified) (1 diff)
-
samples/kauri-jqgrid-sample/src/main/kauri/router.groovy (modified) (1 diff)
-
samples/kauri-representationbuilder-sample/src/main/kauri/representations.groovy (modified) (1 diff)
-
samples/kauri-representationbuilder-sample/src/main/kauri/router.groovy (modified) (1 diff)
-
samples/kauri-routing-sample/src/main/kauri/router.groovy (modified) (3 diffs)
-
samples/kauri-routing-sample/src/main/kauri/templates/index.xml (modified) (3 diffs)
-
samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/router.groovy (modified) (1 diff)
-
samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/templates/index.xml (modified) (1 diff)
-
samples/kauri-runtime-sample/kauri-runtime-sample-module1/src/main/java/org/kauriproject/samples/samplemodule1/MySecondRestlet.java (modified) (1 diff)
-
samples/kauri-runtime-sample/kauri-runtime-sample-module1/src/main/java/org/kauriproject/samples/samplemodule1/MyThirdRestlet.java (modified) (1 diff)
-
samples/kauri-runtime-sample/kauri-runtime-sample-module2/src/main/kauri/spring/runtime-sample-module2-beans.xml (modified) (1 diff)
-
samples/kauri-template-sample/src/main/java/org/kauriproject/samples/template/TemplateRestlet.java (modified) (1 diff)
-
samples/kauri-template-sample/src/main/java/org/kauriproject/samples/template/TemplateRestlet2.java (modified) (1 diff)
-
samples/kauri-template-sample/src/main/kauri/public/helloworld.xml (modified) (2 diffs)
-
samples/kauri-template-sample/src/main/kauri/public/index.xml (modified) (2 diffs)
-
samples/kauri-template-sample/src/main/kauri/public/page.xml (modified) (1 diff)
-
samples/kauri-template-sample/src/main/kauri/public/page_with_notes.xml (modified) (1 diff)
-
samples/kauri-template-sample/src/main/kauri/router.groovy (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-basic/src/main/resources/archetype-resources/module1/src/main/kauri/representations.groovy (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-basic/src/main/resources/archetype-resources/module1/src/main/kauri/router.groovy (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/pages/index.html.xml (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/pages/persons/{id}.html.xml (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/representations.groovy (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/router.groovy (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/spring/production/module1-production-beans.xml (modified) (1 diff)
-
tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/spring/prototype/module1-prototype-beans.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/kauri-runtime-rapi/src/main/java/org/kauriproject/runtime/rapi/KauriModule.java
r671 r748 7 7 public interface KauriModule { 8 8 /** 9 * Converts URIs in kmscheme to 'public URIs' based on the mounting information9 * Converts URIs in service scheme to 'public URIs' based on the mounting information 10 10 * of the restservices. 11 11 * … … 17 17 * path part will always stay absolute. 18 18 */ 19 String publicUri(String kmUri, Reference hostRef);19 String publicUri(String serviceProtocolUri, Reference hostRef); 20 20 21 21 ModuleSource getSource(); -
trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/HelloWorldTest.java
r252 r748 30 30 assertEquals("Hello World!", response.getEntity().getText()); 31 31 32 response = runtime.getModuleById("hw").getRestserviceFacet().getRestletContext().getClientDispatcher().get(" km:/helloWorldRestlet");32 response = runtime.getModuleById("hw").getRestserviceFacet().getRestletContext().getClientDispatcher().get("service:/helloWorldRestlet"); 33 33 assertEquals(200, response.getStatus().getCode()); 34 34 assertEquals("Hello World!", response.getEntity().getText()); -
trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/ServiceProtocolRemainingPartTest.java
r746 r748 10 10 11 11 /** 12 * Tests the remaing part for ' km:' requests is correctly set.12 * Tests the remaing part for 'service:' requests is correctly set. 13 13 */ 14 public class KmRemainingPartTest extends AbstractRuntimeTest {14 public class ServiceProtocolRemainingPartTest extends AbstractRuntimeTest { 15 15 protected KauriRuntimeConfig getRuntimeConfig() throws Exception { 16 File moduleDir = createModule("org.kauriproject.runtime.test.testmodules. kmrp");16 File moduleDir = createModule("org.kauriproject.runtime.test.testmodules.sprp"); // sprp = service protocol remaining part 17 17 18 18 KauriRuntimeConfig config = new KauriRuntimeConfig(); 19 19 config.setRepository(dummyRepository); 20 20 21 ModuleDefinition module = new ModuleDefinition(" kmrp", moduleDir, ModuleSourceType.EXPANDED_JAR);21 ModuleDefinition module = new ModuleDefinition("sprp", moduleDir, ModuleSourceType.EXPANDED_JAR); 22 22 module.addMount(new MountDefinition("proxyRestlet", "", null, true)); 23 23 config.addModule(module); … … 29 29 } 30 30 31 public void test Km() throws IOException {31 public void testServiceProtocol() throws IOException { 32 32 Response response = runtime.getRestserviceManager().getComponent().getContext().getClientDispatcher().get("http://localhost:" + HTTP_TEST_PORT + "/"); 33 33 assertEquals(200, response.getStatus().getCode()); -
trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/ServiceProtocolToPublicTest.java
r746 r748 10 10 11 11 /** 12 * Tests the conversion of ' km:' URLs to public URLs.12 * Tests the conversion of 'service:' URLs to public URLs. 13 13 */ 14 public class KmToPublicTest extends AbstractRuntimeTest {15 public void test KmToPublic() throws Exception {16 // The km-to-public URI conversion needs to be tested for the following kinds of14 public class ServiceProtocolToPublicTest extends AbstractRuntimeTest { 15 public void testServiceProtocolToPublic() throws Exception { 16 // The -to-public URI conversion needs to be tested for the following kinds of 17 17 // restservice registry entries: 18 18 // - exported restservice … … 26 26 27 27 { 28 File moduleDir2 = createModule("org.kauriproject.runtime.test.testmodules. kmtopublic2");29 ModuleDefinition module2 = new ModuleDefinition(" kmtopublic2", moduleDir2, ModuleSourceType.EXPANDED_JAR);28 File moduleDir2 = createModule("org.kauriproject.runtime.test.testmodules.sptopublic2"); 29 ModuleDefinition module2 = new ModuleDefinition("sptopublic2", moduleDir2, ModuleSourceType.EXPANDED_JAR); 30 30 module2.addMount(new MountDefinition("dummy", "/public2", null, true)); 31 31 config.addModule(module2); … … 33 33 34 34 { 35 File moduleDir1 = createModule("org.kauriproject.runtime.test.testmodules. kmtopublic1");36 ModuleDefinition module1 = new ModuleDefinition(" kmtopublic1", moduleDir1, ModuleSourceType.EXPANDED_JAR);35 File moduleDir1 = createModule("org.kauriproject.runtime.test.testmodules.sptopublic1"); 36 ModuleDefinition module1 = new ModuleDefinition("sptopublic1", moduleDir1, ModuleSourceType.EXPANDED_JAR); 37 37 module1.addMount(new MountDefinition("dummy", "/public1", null, true)); 38 38 module1.addInject(new RestserviceInjectDefinition("dummy2", "file:///tmp")); 39 module1.addInject(new RestserviceInjectDefinition("dummy3", " kmtopublic2", "dummy"));39 module1.addInject(new RestserviceInjectDefinition("dummy3", "sptopublic2", "dummy")); 40 40 41 41 config.addModule(module1); … … 48 48 49 49 { 50 RestserviceFacet rsf = runtime.getModuleById(" kmtopublic1").getRestserviceFacet();50 RestserviceFacet rsf = runtime.getModuleById("sptopublic1").getRestserviceFacet(); 51 51 52 assertEquals("/public1", rsf.getPublicPath(" km:/dummy", hostRef));53 assertEquals("/public1/boe/bie/ba.txt", rsf.getPublicPath(" km:/dummy/boe/bie/ba.txt", hostRef));54 assertEquals("file:///tmp", rsf.getPublicPath(" km:/dummy2", hostRef));55 assertEquals("file:///tmp/yes/no", rsf.getPublicPath(" km:/dummy2/yes/no", hostRef));56 assertEquals("/public2/yes/no", rsf.getPublicPath(" km:/dummy3/yes/no", hostRef));52 assertEquals("/public1", rsf.getPublicPath("service:/dummy", hostRef)); 53 assertEquals("/public1/boe/bie/ba.txt", rsf.getPublicPath("service:/dummy/boe/bie/ba.txt", hostRef)); 54 assertEquals("file:///tmp", rsf.getPublicPath("service:/dummy2", hostRef)); 55 assertEquals("file:///tmp/yes/no", rsf.getPublicPath("service:/dummy2/yes/no", hostRef)); 56 assertEquals("/public2/yes/no", rsf.getPublicPath("service:/dummy3/yes/no", hostRef)); 57 57 } 58 58 59 59 { 60 RestserviceFacet rsf = runtime.getModuleById(" kmtopublic2").getRestserviceFacet();61 assertEquals("/public2", rsf.getPublicPath(" km:/dummy", hostRef));60 RestserviceFacet rsf = runtime.getModuleById("sptopublic2").getRestserviceFacet(); 61 assertEquals("/public2", rsf.getPublicPath("service:/dummy", hostRef)); 62 62 } 63 63 … … 78 78 79 79 { 80 ModuleDefinition module2 = config.getModuleById(" kmtopublic2");80 ModuleDefinition module2 = config.getModuleById("sptopublic2"); 81 81 module2.getMounts().clear(); 82 82 module2.addMount(new MountDefinition("dummy", "/public2", "host2", true)); … … 88 88 89 89 { 90 RestserviceFacet rsf = runtime.getModuleById(" kmtopublic1").getRestserviceFacet();90 RestserviceFacet rsf = runtime.getModuleById("sptopublic1").getRestserviceFacet(); 91 91 92 92 // host is same as hostref, host should not be part of result 93 assertEquals("/public1", rsf.getPublicPath(" km:/dummy", hostRef));93 assertEquals("/public1", rsf.getPublicPath("service:/dummy", hostRef)); 94 94 95 95 // host is different, host should be part of result 96 assertEquals("http://otherhost:8888/public2/yes/no", rsf.getPublicPath(" km:/dummy3/yes/no", hostRef));96 assertEquals("http://otherhost:8888/public2/yes/no", rsf.getPublicPath("service:/dummy3/yes/no", hostRef)); 97 97 } 98 98 99 99 { 100 RestserviceFacet rsf = runtime.getModuleById(" kmtopublic2").getRestserviceFacet();101 assertEquals("http://otherhost:8888/public2", rsf.getPublicPath(" km:/dummy", hostRef));100 RestserviceFacet rsf = runtime.getModuleById("sptopublic2").getRestserviceFacet(); 101 assertEquals("http://otherhost:8888/public2", rsf.getPublicPath("service:/dummy", hostRef)); 102 102 } 103 103 -
trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/common/InternalRequestRestlet.java
r703 r748 19 19 String service = request.getResourceRef().getQueryAsForm().getFirstValue("service"); 20 20 21 Request newReq = new Request(Method.GET, " km:/" + service + request.getResourceRef().getRemainingPart());21 Request newReq = new Request(Method.GET, "service:/" + service + request.getResourceRef().getRemainingPart()); 22 22 newReq.setChallengeResponse(request.getChallengeResponse()); 23 23 -
trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/sprp/ProxyRestlet.java
r747 r748 1 package org.kauriproject.runtime.test.testmodules. kmrp;1 package org.kauriproject.runtime.test.testmodules.sprp; 2 2 3 3 import org.restlet.Restlet; -
trunk/core/kauri-runtime-tests/src/test/java/org/kauriproject/runtime/test/testmodules/sprp/RpRestlet.java
r747 r748 1 package org.kauriproject.runtime.test.testmodules. kmrp;1 package org.kauriproject.runtime.test.testmodules.sprp; 2 2 3 3 import org.restlet.Restlet; -
trunk/core/kauri-runtime-tests/src/test/modulesrc/org/kauriproject/runtime/test/testmodules/sprp/KAURI-INF/spring/kmrp-beans.xml
r306 r748 19 19 <kauri:export-restservice ref="proxyRestlet"/> 20 20 21 <bean id="rpRestlet" class="org.kauriproject.runtime.test.testmodules. kmrp.RpRestlet">21 <bean id="rpRestlet" class="org.kauriproject.runtime.test.testmodules.sprp.RpRestlet"> 22 22 <constructor-arg ref="restletContext"/> 23 23 </bean> 24 24 25 <bean id="proxyRestlet" class="org.kauriproject.runtime.test.testmodules. kmrp.ProxyRestlet">25 <bean id="proxyRestlet" class="org.kauriproject.runtime.test.testmodules.sprp.ProxyRestlet"> 26 26 <constructor-arg ref="restletContext"/> 27 <constructor-arg value=" km:/rpRestlet/foo/bar"/>27 <constructor-arg value="service:/rpRestlet/foo/bar"/> 28 28 </bean> 29 29 -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/Constants.java
r280 r748 6 6 7 7 /** 8 * km-request path syntax: everything from first slash till second slash, query string8 * -request path syntax: everything from first slash till second slash, query string 9 9 * or fragment identifier (if any of those is present) identifies the restservice. 10 10 */ … … 13 13 public static final Pattern MODULE_PATH_PATTERN = Pattern.compile("^" + MODULE_PATH_EXPR + "$"); 14 14 15 public static final Pattern MODULE_URI_PATTERN = Pattern.compile("^ km:" + MODULE_PATH_EXPR + "$");15 public static final Pattern MODULE_URI_PATTERN = Pattern.compile("^service:" + MODULE_PATH_EXPR + "$"); 16 16 } -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/build/ModuleBuilder.java
r684 r748 52 52 53 53 // Note: before loading any beans in the spring container: 54 // * the spring build context needs access to the module, for possible injection & kmsresolving during bean initialization54 // * the spring build context needs access to the module, for possible injection & module-protocol resolving during bean initialization 55 55 // * the module also needs to have the reference to the applicationcontext, as there might be beans trying to get while initializing 56 56 ModuleImpl module = new ModuleImpl(classLoader, applicationContext, restserviceFacet, cfg.getDefinition(), cfg.getModuleSource()); -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/ModuleClientDispatcher.java
r649 r748 32 32 33 33 if (RestserviceManager.MODULE_PROTOCOL.equals(protocol) /* protocol can be null, do reverse compare */ ) { 34 String kmUri = request.getResourceRef().toString();35 Matcher matcher = Constants.MODULE_URI_PATTERN.matcher( kmUri);34 String serviceUri = request.getResourceRef().toString(); 35 Matcher matcher = Constants.MODULE_URI_PATTERN.matcher(serviceUri); 36 36 if (!matcher.matches()) { 37 37 throw new KauriRTException("Invalid uri for " 38 + RestserviceManager.MODULE_PROTOCOL.getSchemeName() + " scheme: " + kmUri);38 + RestserviceManager.MODULE_PROTOCOL.getSchemeName() + " scheme: " + serviceUri); 39 39 } 40 40 … … 46 46 response.setStatus(Status.CLIENT_ERROR_NOT_FOUND); 47 47 } else { 48 request.getResourceRef().setBaseRef(" km:/" + restserviceName);48 request.getResourceRef().setBaseRef("service:/" + restserviceName); 49 49 boolean interApplicationRequest = target.getType() == RestserviceRegistryEntry.Type.IMPORT; 50 50 target.getHandle().handle(request, response, remainder, parentContext, interApplicationRequest); -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/RestserviceFacet.java
r630 r748 24 24 * 25 25 * <p>It manages the registry of named restservices (imported or exported) for the current 26 * module and the ModuleContext, which provides the ' km:' and 'kms:' protocols.26 * module and the ModuleContext, which provides the 'service:' and 'module:' protocols. 27 27 * 28 28 * <h3>The Module-Application relationship</h3> -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/RestserviceHandle.java
r471 r748 68 68 } else { 69 69 if (log.isInfoEnabled()) 70 log.info("Response handling of km-protocol backed by injected uri: directory listing base-uri translation: reference in response does not begin with requested uri: " + refString + " and " + uri);70 log.info("Response handling of -protocol backed by injected uri: directory listing base-uri translation: reference in response does not begin with requested uri: " + refString + " and " + uri); 71 71 newRef = ref; 72 72 } -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/module/restservice/RestserviceManager.java
r515 r748 19 19 private KauriMetadataService metadataService; 20 20 21 public static final Protocol MODULE_PROTOCOL = new Protocol(" km", "KM", "Kauri module protocol", -1);22 public static final Protocol MODULE_SOURCE_PROTOCOL = new Protocol(" kms", "KMS", "Kauri module source protocol", -1);21 public static final Protocol MODULE_PROTOCOL = new Protocol("service", "SERVICE", "Kauri service protocol", -1); 22 public static final Protocol MODULE_SOURCE_PROTOCOL = new Protocol("module", "MODULE", "Kauri module protocol", -1); 23 23 24 24 public RestserviceManager(KauriRuntime runtime) { -
trunk/core/kauri-runtime/src/main/java/org/kauriproject/runtime/rapi_impl/KauriModuleImpl.java
r671 r748 20 20 } 21 21 22 public String publicUri(String kmUri, Reference hostRef) {23 return module.getRestserviceFacet().getPublicPath( kmUri, hostRef);22 public String publicUri(String serviceProtocolUri, Reference hostRef) { 23 return module.getRestserviceFacet().getPublicPath(serviceProtocolUri, hostRef); 24 24 } 25 25 -
trunk/modules/kauri-dbresources/kauri-dbresources-impl/src/main/java/org/kauriproject/dbresources/DatabaseResource.java
r603 r748 227 227 } else if (MediaType.APPLICATION_JAVA_OBJECT.equals(representation.getMediaType())) { 228 228 if (representation instanceof ObjectRepresentation) { 229 // when called locally via kmprotocol229 // when called locally via protocol 230 230 try { 231 231 entity = ((ObjectRepresentation<Serializable>) representation).getObject(); -
trunk/modules/kauri-forms/kauri-forms-datejs/src/main/kauri/router.groovy
r589 r748 27 27 }) 28 28 29 directory(uri: "/js", root: " kms:/js/")29 directory(uri: "/js", root: "module:/js/") 30 30 } -
trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/router.groovy
r443 r748 1 1 builder.router { 2 directory(uri: "/", root: " kms:/public/")2 directory(uri: "/", root: "module:/public/") 3 3 } -
trunk/modules/kauri-forms/kauri-forms-jquery-ui/src/main/kauri/router.groovy
r494 r748 1 1 builder.router { 2 directory(uri: "/", root: " kms:/js/jquery.ui-1.5.2")2 directory(uri: "/", root: "module:/js/jquery.ui-1.5.2") 3 3 } -
trunk/modules/kauri-forms/kauri-forms-jquery/src/main/kauri/router.groovy
r494 r748 4 4 targetTemplate: "jquery-1.2.6.pack.js") 5 5 6 directory(uri: "/", root: " kms:/js/")6 directory(uri: "/", root: "module:/js/") 7 7 } -
trunk/modules/kauri-representation/kauri-representationbuilder-impl/src/main/java/org/kauriproject/representation/build/impl/RepresentationResolver.java
r514 r748 113 113 ModuleSource.Resource reprConfigResource = kauriModule.getSource().getResource(configPath); 114 114 if (reprConfigResource == null && !fallBackToDefault) { 115 throw new RepresentationConfigurationException("Representations config does not exist at \" kms:/" + configPath + "\"");115 throw new RepresentationConfigurationException("Representations config does not exist at \"module:/" + configPath + "\""); 116 116 } 117 117 … … 122 122 representations = RSBuilder.build(is, kauriModule); 123 123 } catch (IOException e) { 124 throw new RepresentationConfigurationException("Error creating representation configuration from \" kms:/" + configPath + "\".", e);124 throw new RepresentationConfigurationException("Error creating representation configuration from \"module:/" + configPath + "\".", e); 125 125 } finally { 126 126 if (is != null) { -
trunk/modules/kauri-representation/kauri-representationbuilder-impl/src/main/resources/org/kauriproject/representation/build/impl/defaultrepresentations.groovy
r514 r748 4 4 select { 5 5 when(name: "{name:**}") { 6 template(src: " kms:/templates/{name}.xml")6 template(src: "module:/templates/{name}.xml") 7 7 } 8 8 } -
trunk/modules/kauri-representation/kauri-representationbuilder-impl/src/test/java/org/kauriproject/representation/test/BuilderTest.java
r671 r748 21 21 // Mocked KauriModule implementation 22 22 KauriModule kauriModule = new KauriModule() { 23 public String publicUri(String kmUri, Reference hostRef) {23 public String publicUri(String serviceProtocolUri, Reference hostRef) { 24 24 return null; 25 25 } -
trunk/modules/kauri-routing/kauri-routing-impl/src/main/java/org/kauriproject/routing/impl/components/PagesRestlet.java
r687 r748 155 155 156 156 private void createPages(String filePath, Collection<Page> pages) { 157 String templatePath = " kms:/" + this.root + filePath;157 String templatePath = "module:/" + this.root + filePath; 158 158 Matcher matcher = DOUBLE_EXT.matcher(filePath); 159 159 Page page; -
trunk/modules/kauri-routing/kauri-routing-impl/src/main/java/org/kauriproject/routing/impl/groovybuild/GroovyKauriRouterBuilder.java
r678 r748 66 66 routingRestlet = groovyRestlet.build(userDefinedContext, is); 67 67 } catch (IOException e) { 68 throw new RoutingConfigurationException("Error creating router configuration from \" kms:/" + routingConfig.getConfigPath() + "\".", e);68 throw new RoutingConfigurationException("Error creating router configuration from \"module:/" + routingConfig.getConfigPath() + "\".", e); 69 69 } finally { 70 70 if (is != null) { -
trunk/modules/kauri-routing/kauri-routing-impl/src/main/java/org/kauriproject/routing/impl/routing/KauriRouter.java
r676 r748 51 51 ModuleSource.Resource routerConfigResource = moduleSource.getResource(routingConfig.getConfigPath()); 52 52 if (routerConfigResource == null && !routingConfig.getFallBackToDefault()) { 53 throw new RuntimeException("Router config does not exist at \" kms:/" + routingConfig.getConfigPath() + "\"");53 throw new RuntimeException("Router config does not exist at \"module:/" + routingConfig.getConfigPath() + "\""); 54 54 } 55 55 -
trunk/modules/kauri-routing/kauri-routing-impl/src/main/resources/org/kauriproject/routing/impl/groovybuild/defaultrouter.groovy
r443 r748 2 2 // the router configuration file does not exit 3 3 builder.router { 4 directory(uri: "/resources", root: " kms:/resources/")4 directory(uri: "/resources", root: "module:/resources/") 5 5 6 6 jaxRs(uri: "") { -
trunk/modules/kauri-routing/kauri-routing-impl/src/test/modulesrc/org/kauriproject/routing/test/testmodules/routing1/KAURI-INF/router.groovy
r671 r748 19 19 restlet(uri: "/wiringtest", ofClass: "org.kauriproject.routing.test.testmodules.routing1.MessageUsingRestlet") 20 20 21 read(uri: "/readtest/{path}", source: " kms:/{path}",21 read(uri: "/readtest/{path}", source: "module:/{path}", 22 22 postAttach : { route -> 23 23 Variable variable = new Variable(Variable.TYPE_URI_PATH, "", true, false) -
trunk/modules/kauri-security/kauri-security-impl/src/test/java/org/kauriproject/security/test/KauriSecurityTest.java
r712 r748 62 62 63 63 // to test the internal restlet, we use a restlet that delegates the request to 64 // km:/{service}/{remainingPath} (where {service} is determined by a query parameter)64 // service:/{service}/{remainingPath} (where {service} is determined by a query parameter) 65 65 module.addMount(new MountDefinition("internalRestlet", "/internal", null, true)); 66 66 -
trunk/modules/kauri-security/kauri-security-impl/src/test/java/org/kauriproject/security/test/common/InternalRequestRestlet.java
r712 r748 19 19 String service = request.getResourceRef().getQueryAsForm().getFirstValue("service"); 20 20 21 Request newReq = new Request(Method.GET, " km:/" + service + request.getResourceRef().getRemainingPart());21 Request newReq = new Request(Method.GET, "service:/" + service + request.getResourceRef().getRemainingPart()); 22 22 newReq.setChallengeResponse(request.getChallengeResponse()); 23 23 -
trunk/modules/kauri-security/kauri-security-impl/src/test/modulesrc/org/kauriproject/security/test/testmodules/security/KAURI-INF/spring/security-beans.xml
r712 r748 83 83 <constructor-arg ref="restletContext"/> 84 84 <property name="preAuthTokenStore" ref="preAuthTokenStore"/> 85 <property name="forbidReference" value=" km:/template/forbidden.xml"/>85 <property name="forbidReference" value="service:/template/forbidden.xml"/> 86 86 </bean> 87 87 -
trunk/modules/kauri-template/kauri-template-service-impl/src/main/java/org/kauriproject/template/service/impl/KauriFunctions.java
r174 r748 26 26 private static final String KAURIMODULE = "org.kauriproject.runtime.rapi.KauriModule"; 27 27 28 public static String publicUri(String kmUri) {29 String uriString = null;28 public static String publicUri(String serviceProtocolUri) { 29 String uriString; 30 30 try { 31 31 KauriModule kauriModule = (KauriModule) KauriHelper.getContext().getAttributes().get(KAURIMODULE); 32 uriString = kauriModule.publicUri( kmUri, KauriHelper.getRequest().getHostRef());32 uriString = kauriModule.publicUri(serviceProtocolUri, KauriHelper.getRequest().getHostRef()); 33 33 } catch (Exception ex) { 34 34 // TODO: log error -
trunk/modules/kauri-template/kauri-template-service-impl/src/test/modulesrc/org/kauriproject/template/service/test/testmodules/template_ext/KAURI-INF/router.groovy
r443 r748 1 1 builder.router { 2 2 3 template(uri: "/template/{templateId}", template: " kms:/templates/{templateId}.xml",4 mediaType: "text/html", data: " kms:/templates/{templateId}.json")3 template(uri: "/template/{templateId}", template: "module:/templates/{templateId}.xml", 4 mediaType: "text/html", data: "module:/templates/{templateId}.json") 5 5 6 6 } -
trunk/modules/kauri-upload/src/main/java/org/kauriproject/upload/UploadRestlet.java
r729 r748 79 79 Map<String, Object> templateParams = new HashMap<String, Object>(); 80 80 templateParams.put("uploadInfos", allInfo); 81 Representation rep = this.templateService.getTemplateRepresentation(MediaType.TEXT_HTML, this.getContext(), request, " kms:/templates/listing.xml", templateParams);81 Representation rep = this.templateService.getTemplateRepresentation(MediaType.TEXT_HTML, this.getContext(), request, "module:/templates/listing.xml", templateParams); 82 82 83 83 response.setStatus(Status.SUCCESS_OK); -
trunk/modules/kauri-upload/src/main/kauri/router.groovy
r729 r748 13 13 14 14 template ( uri : "/ui/{name}.xhtml", 15 template : " kms:/ui/{name}.xhtml",15 template : "module:/ui/{name}.xhtml", 16 16 mediaType : "text/html" 17 17 ); … … 19 19 redirector ( uri : "", 20 20 mode : redirectorMode.MODE_CLIENT_PERMANENT, 21 targetTemplate : " km:/ui/menu.xhtml"21 targetTemplate : "service:/ui/menu.xhtml" 22 22 ); 23 23 */ -
trunk/modules/kauri-upload/src/main/kauri/spring/upload-app-context.xml
r729 r748 45 45 <kauri:import-restservice name="store" /><!-- when @type is omitted value ##ANY is assumed --> 46 46 <bean id="store" class="org.restlet.data.Reference" > 47 <constructor-arg><value> km:/store/</value></constructor-arg>47 <constructor-arg><value>service:/store/</value></constructor-arg> 48 48 </bean> 49 49 -
trunk/pom.xml
r746 r748 410 410 <module>samples/kauri-dbforms-sample</module> 411 411 <module>samples/kauri-representationbuilder-sample</module> 412 <module>samples/kauri-jqgrid-sample</module> 412 413 </modules> 413 414 -
trunk/samples/kauri-dbforms-sample/src/main/java/org/kauriproject/samples/dbforms/AddressValidationRestService.java
r522 r748 29 29 public class AddressValidationRestService extends Restlet { 30 30 31 private static final String ROOT_URI = " km:/jpaRestlet/address/";31 private static final String ROOT_URI = "service:/jpaRestlet/address/"; 32 32 33 33 public AddressValidationRestService(Context context) { -
trunk/samples/kauri-dbforms-sample/src/main/java/org/kauriproject/samples/dbforms/BusinessRestlet.java
r603 r748 49 49 private static final Pattern GENERIC_PATTERN = Pattern.compile("^/([^/?]+)/(?:([\\d]+))?(?:\\?.*)?$"); 50 50 51 private static final String rootURI = " km:/jpaRestlet/";51 private static final String rootURI = "service:/jpaRestlet/"; 52 52 53 53 private final Log log = LogFactory.getLog(BusinessRestlet.class); … … 183 183 map.put("addressList", object); 184 184 } 185 templateLocation = " kms:/public/addresses.xml";185 templateLocation = "module:/public/addresses.xml"; 186 186 } else if (path.equals("/persons")) { 187 187 Object object = doInnerRequest("person", MediaType.APPLICATION_JAVA_OBJECT); … … 189 189 map.put("personList", object); 190 190 } 191 templateLocation = " kms:/public/persons.xml";191 templateLocation = "module:/public/persons.xml"; 192 192 } else if (matcher.matches()) { 193 193 String uri = matcher.group(1) + "/" + matcher.group(2); 194 194 JSONObject jso = (JSONObject) doInnerRequest(uri, MediaType.APPLICATION_JSON); 195 195 map.put("jsondata", jso); 196 templateLocation = " kms:/public/" + matcher.group(1) + ".xml";196 templateLocation = "module:/public/" + matcher.group(1) + ".xml"; 197 197 } else { 198 198 map.put("jsondata", null); 199 templateLocation = " kms:/public/" + path + ".xml";199 templateLocation = "module:/public/" + path + ".xml"; 200 200 } 201 201 -
trunk/samples/kauri-dbforms-sample/src/main/java/org/kauriproject/samples/dbforms/CrudRestlet.java
r410 r748 81 81 // TODO: use riap ? 82 82 Uniform rest = getContext().getClientDispatcher(); 83 String rootURI = " km:/jpaRestlet/";83 String rootURI = "service:/jpaRestlet/"; 84 84 rest.post(rootURI + "address", new ObjectRepresentation<Serializable>(address1)); 85 85 rest.post(rootURI + "address", new ObjectRepresentation<Serializable>(address2)); -
trunk/samples/kauri-dbforms-sample/src/main/kauri/public/address.xml
r522 r748 3 3 <title>Address Form</title> 4 4 5 <script type="text/javascript" src="${publicUri(' km:/jquery/jquery-1.2.6.js')}"></script>6 <script type="text/javascript" src="${publicUri(' km:/forms/kauri-forms.js')}"></script>5 <script type="text/javascript" src="${publicUri('service:/jquery/jquery-1.2.6.js')}"></script> 6 <script type="text/javascript" src="${publicUri('service:/forms/kauri-forms.js')}"></script> 7 7 8 8 <script type="text/javascript"> 9 9 jQuery(document).ready(function() { 10 10 var fconf = { 11 dataURI: '${publicUri(' km:/dbformsRestlet/address/{id}')}',11 dataURI: '${publicUri('service:/dbformsRestlet/address/{id}')}', 12 12 type: ['composite', { 13 13 members: { … … 163 163 <br/> 164 164 165 <form method="link" action="${publicUri(' km:/dbformsRestlet/addresses')}" style="background-color: white">165 <form method="link" action="${publicUri('service:/dbformsRestlet/addresses')}" style="background-color: white"> 166 166 <input type="submit" value="return to list"/> 167 167 </form> -
trunk/samples/kauri-dbforms-sample/src/main/kauri/public/addresses.xml
r420 r748 21 21 <td>${address.street} ${address.number} ${address.bus} ${address.postalCode} ${address.city}</td> 22 22 <td style="text-align: center;"> 23 <form method="get" action="${publicUri(' km:/dbformsRestlet/address/')}${address.id}">23 <form method="get" action="${publicUri('service:/dbformsRestlet/address/')}${address.id}"> 24 24 <input type="submit" value="edit"/> 25 25 </form> 26 26 </td> 27 27 <td style="text-align: center;"> 28 <form method="post" action="${publicUri(' km:/dbformsRestlet/address/')}${address.id}?method=DELETE">28 <form method="post" action="${publicUri('service:/dbformsRestlet/address/')}${address.id}?method=DELETE"> 29 29 <input type="submit" value="delete"/> 30 30 </form> … … 36 36 37 37 <div style="width: 75%; text-align: right;"> 38 <form method="get" action="${publicUri(' km:/dbformsRestlet/address')}">38 <form method="get" action="${publicUri('service:/dbformsRestlet/address')}"> 39 39 <input type="submit" value="add address"/> 40 40 </form> -
trunk/samples/kauri-dbforms-sample/src/main/kauri/public/index.xml
r389 r748 14 14 <li> 15 15 <p> 16 <a href="${publicUri(' km:/dbformsRestlet/addresses')}">list of addresses</a>16 <a href="${publicUri('service:/dbformsRestlet/addresses')}">list of addresses</a> 17 17 </p> 18 18 </li> 19 19 <li> 20 20 <p> 21 <a href="${publicUri(' km:/dbformsRestlet/persons')}">list of persons</a>21 <a href="${publicUri('service:/dbformsRestlet/persons')}">list of persons</a> 22 22 </p> 23 23 </li> -
trunk/samples/kauri-dbforms-sample/src/main/kauri/public/person.xml
r609 r748 3 3 <title>Person Form</title> 4 4 5 <script type="text/javascript" src="${publicUri(' km:/jquery/jquery-1.2.6.js')}"></script>6 <script type="text/javascript" src="${publicUri(' km:/forms/kauri-forms.js')}"></script>5 <script type="text/javascript" src="${publicUri('service:/jquery/jquery-1.2.6.js')}"></script> 6 <script type="text/javascript" src="${publicUri('service:/forms/kauri-forms.js')}"></script> 7 7 8 8 <script type="text/javascript"> 9 9 jQuery(document).ready(function() { 10 10 var fconf = { 11 dataURI: '${publicUri(' km:/dbformsRestlet/person/{id}')}',11 dataURI: '${publicUri('service:/dbformsRestlet/person/{id}')}', 12 12 type: ['composite', { 13 13 members: { … … 43 43 '@validators' : { 44 44 'required' : {}, 45 'remote' : { location: '${publicUri(' km:/addressValidationRestlet')}' }45 'remote' : { location: '${publicUri('service:/addressValidationRestlet')}' } 46 46 }, 47 47 control: 'address-control' … … 57 57 base: 'selection-control', 58 58 options: { 59 uri: '${publicUri(' km:/dbformsRestlet/jsonaddresslist')}',59 uri: '${publicUri('service:/dbformsRestlet/jsonaddresslist')}', 60 60 valueTemplate: '{id}', 61 61 labelTemplate: '{street} {number} IN {city}' … … 155 155 <br/> 156 156 157 <form method="link" action="${publicUri(' km:/dbformsRestlet/persons')}" style="background-color: white">157 <form method="link" action="${publicUri('service:/dbformsRestlet/persons')}" style="background-color: white"> 158 158 <input type="submit" value="return to list"/> 159 159 </form> -
trunk/samples/kauri-dbforms-sample/src/main/kauri/public/persons.xml
r420 r748 21 21 <td>${pers.name} ${pers.first} (${pers.persnr})</td> 22 22 <td style="text-align: center;"> 23 <form method="get" action="${publicUri(' km:/dbformsRestlet/person/')}${pers.id}">23 <form method="get" action="${publicUri('service:/dbformsRestlet/person/')}${pers.id}"> 24 24 <input type="submit" value="edit"/> 25 25 </form> 26 26 </td> 27 27 <td style="text-align: center;"> 28 <form method="post" action="${publicUri(' km:/dbformsRestlet/person/')}${pers.id}?method=DELETE">28 <form method="post" action="${publicUri('service:/dbformsRestlet/person/')}${pers.id}?method=DELETE"> 29 29 <input type="submit" value="delete"/> 30 30 </form> … … 36 36 37 37 <div style="width: 75%; text-align: right;"> 38 <form method="get" action="${publicUri(' km:/dbformsRestlet/person')}">38 <form method="get" action="${publicUri('service:/dbformsRestlet/person')}"> 39 39 <input type="submit" value="add person"/> 40 40 </form> -
trunk/samples/kauri-dbforms-sample/src/main/kauri/router.groovy
r443 r748 2 2 3 3 builder.router { 4 template(uri: "/", template: " kms:/public/index.xml",4 template(uri: "/", template: "module:/public/index.xml", 5 5 mediaType: "text/html", postAttach : { route -> route.getTemplate().setMatchingMode(Template.MODE_STARTS_WITH) }) 6 6 7 /* template(uri: "/template/{templateId}", template: " kms:/public/{templateId}.xml",7 /* template(uri: "/template/{templateId}", template: "module:/public/{templateId}.xml", 8 8 mediaType: "text/html") */ 9 9 10 directory(uri: "/resources", root: " kms:/resources/")10 directory(uri: "/resources", root: "module:/resources/") 11 11 } -
trunk/samples/kauri-dbresources-sample/src/main/java/org/kauriproject/samples/dbresources/CrudRestlet.java
r410 r748 44 44 public class CrudRestlet extends Restlet { 45 45 46 private static final String ROOT_URI = " km:/jpaRestlet/";46 private static final String ROOT_URI = "service:/jpaRestlet/"; 47 47 48 48 private static final Pattern REQ_SRC_PATTERN = Pattern.compile("^/([^\\?]*)(.*)$"); -
trunk/samples/kauri-dbresources-sample/src/main/java/org/kauriproject/samples/dbresources/IndexRestlet.java
r296 r748 38 38 public void handle(Request request, Response response) { 39 39 Representation representation = templateService.getTemplateRepresentation(MediaType.TEXT_HTML, 40 getContext(), request, " kms:/public/index.xml", Collections.<String, Object> emptyMap());40 getContext(), request, "module:/public/index.xml", Collections.<String, Object> emptyMap()); 41 41 response.setEntity(representation); 42 42 } -
trunk/samples/kauri-dbresources-sample/src/main/kauri/public/index.xml
r417 r748 131 131 <li> 132 132 <p> 133 <a href="${publicUri(' km:/jpaRestlet/person/1')}">person with id = 1</a>133 <a href="${publicUri('service:/jpaRestlet/person/1')}">person with id = 1</a> 134 134 </p> 135 135 </li> 136 136 <li> 137 137 <p> 138 <a href="${publicUri(' km:/jpaRestlet/person/2/address')}">list of addresses for person with id = 2</a>138 <a href="${publicUri('service:/jpaRestlet/person/2/address')}">list of addresses for person with id = 2</a> 139 139 </p> 140 140 </li> 141 141 <li> 142 142 <p> 143 <a href="${publicUri(' km:/jpaRestlet/person?address=1')}">list of persons which have an address with id = 1</a>143 <a href="${publicUri('service:/jpaRestlet/person?address=1')}">list of persons which have an address with id = 1</a> 144 144 </p> 145 145 </li> -
trunk/samples/kauri-forms-sample/src/main/java/org/kauriproject/samples/forms/DataFormRestService.java
r685 r748 66 66 67 67 ent = templateService.getTemplateRepresentation(MediaType.TEXT_HTML, 68 getContext(), request, " kms:/templates/data/" + type + "-detail.xml", map);68 getContext(), request, "module:/templates/data/" + type + "-detail.xml", map); 69 69 70 70 if (ent != null) … … 101 101 102 102 ent = templateService.getTemplateRepresentation(MediaType.TEXT_HTML, 103 getContext(), request, " kms:/templates/data/" + type + "-form.xml", map);103 getContext(), request, "module:/templates/data/" + type + "-form.xml", map); 104 104 if (ent != null) 105 105 response.setEntity(ent); … … 133 133 134 134 ent = templateService.getTemplateRepresentation(MediaType.TEXT_HTML, 135 getContext(), request, " kms:/templates/data/" + type + "-list.xml", map);135 getContext(), request, "module:/templates/data/" + type + "-list.xml", map); 136 136 137 137 if (ent != null) … … 142 142 143 143 //TODO use this template 144 private String formUriTemplate = " kms:/templates/data/{type}-{formOrList}.xml";144 private String formUriTemplate = "module:/templates/data/{type}-{formOrList}.xml"; 145 145 public void setFormUriTemplate(String template) { 146 146 this.formUriTemplate = template; -
trunk/samples/kauri-forms-sample/src/main/kauri/router.groovy
r706 r748 17 17 template(uri: "/", 18 18 match: "equals", 19 template: " kms:/templates/index.xml",19 template: "module:/templates/index.xml", 20 20 mediaType: "text/html", 21 21 ); 22 22 23 23 directory(uri: "/resources", 24 root: " kms:/resources"24 root: "module:/resources" 25 25 ); 26 26 … … 31 31 32 32 if (method == Method.POST) { 33 def dataRef = " km:/sample-data";33 def dataRef = "service:/sample-data"; 34 34 def status = "<br/>status:<ol>"; 35 35 def rand = new Random(); -
trunk/samples/kauri-forms-sample/src/main/kauri/spring/forms-sample-beans.xml
r651 r748 47 47 <constructor-arg ref="restletContext" /> 48 48 <property name="templateService" ref="templateService" /> 49 <property name="formUriTemplate" value=" kms:/resources/forms/{type}-form.xml" />49 <property name="formUriTemplate" value="module:/resources/forms/{type}-form.xml" /> 50 50 <property name="dataService" ref="sample-data" /> 51 51 </bean> -
trunk/samples/kauri-forms-sample/src/main/kauri/templates/css.xml
r697 r748 7 7 8 8 <!-- datepicker css --> 9 <link rel="stylesheet" type="text/css" href="${publicUri(' km:/jquery-ui/themes/flora/flora.all.css')}"></link>10 <link rel="stylesheet" type="text/css" href="${publicUri(' km:/forms/css/datepicker.css')}"></link>9 <link rel="stylesheet" type="text/css" href="${publicUri('service:/jquery-ui/themes/flora/flora.all.css')}"></link> 10 <link rel="stylesheet" type="text/css" href="${publicUri('service:/forms/css/datepicker.css')}"></link> 11 11 <style type="text/css"> 12 12 table.ui-datepicker td { -
trunk/samples/kauri-forms-sample/src/main/kauri/templates/data/sample-detail.xml
r685 r748 8 8 <title>Sample Data List</title> 9 9 10 <ktl:include src=" kms:/templates/css.xml"/>10 <ktl:include src="module:/templates/css.xml"/> 11 11 12 <script type="text/javascript" src="${publicUri(' km:/jquery/jquery.js')}"></script>13 <script type="text/javascript" src="${publicUri(' km:/jquery-ui/ui/jquery.ui.all.js')}"></script>14 <script type="text/javascript" src="${publicUri(' km:/forms/kauri-forms.js')}"></script>12 <script type="text/javascript" src="${publicUri('service:/jquery/jquery.js')}"></script> 13 <script type="text/javascript" src="${publicUri('service:/jquery-ui/ui/jquery.ui.all.js')}"></script> 14 <script type="text/javascript" src="${publicUri('service:/forms/kauri-forms.js')}"></script> 15 15 16 16 <script type="text/javascript"> 17 var fconf = <ktl:include src=" kms:/templates/data/sample-form-config.xml" mode="txt" />17 var fconf = <ktl:include src="module:/templates/data/sample-form-config.xml" mode="txt" /> 18 18 19 19 <![CDATA[ … … 144 144 <td colspan="2"></td> 145 145 <td> 146 <form method="get" action="${publicUri(' km:/sample-ui/sample/new')}">146 <form method="get" action="${publicUri('service:/sample-ui/sample/new')}"> 147 147 <input type="submit" value="add"/> 148 148 </form> -
trunk/samples/kauri-forms-sample/src/main/kauri/templates/data/sample-form-config.xml
r705 r748 1 1 <ktl:if test="true" xmlns:ktl="http://kauriproject.org/template"> 2 2 { 3 dataURI: '${publicUri(' km:/sample-data/')}${type}/{id}',3 dataURI: '${publicUri('service:/sample-data/')}${type}/{id}', 4 4 type: ['composite', { 5 5 members: { … … 28 28 '@validators': { 29 29 'remote': { 30 location: "${publicUri(' km:/pi-validation')}"30 location: "${publicUri('service:/pi-validation')}" 31 31 } 32 32 }, -
trunk/samples/kauri-forms-sample/src/main/kauri/templates/data/sample-form.xml
r697 r748 3 3 <title>Sample Data Form</title> 4 4 5 <ktl:include src=" kms:/templates/css.xml"/>5 <ktl:include src="module:/templates/css.xml"/> 6 6 7 <script type="text/javascript" src="${publicUri(' km:/jquery/jquery.js')}"></script>8 <script type="text/javascript" src="${publicUri(' km:/jquery-ui/ui/jquery.ui.all.js')}"></script>9 <script type="text/javascript" src="${publicUri(' km:/forms/kauri-forms.js')}"></script>7 <script type="text/javascript" src="${publicUri('service:/jquery/jquery.js')}"></script> 8 <script type="text/javascript" src="${publicUri('service:/jquery-ui/ui/jquery.ui.all.js')}"></script> 9 <script type="text/javascript" src="${publicUri('service:/forms/kauri-forms.js')}"></script> 10 10 11 11 <!-- think about externalized form-models later … … 15 15 <script type="text/javascript"> 16 16 <!-- alternative form-model inclusion 17 var fconf = <ktl:include src=" kms:/templates/data/sample-form.js" mode="txt" />17 var fconf = <ktl:include src="module:/templates/data/sample-form.js" mode="txt" /> 18 18 --> 19 19 20 20 jQuery(document).ready(function() { 21 var fconf = <ktl:include src=" kms:/templates/data/sample-form-config.xml" mode="txt" />21 var fconf = <ktl:include src="module:/templates/data/sample-form-config.xml" mode="txt" /> 22 22 23 23 var testForm = new jQuery.org.kauriproject.forms.Form("sample-form", fconf); -
trunk/samples/kauri-forms-sample/src/main/kauri/templates/data/sample-list.xml
r685 r748 4 4 <title>Sample Data List</title> 5 5 6 <ktl:include src=" kms:/templates/css.xml"/>6 <ktl:include src="module:/templates/css.xml"/> 7 7 8 8 </head> … … 26 26 <td>${item.email}, ${item.mondaysok}, ${item.friendscount}, ${item.pi}, ${item.birthdate}, ${item.contact.case}</td> 27 27 <td style="text-align: center;"> 28 <form method="get" action="${publicUri(' km:/sample-ui/sample/')}${item.id}">28 <form method="get" action="${publicUri('service:/sample-ui/sample/')}${item.id}"> 29 29 <input type="submit" value="edit"/> 30 30 </form> 31 31 </td> 32 32 <td style="text-align: center;"> 33 <form method="post" action="${publicUri(' km:/sample-data/sample/')}${item.id}?method=DELETE">33 <form method="post" action="${publicUri('service:/sample-data/sample/')}${item.id}?method=DELETE"> 34 34 <input type="submit" value="delete"/> 35 35 </form> … … 40 40 <td colspan="2"></td> 41 41 <td> 42 <form method="get" action="${publicUri(' km:/sample-ui/sample/new')}">42 <form method="get" action="${publicUri('service:/sample-ui/sample/new')}"> 43 43 <input type="submit" value="add"/> 44 44 </form> -
trunk/samples/kauri-forms-sample/src/main/kauri/templates/index.xml
r685 r748 4 4 <title>Kauri forms samples</title> 5 5 <!-- 6 <script type="text/javascript" src="${publicUri(' km:/jquery/jquery.js')}" ></script>6 <script type="text/javascript" src="${publicUri('service:/jquery/jquery.js')}" ></script> 7 7 --> 8 8 9 <ktl:include src=" kms:/templates/css.xml"/>9 <ktl:include src="module:/templates/css.xml"/> 10 10 11 <script type="text/javascript" src="${publicUri(' km:/jquery/jquery.js')}" ></script>11 <script type="text/javascript" src="${publicUri('service:/jquery/jquery.js')}" ></script> 12 12 <script type="text/javascript"> 13 13 … … 43 43 <li>Data Resources (JSON) @ data/sample/** 44 44 <ul> 45 <li><a href="${publicUri(' km:/sample-data')}/sample">List of resources</a></li>45 <li><a href="${publicUri('service:/sample-data')}/sample">List of resources</a></li> 46 46 <li>Specific resources: data/sample/{id}</li> 47 <li><form method="POST" action="${publicUri(' km:/sample-router/load-data')}">Tip: we provide a simple resource that will <input type="submit" value="load"/> some fake data.</form></li>47 <li><form method="POST" action="${publicUri('service:/sample-router/load-data')}">Tip: we provide a simple resource that will <input type="submit" value="load"/> some fake data.</form></li> 48 48 </ul> 49 49 </li> … … 51 51 <ul> 52 52 <li>Π validation @ validate/pi POST value as entity: 53 <a href="javascript:testValidate('${publicUri(' km:/pi-validation')}', ${22/7})">${22/7}</a> -54 <a href="javascript:testValidate('${publicUri(' km:/pi-validation')}', ${math:pi()})">${math:pi()}</a>53 <a href="javascript:testValidate('${publicUri('service:/pi-validation')}', ${22/7})">${22/7}</a> - 54 <a href="javascript:testValidate('${publicUri('service:/pi-validation')}', ${math:pi()})">${math:pi()}</a> 55 55 </li> 56 56 </ul> … … 58 58 <li>UI Interaction Resources @ ui/sample/** 59 59 <ul> 60 <li><a href="${publicUri(' km:/sample-ui/sample')}">List of resources</a></li>61 <li>Form with specific resources data: ${publicUri(' km:/sample-ui')}/sample/{id}</li>62 <li><a href="${publicUri(' km:/sample-ui/sample/detail')}">Detailed list of resources</a></li>60 <li><a href="${publicUri('service:/sample-ui/sample')}">List of resources</a></li> 61 <li>Form with specific resources data: ${publicUri('service:/sample-ui')}/sample/{id}</li> 62 <li><a href="${publicUri('service:/sample-ui/sample/detail')}">Detailed list of resources</a></li> 63 63 <!-- 64 <li><a href="${publicUri(' km:/sample-ui/sample/new')}">Empty form</a> (new entity)</li>64 <li><a href="${publicUri('service:/sample-ui/sample/new')}">Empty form</a> (new entity)</li> 65 65 --> 66 66 </ul> -
trunk/samples/kauri-jqgrid-sample/src/main/java/org/kauriproject/samples/grid/GridRestlet.java
r700 r748 32 32 private static final Pattern GENERIC_PATTERN = Pattern.compile("^/([^/?]+)(?:\\?(.*))?$"); 33 33 34 private static final String rootURI = " km:/jpaRestlet/";34 private static final String rootURI = "service:/jpaRestlet/"; 35 35 36 36 public GridRestlet(Context context) { -
trunk/samples/kauri-jqgrid-sample/src/main/java/org/kauriproject/samples/grid/TemplateRestlet.java
r700 r748 36 36 private static final Pattern REQ_SRC_PATTERN = Pattern.compile("^/([^\\?.]*)(\\.[^\\?]*)?(.*)$"); 37 37 38 private static final String TEMPLATE_BASE = " kms:/public/";38 private static final String TEMPLATE_BASE = "module:/public/"; 39 39 private static final String TEMPLATE_EXT = ".xml"; 40 40 -
trunk/samples/kauri-jqgrid-sample/src/main/kauri/public/grid.xml
r700 r748 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <html xmlns:t="http://kauriproject.org/template" t:inherit=" kms:/public/skeleton.xml">2 <html xmlns:t="http://kauriproject.org/template" t:inherit="module:/public/skeleton.xml"> 3 3 <head> 4 4 <title>child inheriting from base</title> -
trunk/samples/kauri-jqgrid-sample/src/main/kauri/public/grid_edit.xml
r700 r748 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <html xmlns:t="http://kauriproject.org/template" t:inherit=" kms:/public/skeleton.xml">2 <html xmlns:t="http://kauriproject.org/template" t:inherit="module:/public/skeleton.xml"> 3 3 <head> 4 4 <title>child inheriting from base ${width}</title> -
trunk/samples/kauri-jqgrid-sample/src/main/kauri/public/grid_local.xml
r700 r748 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <html xmlns:t="http://kauriproject.org/template" t:inherit=" kms:/public/skeleton.xml">2 <html xmlns:t="http://kauriproject.org/template" t:inherit="module:/public/skeleton.xml"> 3 3 <head> 4 4 <title>child inheriting from base ${width}</title> -
trunk/samples/kauri-jqgrid-sample/src/main/kauri/public/index.xml
r700 r748 8 8 <h1>jqgrid sample</h1> 9 9 10 <p><a href="${publicUri(' km:/templateRestlet/skeleton')}">Base template</a></p>10 <p><a href="${publicUri('service:/templateRestlet/skeleton')}">Base template</a></p> 11 11 12 <p><a href="${publicUri(' km:/templateRestlet/grid')}">grid showcase</a></p>12 <p><a href="${publicUri('service:/templateRestlet/grid')}">grid showcase</a></p> 13 13 14 <p><a href="${publicUri(' km:/templateRestlet/grid_local')}">inline editing : local</a></p>14 <p><a href="${publicUri('service:/templateRestlet/grid_local')}">inline editing : local</a></p> 15 15 16 <p><a href="${publicUri(' km:/templateRestlet/grid_edit')}">inline editing : dbresources</a></p>16 <p><a href="${publicUri('service:/templateRestlet/grid_edit')}">inline editing : dbresources</a></p> 17 17 18 18 </body> -
trunk/samples/kauri-jqgrid-sample/src/main/kauri/router.groovy
r700 r748 2 2 3 3 builder.router { 4 directory(uri: "/resources", root: " kms:/resources/")4 directory(uri: "/resources", root: "module:/resources/") 5 5 6 template(uri: "/", template: " kms:/public/index.xml",6 template(uri: "/", template: "module:/public/index.xml", 7 7 mediaType: "text/html", postAttach : { route -> route.getTemplate().setMatchingMode(Template.MODE_STARTS_WITH) }) 8 8 -
trunk/samples/kauri-representationbuilder-sample/src/main/kauri/representations.groovy
r475 r748 35 35 * substitution. 36 36 */ 37 template(src: " kms:/templates/{name}.xml")37 template(src: "module:/templates/{name}.xml") 38 38 } 39 39 } -
trunk/samples/kauri-representationbuilder-sample/src/main/kauri/router.groovy
r474 r748 1 1 builder.router { 2 template(uri: "/", match: "equals", template: " kms:/templates/index.xml", mediaType: "text/html")2 template(uri: "/", match: "equals", template: "module:/templates/index.xml", mediaType: "text/html") 3 3 4 4 resource(uri: "/exception", match: "equals", ofClass: "org.kauriproject.representation.build.sample.ExceptionResource") 5 5 6 directory(uri: "/resources", root: " kms:/resources/")6 directory(uri: "/resources", root: "module:/resources/") 7 7 8 8 jaxRs(uri: "") { -
trunk/samples/kauri-routing-sample/src/main/kauri/router.groovy
r482 r748 21 21 // which ensures proper resolving of context-related things. 22 22 builder.router(match: "equals") { 23 template(uri: "/", template: " kms:/templates/index.xml",23 template(uri: "/", template: "module:/templates/index.xml", 24 24 mediaType: "text/html") 25 25 26 read (uri: "/router-groovy.txt", source: " kms:/router.groovy", mediaType: mediaType.TEXT_PLAIN)26 read (uri: "/router-groovy.txt", source: "module:/router.groovy", mediaType: mediaType.TEXT_PLAIN) 27 27 28 28 … … 53 53 } 54 54 55 directory(uri: "/resources", match: "start", root: " kms:/resources/")55 directory(uri: "/resources", match: "start", root: "module:/resources/") 56 56 57 read(uri: "/resources_alt/{path}", source: " kms:/resources/{path}",57 read(uri: "/resources_alt/{path}", source: "module:/resources/{path}", 58 58 postAttach : { route -> 59 59 Variable variable = new Variable(Variable.TYPE_URI_PATH, "", true, false) … … 61 61 }) 62 62 63 template(uri: "/template/{templateId}", template: " kms:/templates/{templateId}.xml",64 mediaType: "text/html", data: " kms:/templates/{templateId}.json")63 template(uri: "/template/{templateId}", template: "module:/templates/{templateId}.xml", 64 mediaType: "text/html", data: "module:/templates/{templateId}.json") 65 65 66 66 resource(uri: "/user/{name}", ofClass: "org.kauriproject.samples.routingmodule.UserResource") -
trunk/samples/kauri-routing-sample/src/main/kauri/templates/index.xml
r482 r748 13 13 14 14 <p>The actual routing configuration can be found in the source of this sample 15 at src/main/kauri/<a href="${publicUri(' km:/router/router-groovy.txt')}">router.groovy</a>.15 at src/main/kauri/<a href="${publicUri('service:/router/router-groovy.txt')}">router.groovy</a>. 16 16 This particular sample can be overwhelming because it combines a variety of features.</p> 17 17 18 18 <h2>Restlet samples</h2> 19 19 20 <p><a href="${publicUri(' km:/router/helloworld-router')}">Hello world closure</a> -- this sample20 <p><a href="${publicUri('service:/router/helloworld-router')}">Hello world closure</a> -- this sample 21 21 demonstrates a plain Restlet, but implemented as a closure within the Groovy-based 22 22 routing configuration.</p> 23 23 24 <p><a href="${publicUri(' km:/router/user/Steven')}">User resource</a> -- this sample24 <p><a href="${publicUri('service:/router/user/Steven')}">User resource</a> -- this sample 25 25 demonstrates implementing a ReST resource using Restlet's Resource API.</p> 26 26 27 <p><a href="${publicUri(' km:/router/path/this/are/multiple/path/segments')}">URI27 <p><a href="${publicUri('service:/router/path/this/are/multiple/path/segments')}">URI 28 28 template</a> -- the router uses URI templates as syntax for expressing the URIs to 29 29 match. This sample illustrates setting options for the variable parts within … … 33 33 <h2>JAX-RS samples</h2> 34 34 35 <p><a href="${publicUri(' km:/router/jaxrs/helloworld-java')}">Hello world JAX-RS resource35 <p><a href="${publicUri('service:/router/jaxrs/helloworld-java')}">Hello world JAX-RS resource 36 36 implemented in Java.</a></p> 37 37 38 <p><a href="${publicUri(' km:/router/jaxrs/helloworld-groovy')}">Hello world JAX-RS resource38 <p><a href="${publicUri('service:/router/jaxrs/helloworld-groovy')}">Hello world JAX-RS resource 39 39 implemented in Groovy.</a></p> 40 40 41 <p><a href="${publicUri(' km:/router/jaxrs/vegetable')}">Vegetables list.</a> -- this sample41 <p><a href="${publicUri('service:/router/jaxrs/vegetable')}">Vegetables list.</a> -- this sample 42 42 demonstrates the use of a custom JAX-RS MessageBodyWriter.</p> 43 43 44 <p><a href="${publicUri(' km:/router/jaxrs/user/Steven')}">User resource.</a> -- this sample44 <p><a href="${publicUri('service:/router/jaxrs/user/Steven')}">User resource.</a> -- this sample 45 45 demonstrates the ability to inject path parts as method parameters (see source code).</p> 46 46 47 <p><a href="${publicUri(' km:/router/jaxrs/message')}">Message resource.</a> -- this sample47 <p><a href="${publicUri('service:/router/jaxrs/message')}">Message resource.</a> -- this sample 48 48 is a JAX-RS class with an inject MessageService object, autowired by the module's Spring 49 49 container.</p> … … 51 51 <h2>template sample</h2> 52 52 53 <p><a href="${publicUri(' km:/router/template/person')}">Template sample</a> -- this sample53 <p><a href="${publicUri('service:/router/template/person')}">Template sample</a> -- this sample 54 54 illustrates the 'template' instruction available in the router configuration. It is a shortcut 55 55 for creating a restlet which executes a template, with the ability to provide it data from -
trunk/samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/router.groovy
r443 r748 5 5 builder.router { 6 6 7 template(uri: "/", match: "equals", template: " kms:/templates/index.xml", mediaType: "text/html")7 template(uri: "/", match: "equals", template: "module:/templates/index.xml", mediaType: "text/html") 8 8 9 9 } -
trunk/samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/templates/index.xml
r288 r748 26 26 <h3>Rest-services provided by sample module 1</h3> 27 27 28 <p><a href="${publicUri(' km:/firstRestlet')}">First restlet</a></p>28 <p><a href="${publicUri('service:/firstRestlet')}">First restlet</a></p> 29 29 30 <p><a href="${publicUri(' km:/secondRestlet')}">Second restlet</a> -- shows how to30 <p><a href="${publicUri('service:/secondRestlet')}">Second restlet</a> -- shows how to 31 31 perform an internal request to retrieve the content produced by the first restlet.</p> 32 32 33 <p><a href="${publicUri('km:/thirdRestlet')}">Third restlet</a> -- shows how to use 34 the 'kms' (kauri module source) protocol to retrieve a file contained within 35 a module.</p> 33 <p><a href="${publicUri('service:/thirdRestlet')}">Third restlet</a> -- shows how to use 34 the module-protocol to retrieve a file contained within a module.</p> 36 35 37 36 <h3>Rest-services provided by sample module 2</h3> 38 37 39 <p><a href="${publicUri(' km:/depTestRestlet1')}">depTestRestlet1</a> -- gets data from38 <p><a href="${publicUri('service:/depTestRestlet1')}">depTestRestlet1</a> -- gets data from 40 39 an injected rest-service, in this case the 'firstRestlet' from sample module 1.</p> 41 40 42 <p><a href="${publicUri(' km:/depTestRestlet2')}">depTestRestlet2</a> -- gets data from41 <p><a href="${publicUri('service:/depTestRestlet2')}">depTestRestlet2</a> -- gets data from 43 42 an injected rest-service, in this case the XML specification in XML format. This illustrates 44 43 that injected rest-services can be arbitrary URIs, not only rest-services implemented -
trunk/samples/kauri-runtime-sample/kauri-runtime-sample-module1/src/main/java/org/kauriproject/samples/samplemodule1/MySecondRestlet.java
r279 r748 17 17 18 18 public void handle(Request request, Response response) { 19 Reference reference = new Reference(" km:/firstRestlet");19 Reference reference = new Reference("service:/firstRestlet"); 20 20 Response otherResponse = getContext().getClientDispatcher().get(reference); 21 21 String text; -
trunk/samples/kauri-runtime-sample/kauri-runtime-sample-module1/src/main/java/org/kauriproject/samples/samplemodule1/MyThirdRestlet.java
r279 r748 16 16 17 17 public void handle(Request request, Response response) { 18 Reference reference = new Reference(" kms:/resources/helloworld.txt");18 Reference reference = new Reference("module:/resources/helloworld.txt"); 19 19 Response otherResponse = getContext().getClientDispatcher().get(reference); 20 20 Representation representation = otherResponse.getEntity(); -
trunk/samples/kauri-runtime-sample/kauri-runtime-sample-module2/src/main/kauri/spring/runtime-sample-module2-beans.xml
r279 r748 24 24 <bean id="depTestRestlet1" class="org.kauriproject.samples.samplemodule2.DependencyTestRestlet"> 25 25 <constructor-arg ref="restletContext"/> 26 <constructor-arg value=" km:/testdep1"/>26 <constructor-arg value="service:/testdep1"/> 27 27 </bean> 28 28 29 29 <bean id="depTestRestlet2" class="org.kauriproject.samples.samplemodule2.DependencyTestRestlet"> 30 30 <constructor-arg ref="restletContext"/> 31 <constructor-arg value=" km:/testdep2"/>31 <constructor-arg value="service:/testdep2"/> 32 32 </bean> 33 33 -
trunk/samples/kauri-template-sample/src/main/java/org/kauriproject/samples/template/TemplateRestlet.java
r645 r748 33 33 public class TemplateRestlet extends Restlet { 34 34 35 private static final String SAMPLE_TEMPLATE_LOC = " kms:/public/helloworld.xml";35 private static final String SAMPLE_TEMPLATE_LOC = "module:/public/helloworld.xml"; 36 36 37 37 private TemplateService templateService; -
trunk/samples/kauri-template-sample/src/main/java/org/kauriproject/samples/template/TemplateRestlet2.java
r281 r748 36 36 private static final Pattern REQ_SRC_PATTERN = Pattern.compile("^/([^\\?.]*)(\\.[^\\?]*)?(.*)$"); 37 37 38 private static final String TEMPLATE_BASE = " kms:/public/";38 private static final String TEMPLATE_BASE = "module:/public/"; 39 39 private static final String TEMPLATE_EXT = ".xml"; 40 40 -
trunk/samples/kauri-template-sample/src/main/kauri/public/helloworld.xml
r696 r748 10 10 </head> 11 11 <body> 12 <ktl:include src=" kms:/public/header.xml"/>12 <ktl:include src="module:/public/header.xml"/> 13 13 <h1>Hello World</h1> 14 14 <p> … … 26 26 </div> 27 27 <ktl:insert src="snip.xml"/> 28 <ktl:insert src=" kms:/public/snip2.xml" />28 <ktl:insert src="module:/public/snip2.xml" /> 29 29 <ktl:insert src="snip.txt" /> 30 <p><b>The publicUri of km:/templateRestlet2/helloworld is31 ${publicUri(" km:/templateRestlet2/helloworld")} !</b></p>30 <p><b>The publicUri of service:/templateRestlet2/helloworld is 31 ${publicUri("service:/templateRestlet2/helloworld")} !</b></p> 32 32 <!-- 33 33 <div> -
trunk/samples/kauri-template-sample/src/main/kauri/public/index.xml
r695 r748 31 31 catches the response to return it to Restlet.</p> 32 32 33 <p><a href="${publicUri(' km:/templateRestlet')}">A template</a>. Look at the <a href="${publicUri('km:/templateRestlet?_raw=true')}">template source code</a>.</p>33 <p><a href="${publicUri('service:/templateRestlet')}">A template</a>. Look at the <a href="${publicUri('service:/templateRestlet?_raw=true')}">template source code</a>.</p> 34 34 35 35 <h2>TemplateRestlet2</h2> … … 39 39 generation. This is the more common approach.</p> 40 40 41 <p><a href="${publicUri(' km:/templateRestlet2/helloworld')}">Template helloworld</a></p>41 <p><a href="${publicUri('service:/templateRestlet2/helloworld')}">Template helloworld</a></p> 42 42 43 <p><a href="${publicUri(' km:/templateRestlet2/request.xml')}">Template request</a></p>43 <p><a href="${publicUri('service:/templateRestlet2/request.xml')}">Template request</a></p> 44 44 45 <p><a href="${publicUri(' km:/templateRestlet2/response.xml')}">Template response</a></p>45 <p><a href="${publicUri('service:/templateRestlet2/response.xml')}">Template response</a></p> 46 46 47 47 <h3>Template inheritance</h3> 48 48 49 <p><a href="${publicUri(' km:/templateRestlet2/skeleton')}">Base template</a></p>49 <p><a href="${publicUri('service:/templateRestlet2/skeleton')}">Base template</a></p> 50 50 51 <p><a href="${publicUri(' km:/templateRestlet2/page')}">Page inheriting from base</a></p>51 <p><a href="${publicUri('service:/templateRestlet2/page')}">Page inheriting from base</a></p> 52 52 53 <p><a href="${publicUri(' km:/templateRestlet2/page_with_notes')}">multiple inheritance: adding notes to previous page</a></p>53 <p><a href="${publicUri('service:/templateRestlet2/page_with_notes')}">multiple inheritance: adding notes to previous page</a></p> 54 54 55 55 <h3>Sample of a template using data from request parameters</h3> 56 56 <p>This is a very plain HTML form, not a demo of Kauri's Ajax form features!</p> 57 57 <p> 58 <form action="${publicUri(' km:/templateRestlet2/person.xml')}" method="GET">58 <form action="${publicUri('service:/templateRestlet2/person.xml')}" method="GET"> 59 59 <fieldset> 60 60 <legend>Personal information</legend> -
trunk/samples/kauri-template-sample/src/main/kauri/public/page.xml
r695 r748 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <html xmlns:ktl="http://kauriproject.org/template" ktl:inherit=" kms:/public/skeleton.xml">2 <html xmlns:ktl="http://kauriproject.org/template" ktl:inherit="module:/public/skeleton.xml"> 3 3 <head> 4 4 <title>child inheriting from base</title> -
trunk/samples/kauri-template-sample/src/main/kauri/public/page_with_notes.xml
r695 r748 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <html xmlns:ktl="http://kauriproject.org/template" ktl:inherit=" kms:/public/page.xml">2 <html xmlns:ktl="http://kauriproject.org/template" ktl:inherit="module:/public/page.xml"> 3 3 <head> 4 4 <title>adding notes to existing page</title> -
trunk/samples/kauri-template-sample/src/main/kauri/router.groovy
r692 r748 2 2 3 3 builder.router { 4 directory(uri: "/resources", root: " kms:/resources/")4 directory(uri: "/resources", root: "module:/resources/") 5 5 6 template(uri: "/", template: " kms:/public/index.xml",6 template(uri: "/", template: "module:/public/index.xml", 7 7 mediaType: "text/html", postAttach : { route -> route.getTemplate().setMatchingMode(Template.MODE_STARTS_WITH) }) 8 8 -
trunk/tools/kauri-archetype/kauri-archetype-basic/src/main/resources/archetype-resources/module1/src/main/kauri/representations.groovy
r475 r748 14 14 select { 15 15 when(name: "{name:**}") { 16 template(src: " kms:/templates/{name}.xml")16 template(src: "module:/templates/{name}.xml") 17 17 } 18 18 } -
trunk/tools/kauri-archetype/kauri-archetype-basic/src/main/resources/archetype-resources/module1/src/main/kauri/router.groovy
r443 r748 4 4 uri: "/", 5 5 match: "equals", 6 template: " kms:/templates/index.xml",6 template: "module:/templates/index.xml", 7 7 mediaType: "text/html" 8 8 ) 9 9 10 directory(uri: "/resources", root: " kms:/resources/")10 directory(uri: "/resources", root: "module:/resources/") 11 11 12 12 jaxRs(uri: "") { -
trunk/tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/pages/index.html.xml
r689 r748 16 16 useful when linking to other modules. 17 17 --> 18 <p><a href="${publicUri(' km:/router/persons/1.html')}">View person</a></p>18 <p><a href="${publicUri('service:/router/persons/1.html')}">View person</a></p> 19 19 </body> 20 20 </html> -
trunk/tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/pages/persons/{id}.html.xml
r689 r748 5 5 supplied from the resource class (PersonResource). 6 6 --> 7 <t:variable name="person" src=" km:/data/persons/${request.attributes.id}.json" overwrite="false"/>7 <t:variable name="person" src="service:/data/persons/${request.attributes.id}.json" overwrite="false"/> 8 8 9 9 <head> -
trunk/tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/representations.groovy
r689 r748 14 14 select { 15 15 when(name: "{name:**}") { 16 template(src: " kms:/pages/{name}.html.xml")16 template(src: "module:/pages/{name}.html.xml") 17 17 } 18 18 } -
trunk/tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/router.groovy
r689 r748 3 3 * Static resources. 4 4 */ 5 directory(uri: "/resources", root: " kms:/resources/")5 directory(uri: "/resources", root: "module:/resources/") 6 6 7 7 /* -
trunk/tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/spring/production/module1-production-beans.xml
r689 r748 19 19 <bean id="data" class="org.restlet.Directory"> 20 20 <constructor-arg ref="restletContext"/> 21 <constructor-arg value=" kms:/mockdata/"/>21 <constructor-arg value="module:/mockdata/"/> 22 22 </bean> 23 23 <kauri:export-restservice ref="data"/> -
trunk/tools/kauri-archetype/kauri-archetype-prototyping/src/main/resources/archetype-resources/module1/src/main/kauri/spring/prototype/module1-prototype-beans.xml
r689 r748 17 17 <bean id="data" class="org.restlet.Directory"> 18 18 <constructor-arg ref="restletContext"/> 19 <constructor-arg value=" kms:/mockdata/"/>19 <constructor-arg value="module:/mockdata/"/> 20 20 </bean> 21 21 <kauri:export-restservice ref="data"/>
Note: See TracChangeset
for help on using the changeset viewer.