Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added intellij iml files and fixed webi-php

  • Loading branch information...
commit 147c9739e56004ea7139e4c068a136f8b186a1d7 1 parent 1e511c7
Henrik Hofmeister authored February 05, 2013
22  modules/webi-client/webi-client.iml
... ...
@@ -0,0 +1,22 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
  9
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  10
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  11
+    </content>
  12
+    <orderEntry type="inheritedJdk" />
  13
+    <orderEntry type="sourceFolder" forTests="false" />
  14
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  15
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  16
+    <orderEntry type="module" module-name="babelshark" />
  17
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  18
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  19
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  20
+  </component>
  21
+</module>
  22
+
47  modules/webi-db/webi-db.iml
... ...
@@ -0,0 +1,47 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
  9
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  10
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  11
+    </content>
  12
+    <orderEntry type="inheritedJdk" />
  13
+    <orderEntry type="sourceFolder" forTests="false" />
  14
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  15
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  16
+    <orderEntry type="module" module-name="webi" />
  17
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:8.1.2.v20120308" level="project" />
  18
+    <orderEntry type="library" name="Maven: org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016" level="project" />
  19
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:8.1.2.v20120308" level="project" />
  20
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:8.1.2.v20120308" level="project" />
  21
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:8.1.2.v20120308" level="project" />
  22
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:8.1.2.v20120308" level="project" />
  23
+    <orderEntry type="module" module-name="babelshark" />
  24
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  25
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  26
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  27
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
  28
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
  29
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
  30
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:8.1.4.v20120524" level="project" />
  31
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:8.1.4.v20120524" level="project" />
  32
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
  33
+    <orderEntry type="library" name="Maven: com.google.javascript:closure-compiler:r2388" level="project" />
  34
+    <orderEntry type="library" name="Maven: args4j:args4j:2.0.16" level="project" />
  35
+    <orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
  36
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.4.1" level="project" />
  37
+    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
  38
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
  39
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
  40
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
  41
+    <orderEntry type="library" name="Maven: com.googlecode.jarjar:jarjar:1.1" level="project" />
  42
+    <orderEntry type="library" name="Maven: com.asual.lesscss:lesscss-engine:1.3.0" level="project" />
  43
+    <orderEntry type="library" name="Maven: org.mozilla:rhino:1.7R3" level="project" />
  44
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
  45
+  </component>
  46
+</module>
  47
+
49  modules/webi-mongo/webi-mongo.iml
... ...
@@ -0,0 +1,49 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
  9
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  10
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  11
+    </content>
  12
+    <orderEntry type="inheritedJdk" />
  13
+    <orderEntry type="sourceFolder" forTests="false" />
  14
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  15
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  16
+    <orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.8.0" level="project" />
  17
+    <orderEntry type="module" module-name="webi-db" />
  18
+    <orderEntry type="module" module-name="webi" />
  19
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:8.1.2.v20120308" level="project" />
  20
+    <orderEntry type="library" name="Maven: org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016" level="project" />
  21
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:8.1.2.v20120308" level="project" />
  22
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:8.1.2.v20120308" level="project" />
  23
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:8.1.2.v20120308" level="project" />
  24
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:8.1.2.v20120308" level="project" />
  25
+    <orderEntry type="module" module-name="babelshark" />
  26
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  27
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  28
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  29
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
  30
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
  31
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
  32
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:8.1.4.v20120524" level="project" />
  33
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:8.1.4.v20120524" level="project" />
  34
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
  35
+    <orderEntry type="library" name="Maven: com.google.javascript:closure-compiler:r2388" level="project" />
  36
+    <orderEntry type="library" name="Maven: args4j:args4j:2.0.16" level="project" />
  37
+    <orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
  38
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.4.1" level="project" />
  39
+    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
  40
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
  41
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
  42
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
  43
+    <orderEntry type="library" name="Maven: com.googlecode.jarjar:jarjar:1.1" level="project" />
  44
+    <orderEntry type="library" name="Maven: com.asual.lesscss:lesscss-engine:1.3.0" level="project" />
  45
