Changeset 923


Ignore:
Timestamp:
2008-12-02 19:35:03 (4 years ago)
Author:
bruno
Message:

kauri-runtime-sample: apply common sample skinning, service.xml rename. No changes to the actual sample itself.

Location:
trunk/samples/kauri-runtime-sample
Files:
5 added
1 deleted
3 edited
5 moved

Legend:

Unmodified
Added
Removed
  • trunk/samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/pages/index.html.xml

    r911 r923  
    11<?xml version="1.0"?> 
    2 <html> 
    3   <head> 
    4     <title>Kauri runtime samples</title> 
    5   </head> 
     2<html t:inherit="module:/templates/layout/layout.xml" 
     3      xmlns:t="http://kauriproject.org/template"> 
    64 
    7   <body> 
     5  <t:block name="main"> 
    86    <h1>Kauri runtime samples</h1> 
    97 
     
    1513    functionality of the Kauri Runtime is that the Spring containers can also 
    1614    export and import what we call <b>rest-services</b>. Rest-services can answer 
    17     to ReST-style requests (i.e. GET/POST/PUT/... on an URI-identified resource), 
     15    to REST-style requests (i.e. GET/POST/PUT/... on an URI-identified resource), 
    1816    not just for a single URI but an entire URI-space. These rest-services can 
    1917    be wired between modules similar to classic Java 
    20     services, and can be mounted on public URI paths.</p> 
     18    services, and can be mounted on public URI paths to make them 
     19    available over HTTP.</p> 
    2120 
    2221    <h2>Things you can look at:</h2> 
     
    4443    in Kauri.</p> 
    4544 
    46   </body> 
     45  </t:block> 
    4746</html> 
  • trunk/samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/router.groovy

    r748 r923  
    1 // To see some feedback in your console of when the routing is rebuild, 
    2 // uncomment the following line 
    3 //println("Building router") 
    4  
    51builder.router { 
    62 
    7   template(uri: "/", match: "equals", template: "module:/templates/index.xml", mediaType: "text/html") 
     3  pages(uri: "", root: "pages") 
    84 
    95} 
  • trunk/samples/kauri-runtime-sample/kauri-runtime-sample-index/src/main/kauri/spring/services.xml

    r911 r923  
    2121                        service="org.kauriproject.template.service.TemplateService"/> 
    2222 
    23   <kauri:export-restservice ref="router"/> 
     23  <kauri:export-restservice ref="main"/> 
     24 
     25  <kauri:import-restservice name="samples-common"/> 
    2426 
    2527  <kauri:import-restservice name="firstRestlet"/> 
     
    3234 
    3335 
    34   <bean id="router" factory-bean="routingService" factory-method="createRouter"> 
     36  <bean id="main" factory-bean="routingService" factory-method="createRouter"> 
    3537    <constructor-arg ref="restletContext"/> 
    3638    <constructor-arg ref="module"/> 
  • trunk/samples/kauri-runtime-sample/kauri-runtime-sample-module1/src/main/java/org/kauriproject/samples/samplemodule1/MyThirdRestlet.java

    r748 r923  
    1616 
    1717    public void handle(Request request, Response response) { 
    18         Reference reference = new Reference("module:/resources/helloworld.txt"); 
     18        Reference reference = new Reference("module:/static/helloworld.txt"); 
    1919        Response otherResponse = getContext().getClientDispatcher().get(reference); 
    2020        Representation representation = otherResponse.getEntity(); 
  • trunk/samples/kauri-runtime-sample/kauri.xml

    r440 r923  
    1818  <modules> 
    1919 
    20     <artifact id="routingModule" groupId="org.kauriproject" artifactId="kauri-routing-impl"> 
     20    <artifact id="routing" groupId="org.kauriproject" artifactId="kauri-routing-impl"/> 
     21 
     22    <artifact id="template" groupId="org.kauriproject" artifactId="kauri-template-service-impl"/> 
     23 
     24    <artifact id="blueprintcss" groupId="org.kauriproject" artifactId="kauri-blueprintcss"> 
     25      <mount name="main" path="/kauri/blueprintcss"/> 
    2126    </artifact> 
    22      
    23     <artifact id="templateModule" groupId="org.kauriproject" artifactId="kauri-template-service-impl"> 
     27 
     28    <artifact id="samples.common" groupId="org.kauriproject" artifactId="kauri-samples-common"> 
     29      <inject-restservice name="blueprintcss" ref="blueprintcss:main"/> 
     30 
     31      <mount name="main" path="/samples/common"/> 
    2432    </artifact> 
    2533 
     
    3947 
    4048    <artifact id="index" groupId="org.kauriproject" artifactId="kauri-runtime-sample-index"> 
     49      <inject-restservice name="samples-common" ref="samples.common:main"/> 
    4150      <inject-restservice name="firstRestlet" ref="samplemodule1:firstRestlet"/> 
    4251      <inject-restservice name="secondRestlet" ref="samplemodule1:secondRestlet"/> 
     
    4554      <inject-restservice name="depTestRestlet2" ref="samplemodule2:depTestRestlet2"/> 
    4655 
    47       <mount name="router" path=""/> 
     56      <mount name="main" path=""/> 
    4857    </artifact> 
    4958 
Note: See TracChangeset for help on using the changeset viewer.