lipog-commit Mailing List for Little Portal Gizmo (Page 11)
Status: Beta
Brought to you by:
jbu
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(94) |
Jun
(14) |
Jul
(168) |
Aug
(39) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:20
|
Update of /cvsroot/lipog/net.heilancoo.bingo In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28587 Modified Files: plugin.xml Log Message: session and application initialisation rationalisation Index: plugin.xml =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.bingo/plugin.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** plugin.xml 20 Apr 2009 18:56:04 -0000 1.3 --- plugin.xml 15 May 2009 19:21:11 -0000 1.4 *************** *** 13,16 **** --- 13,23 ---- </webapp> </extension> + <extension + point="net.heilancoo.portal.webfolder"> + <webfolder + private-path="templates/" + public-path="static/*"> + </webfolder> + </extension> </plugin> |
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:20
|
Update of /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28587/src/net/heilancoo/bingo Modified Files: BingoSession.java BingoApplication.java Log Message: session and application initialisation rationalisation Index: BingoApplication.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo/BingoApplication.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BingoApplication.java 11 May 2009 20:23:25 -0000 1.3 --- BingoApplication.java 15 May 2009 19:21:11 -0000 1.4 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldAccessException; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldAccessException; *************** *** 44,53 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub - } --- 44,52 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } Index: BingoSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo/BingoSession.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BingoSession.java 12 May 2009 16:15:28 -0000 1.8 --- BingoSession.java 15 May 2009 19:21:11 -0000 1.9 *************** *** 12,19 **** package net.heilancoo.bingo; - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; - import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 12,17 ---- package net.heilancoo.bingo; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 54,66 **** } - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.application.ApplicationRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request public void main(HttpRequest request, FormFieldContainer fields, --- 52,55 ---- |
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:18
|
Update of /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28530/src/net/heilancoo/portal/test Modified Files: PortalTestPlugin.java Log Message: session and application initialisation rationalisation Index: PortalTestPlugin.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/test/PortalTestPlugin.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PortalTestPlugin.java 10 Apr 2009 15:08:39 -0000 1.2 --- PortalTestPlugin.java 15 May 2009 19:21:05 -0000 1.3 *************** *** 12,15 **** --- 12,17 ---- package net.heilancoo.portal.test; + import net.heilancoo.portal.PortalPlugin; + import org.eclipse.core.runtime.Plugin; import org.osgi.framework.BundleContext; *************** *** 31,35 **** */ public PortalTestPlugin() { - // TODO Auto-generated constructor stub } --- 33,36 ---- *************** *** 41,44 **** --- 42,46 ---- super.start(context); plugin = this; + PortalPlugin.getDefault().configureLogging(null); } *************** *** 60,63 **** return plugin; } ! } --- 62,65 ---- return plugin; } ! } |
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:14
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28454/src/net/heilancoo/portal/session Modified Files: Session.java Log Message: session and application initialisation rationalisation Index: Session.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session/Session.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Session.java 12 May 2009 16:15:13 -0000 1.6 --- Session.java 15 May 2009 19:20:58 -0000 1.7 *************** *** 12,17 **** package net.heilancoo.portal.session; - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Controller; --- 12,15 ---- *************** *** 22,26 **** public interface Session extends Controller { - public void initialise(ApplicationRequestHandler handler, Application application, String sessionKey); public Controller getInitialController(); --- 20,23 ---- |
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:13
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28503/src/net/heilancoo/portal/examples/controllerchange Modified Files: TheApplication.java TheSession.java Log Message: session and application initialisation rationalisation Index: TheSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/TheSession.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TheSession.java 12 May 2009 16:15:16 -0000 1.4 --- TheSession.java 15 May 2009 19:21:01 -0000 1.5 *************** *** 12,17 **** package net.heilancoo.portal.examples.controllerchange; - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.controller.ValidControllers; --- 12,15 ---- *************** *** 48,60 **** } - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.application.ApplicationRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - void access() { accessCounter += 1; --- 46,49 ---- Index: TheApplication.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/TheApplication.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TheApplication.java 11 May 2009 20:23:19 -0000 1.2 --- TheApplication.java 15 May 2009 19:21:01 -0000 1.3 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldAccessException; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldAccessException; *************** *** 44,53 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub - } --- 44,52 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } |
Update of /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28530/src/net/heilancoo/portal/webapps/test Modified Files: SessionWithMultipleResponseFormats.java TestWebApp6.java SessionWithMultipleResponseFormatsTemplateMissing.java SimpleSession.java SimpleSessionMainEntryMissing.java TestWebApp4.java TestWebApp.java InitialisationTests.java SessionWithCustomTemplateFolder.java TestWebApp7.java TestWebApp8.java SessionWithCustomDefaultResponseFormat.java TestWebApp5.java TestWebApp2.java SessionWithCustomEntry.java TestWebApp3.java Log Message: session and application initialisation rationalisation Index: InitialisationTests.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/InitialisationTests.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** InitialisationTests.java 23 Apr 2009 20:24:37 -0000 1.8 --- InitialisationTests.java 15 May 2009 19:21:05 -0000 1.9 *************** *** 19,22 **** --- 19,23 ---- import java.io.File; import java.io.IOException; + import java.util.Properties; import net.heilancoo.portal.PortalPlugin; *************** *** 42,45 **** --- 43,47 ---- private static Bundle bundle; private ApplicationRequestHandler h; + private Properties p; @BeforeClass *************** *** 122,130 **** public void webAppWithGoodProperties() { assertTrue(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/good-file.properties")); ! assertEquals("1", h.getProperties().getProperty("a.b.c")); ! assertEquals("hello Gizmo!", h.getProperties().getProperty("a.b.d")); ! assertEquals("at the end of it all", h.getProperties().getProperty("x.y.z")); ! assertEquals(3, h.getProperties().size()); ! assertEquals(Utils.makePathFor(bundle, "data/good-file.properties"), h.getConfigFile()); } --- 124,133 ---- public void webAppWithGoodProperties() { assertTrue(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/good-file.properties")); ! p = h.getParameters().getProperties(); ! assertEquals("1", p.getProperty("a.b.c")); ! assertEquals("hello Gizmo!", p.getProperty("a.b.d")); ! assertEquals("at the end of it all", p.getProperty("x.y.z")); ! assertEquals(3, p.size()); ! assertEquals(Utils.makePathFor(bundle, "data/good-file.properties"), h.getParameters().getFileName()); } *************** *** 132,137 **** public void webAppWithMissingProperties() { assertFalse(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/missing-file.properties")); ! assertEquals(0, h.getProperties().size()); ! assertNull(h.getConfigFile()); } --- 135,140 ---- public void webAppWithMissingProperties() { assertFalse(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/missing-file.properties")); ! assertNull(h.getParameters().getFileName()); ! assertNull(h.getParameters().getProperties()); } *************** *** 139,144 **** public void webAppWithOtherConfigFile() { assertTrue(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/another-file.txt")); ! assertEquals(0, h.getProperties().size()); ! assertEquals(Utils.makePathFor(bundle, "data/another-file.txt"), h.getConfigFile()); } --- 142,147 ---- public void webAppWithOtherConfigFile() { assertTrue(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/another-file.txt")); ! assertNull(h.getParameters().getProperties()); ! assertEquals(Utils.makePathFor(bundle, "data/another-file.txt"), h.getParameters().getFileName()); } *************** *** 146,151 **** public void webAppWithMissingOtherConfigFile() { assertFalse(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/another-missing-file.txt")); ! assertEquals(0, h.getProperties().size()); ! assertNull(h.getConfigFile()); } --- 149,154 ---- public void webAppWithMissingOtherConfigFile() { assertFalse(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data/another-missing-file.txt")); ! assertNull(h.getParameters().getProperties()); ! assertNull(h.getParameters().getFileName()); } *************** *** 153,158 **** public void webAppWithWrongOtherConfigFile() { assertFalse(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data")); ! assertEquals(0, h.getProperties().size()); ! assertNull(h.getConfigFile()); } } --- 156,161 ---- public void webAppWithWrongOtherConfigFile() { assertFalse(h.initialise(bundle, new TestWebApp(), "uri-prefix", "Test Web Application", "Some text", null, "data")); ! assertNull(h.getParameters().getProperties()); ! assertNull(h.getParameters().getFileName()); } } Index: SessionWithMultipleResponseFormats.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithMultipleResponseFormats.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SessionWithMultipleResponseFormats.java 12 May 2009 16:15:25 -0000 1.5 --- SessionWithMultipleResponseFormats.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 12,23 **** package net.heilancoo.portal.webapps.test; - import org.apache.http.HttpRequest; - import org.apache.http.HttpResponse; - import org.apache.http.protocol.HttpContext; - - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; - import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 12,17 ---- package net.heilancoo.portal.webapps.test; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 26,29 **** --- 20,27 ---- import net.heilancoo.portal.session.Session; + import org.apache.http.HttpRequest; + import org.apache.http.HttpResponse; + import org.apache.http.protocol.HttpContext; + /** * @author joerg *************** *** 33,45 **** public class SessionWithMultipleResponseFormats implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request @ValidResponseFormats({ "html", "txt", "xml" }) --- 31,34 ---- Index: SimpleSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SimpleSession.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SimpleSession.java 12 May 2009 16:15:25 -0000 1.5 --- SimpleSession.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 12,27 **** package net.heilancoo.portal.webapps.test; - import org.apache.http.HttpRequest; - import org.apache.http.HttpResponse; - import org.apache.http.protocol.HttpContext; - - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; - import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; /** * @author joerg --- 12,25 ---- package net.heilancoo.portal.webapps.test; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; + import org.apache.http.HttpRequest; + import org.apache.http.HttpResponse; + import org.apache.http.protocol.HttpContext; + /** * @author joerg *************** *** 30,42 **** public class SimpleSession implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request public void main(HttpRequest request, FormFieldContainer fields, --- 28,31 ---- Index: TestWebApp8.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp8.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestWebApp8.java 1 May 2009 13:30:59 -0000 1.2 --- TestWebApp8.java 15 May 2009 19:21:05 -0000 1.3 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 40,48 **** */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub } @Override public Session validateCredentialsAndMakeNewSession( --- 40,52 ---- */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: TestWebApp2.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp2.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebApp2.java 1 May 2009 13:30:59 -0000 1.5 --- TestWebApp2.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 37,48 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub - } @Override public Session validateCredentialsAndMakeNewSession( --- 37,51 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: SessionWithCustomDefaultResponseFormat.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomDefaultResponseFormat.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SessionWithCustomDefaultResponseFormat.java 12 May 2009 16:15:25 -0000 1.6 --- SessionWithCustomDefaultResponseFormat.java 15 May 2009 19:21:05 -0000 1.7 *************** *** 12,23 **** package net.heilancoo.portal.webapps.test; - import org.apache.http.HttpRequest; - import org.apache.http.HttpResponse; - import org.apache.http.protocol.HttpContext; - - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; - import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 12,17 ---- package net.heilancoo.portal.webapps.test; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 26,29 **** --- 20,27 ---- import net.heilancoo.portal.session.Session; + import org.apache.http.HttpRequest; + import org.apache.http.HttpResponse; + import org.apache.http.protocol.HttpContext; + /** * @author joerg *************** *** 34,46 **** public class SessionWithCustomDefaultResponseFormat implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request public void main(HttpRequest request, FormFieldContainer fields, --- 32,35 ---- Index: TestWebApp4.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp4.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebApp4.java 1 May 2009 13:30:59 -0000 1.5 --- TestWebApp4.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 37,48 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub - } @Override public Session validateCredentialsAndMakeNewSession( --- 37,51 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: TestWebApp5.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp5.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebApp5.java 1 May 2009 13:30:59 -0000 1.5 --- TestWebApp5.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 37,48 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub - } @Override public Session validateCredentialsAndMakeNewSession( --- 37,51 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: SessionWithCustomEntry.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomEntry.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionWithCustomEntry.java 12 May 2009 16:15:25 -0000 1.4 --- SessionWithCustomEntry.java 15 May 2009 19:21:05 -0000 1.5 *************** *** 12,28 **** package net.heilancoo.portal.webapps.test; ! import org.apache.http.HttpRequest; ! import org.apache.http.HttpResponse; ! import org.apache.http.protocol.HttpContext; ! ! import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; - import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; /** * @author joerg --- 12,26 ---- package net.heilancoo.portal.webapps.test; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; + import org.apache.http.HttpRequest; + import org.apache.http.HttpResponse; + import org.apache.http.protocol.HttpContext; + /** * @author joerg *************** *** 32,44 **** public class SessionWithCustomEntry implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request public void hello(HttpRequest request, FormFieldContainer fields, --- 30,33 ---- Index: TestWebApp.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestWebApp.java 1 May 2009 13:30:59 -0000 1.7 --- TestWebApp.java 15 May 2009 19:21:05 -0000 1.8 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; *************** *** 35,46 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub } @Override public Session validateCredentialsAndMakeNewSession( --- 35,50 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: TestWebApp6.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp6.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebApp6.java 1 May 2009 13:30:59 -0000 1.5 --- TestWebApp6.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 40,48 **** */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub } @Override public Session validateCredentialsAndMakeNewSession( --- 40,52 ---- */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: TestWebApp7.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp7.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebApp7.java 1 May 2009 13:30:59 -0000 1.5 --- TestWebApp7.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 40,48 **** */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub } @Override public Session validateCredentialsAndMakeNewSession( --- 40,52 ---- */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: SessionWithCustomTemplateFolder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomTemplateFolder.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SessionWithCustomTemplateFolder.java 12 May 2009 16:15:25 -0000 1.5 --- SessionWithCustomTemplateFolder.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 12,23 **** package net.heilancoo.portal.webapps.test; - import org.apache.http.HttpRequest; - import org.apache.http.HttpResponse; - import org.apache.http.protocol.HttpContext; - - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; - import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 12,17 ---- package net.heilancoo.portal.webapps.test; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 25,28 **** --- 19,26 ---- import net.heilancoo.portal.session.Session; + import org.apache.http.HttpRequest; + import org.apache.http.HttpResponse; + import org.apache.http.protocol.HttpContext; + /** * @author joerg *************** *** 32,44 **** public class SessionWithCustomTemplateFolder implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request public void main(HttpRequest request, FormFieldContainer fields, --- 30,33 ---- Index: TestWebApp3.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/TestWebApp3.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebApp3.java 1 May 2009 13:30:59 -0000 1.5 --- TestWebApp3.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 13,17 **** import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 13,17 ---- import net.heilancoo.portal.application.Application; ! import net.heilancoo.portal.application.ApplicationParameters; import net.heilancoo.portal.application.ValidSessions; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 37,48 **** /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.requests.SessionRequestHandler) */ @Override ! public void initialise(ApplicationRequestHandler handler) { // TODO Auto-generated method stub - } @Override public Session validateCredentialsAndMakeNewSession( --- 37,51 ---- /* * (non-Javadoc) ! * @see net.heilancoo.portal.application.Application#initialise(net.heilancoo.portal.application.ApplicationParameters) */ @Override ! public void initialise(ApplicationParameters parameters) { // TODO Auto-generated method stub } + /* + * (non-Javadoc) + * @see net.heilancoo.portal.application.Application#validateCredentialsAndMakeNewSession(net.heilancoo.portal.htmlforms.FormFieldContainer) + */ @Override public Session validateCredentialsAndMakeNewSession( Index: SessionWithMultipleResponseFormatsTemplateMissing.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithMultipleResponseFormatsTemplateMissing.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SessionWithMultipleResponseFormatsTemplateMissing.java 12 May 2009 16:15:25 -0000 1.5 --- SessionWithMultipleResponseFormatsTemplateMissing.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 12,23 **** package net.heilancoo.portal.webapps.test; - import org.apache.http.HttpRequest; - import org.apache.http.HttpResponse; - import org.apache.http.protocol.HttpContext; - - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; - import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 12,17 ---- package net.heilancoo.portal.webapps.test; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.Request; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 26,29 **** --- 20,27 ---- import net.heilancoo.portal.session.Session; + import org.apache.http.HttpRequest; + import org.apache.http.HttpResponse; + import org.apache.http.protocol.HttpContext; + /** * @author joerg *************** *** 33,45 **** public class SessionWithMultipleResponseFormatsTemplateMissing implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Request @ValidResponseFormats({ "html", "txt", "xml", "rtf" }) --- 31,34 ---- Index: SimpleSessionMainEntryMissing.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SimpleSessionMainEntryMissing.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SimpleSessionMainEntryMissing.java 12 May 2009 16:15:25 -0000 1.5 --- SimpleSessionMainEntryMissing.java 15 May 2009 19:21:05 -0000 1.6 *************** *** 12,17 **** package net.heilancoo.portal.webapps.test; - import net.heilancoo.portal.application.Application; - import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.session.Session; --- 12,15 ---- *************** *** 23,35 **** public class SimpleSessionMainEntryMissing implements Session { - /* - * (non-Javadoc) - * @see net.heilancoo.portal.session.Session#initialise(net.heilancoo.portal.requests.SessionRequestHandler, net.heilancoo.portal.application.Application, java.lang.String) - */ - @Override - public void initialise(ApplicationRequestHandler handler, - Application application, String sessionKey) { - } - @Override public Controller getInitialController() { --- 21,24 ---- |
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:12
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28454/src/net/heilancoo/portal Modified Files: PortalPlugin.java Log Message: session and application initialisation rationalisation Index: PortalPlugin.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/PortalPlugin.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PortalPlugin.java 11 May 2009 18:34:02 -0000 1.18 --- PortalPlugin.java 15 May 2009 19:20:58 -0000 1.19 *************** *** 243,247 **** initialisationOk = false; else { - application.initialise(handler); webAppMap.put(uriPrefix, handler); requestHandlerMap.put("/" + uriPrefix, handler); --- 243,246 ---- |
From: Joerg B. <jb...@us...> - 2009-05-15 19:21:11
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28454/src/net/heilancoo/portal/application Modified Files: Application.java ApplicationRequestHandler.java Added Files: ApplicationParameters.java Log Message: session and application initialisation rationalisation Index: Application.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/Application.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Application.java 12 May 2009 16:15:13 -0000 1.5 --- Application.java 15 May 2009 19:20:58 -0000 1.6 *************** *** 8,12 **** public interface Application extends Controller { ! public void initialise(ApplicationRequestHandler handler); public Session validateCredentialsAndMakeNewSession(FormFieldContainer fields) throws FormFieldAccessException; public String getVersion(); --- 8,12 ---- public interface Application extends Controller { ! public void initialise(ApplicationParameters parameters); public Session validateCredentialsAndMakeNewSession(FormFieldContainer fields) throws FormFieldAccessException; public String getVersion(); --- NEW FILE: ApplicationParameters.java --- /* * Copyright (c) 2009 Heilan' Coo -- Joerg Bullmann * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Joerg Bullmann <jb...@he...> */ package net.heilancoo.portal.application; import java.util.Properties; /** * @author joerg * */ public class ApplicationParameters { private final Properties properties; private final String fileName; public ApplicationParameters(Properties properties, String fileName) { this.properties = properties; this.fileName = fileName; } public Properties getProperties() { return properties; } public String getFileName() { return fileName; } } Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ApplicationRequestHandler.java 12 May 2009 16:15:13 -0000 1.15 --- ApplicationRequestHandler.java 15 May 2009 19:20:58 -0000 1.16 *************** *** 25,30 **** import net.heilancoo.portal.MimeTypeMapper; import net.heilancoo.portal.PortalPlugin; - import net.heilancoo.portal.controller.ControllerChanger; import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.controller.ControllerManager; import net.heilancoo.portal.controller.ValidControllers; --- 25,30 ---- import net.heilancoo.portal.MimeTypeMapper; import net.heilancoo.portal.PortalPlugin; import net.heilancoo.portal.controller.Controller; + import net.heilancoo.portal.controller.ControllerChanger; import net.heilancoo.portal.controller.ControllerManager; import net.heilancoo.portal.controller.ValidControllers; *************** *** 67,72 **** private Application application; private String uriPrefix; ! private String configFile; ! private Properties properties; public String getName() { --- 67,71 ---- private Application application; private String uriPrefix; ! private ApplicationParameters parameters; public String getName() { *************** *** 81,91 **** return uriPrefix; } - - public String getConfigFile() { - return configFile; - } ! public Properties getProperties() { ! return properties; } --- 80,86 ---- return uriPrefix; } ! public ApplicationParameters getParameters() { ! return parameters; } *************** *** 121,124 **** --- 116,121 ---- stateOk = false; } + else + parameters = new ApplicationParameters(null, configFile); } else { *************** *** 126,131 **** try { ! Reader r = new FileReader(new File(configFile)); ! properties.load(r); } catch (FileNotFoundException e) { --- 123,132 ---- try { ! Reader r = new FileReader(new File(configFile)); ! Properties p = new Properties(); ! ! p.load(r); ! ! parameters = new ApplicationParameters(p, configFile); } catch (FileNotFoundException e) { *************** *** 138,143 **** } } ! ! this.configFile = stateOk ? configFile : null; return stateOk; --- 139,145 ---- } } ! ! if(stateOk == false) ! parameters = new ApplicationParameters(null, null); return stateOk; *************** *** 153,159 **** this.name = name; this.description = description; - this.properties = new Properties(); this.application = application; if(configFile != null) stateOk = initialiseConfigFile(bundle, configFile); --- 155,162 ---- this.name = name; this.description = description; this.application = application; + application.initialise(parameters); + if(configFile != null) stateOk = initialiseConfigFile(bundle, configFile); |
From: Joerg B. <jb...@us...> - 2009-05-12 16:17:09
|
Update of /cvsroot/lipog/net.heilancoo.portal.documentation/doc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18459/doc Modified Files: webapp-123.html Log Message: renamed RequestTarget to Controller because that's what it is Index: webapp-123.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.documentation/doc/webapp-123.html,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** webapp-123.html 11 May 2009 20:23:22 -0000 1.13 --- webapp-123.html 12 May 2009 16:17:02 -0000 1.14 *************** *** 127,131 **** @Override ! public RequestTarget getInitialController() { // TODO Auto-generated method stub return null; --- 127,131 ---- @Override ! public Controller getInitialController() { // TODO Auto-generated method stub return null; *************** *** 165,169 **** @Override ! public RequestTarget getInitialController() { // TODO Auto-generated method stub return null; --- 165,169 ---- @Override ! public Controller getInitialController() { // TODO Auto-generated method stub return null; *************** *** 301,305 **** @Override ! public RequestTarget getInitialController() { // TODO Auto-generated method stub return null; --- 301,305 ---- @Override ! public Controller getInitialController() { // TODO Auto-generated method stub return null; |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:37
|
Update of /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18311/src/net/heilancoo/bingo Modified Files: BingoSession.java Log Message: renamed RequestTarget to Controller because that's what it is Index: BingoSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo/BingoSession.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BingoSession.java 11 May 2009 16:43:27 -0000 1.7 --- BingoSession.java 12 May 2009 16:15:28 -0000 1.8 *************** *** 15,19 **** import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 15,19 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 50,54 **** */ @Override ! public RequestTarget getInitialController() { return null; } --- 50,54 ---- */ @Override ! public Controller getInitialController() { return null; } |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:35
|
Update of /cvsroot/lipog/net.heilancoo.portal.json/src/net/heilancoo/portal/json In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18289/src/net/heilancoo/portal/json Modified Files: JsonResponder.java Log Message: renamed RequestTarget to Controller because that's what it is Index: JsonResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.json/src/net/heilancoo/portal/json/JsonResponder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JsonResponder.java 11 May 2009 16:43:20 -0000 1.7 --- JsonResponder.java 12 May 2009 16:15:22 -0000 1.8 *************** *** 15,19 **** import java.lang.reflect.Method; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.responders.Responder; --- 15,19 ---- import java.lang.reflect.Method; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.responders.Responder; *************** *** 39,43 **** */ @Override ! public boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { --- 39,43 ---- */ @Override ! public boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:33
|
Update of /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18297/src/net/heilancoo/portal/webapps/test Modified Files: SessionWithCustomDefaultResponseFormat.java SessionWithMultipleResponseFormats.java SimpleSession.java SessionWithMultipleResponseFormatsTemplateMissing.java SimpleSessionMainEntryMissing.java SessionWithCustomTemplateFolder.java SessionWithCustomEntry.java Log Message: renamed RequestTarget to Controller because that's what it is Index: SimpleSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SimpleSession.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SimpleSession.java 11 May 2009 16:43:24 -0000 1.4 --- SimpleSession.java 12 May 2009 16:15:25 -0000 1.5 *************** *** 19,23 **** import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 19,23 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 50,54 **** @Override ! public RequestTarget getInitialController() { return null; } --- 50,54 ---- @Override ! public Controller getInitialController() { return null; } Index: SessionWithCustomDefaultResponseFormat.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomDefaultResponseFormat.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SessionWithCustomDefaultResponseFormat.java 11 May 2009 16:43:24 -0000 1.5 --- SessionWithCustomDefaultResponseFormat.java 12 May 2009 16:15:25 -0000 1.6 *************** *** 19,23 **** import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 19,23 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 54,58 **** @Override ! public RequestTarget getInitialController() { return null; } --- 54,58 ---- @Override ! public Controller getInitialController() { return null; } Index: SessionWithCustomEntry.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomEntry.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SessionWithCustomEntry.java 11 May 2009 16:43:24 -0000 1.3 --- SessionWithCustomEntry.java 12 May 2009 16:15:25 -0000 1.4 *************** *** 20,24 **** import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 20,24 ---- import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 52,56 **** @Override ! public RequestTarget getInitialController() { return null; } --- 52,56 ---- @Override ! public Controller getInitialController() { return null; } Index: SessionWithMultipleResponseFormats.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithMultipleResponseFormats.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionWithMultipleResponseFormats.java 11 May 2009 16:43:24 -0000 1.4 --- SessionWithMultipleResponseFormats.java 12 May 2009 16:15:25 -0000 1.5 *************** *** 19,23 **** import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 19,23 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 49,53 **** @Override ! public RequestTarget getInitialController() { return null; } --- 49,53 ---- @Override ! public Controller getInitialController() { return null; } Index: SessionWithCustomTemplateFolder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomTemplateFolder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionWithCustomTemplateFolder.java 11 May 2009 16:43:24 -0000 1.4 --- SessionWithCustomTemplateFolder.java 12 May 2009 16:15:25 -0000 1.5 *************** *** 19,23 **** import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 19,23 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 47,51 **** @Override ! public RequestTarget getInitialController() { return null; } --- 47,51 ---- @Override ! public Controller getInitialController() { return null; } Index: SessionWithMultipleResponseFormatsTemplateMissing.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithMultipleResponseFormatsTemplateMissing.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SessionWithMultipleResponseFormatsTemplateMissing.java 11 May 2009 16:43:24 -0000 1.4 --- SessionWithMultipleResponseFormatsTemplateMissing.java 12 May 2009 16:15:25 -0000 1.5 *************** *** 19,23 **** import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 19,23 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 49,53 **** @Override ! public RequestTarget getInitialController() { return null; } --- 49,53 ---- @Override ! public Controller getInitialController() { return null; } Index: SimpleSessionMainEntryMissing.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SimpleSessionMainEntryMissing.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SimpleSessionMainEntryMissing.java 11 May 2009 16:43:24 -0000 1.4 --- SimpleSessionMainEntryMissing.java 12 May 2009 16:15:25 -0000 1.5 *************** *** 14,18 **** import net.heilancoo.portal.application.Application; import net.heilancoo.portal.application.ApplicationRequestHandler; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.session.Session; --- 14,18 ---- import net.heilancoo.portal.application.Application; import net.heilancoo.portal.application.ApplicationRequestHandler; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.session.Session; *************** *** 33,37 **** @Override ! public RequestTarget getInitialController() { return null; } --- 33,37 ---- @Override ! public Controller getInitialController() { return null; } |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:28
|
Update of /cvsroot/lipog/net.heilancoo.portal.freemarker/src/net/heilancoo/portal/freemarker In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18278/src/net/heilancoo/portal/freemarker Modified Files: FreeMarkerResponder.java Log Message: renamed RequestTarget to Controller because that's what it is Index: FreeMarkerResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.freemarker/src/net/heilancoo/portal/freemarker/FreeMarkerResponder.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FreeMarkerResponder.java 11 May 2009 16:43:18 -0000 1.10 --- FreeMarkerResponder.java 12 May 2009 16:15:19 -0000 1.11 *************** *** 19,23 **** import net.heilancoo.portal.MimeTypeMapper; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.responders.Responder; --- 19,23 ---- import net.heilancoo.portal.MimeTypeMapper; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.responders.Responder; *************** *** 129,133 **** * @see net.heilancoo.portal.responses.Responder#execute(net.heilancoo.portal.session.Session, org.apache.http.HttpRequest, net.heilancoo.portal.htmlforms.FormFieldContainer, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) */ ! public boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) --- 129,133 ---- * @see net.heilancoo.portal.responses.Responder#execute(net.heilancoo.portal.session.Session, org.apache.http.HttpRequest, net.heilancoo.portal.htmlforms.FormFieldContainer, org.apache.http.HttpResponse, org.apache.http.protocol.HttpContext) */ ! public boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:27
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18217/src/net/heilancoo/portal/session Modified Files: Session.java SessionCompound.java Log Message: renamed RequestTarget to Controller because that's what it is Index: SessionCompound.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session/SessionCompound.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SessionCompound.java 11 May 2009 16:43:11 -0000 1.3 --- SessionCompound.java 12 May 2009 16:15:13 -0000 1.4 *************** *** 12,16 **** package net.heilancoo.portal.session; ! import net.heilancoo.portal.controller.RequestTarget; /** --- 12,16 ---- package net.heilancoo.portal.session; ! import net.heilancoo.portal.controller.Controller; /** *************** *** 29,33 **** private final Session session; ! private RequestTarget controller; public SessionCompound(Session session) { --- 29,33 ---- private final Session session; ! private Controller controller; public SessionCompound(Session session) { *************** *** 44,52 **** } ! public void setController(RequestTarget controller) { this.controller = controller; } ! public RequestTarget getController() { return controller; } --- 44,52 ---- } ! public void setController(Controller controller) { this.controller = controller; } ! public Controller getController() { return controller; } Index: Session.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session/Session.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Session.java 11 May 2009 16:43:11 -0000 1.5 --- Session.java 12 May 2009 16:15:13 -0000 1.6 *************** *** 14,18 **** import net.heilancoo.portal.application.Application; import net.heilancoo.portal.application.ApplicationRequestHandler; ! import net.heilancoo.portal.controller.RequestTarget; /** --- 14,18 ---- import net.heilancoo.portal.application.Application; import net.heilancoo.portal.application.ApplicationRequestHandler; ! import net.heilancoo.portal.controller.Controller; /** *************** *** 20,27 **** * */ ! public interface Session extends RequestTarget { public void initialise(ApplicationRequestHandler handler, Application application, String sessionKey); ! public RequestTarget getInitialController(); } --- 20,27 ---- * */ ! public interface Session extends Controller { public void initialise(ApplicationRequestHandler handler, Application application, String sessionKey); ! public Controller getInitialController(); } |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:25
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18262/src/net/heilancoo/portal/examples/controllerchange Modified Files: ThePreferences.java TheMain.java TheExport.java TheSession.java Log Message: renamed RequestTarget to Controller because that's what it is Index: TheMain.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/TheMain.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TheMain.java 11 May 2009 16:43:15 -0000 1.3 --- TheMain.java 12 May 2009 16:15:16 -0000 1.4 *************** *** 14,18 **** import net.heilancoo.portal.controller.ChangeControllers; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 14,18 ---- import net.heilancoo.portal.controller.ChangeControllers; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 28,32 **** */ @ChangeControllers({ TheExport.class, ThePreferences.class }) ! public class TheMain implements RequestTarget { private TheSession s; --- 28,32 ---- */ @ChangeControllers({ TheExport.class, ThePreferences.class }) ! public class TheMain implements Controller { private TheSession s; Index: TheExport.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/TheExport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TheExport.java 11 May 2009 16:43:15 -0000 1.2 --- TheExport.java 12 May 2009 16:15:16 -0000 1.3 *************** *** 20,24 **** import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 20,24 ---- import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 30,34 **** @EntryPoint("export") @ChangeControllers({ TheMain.class, ThePreferences.class }) ! public class TheExport implements RequestTarget { private TheSession s; --- 30,34 ---- @EntryPoint("export") @ChangeControllers({ TheMain.class, ThePreferences.class }) ! public class TheExport implements Controller { private TheSession s; Index: ThePreferences.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/ThePreferences.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ThePreferences.java 11 May 2009 16:43:15 -0000 1.3 --- ThePreferences.java 12 May 2009 16:15:16 -0000 1.4 *************** *** 19,23 **** import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 19,23 ---- import net.heilancoo.portal.controller.EntryPoint; import net.heilancoo.portal.controller.Request; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.freemarker.FreeMarkerModel; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 28,32 **** */ @EntryPoint("prefs") ! public class ThePreferences implements RequestTarget { private TheSession s; --- 28,32 ---- */ @EntryPoint("prefs") ! public class ThePreferences implements Controller { private TheSession s; Index: TheSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/TheSession.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TheSession.java 11 May 2009 16:43:15 -0000 1.3 --- TheSession.java 12 May 2009 16:15:16 -0000 1.4 *************** *** 14,18 **** import net.heilancoo.portal.application.Application; import net.heilancoo.portal.application.ApplicationRequestHandler; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.controller.ValidControllers; import net.heilancoo.portal.session.Session; --- 14,18 ---- import net.heilancoo.portal.application.Application; import net.heilancoo.portal.application.ApplicationRequestHandler; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.controller.ValidControllers; import net.heilancoo.portal.session.Session; *************** *** 44,48 **** */ @Override ! public RequestTarget getInitialController() { return new TheMain(this); } --- 44,48 ---- */ @Override ! public Controller getInitialController() { return new TheMain(this); } |
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/controller In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18217/src/net/heilancoo/portal/controller Modified Files: ControllerChanger.java Added Files: ControllerManager.java Controller.java Removed Files: RequestTargetManager.java RequestTarget.java Log Message: renamed RequestTarget to Controller because that's what it is --- RequestTarget.java DELETED --- --- NEW FILE: Controller.java --- /* * Copyright (c) 2009 Heilan' Coo -- Joerg Bullmann * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Joerg Bullmann <jb...@he...> */ package net.heilancoo.portal.controller; /** * @author joerg * */ public interface Controller { } --- RequestTargetManager.java DELETED --- Index: ControllerChanger.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/controller/ControllerChanger.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ControllerChanger.java 11 May 2009 17:30:31 -0000 1.2 --- ControllerChanger.java 12 May 2009 16:15:13 -0000 1.3 *************** *** 67,71 **** private Constructor<?> constructor; ! public ControllerChanger(Class<?> sessionClass, Class<?> currentControllerClass, RequestTargetManager targetManager) { this.method = null; this.name = targetManager.getEntryPoint(); --- 67,71 ---- private Constructor<?> constructor; ! public ControllerChanger(Class<?> sessionClass, Class<?> currentControllerClass, ControllerManager targetManager) { this.method = null; this.name = targetManager.getEntryPoint(); *************** *** 188,193 **** FormFieldContainer fields, HttpResponse response) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassCastException, InstantiationException { ! RequestTarget c = sessionCompound.getController(); ! Session s = sessionCompound.getSession(); Object o = null; --- 188,193 ---- FormFieldContainer fields, HttpResponse response) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassCastException, InstantiationException { ! Controller c = sessionCompound.getController(); ! Session s = sessionCompound.getSession(); Object o = null; *************** *** 205,209 **** return false; } ! else if(! (o instanceof RequestTarget)) { ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, "Method Dispatch Failure", "Failed to dispatch method " + getName() + ".", --- 205,209 ---- return false; } ! else if(! (o instanceof Controller)) { ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, "Method Dispatch Failure", "Failed to dispatch method " + getName() + ".", *************** *** 212,216 **** } ! sessionCompound.setController((RequestTarget) o); return true; --- 212,216 ---- } ! sessionCompound.setController((Controller) o); return true; --- NEW FILE: ControllerManager.java --- /* * Copyright (c) 2009 Heilan' Coo -- Joerg Bullmann * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Joerg Bullmann <jb...@he...> */ package net.heilancoo.portal.controller; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import net.heilancoo.portal.MimeTypeMapper; import net.heilancoo.portal.PortalPlugin; import net.heilancoo.portal.responders.Responder; import org.apache.log4j.Logger; import org.osgi.framework.Bundle; /** * @author joerg * */ public class ControllerManager { private static final Logger logger = Logger.getLogger(ControllerManager.class); private final Class<?> targetClass; private final String entryPoint; private final String exitPoint; private final Map<String, Responder> responders; private final Map<String, ControllerChanger> changers; private boolean stateOk; private boolean initialised; public ControllerManager(Class<?> targetClass, String defaultEntryPoint, String defaultExitPoint) { EntryPoint enp = targetClass.getAnnotation(EntryPoint.class); ExitPoint exp = targetClass.getAnnotation(ExitPoint.class); this.targetClass = targetClass; this.responders = new HashMap<String, Responder>(); this.changers = new HashMap<String, ControllerChanger>(); this.entryPoint = enp != null ? enp.value() : defaultEntryPoint; this.exitPoint = defaultEntryPoint == null ? null : (exp != null ? exp.value() : defaultExitPoint); this.initialised = false; this.stateOk = true; } public void initialiseMethods(Bundle bundle, String logTag, MimeTypeMapper mimeMapper) { if(initialised) { logger.error("Attempt at multiple initialisation of " + logTag + " class " + targetClass.getCanonicalName() + "."); return; } logger.info("Initialising methods for " + logTag + " class " + targetClass.getCanonicalName() + "."); for(Method m : targetClass.getMethods()) { String methodName = m.getName(); if(m.getAnnotation(Request.class) != null) { Responder g = PortalPlugin.getDefault().findResponseGeneratorFor(m, bundle, mimeMapper); if(g == null) { logger.error("No response generator for method " + methodName + "."); stateOk = false; } else addResponder(methodName, g); } else if(m.getAnnotation(ChangeController.class) != null) { ControllerChanger c = new ControllerChanger(m); changers.put(methodName, c); logger.info("Controller change method " + c.getName() + " creates " + c.getNewControllerClassName() + "."); } } logger.info("Done initialising methods for " + logTag + " class " + targetClass.getCanonicalName() + "."); } public void initialiseChangers(String logTag, Class<?> sessionClass, Map<Class<?>, ControllerManager> targetManagerMap) { ChangeControllers vc = targetClass.getAnnotation(ChangeControllers.class); if(vc == null) return; logger.info("Initialising target changers for " + logTag + " class " + targetClass.getCanonicalName() + "."); Class<?> [] changeTargets = vc.value(); for(Class<?> newTarget : changeTargets) { ControllerManager newManager = targetManagerMap.get(newTarget); if(newManager == null) { logger.error("Unknown target manager class " + newTarget.getCanonicalName() + "."); stateOk = false; continue; } String entry = newManager.getEntryPoint(); if(responders.containsKey(entry)) { logger.error("Responder method " + entry + " hides target changer in " + targetClass.getCanonicalName() + "."); stateOk = false; } else if(!changers.containsKey(entry)) { ControllerChanger c = new ControllerChanger(sessionClass, targetClass, newManager); changers.put(newManager.getEntryPoint(), c); logger.info("Controller change method " + c.getName() + " creates " + c.getNewControllerClassName() + "."); } else { ControllerChanger c = changers.get(entry); if(!c.getNewControllerClassName().equals(newTarget.getCanonicalName())) { logger.error("Controller change method " + c.getName() + " in " + targetClass.getCanonicalName() + " cannot create both " + c.getNewControllerClassName() + " and " + newTarget.getCanonicalName() + "."); stateOk = false; } } } logger.info("Done initialising target changers for " + logTag + " class " + targetClass.getCanonicalName() + "."); } public void checkChangers(String logTag, Map<Class<?>, ControllerManager> targetManagerMap) { logger.info("Checking target changers for " + logTag + " class " + targetClass.getCanonicalName() + "."); for(Map.Entry<String, ControllerChanger> e : changers.entrySet()) { String req = e.getKey(); ControllerChanger chng = e.getValue(); Class<?> newClass = chng.getNewControllerClass(); ControllerManager mgr = targetManagerMap.get(newClass); if(!mgr.handlesRequest(req)) { logger.error("Target changer " + req + " has no corresponding response method in " + newClass.getCanonicalName() + "."); stateOk = false; } } logger.info("Done checking target changers for " + logTag + " class " + targetClass.getCanonicalName() + "."); } public boolean wrapUpInitialisations(String logTag) { logger.info("Summarize initialisation for " + logTag + " class " + targetClass.getCanonicalName() + "."); logger.info("Found " + responders.size() + " response method(s)."); if(changers.size() > 0) logger.info("Found " + changers.size() + " controller change method(s)."); logger.info("Entry point " + entryPoint + "."); if(!responders.containsKey(entryPoint)) { logger.error("Entry point " + entryPoint + " missing for " + logTag + " class " + targetClass.getCanonicalName() + "."); stateOk = false; } if(exitPoint != null) { logger.info("Exit point " + exitPoint + "."); if(!responders.containsKey(exitPoint)) { logger.error("Exit point " + exitPoint + " missing for " + logTag + " class " + targetClass.getCanonicalName() + "."); stateOk = false; } } if(stateOk) logger.info("Finished initialising " + logTag + " class " + targetClass.getCanonicalName() + "."); else logger.error("Errors encountered when initialising " + logTag + " class " + targetClass.getCanonicalName() + "."); initialised = true; return stateOk; } public boolean handlesRequest(String request) { return responders.containsKey(request); } public String getEntryPoint() { return entryPoint; } public String getExitPoint() { return exitPoint; } public Class<?> getTargetClass() { return targetClass; } public ControllerChanger getChanger(String request) { return changers.get(request); } public Responder getResponder(String request) { return responders.get(request); } public void addResponder(String request, Responder responder) { responders.put(request, responder); } } |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:20
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18217/src/net/heilancoo/portal/responders Modified Files: FileResponder.java Responder.java PlainResponder.java Log Message: renamed RequestTarget to Controller because that's what it is Index: FileResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/FileResponder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileResponder.java 11 May 2009 16:43:11 -0000 1.2 --- FileResponder.java 12 May 2009 16:15:13 -0000 1.3 *************** *** 16,20 **** import net.heilancoo.portal.MimeTypeMapper; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.requests.FileRequestHandler; --- 16,20 ---- import net.heilancoo.portal.MimeTypeMapper; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.requests.FileRequestHandler; *************** *** 42,46 **** */ @Override ! public boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws IllegalArgumentException, --- 42,46 ---- */ @Override ! public boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws IllegalArgumentException, Index: Responder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/Responder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Responder.java 11 May 2009 16:43:11 -0000 1.2 --- Responder.java 12 May 2009 16:15:13 -0000 1.3 *************** *** 14,18 **** import java.lang.reflect.Method; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 14,18 ---- import java.lang.reflect.Method; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 29,33 **** protected Method method; ! public abstract boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception; --- 29,33 ---- protected Method method; ! public abstract boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception; Index: PlainResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/PlainResponder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PlainResponder.java 11 May 2009 16:43:11 -0000 1.2 --- PlainResponder.java 12 May 2009 16:15:13 -0000 1.3 *************** *** 15,19 **** import java.lang.reflect.Method; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.htmlforms.FormFieldContainer; --- 15,19 ---- import java.lang.reflect.Method; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; *************** *** 36,40 **** */ @Override ! public boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws IllegalArgumentException, --- 36,40 ---- */ @Override ! public boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws IllegalArgumentException, |
From: Joerg B. <jb...@us...> - 2009-05-12 16:15:20
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18217/src/net/heilancoo/portal/application Modified Files: Application.java ApplicationRequestHandler.java Log Message: renamed RequestTarget to Controller because that's what it is Index: Application.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/Application.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Application.java 11 May 2009 20:23:16 -0000 1.4 --- Application.java 12 May 2009 16:15:13 -0000 1.5 *************** *** 1,10 **** package net.heilancoo.portal.application; ! import net.heilancoo.portal.controller.RequestTarget; import net.heilancoo.portal.htmlforms.FormFieldAccessException; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; ! public interface Application extends RequestTarget { public void initialise(ApplicationRequestHandler handler); --- 1,10 ---- package net.heilancoo.portal.application; ! import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldAccessException; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; ! public interface Application extends Controller { public void initialise(ApplicationRequestHandler handler); Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ApplicationRequestHandler.java 11 May 2009 21:19:21 -0000 1.14 --- ApplicationRequestHandler.java 12 May 2009 16:15:13 -0000 1.15 *************** *** 26,31 **** import net.heilancoo.portal.PortalPlugin; import net.heilancoo.portal.controller.ControllerChanger; ! import net.heilancoo.portal.controller.RequestTarget; ! import net.heilancoo.portal.controller.RequestTargetManager; import net.heilancoo.portal.controller.ValidControllers; import net.heilancoo.portal.htmlforms.FormFieldAccessException; --- 26,31 ---- import net.heilancoo.portal.PortalPlugin; import net.heilancoo.portal.controller.ControllerChanger; ! import net.heilancoo.portal.controller.Controller; ! import net.heilancoo.portal.controller.ControllerManager; import net.heilancoo.portal.controller.ValidControllers; import net.heilancoo.portal.htmlforms.FormFieldAccessException; *************** *** 58,62 **** private final Map<String, SessionCompound> sessionMap; ! private final Map<Class<?>, RequestTargetManager> targetManagerMap; private final MimeTypeMapper mimeMapper; --- 58,62 ---- private final Map<String, SessionCompound> sessionMap; ! private final Map<Class<?>, ControllerManager> targetManagerMap; private final MimeTypeMapper mimeMapper; *************** *** 93,97 **** this.randy = new KeyGenerator(new Random().nextLong()); this.sessionMap = new HashMap<String, SessionCompound>(); ! this.targetManagerMap = new HashMap<Class<?>, RequestTargetManager>(); this.mimeMapper = new MimeTypeMapper(); } --- 93,97 ---- this.randy = new KeyGenerator(new Random().nextLong()); this.sessionMap = new HashMap<String, SessionCompound>(); ! this.targetManagerMap = new HashMap<Class<?>, ControllerManager>(); this.mimeMapper = new MimeTypeMapper(); } *************** *** 187,197 **** initialiseController(controllerClass, "controller", bundle); ! for(RequestTargetManager tm : targetManagerMap.values()) tm.initialiseChangers("controller", sessionClass, targetManagerMap); ! for(RequestTargetManager tm : targetManagerMap.values()) tm.checkChangers("controller", targetManagerMap); ! for(RequestTargetManager tm : targetManagerMap.values()) if(!tm.wrapUpInitialisations("controller")) stateOk = false; --- 187,197 ---- initialiseController(controllerClass, "controller", bundle); ! for(ControllerManager tm : targetManagerMap.values()) tm.initialiseChangers("controller", sessionClass, targetManagerMap); ! for(ControllerManager tm : targetManagerMap.values()) tm.checkChangers("controller", targetManagerMap); ! for(ControllerManager tm : targetManagerMap.values()) if(!tm.wrapUpInitialisations("controller")) stateOk = false; *************** *** 203,207 **** private boolean initialiseApplication(Bundle bundle) { ! RequestTargetManager tm = new RequestTargetManager(application.getClass(), "login", null); targetManagerMap.put(application.getClass(), tm); --- 203,207 ---- private boolean initialiseApplication(Bundle bundle) { ! ControllerManager tm = new ControllerManager(application.getClass(), "login", null); targetManagerMap.put(application.getClass(), tm); *************** *** 210,214 **** tm.addResponder("login-validate", new Responder() { @Override ! public boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { --- 210,214 ---- tm.addResponder("login-validate", new Responder() { @Override ! public boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { *************** *** 222,226 **** private void initialiseController(Class<?> sessionClass, String logTag, Bundle bundle) { ! RequestTargetManager tm = new RequestTargetManager(sessionClass, "main", "logout"); targetManagerMap.put(sessionClass, tm); --- 222,226 ---- private void initialiseController(Class<?> sessionClass, String logTag, Bundle bundle) { ! ControllerManager tm = new ControllerManager(sessionClass, "main", "logout"); targetManagerMap.put(sessionClass, tm); *************** *** 228,232 **** tm.addResponder(tm.getExitPoint(), new Responder() { @Override ! public boolean execute(RequestTarget target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { --- 228,232 ---- tm.addResponder(tm.getExitPoint(), new Responder() { @Override ! public boolean execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { *************** *** 291,295 **** FormFieldContainer fields = FormFieldDecoder.decodeFields(request); ! RequestTargetManager tm = getTargetManager(application, response); if(tm == null) --- 291,295 ---- FormFieldContainer fields = FormFieldDecoder.decodeFields(request); ! ControllerManager tm = getTargetManager(application, response); if(tm == null) *************** *** 315,321 **** response.addHeader("Cache-Control", "no-cache"); ! RequestTarget target = getSessionFor(targetKey).getController(); ! RequestTargetManager tm = getTargetManager(target, response); if(tm == null) --- 315,321 ---- response.addHeader("Cache-Control", "no-cache"); ! Controller target = getSessionFor(targetKey).getController(); ! ControllerManager tm = getTargetManager(target, response); if(tm == null) *************** *** 393,399 **** } ! private RequestTargetManager getTargetManager(RequestTarget target, HttpResponse response) { Class<?> tgtClass = target.getClass(); ! RequestTargetManager tm = targetManagerMap.get(tgtClass); if(tm == null) { --- 393,399 ---- } ! private ControllerManager getTargetManager(Controller target, HttpResponse response) { Class<?> tgtClass = target.getClass(); ! ControllerManager tm = targetManagerMap.get(tgtClass); if(tm == null) { *************** *** 423,427 **** else { SessionCompound sc = new SessionCompound(session); ! RequestTargetManager tm = getTargetManager(sc.getController(), response); if(tm == null) --- 423,427 ---- else { SessionCompound sc = new SessionCompound(session); ! ControllerManager tm = getTargetManager(sc.getController(), response); if(tm == null) *************** *** 439,443 **** private void doStartPage(String uri, HttpRequest request, HttpResponse response, HttpContext context) { ! RequestTargetManager tm = getTargetManager(application, response); if(tm == null) --- 439,443 ---- private void doStartPage(String uri, HttpRequest request, HttpResponse response, HttpContext context) { ! ControllerManager tm = getTargetManager(application, response); if(tm == null) |
From: Joerg B. <jb...@us...> - 2009-05-11 21:19:29
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31755/src/net/heilancoo/portal/application Modified Files: ApplicationRequestHandler.java Log Message: improved form field access error handling Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ApplicationRequestHandler.java 11 May 2009 20:23:16 -0000 1.13 --- ApplicationRequestHandler.java 11 May 2009 21:19:21 -0000 1.14 *************** *** 245,359 **** String aux = paramStart >= 0 ? uri.substring(0, paramStart) : uri; String [] components = aux.replace("/", " ").trim().split(" "); ! if(components.length == 1) { ! doStartPage(uri, request, response, context); ! } ! else if(components.length == 2 || components.length == 3) { ! String [] methodComps = components[components.length - 1].split("\\."); ! String method = methodComps[0]; ! String presentation = methodComps.length > 1 ? methodComps[1] : null; ! ! if(components.length == 2) ! dispatchApplicationMethod(method, presentation, request, response, context); ! else if(components.length == 3) { ! String key = components[1]; ! SessionCompound sc = getSessionFor(key); ! if(sc == null) ! ResponseHelper.error(HttpStatus.SC_NOT_FOUND, response, "No Session", "No session " + key + "."); else ! dispatchSessionMethod(method, presentation, key, request, null, response, context); } ! else ! ResponseHelper.error(HttpStatus.SC_NOT_FOUND, response, "Bad URI", "Bad URI " + uri + "."); } } private void dispatchApplicationMethod(String method, String presentation, HttpRequest request, ! HttpResponse response, HttpContext context) { response.addHeader("Cache-Control", "no-cache"); - - try { - FormFieldContainer fields = FormFieldDecoder.decodeFields(request); - RequestTargetManager tm = getTargetManager(application, response); - - if(tm == null) - return; - - Responder g = tm.getResponder(method); ! if(g == null) ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Dispatch Failure", "Failed to dispatch method " + method + ".", ! "No method " + method + " in target class " + application.getClass().getCanonicalName() + "."); ! else { ! logger.info("Method " + method + ", application " + getUriPrefix()); ! ! if(!g.execute(application, presentation, request, fields, response, context)) ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); ! } ! } ! catch (Exception e) { ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); ! logger.error("Problem in responder execution.", e); } } private void dispatchSessionMethod(String method, String presentation, String targetKey, HttpRequest request, ! FormFieldContainer fields, HttpResponse response, HttpContext context) { response.addHeader("Cache-Control", "no-cache"); RequestTarget target = getSessionFor(targetKey).getController(); - - try { - RequestTargetManager tm = getTargetManager(target, response); - - if(tm == null) - return; - - if(fields == null) - fields = FormFieldDecoder.decodeFields(request); ! Responder g = tm.getResponder(method); ! if(g == null) { ! ControllerChanger c = tm.getChanger(method); ! ! if(c != null) { ! if(c.change(getSessionFor(targetKey), fields, response)) { ! logger.info("Controller change " + method + ", application " + getUriPrefix() ! + ", session " + targetKey + ", " + c.getNewControllerClassName()); ! dispatchSessionMethod(method, presentation, targetKey, request, fields, response, context); ! } ! } ! else ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Dispatch Failure", "Failed to dispatch method " + method + ".", ! "No method " + method + " in target class " + target.getClass().getCanonicalName() + "."); ! } ! else { ! logger.info("Method " + method + ", application " + getUriPrefix() + ", session " + targetKey); ! ! if(!g.execute(target, presentation, request, fields, response, context)) ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); ! ! if(method.equals(tm.getExitPoint())) { ! logger.info("Dropping session " + targetKey); ! dropSessionFor(targetKey); } } } ! catch (InvocationTargetException ite) { ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); ! logger.error("Problem in responder execution.", ite.getTargetException()); ! } ! catch (Exception e) { ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); ! logger.error("Problem in responder execution.", e); } } --- 245,356 ---- String aux = paramStart >= 0 ? uri.substring(0, paramStart) : uri; String [] components = aux.replace("/", " ").trim().split(" "); + String what = null; ! try { ! if(components.length == 1) { ! what = "start page"; ! doStartPage(uri, request, response, context); ! } ! else if(components.length == 2 || components.length == 3) { ! String [] methodComps = components[components.length - 1].split("\\."); ! String method = methodComps[0]; ! String presentation = methodComps.length > 1 ? methodComps[1] : null; ! ! what = "method " + method; ! if(components.length == 2) ! dispatchApplicationMethod(method, presentation, request, response, context); ! else if(components.length == 3) { ! String key = components[1]; ! SessionCompound sc = getSessionFor(key); ! ! if(sc == null) ! ResponseHelper.error(HttpStatus.SC_NOT_FOUND, response, "No Session", "No session " + key + "."); ! else ! dispatchSessionMethod(method, presentation, key, request, null, response, context); ! } else ! ResponseHelper.error(HttpStatus.SC_NOT_FOUND, response, "Bad URI", "Bad URI " + uri + "."); } ! } ! catch (InvocationTargetException ite) { ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute " + what + "."); ! logger.error("Problem in responder execution.", ite.getTargetException()); ! } ! catch (Exception e) { ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute " + what + "."); ! logger.error("Problem in responder execution.", e); } } private void dispatchApplicationMethod(String method, String presentation, HttpRequest request, ! HttpResponse response, HttpContext context) throws Exception { response.addHeader("Cache-Control", "no-cache"); ! FormFieldContainer fields = FormFieldDecoder.decodeFields(request); ! RequestTargetManager tm = getTargetManager(application, response); ! ! if(tm == null) ! return; ! ! Responder g = tm.getResponder(method); ! ! if(g == null) ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Dispatch Failure", "Failed to dispatch method " + method + ".", ! "No method " + method + " in target class " + application.getClass().getCanonicalName() + "."); ! else { ! logger.info("Method " + method + ", application " + getUriPrefix()); ! ! if(!g.execute(application, presentation, request, fields, response, context)) ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); } } private void dispatchSessionMethod(String method, String presentation, String targetKey, HttpRequest request, ! FormFieldContainer fields, HttpResponse response, HttpContext context) throws Exception { response.addHeader("Cache-Control", "no-cache"); RequestTarget target = getSessionFor(targetKey).getController(); ! RequestTargetManager tm = getTargetManager(target, response); ! if(tm == null) ! return; ! ! if(fields == null) ! fields = FormFieldDecoder.decodeFields(request); ! ! Responder g = tm.getResponder(method); ! ! if(g == null) { ! ControllerChanger c = tm.getChanger(method); ! ! if(c != null) { ! if(c.change(getSessionFor(targetKey), fields, response)) { ! logger.info("Controller change " + method + ", application " + getUriPrefix() ! + ", session " + targetKey + ", " + c.getNewControllerClassName()); ! dispatchSessionMethod(method, presentation, targetKey, request, fields, response, context); } } + else + ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, + "Method Dispatch Failure", "Failed to dispatch method " + method + ".", + "No method " + method + " in target class " + target.getClass().getCanonicalName() + "."); } ! else { ! logger.info("Method " + method + ", application " + getUriPrefix() + ", session " + targetKey); ! ! if(!g.execute(target, presentation, request, fields, response, context)) ! ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, ! "Method Execution Failure", "Failed to execute method " + method + "."); ! ! if(method.equals(tm.getExitPoint())) { ! logger.info("Dropping session " + targetKey); ! dropSessionFor(targetKey); ! } } } |
From: Joerg B. <jb...@us...> - 2009-05-11 20:37:45
|
Update of /cvsroot/lipog/net.heilancoo.portal.documentation/doc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23328/doc Modified Files: change-log.html Log Message: form field access error handling Index: change-log.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.documentation/doc/change-log.html,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** change-log.html 11 May 2009 18:34:05 -0000 1.19 --- change-log.html 11 May 2009 20:37:32 -0000 1.20 *************** *** 11,14 **** --- 11,15 ---- <h2>Release 4 (upcoming)</h2> <ul> + <li>Better form field access error handling.</li> <li>Command line option "--log=<i>FILE</i>" to log to (rolling) log file(s) instead of the console.</li> <li>Request target (controller) changing improved and simplified (@ChangeControllers annotation).</li> |
From: Joerg B. <jb...@us...> - 2009-05-11 20:23:34
|
Update of /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21116/src/net/heilancoo/bingo Modified Files: BingoApplication.java Log Message: form field access error handling via exceptions Index: BingoApplication.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo/BingoApplication.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BingoApplication.java 1 May 2009 13:30:48 -0000 1.2 --- BingoApplication.java 11 May 2009 20:23:25 -0000 1.3 *************** *** 15,18 **** --- 15,19 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; + import net.heilancoo.portal.htmlforms.FormFieldAccessException; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; *************** *** 57,61 **** @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); --- 58,62 ---- @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); |
From: Joerg B. <jb...@us...> - 2009-05-11 20:23:29
|
Update of /cvsroot/lipog/net.heilancoo.portal.documentation/doc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21106/doc Modified Files: webapp-123.html Log Message: form field access error handling via exceptions Index: webapp-123.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.documentation/doc/webapp-123.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** webapp-123.html 1 May 2009 13:30:57 -0000 1.12 --- webapp-123.html 11 May 2009 20:23:22 -0000 1.13 *************** *** 212,216 **** @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) { // TODO Auto-generated method stub return null; --- 212,216 ---- @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException { // TODO Auto-generated method stub return null; *************** *** 239,243 **** @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); --- 239,243 ---- @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); |
From: Joerg B. <jb...@us...> - 2009-05-11 20:23:28
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21074/src/net/heilancoo/portal/application Modified Files: Application.java ApplicationRequestHandler.java Log Message: form field access error handling via exceptions Index: Application.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/Application.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Application.java 11 May 2009 16:43:11 -0000 1.3 --- Application.java 11 May 2009 20:23:16 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- import net.heilancoo.portal.controller.RequestTarget; + import net.heilancoo.portal.htmlforms.FormFieldAccessException; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; *************** *** 8,12 **** public void initialise(ApplicationRequestHandler handler); ! public Session validateCredentialsAndMakeNewSession(FormFieldContainer fields); public String getVersion(); --- 9,13 ---- public void initialise(ApplicationRequestHandler handler); ! public Session validateCredentialsAndMakeNewSession(FormFieldContainer fields) throws FormFieldAccessException; public String getVersion(); Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ApplicationRequestHandler.java 11 May 2009 17:30:31 -0000 1.12 --- ApplicationRequestHandler.java 11 May 2009 20:23:16 -0000 1.13 *************** *** 17,20 **** --- 17,21 ---- import java.io.IOException; import java.io.Reader; + import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; *************** *** 28,31 **** --- 29,33 ---- import net.heilancoo.portal.controller.RequestTargetManager; import net.heilancoo.portal.controller.ValidControllers; + import net.heilancoo.portal.htmlforms.FormFieldAccessException; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.htmlforms.FormFieldDecoder; *************** *** 345,348 **** --- 347,355 ---- } } + catch (InvocationTargetException ite) { + ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, + "Method Execution Failure", "Failed to execute method " + method + "."); + logger.error("Problem in responder execution.", ite.getTargetException()); + } catch (Exception e) { ResponseHelper.error(HttpStatus.SC_INTERNAL_SERVER_ERROR, response, *************** *** 405,409 **** private boolean doLogin(String uri, HttpRequest request, FormFieldContainer fields, ! HttpResponse response, HttpContext context) { String user = fields.getStringValue("user"); --- 412,416 ---- private boolean doLogin(String uri, HttpRequest request, FormFieldContainer fields, ! HttpResponse response, HttpContext context) throws FormFieldAccessException { String user = fields.getStringValue("user"); |
From: Joerg B. <jb...@us...> - 2009-05-11 20:23:28
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/htmlforms In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21074/src/net/heilancoo/portal/htmlforms Modified Files: FormFieldContainer.java Added Files: FormFieldAccessException.java Log Message: form field access error handling via exceptions Index: FormFieldContainer.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/htmlforms/FormFieldContainer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FormFieldContainer.java 10 Apr 2009 15:08:33 -0000 1.2 --- FormFieldContainer.java 11 May 2009 20:23:16 -0000 1.3 *************** *** 90,107 **** } ! public String getStringValue(String name) { return fields.get(name); } ! public double getDoubleValue(String name) { ! return Double.parseDouble(fields.get(name)); } ! public float getFloatValue(String name) { ! return Float.parseFloat(fields.get(name)); } ! public int getIntValue(String name) { ! return Integer.parseInt(fields.get(name)); } } --- 90,138 ---- } ! public boolean hasFieldName(String name) { ! return fields.containsKey(name); ! } ! ! public String getStringValue(String name) throws FormFieldAccessException { ! if(!hasFieldName(name)) ! throw new FormFieldAccessException("No field '" + name + "' in container."); ! return fields.get(name); } ! public double getDoubleValue(String name) throws FormFieldAccessException { ! String s = getStringValue(name); ! ! try { ! return Double.parseDouble(s); ! } ! catch(NumberFormatException nfe) { ! throw new FormFieldAccessException("Content of field '" + name ! + "' is not a valid double precision floating point number: '" + s + "'."); ! } } ! public float getFloatValue(String name) throws FormFieldAccessException { ! String s = getStringValue(name); ! ! try { ! return Float.parseFloat(s); ! } ! catch(NumberFormatException nfe) { ! throw new FormFieldAccessException("Content of field '" + name ! + "' is not a valid floating point number: '" + s + "'."); ! } } ! public int getIntValue(String name) throws FormFieldAccessException { ! String s = getStringValue(name); ! ! try { ! return Integer.parseInt(s.trim()); ! } ! catch(NumberFormatException nfe) { ! throw new FormFieldAccessException("Content of field '" + name ! + "' is not a valid integral number: '" + s + "'."); ! } } } --- NEW FILE: FormFieldAccessException.java --- /* * Copyright (c) 2009 Heilan' Coo -- Joerg Bullmann * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Joerg Bullmann <jb...@he...> */ package net.heilancoo.portal.htmlforms; /** * @author joerg * */ public class FormFieldAccessException extends Exception { private static final long serialVersionUID = -3368514384097096865L; public FormFieldAccessException(String reason) { super(reason); } } |
From: Joerg B. <jb...@us...> - 2009-05-11 20:23:23
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21094/src/net/heilancoo/portal/examples/controllerchange Modified Files: TheApplication.java Log Message: form field access error handling via exceptions Index: TheApplication.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/controllerchange/TheApplication.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TheApplication.java 1 May 2009 13:42:47 -0000 1.1 --- TheApplication.java 11 May 2009 20:23:19 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- import net.heilancoo.portal.application.ApplicationRequestHandler; import net.heilancoo.portal.application.ValidSessions; + import net.heilancoo.portal.htmlforms.FormFieldAccessException; import net.heilancoo.portal.htmlforms.FormFieldContainer; import net.heilancoo.portal.session.Session; *************** *** 57,61 **** @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); --- 58,62 ---- @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); |