+    <orderEntry type="library" name="Maven: org.mozilla:rhino:1.7R3" level="project" />
  46
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
  47
+  </component>
  48
+</module>
  49
+
5  modules/webi-php/pom.xml
@@ -36,5 +36,10 @@
36 36
       <artifactId>javaee-web-api</artifactId>
37 37
       <version>6.0</version>
38 38
     </dependency>
  39
+      <dependency>
  40
+          <groupId>com.vonhof</groupId>
  41
+          <artifactId>webi</artifactId>
  42
+          <version>1.0</version>
  43
+      </dependency>
39 44
   </dependencies>
40 45
 </project>
8  modules/webi-php/src/main/java/com/vonhof/webi/php/PHPRequestHandler.java
@@ -23,9 +23,9 @@
23 23
 import com.caucho.vfs.Path;
24 24
 import com.caucho.vfs.Vfs;
25 25
 import com.caucho.vfs.WriteStream;
26  
-import com.vonhof.webi.FileRequestHandler;
  26
+import com.vonhof.webi.file.FileRequestHandler;
27 27
 import com.vonhof.webi.WebiContext;
28  
-import com.vonhof.webi.mvc.MVCRequestHandler;
  28
+import com.vonhof.webi.rest.RESTServiceHandler;
29 29
 import com.vonhof.webi.php.module.WebiModule;
30 30
 import java.io.File;
31 31
 import java.io.FileNotFoundException;
@@ -38,7 +38,7 @@
38 38
  */
39 39
 public class PHPRequestHandler extends FileRequestHandler {
40 40
     
41  
-    private final MVCRequestHandler service;
  41
+    private final RESTServiceHandler service;
42 42
     
43 43
     private static final L10N L = new L10N(QuercusServletImpl.class);
44 44
     private static final Logger LOG = Logger.getLogger(PHPRequestHandler.class.getName());
@@ -46,7 +46,7 @@
46 46
     private final QuercusContext quercus = new QuercusContext();
47 47
     private final Path basePath;
48 48
 
49  
-    public PHPRequestHandler(MVCRequestHandler service,String docRoot) {
  49
+    public PHPRequestHandler(RESTServiceHandler service,String docRoot) {
50 50
         super();
51 51
         this.service = service;
52 52
         
14  modules/webi-php/src/main/java/com/vonhof/webi/php/module/WebiModule.java
@@ -16,9 +16,9 @@
16 16
 import com.vonhof.webi.WebiContext;
17 17
 import com.vonhof.webi.annotation.Body;
18 18
 import com.vonhof.webi.annotation.Parm;
19  
-import com.vonhof.webi.mvc.MVCRequestHandler;
20  
-import com.vonhof.webi.mvc.TextFile;
21  
-import com.vonhof.webi.mvc.UrlMapper;
  19
+import com.vonhof.webi.rest.RESTServiceHandler;
  20
+import com.vonhof.webi.rest.TextFile;
  21
+import com.vonhof.webi.rest.UrlMapper;
22 22
 import com.vonhof.webi.session.WebiSession;
23 23
 import java.io.InputStream;
24 24
 import java.io.OutputStream;
@@ -34,10 +34,10 @@
34 34
  */
35 35
 public class WebiModule extends AbstractQuercusModule {
36 36
 
37  
-    private final MVCRequestHandler service;
  37
+    private final RESTServiceHandler service;
38 38
     private final Webi webi;
39 39
 
40  
-    public WebiModule(Webi webi,MVCRequestHandler service) {
  40
+    public WebiModule(Webi webi,RESTServiceHandler service) {
41 41
         this.webi = webi;
42 42
         this.service = service;
43 43
     }
@@ -48,11 +48,11 @@ public WebiWrapper webi(Env env) {
48 48
 
49 49
     public class WebiWrapper {
50 50
 
51  
-        private final MVCRequestHandler service;
  51
+        private final RESTServiceHandler service;
52 52
         private final Env env;
53 53
         private final Map<String, ControllerWrapper> controllers = new HashMap<String, ControllerWrapper>();
54 54
 
55  
-        public WebiWrapper(MVCRequestHandler webi, Env env) {
  55
+        public WebiWrapper(RESTServiceHandler webi, Env env) {
56 56
             this.service = webi;
57 57
             this.env = env;
58 58
             
49  modules/webi-php/webi-php.iml
... ...
@@ -0,0 +1,49 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
  9
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  10
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  11
+    </content>
  12
+    <orderEntry type="inheritedJdk" />
  13
+    <orderEntry type="sourceFolder" forTests="false" />
  14
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  15
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  16
+    <orderEntry type="module" module-name="webi" />
  17
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:8.1.2.v20120308" level="project" />
  18
+    <orderEntry type="library" name="Maven: org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016" level="project" />
  19
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:8.1.2.v20120308" level="project" />
  20
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:8.1.2.v20120308" level="project" />
  21
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:8.1.2.v20120308" level="project" />
  22
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:8.1.2.v20120308" level="project" />
  23
+    <orderEntry type="module" module-name="babelshark" />
  24
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  25
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  26
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  27
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
  28
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
  29
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
  30
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:8.1.4.v20120524" level="project" />
  31
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:8.1.4.v20120524" level="project" />
  32
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
  33
+    <orderEntry type="library" name="Maven: com.google.javascript:closure-compiler:r2388" level="project" />
  34
+    <orderEntry type="library" name="Maven: args4j:args4j:2.0.16" level="project" />
  35
+    <orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
  36
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.4.1" level="project" />
  37
+    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
  38
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
  39
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
  40
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
  41
+    <orderEntry type="library" name="Maven: com.googlecode.jarjar:jarjar:1.1" level="project" />
  42
+    <orderEntry type="library" name="Maven: com.asual.lesscss:lesscss-engine:1.3.0" level="project" />
  43
+    <orderEntry type="library" name="Maven: org.mozilla:rhino:1.7R3" level="project" />
  44
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
  45
+    <orderEntry type="library" name="Maven: javax.cache:cache-api:0.5" level="project" />
  46
+    <orderEntry type="library" name="Maven: javax:javaee-web-api:6.0" level="project" />
  47
+  </component>
  48
+</module>
  49
+
59  modules/webi-postgres/webi-postgres.iml
... ...
@@ -0,0 +1,59 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
  9
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  10
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  11
+    </content>
  12
+    <orderEntry type="inheritedJdk" />
  13
+    <orderEntry type="sourceFolder" forTests="false" />
  14
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  15
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  16
+    <orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901-1.jdbc4" level="project" />
  17
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:3.0.5.RELEASE" level="project" />
  18
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.0.5.RELEASE" level="project" />
  19
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:3.0.5.RELEASE" level="project" />
  20
+    <orderEntry type="library" name="Maven: org.springframework:spring-asm:3.0.5.RELEASE" level="project" />
  21
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
  22
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:3.0.5.RELEASE" level="project" />
  23
+    <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
  24
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:3.0.5.RELEASE" level="project" />
  25
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:3.0.5.RELEASE" level="project" />
  26
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:3.0.5.RELEASE" level="project" />
  27
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
  28
+    <orderEntry type="module" module-name="webi-db" />
  29
+    <orderEntry type="module" module-name="webi" />
  30
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:8.1.2.v20120308" level="project" />
  31
+    <orderEntry type="library" name="Maven: org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016" level="project" />
  32
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:8.1.2.v20120308" level="project" />
  33
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:8.1.2.v20120308" level="project" />
  34
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:8.1.2.v20120308" level="project" />
  35
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:8.1.2.v20120308" level="project" />
  36
+    <orderEntry type="module" module-name="babelshark" />
  37
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  38
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  39
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  40
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
  41
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
  42
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
  43
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:8.1.4.v20120524" level="project" />
  44
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:8.1.4.v20120524" level="project" />
  45
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
  46
+    <orderEntry type="library" name="Maven: com.google.javascript:closure-compiler:r2388" level="project" />
  47
+    <orderEntry type="library" name="Maven: args4j:args4j:2.0.16" level="project" />
  48
+    <orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
  49
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.4.1" level="project" />
  50
+    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
  51
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
  52
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
  53
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
  54
+    <orderEntry type="library" name="Maven: com.googlecode.jarjar:jarjar:1.1" level="project" />
  55
+    <orderEntry type="library" name="Maven: com.asual.lesscss:lesscss-engine:1.3.0" level="project" />
  56
+    <orderEntry type="library" name="Maven: org.mozilla:rhino:1.7R3" level="project" />
  57
+  </component>
  58
+</module>
  59
+
47  modules/webi-websockets/webi-websockets.iml
... ...
@@ -0,0 +1,47 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  9
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  10
+    </content>
  11
+    <orderEntry type="inheritedJdk" />
  12
+    <orderEntry type="sourceFolder" forTests="false" />
  13
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  14
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  15
+    <orderEntry type="module" module-name="webi" />
  16
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:8.1.2.v20120308" level="project" />
  17
+    <orderEntry type="library" name="Maven: org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016" level="project" />
  18
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:8.1.2.v20120308" level="project" />
  19
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:8.1.5.v20120716" level="project" />
  20
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:8.1.5.v20120716" level="project" />
  21
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:8.1.5.v20120716" level="project" />
  22
+    <orderEntry type="module" module-name="babelshark" />
  23
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  24
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  25
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  26
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
  27
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
  28
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
  29
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:8.1.4.v20120524" level="project" />
  30
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:8.1.4.v20120524" level="project" />
  31
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
  32
+    <orderEntry type="library" name="Maven: com.google.javascript:closure-compiler:r2388" level="project" />
  33
+    <orderEntry type="library" name="Maven: args4j:args4j:2.0.16" level="project" />
  34
+    <orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
  35
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.4.1" level="project" />
  36
+    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
  37
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
  38
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
  39
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
  40
+    <orderEntry type="library" name="Maven: com.googlecode.jarjar:jarjar:1.1" level="project" />
  41
+    <orderEntry type="library" name="Maven: com.asual.lesscss:lesscss-engine:1.3.0" level="project" />
  42
+    <orderEntry type="library" name="Maven: org.mozilla:rhino:1.7R3" level="project" />
  43
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
  44
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-websocket:8.1.5.v20120716" level="project" />
  45
+  </component>
  46
+</module>
  47
+
24  src/main/java/com/vonhof/webi/rest/DefaultUrlMapper.java
@@ -31,21 +31,26 @@ public void expose(Object obj) {
31 31
 
32 32
     @Override
33 33
     public void expose(Object obj, String baseUrl) {
  34
+        baseUrl = baseUrl.toLowerCase();
34 35
         controllers.put(baseUrl, obj);
35  
-        if (!actions.containsKey(baseUrl))
  36
+        if (!actions.containsKey(baseUrl)) {
36 37
             actions.put(baseUrl, new HashMap<String, EnumMap<HttpMethod, MethodInfo>>());
  38
+        }
37 39
         Map<String, EnumMap<HttpMethod, MethodInfo>> ctrlActions = actions.get(baseUrl);
38 40
         
39 41
         ClassInfo<?> classInfo = ClassInfo.from(obj.getClass());
40 42
         for (MethodInfo m : classInfo.getMethods()) {
41  
-            if (!m.isPublic() || m.hasAnnotation(Ignore.class) || m.hasAnnotation(Handler.class))
  43
+            if (!m.isPublic() || m.hasAnnotation(Ignore.class) || m.hasAnnotation(Handler.class)) {
42 44
                 continue;
  45
+            }
43 46
             
44 47
             Path path = m.getAnnotation(Path.class);
45 48
             HttpMethod httpMethod = path != null ? path.method() : HttpMethod.GET;
46 49
             String url = getMethodURL(m);
47  
-            if (!ctrlActions.containsKey(url))
  50
+            if (!ctrlActions.containsKey(url)) {
48 51
                 ctrlActions.put(url,new EnumMap<HttpMethod, MethodInfo>(HttpMethod.class));
  52
+            }
  53
+            
49 54
             ctrlActions.get(url).put(httpMethod,m);
50 55
             LOG.log(Level.INFO,String.format("Mapped %s/%s (%s) to %s:%s",
51 56
                                                             baseUrl,url,httpMethod,
@@ -53,6 +58,7 @@ public void expose(Object obj, String baseUrl) {
53 58
         }
54 59
     }
55 60
 
  61
+    @Override
56 62
     public Map<String, Map<String, EnumMap<HttpMethod, MethodInfo>>> getMethods() {
57 63
         return actions;
58 64
     }
@@ -89,20 +95,24 @@ public MethodInfo getMethodByURL(String url,HttpMethod method) {
89 95
         int firstSep = url.indexOf("/");
90 96
         if (firstSep > 1) {
91 97
             String ctrlUrl = url.substring(0,firstSep);
92  
-            if (ctrlUrl.endsWith("/"))
  98
+            if (ctrlUrl.endsWith("/")) {
93 99
                 ctrlUrl = ctrlUrl.substring(0,ctrlUrl.length()-1);
  100
+            }
94 101
             
95 102
             final Map<String, EnumMap<HttpMethod, MethodInfo>> ctrlActions = actions.get(ctrlUrl);
96  
-            if (ctrlActions == null)
  103
+            if (ctrlActions == null) {
97 104
                 return null;
  105
+            }
98 106
             
99 107
             String name = url.substring(firstSep + 1);
100  
-            if (name.endsWith("/"))
  108
+            if (name.endsWith("/")) {
101 109
                 name = name.substring(0,name.length()-1);
  110
+            }
102 111
             
103 112
             final EnumMap<HttpMethod, MethodInfo> methods = ctrlActions.get(name.toLowerCase());
104  
-            if (methods != null)
  113
+            if (methods != null) {
105 114
                 return methods.get(method);
  115
+            }
106 116
         }
107 117
         return null;
108 118
     }
46  webi.iml
... ...
@@ -0,0 +1,46 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
  4
+    <output url="file://$MODULE_DIR$/target/classes" />
  5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
  6
+    <content url="file://$MODULE_DIR$">
  7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  8
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
  9
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  10
+      <excludeFolder url="file://$MODULE_DIR$/target" />
  11
+    </content>
  12
+    <orderEntry type="inheritedJdk" />
  13
+    <orderEntry type="sourceFolder" forTests="false" />
  14
+    <orderEntry type="library" name="Maven: vonhof:babelshark:1.0-SNAPSHOT" level="project" />
  15
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
  16
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:8.1.2.v20120308" level="project" />
  17
+    <orderEntry type="library" name="Maven: org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016" level="project" />
  18
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:8.1.2.v20120308" level="project" />
  19
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:8.1.2.v20120308" level="project" />
  20
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:8.1.2.v20120308" level="project" />
  21
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:8.1.2.v20120308" level="project" />
  22
+    <orderEntry type="module" module-name="babelshark" />
  23
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
  24
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" />
  25
+    <orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.4.1" level="project" />
  26
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
  27
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
  28
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
  29
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:8.1.4.v20120524" level="project" />
  30
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:8.1.4.v20120524" level="project" />
  31
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
  32
+    <orderEntry type="library" name="Maven: com.google.javascript:closure-compiler:r2388" level="project" />
  33
+    <orderEntry type="library" name="Maven: args4j:args4j:2.0.16" level="project" />
  34
+    <orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
  35
+    <orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:2.4.1" level="project" />
  36
+    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
  37
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
  38
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.8.2" level="project" />
  39
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
  40
+    <orderEntry type="library" name="Maven: com.googlecode.jarjar:jarjar:1.1" level="project" />
  41
+    <orderEntry type="library" name="Maven: com.asual.lesscss:lesscss-engine:1.3.0" level="project" />
  42
+    <orderEntry type="library" name="Maven: org.mozilla:rhino:1.7R3" level="project" />
  43
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
  44
+  </component>
  45
+</module>
  46
+

0 notes on commit 147c973

Please sign in to comment.
Something went wrong with that request. Please try again.