You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2006/05/10 17:54:24 UTC
svn commit: r405785 [8/20] - in /beehive/trunk/netui: external/struts/
external/struts/legacy/jakarta-struts-1.1-lib/ src/bootstrap/
src/bootstrap/org/apache/beehive/netui/tools/tld/xdoclet/ src/compiler-apt/
src/compiler-apt/META-INF/services/ src/com...
Modified: beehive/trunk/netui/test/src/compilerTests/testsuite/simpleInvalidPathWarning/expectedOutput/warningsorerrors.expected
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/compilerTests/testsuite/simpleInvalidPathWarning/expectedOutput/warningsorerrors.expected?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/compilerTests/testsuite/simpleInvalidPathWarning/expectedOutput/warningsorerrors.expected (original)
+++ beehive/trunk/netui/test/src/compilerTests/testsuite/simpleInvalidPathWarning/expectedOutput/warningsorerrors.expected Wed May 10 08:49:42 2006
@@ -1,4 +1,4 @@
-[LOCAL_PATH]\WEB-INF\.tmpbeansrc\simpleInvalidPathWarning\ParentFlow.java:12: warning: File "index.jsp" could not be found in the web application.
-public class ParentFlow
- ^
-1 warning
+[LOCAL_PATH]\WEB-INF\.tmpbeansrc\simpleInvalidPathWarning\ParentFlow.java:12: warning: File "index.jsp" could not be found in the web application.
+public class ParentFlow
+ ^
+1 warning
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/simpleInvalidPathWarning/expectedOutput/warningsorerrors.expected
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/simpleReadOnlyUseFormBeanWarning/expectedOutput/struts-config-simpleReadOnlyUseFormBeanWarning.expected
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/compilerTests/testsuite/simpleReadOnlyUseFormBeanWarning/expectedOutput/warningsorerrors.expected
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/compilerTests/testsuite/simpleReadOnlyUseFormBeanWarning/expectedOutput/warningsorerrors.expected?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/compilerTests/testsuite/simpleReadOnlyUseFormBeanWarning/expectedOutput/warningsorerrors.expected (original)
+++ beehive/trunk/netui/test/src/compilerTests/testsuite/simpleReadOnlyUseFormBeanWarning/expectedOutput/warningsorerrors.expected Wed May 10 08:49:42 2006
@@ -1,4 +1,4 @@
-[LOCAL_PATH]\WEB-INF\.tmpbeansrc\simpleReadOnlyUseFormBeanWarning\readOnlyController.java:18: warning: This action has the readOnly attribute set to true, but the useFormBean attribute may cause the value of member field scopedBean to be modified.
-public class readOnlyController extends PageFlowController
- ^
-1 warning
+[LOCAL_PATH]\WEB-INF\.tmpbeansrc\simpleReadOnlyUseFormBeanWarning\readOnlyController.java:18: warning: This action has the readOnly attribute set to true, but the useFormBean attribute may cause the value of member field scopedBean to be modified.
+public class readOnlyController extends PageFlowController
+ ^
+1 warning
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/simpleReadOnlyUseFormBeanWarning/expectedOutput/warningsorerrors.expected
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/CatalogParserTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/CatalogParserTest.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/CatalogParserTest.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/CatalogParserTest.java Wed May 10 08:49:42 2006
@@ -1,93 +1,93 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.core.chain;
-
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-import org.apache.beehive.netui.core.chain.Catalog;
-import org.apache.beehive.netui.core.chain.CatalogFactory;
-import org.apache.beehive.netui.core.chain.Command;
-import org.apache.beehive.netui.core.chain.Context;
-import org.apache.beehive.netui.util.config.bean.CatalogConfig;
-import org.apache.beehive.netui.util.config.internal.catalog.CatalogParser;
-import org.apache.beehive.netui.core.chain.impl.ContextBase;
-import org.apache.beehive.netui.test.core.chain.commands.ConfigurableCommand;
-
-/**
- *
- */
-public class CatalogParserTest
- extends TestCase {
-
- private String _resourcePath = "org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml";
-
- public void testSimple()
- throws Exception {
-
- load(_resourcePath);
- CatalogFactory catalogFactory = CatalogFactory.getInstance();
-
- /* execute a command */
- Catalog catalog = catalogFactory.getCatalog();
-
- Context context = new ContextBase();
- Command command = catalog.getCommand("echo-1234");
- command.execute(context);
- }
-
- public void testConfigurable()
- throws Exception {
- load(_resourcePath);
- CatalogFactory catalogFactory = CatalogFactory.getInstance();
-
- Catalog catalog = catalogFactory.getCatalog();
- Command command = catalog.getCommand("configurable");
- ConfigurableCommand configurableCommand = (ConfigurableCommand)command;
- assertNotNull(configurableCommand);
- assertEquals(54321, configurableCommand.getBar());
- assertEquals("Homer", configurableCommand.getFoo());
-
- command.execute(new ContextBase());
- }
-
- private void load(String resourcePath)
- throws Exception {
-
- InputStream inputStream = null;
- try {
- /* parse an XML file that defines a catalog */
- inputStream = getClass().getClassLoader().getResourceAsStream(resourcePath);
- CatalogParser catalogParser = CatalogParser.getInstance();
- CatalogConfig catalogConfig = catalogParser.parse(resourcePath, inputStream);
-
- /* create a real catalog instance */
- CatalogFactory catalogFactory = CatalogFactory.getInstance(catalogConfig);
- assertNotNull(catalogFactory);
- }
- catch(Exception e) {
- throw e;
- }
- finally {
- if(inputStream != null) inputStream.close();
- }
- }
-}
-
-
-
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.core.chain;
+
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+import org.apache.beehive.netui.core.chain.Catalog;
+import org.apache.beehive.netui.core.chain.CatalogFactory;
+import org.apache.beehive.netui.core.chain.Command;
+import org.apache.beehive.netui.core.chain.Context;
+import org.apache.beehive.netui.util.config.bean.CatalogConfig;
+import org.apache.beehive.netui.util.config.internal.catalog.CatalogParser;
+import org.apache.beehive.netui.core.chain.impl.ContextBase;
+import org.apache.beehive.netui.test.core.chain.commands.ConfigurableCommand;
+
+/**
+ *
+ */
+public class CatalogParserTest
+ extends TestCase {
+
+ private String _resourcePath = "org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml";
+
+ public void testSimple()
+ throws Exception {
+
+ load(_resourcePath);
+ CatalogFactory catalogFactory = CatalogFactory.getInstance();
+
+ /* execute a command */
+ Catalog catalog = catalogFactory.getCatalog();
+
+ Context context = new ContextBase();
+ Command command = catalog.getCommand("echo-1234");
+ command.execute(context);
+ }
+
+ public void testConfigurable()
+ throws Exception {
+ load(_resourcePath);
+ CatalogFactory catalogFactory = CatalogFactory.getInstance();
+
+ Catalog catalog = catalogFactory.getCatalog();
+ Command command = catalog.getCommand("configurable");
+ ConfigurableCommand configurableCommand = (ConfigurableCommand)command;
+ assertNotNull(configurableCommand);
+ assertEquals(54321, configurableCommand.getBar());
+ assertEquals("Homer", configurableCommand.getFoo());
+
+ command.execute(new ContextBase());
+ }
+
+ private void load(String resourcePath)
+ throws Exception {
+
+ InputStream inputStream = null;
+ try {
+ /* parse an XML file that defines a catalog */
+ inputStream = getClass().getClassLoader().getResourceAsStream(resourcePath);
+ CatalogParser catalogParser = CatalogParser.getInstance();
+ CatalogConfig catalogConfig = catalogParser.parse(resourcePath, inputStream);
+
+ /* create a real catalog instance */
+ CatalogFactory catalogFactory = CatalogFactory.getInstance(catalogConfig);
+ assertNotNull(catalogFactory);
+ }
+ catch(Exception e) {
+ throw e;
+ }
+ finally {
+ if(inputStream != null) inputStream.close();
+ }
+ }
+}
+
+
+
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/CatalogParserTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleCatalogFactoryTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleCatalogFactoryTest.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleCatalogFactoryTest.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleCatalogFactoryTest.java Wed May 10 08:49:42 2006
@@ -1,62 +1,62 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.core.chain;
-
-import junit.framework.TestCase;
-import org.apache.beehive.netui.core.chain.CatalogFactory;
-import org.apache.beehive.netui.core.chain.Catalog;
-import org.apache.beehive.netui.core.chain.Chain;
-import org.apache.beehive.netui.core.chain.Command;
-import org.apache.beehive.netui.core.chain.Context;
-import org.apache.beehive.netui.core.chain.impl.CatalogBase;
-import org.apache.beehive.netui.core.chain.impl.ChainBase;
-import org.apache.beehive.netui.core.chain.impl.ContextBase;
-import org.apache.beehive.netui.test.core.chain.commands.EchoCommand;
-
-/**
- *
- */
-public class SimpleCatalogFactoryTest
- extends TestCase {
-
- public void testSimple()
- throws Exception {
- Chain chain = new ChainBase();
- for(int i = 0; i < 3; i++) {
- EchoCommand echoCommand = new EchoCommand();
- echoCommand.setMessage("echo me " + i);
- chain.addCommand(echoCommand);
- }
-
- Catalog catalog = new CatalogBase();
- catalog.addCommand("echo", chain);
-
- CatalogFactory catalogFactory = CatalogFactory.getInstance();
- catalogFactory.addCatalog("simple", catalog);
-
- Context context = new ContextBase();
- Catalog theCatalog = catalogFactory.getCatalog("simple");
- Command theCommand = theCatalog.getCommand("echo");
- try {
- theCommand.execute(context);
- }
- catch(Exception e) {
- throw e;
- }
- }
-}
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.core.chain;
+
+import junit.framework.TestCase;
+import org.apache.beehive.netui.core.chain.CatalogFactory;
+import org.apache.beehive.netui.core.chain.Catalog;
+import org.apache.beehive.netui.core.chain.Chain;
+import org.apache.beehive.netui.core.chain.Command;
+import org.apache.beehive.netui.core.chain.Context;
+import org.apache.beehive.netui.core.chain.impl.CatalogBase;
+import org.apache.beehive.netui.core.chain.impl.ChainBase;
+import org.apache.beehive.netui.core.chain.impl.ContextBase;
+import org.apache.beehive.netui.test.core.chain.commands.EchoCommand;
+
+/**
+ *
+ */
+public class SimpleCatalogFactoryTest
+ extends TestCase {
+
+ public void testSimple()
+ throws Exception {
+ Chain chain = new ChainBase();
+ for(int i = 0; i < 3; i++) {
+ EchoCommand echoCommand = new EchoCommand();
+ echoCommand.setMessage("echo me " + i);
+ chain.addCommand(echoCommand);
+ }
+
+ Catalog catalog = new CatalogBase();
+ catalog.addCommand("echo", chain);
+
+ CatalogFactory catalogFactory = CatalogFactory.getInstance();
+ catalogFactory.addCatalog("simple", catalog);
+
+ Context context = new ContextBase();
+ Catalog theCatalog = catalogFactory.getCatalog("simple");
+ Command theCommand = theCatalog.getCommand("echo");
+ try {
+ theCommand.execute(context);
+ }
+ catch(Exception e) {
+ throw e;
+ }
+ }
+}
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleCatalogFactoryTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleChainTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleChainTest.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleChainTest.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleChainTest.java Wed May 10 08:49:42 2006
@@ -1,73 +1,73 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.core.chain;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.beehive.netui.core.chain.Context;
-import org.apache.beehive.netui.core.chain.Chain;
-import org.apache.beehive.netui.core.chain.impl.ChainBase;
-import org.apache.beehive.netui.core.chain.impl.ContextBase;
-import org.apache.beehive.netui.test.core.chain.commands.EchoCommand;
-
-/**
- *
- */
-public class SimpleChainTest
- extends TestCase {
-
- public void testSimple()
- throws Exception {
-
- Context context = new ContextBase();
- Chain chain = new ChainBase();
- for(int i = 0; i < 3; i++) {
- EchoCommand echoCommand = new EchoCommand();
- echoCommand.setMessage("echo me " + i);
- chain.addCommand(echoCommand);
- }
-
- boolean result = false;
- try {
- chain.execute(context);
- }
- catch(Exception e) {
- throw e;
- }
-
- assertFalse(result);
- }
-
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public SimpleChainTest(String testName) {
- super(testName);
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite() {
- return new TestSuite(SimpleChainTest.class);
- }
-}
-
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.core.chain;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.apache.beehive.netui.core.chain.Context;
+import org.apache.beehive.netui.core.chain.Chain;
+import org.apache.beehive.netui.core.chain.impl.ChainBase;
+import org.apache.beehive.netui.core.chain.impl.ContextBase;
+import org.apache.beehive.netui.test.core.chain.commands.EchoCommand;
+
+/**
+ *
+ */
+public class SimpleChainTest
+ extends TestCase {
+
+ public void testSimple()
+ throws Exception {
+
+ Context context = new ContextBase();
+ Chain chain = new ChainBase();
+ for(int i = 0; i < 3; i++) {
+ EchoCommand echoCommand = new EchoCommand();
+ echoCommand.setMessage("echo me " + i);
+ chain.addCommand(echoCommand);
+ }
+
+ boolean result = false;
+ try {
+ chain.execute(context);
+ }
+ catch(Exception e) {
+ throw e;
+ }
+
+ assertFalse(result);
+ }
+
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public SimpleChainTest(String testName) {
+ super(testName);
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite() {
+ return new TestSuite(SimpleChainTest.class);
+ }
+}
+
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/SimpleChainTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/ConfigurableCommand.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/ConfigurableCommand.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/ConfigurableCommand.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/ConfigurableCommand.java Wed May 10 08:49:42 2006
@@ -1,52 +1,52 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.core.chain.commands;
-
-import org.apache.beehive.netui.core.chain.Command;
-import org.apache.beehive.netui.core.chain.Context;
-
-/**
- *
- */
-public class ConfigurableCommand
- implements Command {
-
- private String _foo;
- private int _bar;
-
- public String getFoo() {
- return _foo;
- }
-
- public void setFoo(String foo) {
- _foo = foo;
- }
-
- public int getBar() {
- return _bar;
- }
-
- public void setBar(int bar) {
- _bar = bar;
- }
-
- public boolean execute(Context context) throws Exception {
- System.out.println("foo: " + _foo + " bar: " + _bar);
- return false;
- }
-}
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.core.chain.commands;
+
+import org.apache.beehive.netui.core.chain.Command;
+import org.apache.beehive.netui.core.chain.Context;
+
+/**
+ *
+ */
+public class ConfigurableCommand
+ implements Command {
+
+ private String _foo;
+ private int _bar;
+
+ public String getFoo() {
+ return _foo;
+ }
+
+ public void setFoo(String foo) {
+ _foo = foo;
+ }
+
+ public int getBar() {
+ return _bar;
+ }
+
+ public void setBar(int bar) {
+ _bar = bar;
+ }
+
+ public boolean execute(Context context) throws Exception {
+ System.out.println("foo: " + _foo + " bar: " + _bar);
+ return false;
+ }
+}
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/ConfigurableCommand.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/EchoCommand.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/EchoCommand.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/EchoCommand.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/EchoCommand.java Wed May 10 08:49:42 2006
@@ -1,44 +1,44 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.core.chain.commands;
-
-import org.apache.beehive.netui.core.chain.Command;
-import org.apache.beehive.netui.core.chain.Context;
-
-/**
- *
- */
-public class EchoCommand
- implements Command {
-
- private String _message;
-
- public String getMessage() {
- return _message;
- }
-
- public void setMessage(String message) {
- _message = message;
- }
-
- public boolean execute(Context context)
- throws Exception {
- System.out.println(getMessage());
- return false;
- }
-}
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.core.chain.commands;
+
+import org.apache.beehive.netui.core.chain.Command;
+import org.apache.beehive.netui.core.chain.Context;
+
+/**
+ *
+ */
+public class EchoCommand
+ implements Command {
+
+ private String _message;
+
+ public String getMessage() {
+ return _message;
+ }
+
+ public void setMessage(String message) {
+ _message = message;
+ }
+
+ public boolean execute(Context context)
+ throws Exception {
+ System.out.println(getMessage());
+ return false;
+ }
+}
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/commands/EchoCommand.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml Wed May 10 08:49:42 2006
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<catalog xmlns="http://beehive.apache.org/netui/2006/server/catalog">
- <chain name="echo-1234">
- <command>
- <id>1</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
- <custom-property>
- <name>message</name>
- <value>echo 1</value>
- </custom-property>
- </command>
- <command>
- <id>2</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
- <custom-property>
- <name>message</name>
- <value>echo 2</value>
- </custom-property>
- </command>
- <command>
- <id>3</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
- <custom-property>
- <name>message</name>
- <value>echo 3</value>
- </custom-property>
- </command>
- <command>
- <id>4</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
- <custom-property>
- <name>message</name>
- <value>echo 4</value>
- </custom-property>
- </command>
- </chain>
- <chain name="echo-abc">
- <command>
- <id>1</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
- <custom-property>
- <name>message</name>
- <value>echo aaa</value>
- </custom-property>
- </command>
- <command>
- <id>2</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
- <custom-property>
- <name>message</name>
- <value>echo bbb</value>
- </custom-property>
- </command>
- </chain>
- <command>
- <id>configurable</id>
- <command-class>org.apache.beehive.netui.test.core.chain.commands.ConfigurableCommand</command-class>
- <custom-property>
- <name>foo</name>
- <value>Homer</value>
- </custom-property>
- <custom-property>
- <name>bar</name>
- <value>54321</value>
- </custom-property>
- </command>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<catalog xmlns="http://beehive.apache.org/netui/2006/server/catalog">
+ <chain name="echo-1234">
+ <command>
+ <id>1</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
+ <custom-property>
+ <name>message</name>
+ <value>echo 1</value>
+ </custom-property>
+ </command>
+ <command>
+ <id>2</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
+ <custom-property>
+ <name>message</name>
+ <value>echo 2</value>
+ </custom-property>
+ </command>
+ <command>
+ <id>3</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
+ <custom-property>
+ <name>message</name>
+ <value>echo 3</value>
+ </custom-property>
+ </command>
+ <command>
+ <id>4</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
+ <custom-property>
+ <name>message</name>
+ <value>echo 4</value>
+ </custom-property>
+ </command>
+ </chain>
+ <chain name="echo-abc">
+ <command>
+ <id>1</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
+ <custom-property>
+ <name>message</name>
+ <value>echo aaa</value>
+ </custom-property>
+ </command>
+ <command>
+ <id>2</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.EchoCommand</command-class>
+ <custom-property>
+ <name>message</name>
+ <value>echo bbb</value>
+ </custom-property>
+ </command>
+ </chain>
+ <command>
+ <id>configurable</id>
+ <command-class>org.apache.beehive.netui.test.core.chain.commands.ConfigurableCommand</command-class>
+ <custom-property>
+ <name>foo</name>
+ <value>Homer</value>
+ </custom-property>
+ <custom-property>
+ <name>bar</name>
+ <value>54321</value>
+ </custom-property>
+ </command>
</catalog>
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/core/chain/xmls/simple-chain.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceListenerTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceListenerTest.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceListenerTest.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceListenerTest.java Wed May 10 08:49:42 2006
@@ -1,212 +1,212 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.nameservice;
-
-import junit.framework.TestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.apache.beehive.netui.pageflow.requeststate.NameService;
-import org.apache.beehive.netui.pageflow.requeststate.NamingObjectListener;
-import org.apache.beehive.netui.pageflow.requeststate.INameable;
-
-import java.util.Map;
-
-/**
- */
-public class NameServiceListenerTest extends TestCase
-{
- public NameServiceListenerTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return new TestSuite(NameServiceListenerTest.class);
- }
-
- public void testNamingListeners()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- // add the listener
- ListenerObject lo = new ListenerObject();
- ns.addNamingObjectListener(lo);
-
- // remove the listener
- ns.removeNamingObjectListener(lo);
-
- // the listener may be removed twice
- ns.removeNamingObjectListener(lo);
- }
-
- public void testNamingListenersEvents()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- ListenerObject lo1 = new ListenerObject();
- ns.addNamingObjectListener(lo1);
-
- // now add a nameable object and verify that the listener is called
- NameableObject no1 = new NameableObject();
- ns.nameObject("Nameable",no1);
- ns.put(no1);
-
- assertTrue("NameListener [1] = 1 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 1);
-
- // now add a nameable object and verify that the listener is called
- NameableObject no2 = new NameableObject();
- ns.nameObject("Nameable",no2);
- ns.put(no2);
-
- assertTrue("NameListener [1] = 2 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 2);
-
- // add another listener and verify that both are called
- ListenerObject lo2 = new ListenerObject();
- ns.addNamingObjectListener(lo2);
-
- // now add a nameable object and verify that the listener is called
- NameableObject no3 = new NameableObject();
- ns.nameObject("Nameable",no3);
- ns.put(no3);
-
- assertTrue("NameListener [1] = 3 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 3);
- assertTrue("NameListener [2] = 1 (" + lo1.getEventCount() + ")", lo2.getEventCount() == 1);
-
- // remove the first listender and verify that things work correctly
- ns.removeNamingObjectListener(lo1);
-
- // now add a nameable object and verify that the listener is called
- NameableObject no4 = new NameableObject();
- ns.nameObject("Nameable",no4);
- ns.put(no4);
-
- assertTrue("NameListener [1] = 3 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 3);
- assertTrue("NameListener [2] = 2 (" + lo1.getEventCount() + ")", lo2.getEventCount() == 2);
-
- // remove the second listender and verify that things work correctly
- ns.removeNamingObjectListener(lo2);
-
- // now add a nameable object and verify that the listener is called
- NameableObject no5 = new NameableObject();
- ns.nameObject("Nameable",no5);
- ns.put(no5);
-
- assertTrue("NameListener [1] = 3 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 3);
- assertTrue("NameListener [2] = 2 (" + lo1.getEventCount() + ")", lo2.getEventCount() == 2);
- }
-
- public void testApplingStateToNamedObject()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- StatefulListenerObject listner = new StatefulListenerObject();
- ns.addNamingObjectListener(listner);
-
- try {
- NameableObject no = new NameableObject();
- ns.nameObject("Nameable",no);
- ns.put(no);
-
- Map map = ns.getMap(no.getObjectName(), false);
- assertNotNull("The returned Map was null", map);
-
- // verify that there was state stored in the map by the listener
- Object o = map.get(StatefulListenerObject.STATE_NAME);
- assertNotNull("The state was not found", o);
- assertTrue("The state was not the nameable's name", no.getObjectName().equals(o));
- }
- finally {
- ns.removeNamingObjectListener(listner);
- }
- }
-
- public void testApplingStateToNamedObject2()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- NameableObject no = new NameableObject();
- ns.nameObject("Nameable",no);
- ns.put(no);
-
- Map map = ns.getMap(no.getObjectName(), false);
- assertNull("The returned Map was not null", map);
-
- map = ns.getMap(no.getObjectName(), true);
- assertNotNull("The returned Map was null when create is true", map);
-
- // place something into the map
- map.put("x","x");
-
- // now that the map has something in it, it should return
- map = ns.getMap(no.getObjectName(), false);
- assertNotNull("The returned Map was null", map);
-
- Object o = map.get("x");
- assertNotNull("The state was not found", o);
- assertTrue("The state was not the set state", "x".equals(o));
- }
-
- public void testNameServiceListenerErrors()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- boolean error = true;
-
- // cannot add a null listener object
- try {
- ns.addNamingObjectListener(null);
- }
- catch (IllegalArgumentException e) {
- error = false;
- }
- assertFalse("Able to add a null listener object",error);
-
- // cannot remove a null listener object
- try {
- ns.removeNamingObjectListener(null);
- }
- catch (IllegalArgumentException e) {
- error = false;
- }
- assertFalse("Able to remove a null listener object",error);
- }
-
- static class ListenerObject implements NamingObjectListener
- {
- private int _cnt = 0;
- public void namingObject(INameable iNameable, Map map) {
- _cnt++;
- }
-
- public int getEventCount() {
- return _cnt;
- }
- }
-
- static class StatefulListenerObject implements NamingObjectListener
- {
- public static String STATE_NAME = "StatefulListenerObject.state";
- public void namingObject(INameable iNameable, Map map) {
- map.put(STATE_NAME, iNameable.getObjectName());
- }
- }
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.nameservice;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.beehive.netui.pageflow.requeststate.NameService;
+import org.apache.beehive.netui.pageflow.requeststate.NamingObjectListener;
+import org.apache.beehive.netui.pageflow.requeststate.INameable;
+
+import java.util.Map;
+
+/**
+ */
+public class NameServiceListenerTest extends TestCase
+{
+ public NameServiceListenerTest(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return new TestSuite(NameServiceListenerTest.class);
+ }
+
+ public void testNamingListeners()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ // add the listener
+ ListenerObject lo = new ListenerObject();
+ ns.addNamingObjectListener(lo);
+
+ // remove the listener
+ ns.removeNamingObjectListener(lo);
+
+ // the listener may be removed twice
+ ns.removeNamingObjectListener(lo);
+ }
+
+ public void testNamingListenersEvents()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ ListenerObject lo1 = new ListenerObject();
+ ns.addNamingObjectListener(lo1);
+
+ // now add a nameable object and verify that the listener is called
+ NameableObject no1 = new NameableObject();
+ ns.nameObject("Nameable",no1);
+ ns.put(no1);
+
+ assertTrue("NameListener [1] = 1 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 1);
+
+ // now add a nameable object and verify that the listener is called
+ NameableObject no2 = new NameableObject();
+ ns.nameObject("Nameable",no2);
+ ns.put(no2);
+
+ assertTrue("NameListener [1] = 2 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 2);
+
+ // add another listener and verify that both are called
+ ListenerObject lo2 = new ListenerObject();
+ ns.addNamingObjectListener(lo2);
+
+ // now add a nameable object and verify that the listener is called
+ NameableObject no3 = new NameableObject();
+ ns.nameObject("Nameable",no3);
+ ns.put(no3);
+
+ assertTrue("NameListener [1] = 3 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 3);
+ assertTrue("NameListener [2] = 1 (" + lo1.getEventCount() + ")", lo2.getEventCount() == 1);
+
+ // remove the first listender and verify that things work correctly
+ ns.removeNamingObjectListener(lo1);
+
+ // now add a nameable object and verify that the listener is called
+ NameableObject no4 = new NameableObject();
+ ns.nameObject("Nameable",no4);
+ ns.put(no4);
+
+ assertTrue("NameListener [1] = 3 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 3);
+ assertTrue("NameListener [2] = 2 (" + lo1.getEventCount() + ")", lo2.getEventCount() == 2);
+
+ // remove the second listender and verify that things work correctly
+ ns.removeNamingObjectListener(lo2);
+
+ // now add a nameable object and verify that the listener is called
+ NameableObject no5 = new NameableObject();
+ ns.nameObject("Nameable",no5);
+ ns.put(no5);
+
+ assertTrue("NameListener [1] = 3 (" + lo1.getEventCount() + ")", lo1.getEventCount() == 3);
+ assertTrue("NameListener [2] = 2 (" + lo1.getEventCount() + ")", lo2.getEventCount() == 2);
+ }
+
+ public void testApplingStateToNamedObject()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ StatefulListenerObject listner = new StatefulListenerObject();
+ ns.addNamingObjectListener(listner);
+
+ try {
+ NameableObject no = new NameableObject();
+ ns.nameObject("Nameable",no);
+ ns.put(no);
+
+ Map map = ns.getMap(no.getObjectName(), false);
+ assertNotNull("The returned Map was null", map);
+
+ // verify that there was state stored in the map by the listener
+ Object o = map.get(StatefulListenerObject.STATE_NAME);
+ assertNotNull("The state was not found", o);
+ assertTrue("The state was not the nameable's name", no.getObjectName().equals(o));
+ }
+ finally {
+ ns.removeNamingObjectListener(listner);
+ }
+ }
+
+ public void testApplingStateToNamedObject2()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ NameableObject no = new NameableObject();
+ ns.nameObject("Nameable",no);
+ ns.put(no);
+
+ Map map = ns.getMap(no.getObjectName(), false);
+ assertNull("The returned Map was not null", map);
+
+ map = ns.getMap(no.getObjectName(), true);
+ assertNotNull("The returned Map was null when create is true", map);
+
+ // place something into the map
+ map.put("x","x");
+
+ // now that the map has something in it, it should return
+ map = ns.getMap(no.getObjectName(), false);
+ assertNotNull("The returned Map was null", map);
+
+ Object o = map.get("x");
+ assertNotNull("The state was not found", o);
+ assertTrue("The state was not the set state", "x".equals(o));
+ }
+
+ public void testNameServiceListenerErrors()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ boolean error = true;
+
+ // cannot add a null listener object
+ try {
+ ns.addNamingObjectListener(null);
+ }
+ catch (IllegalArgumentException e) {
+ error = false;
+ }
+ assertFalse("Able to add a null listener object",error);
+
+ // cannot remove a null listener object
+ try {
+ ns.removeNamingObjectListener(null);
+ }
+ catch (IllegalArgumentException e) {
+ error = false;
+ }
+ assertFalse("Able to remove a null listener object",error);
+ }
+
+ static class ListenerObject implements NamingObjectListener
+ {
+ private int _cnt = 0;
+ public void namingObject(INameable iNameable, Map map) {
+ _cnt++;
+ }
+
+ public int getEventCount() {
+ return _cnt;
+ }
+ }
+
+ static class StatefulListenerObject implements NamingObjectListener
+ {
+ public static String STATE_NAME = "StatefulListenerObject.state";
+ public void namingObject(INameable iNameable, Map map) {
+ map.put(STATE_NAME, iNameable.getObjectName());
+ }
+ }
+}
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceListenerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceTest.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceTest.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceTest.java Wed May 10 08:49:42 2006
@@ -1,108 +1,108 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.nameservice;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.beehive.netui.pageflow.requeststate.INameable;
-import org.apache.beehive.netui.pageflow.requeststate.NameService;
-
-public class NameServiceTest extends TestCase
-{
- public NameServiceTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- return new TestSuite(NameServiceTest.class);
- }
-
- public void testNameServiceNaming()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- NameableObject no1 = new NameableObject();
- ns.nameObject("NameObject",no1);
- assertNotNull("The Name was returned as null", no1.getObjectName());
-
-
- NameableObject no2 = new NameableObject();
- ns.nameObject("NameObject",no2);
- assertNotNull("The Name was returned as null", no2.getObjectName());
-
- assertFalse("The name of the named objects cannot be the same",
- no1.getObjectName().equals(no2.getObjectName()));
- }
-
- public void testNameServicePutAndGet()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- // create a nameable object and the name it.
- NameableObject no1 = new NameableObject();
- ns.nameObject("Nameable",no1);
- ns.put(no1);
-
- // get the object back and verify that it was the same object
- INameable nameable = ns.get(no1.getObjectName());
- assertEquals(no1,nameable);
- }
-
-
- public void testNameServiceErrors()
- {
- NameService ns = NameService.staticInstance();
- assertNotNull("The NameService was returned as null", ns);
-
- boolean error = true;
- // you cannot add an object without it having a name
- try {
- NameableObject no1 = new NameableObject();
- ns.put(no1);
- }
- catch (IllegalStateException e) {
- error = false;
- }
- assertFalse("Able to add INameable without naming it",error);
-
- // you cannot put an object without providing the object
- error = true;
- try {
- ns.put(null);
- }
- catch (IllegalStateException e) {
- error = false;
- }
- assertFalse("Didn't fail the put when we passed a null object",error);
-
-
- // you cannot get an object without providing a name
- error = true;
- try {
- ns.get(null);
- }
- catch (IllegalStateException e) {
- error = false;
- }
- assertFalse("Didn't fail the get when we passed a null string",error);
-
- }
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.nameservice;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.apache.beehive.netui.pageflow.requeststate.INameable;
+import org.apache.beehive.netui.pageflow.requeststate.NameService;
+
+public class NameServiceTest extends TestCase
+{
+ public NameServiceTest(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return new TestSuite(NameServiceTest.class);
+ }
+
+ public void testNameServiceNaming()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ NameableObject no1 = new NameableObject();
+ ns.nameObject("NameObject",no1);
+ assertNotNull("The Name was returned as null", no1.getObjectName());
+
+
+ NameableObject no2 = new NameableObject();
+ ns.nameObject("NameObject",no2);
+ assertNotNull("The Name was returned as null", no2.getObjectName());
+
+ assertFalse("The name of the named objects cannot be the same",
+ no1.getObjectName().equals(no2.getObjectName()));
+ }
+
+ public void testNameServicePutAndGet()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ // create a nameable object and the name it.
+ NameableObject no1 = new NameableObject();
+ ns.nameObject("Nameable",no1);
+ ns.put(no1);
+
+ // get the object back and verify that it was the same object
+ INameable nameable = ns.get(no1.getObjectName());
+ assertEquals(no1,nameable);
+ }
+
+
+ public void testNameServiceErrors()
+ {
+ NameService ns = NameService.staticInstance();
+ assertNotNull("The NameService was returned as null", ns);
+
+ boolean error = true;
+ // you cannot add an object without it having a name
+ try {
+ NameableObject no1 = new NameableObject();
+ ns.put(no1);
+ }
+ catch (IllegalStateException e) {
+ error = false;
+ }
+ assertFalse("Able to add INameable without naming it",error);
+
+ // you cannot put an object without providing the object
+ error = true;
+ try {
+ ns.put(null);
+ }
+ catch (IllegalStateException e) {
+ error = false;
+ }
+ assertFalse("Didn't fail the put when we passed a null object",error);
+
+
+ // you cannot get an object without providing a name
+ error = true;
+ try {
+ ns.get(null);
+ }
+ catch (IllegalStateException e) {
+ error = false;
+ }
+ assertFalse("Didn't fail the get when we passed a null string",error);
+
+ }
+}
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameServiceTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameableObject.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameableObject.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameableObject.java (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameableObject.java Wed May 10 08:49:42 2006
@@ -1,35 +1,35 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-package org.apache.beehive.netui.test.nameservice;
-
-import org.apache.beehive.netui.pageflow.requeststate.INameable;
-
-public class NameableObject implements INameable {
- private String _name;
-
- public void setObjectName(String name) {
- if (_name != null) {
- throw new IllegalStateException("Attempt to set the ObjectName twice");
- }
- _name = name;
- }
-
- public String getObjectName() {
- return _name;
- }
- }
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.test.nameservice;
+
+import org.apache.beehive.netui.pageflow.requeststate.INameable;
+
+public class NameableObject implements INameable {
+ private String _name;
+
+ public void setObjectName(String name) {
+ if (_name != null) {
+ throw new IllegalStateException("Attempt to set the ObjectName twice");
+ }
+ _name = name;
+ }
+
+ public String getObjectName() {
+ return _name;
+ }
+ }
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/nameservice/NameableObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-default-1.x.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-default-1.x.xml?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-default-1.x.xml (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-default-1.x.xml Wed May 10 08:49:42 2006
@@ -1,62 +1,62 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Copyright 2004-2006 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- $Header:$
- -->
-
-<!--
- This file defines the default, OOTB required runtime configuration for the NetUI framework
--->
-<netui-config xmlns="http://beehive.apache.org/netui/2004/server/config">
- <expression-languages>
- <default-language>netuiel</default-language>
- <expression-language>
- <name>netuiel</name>
- <factory-class>org.apache.beehive.netui.script.el.ExpressionEvaluatorImpl$NetUIELEngineFactory</factory-class>
- </expression-language>
- </expression-languages>
-
- <prefix-handlers>
- <prefix-handler>
- <name>checkbox_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.CheckBox$CheckBoxPrefixHandler</handler-class>
- </prefix-handler>
- <prefix-handler>
- <name>checkbox_group_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.CheckBoxGroup$CheckboxGroupPrefixHandler</handler-class>
- </prefix-handler>
- <prefix-handler>
- <name>radio_button_group_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.RadioButtonGroup$RadioButtonGroupPrefixHandler</handler-class>
- </prefix-handler>
- <prefix-handler>
- <name>select_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.Select$SelectPrefixHandler</handler-class>
- </prefix-handler>
- </prefix-handlers>
-
- <catalog>
- <chain name="xhr-commands">
- <command>
- <command-class>org.apache.beehive.netui.tags.tree.TreeCRI</command-class>
- </command>
- <command>
- <command-class>org.apache.beehive.netui.tags.divpanel.DivPanelCRI</command-class>
- </command>
- </chain>
- </catalog>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright 2004-2006 The Apache Software Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Header:$
+ -->
+
+<!--
+ This file defines the default, OOTB required runtime configuration for the NetUI framework
+-->
+<netui-config xmlns="http://beehive.apache.org/netui/2004/server/config">
+ <expression-languages>
+ <default-language>netuiel</default-language>
+ <expression-language>
+ <name>netuiel</name>
+ <factory-class>org.apache.beehive.netui.script.el.ExpressionEvaluatorImpl$NetUIELEngineFactory</factory-class>
+ </expression-language>
+ </expression-languages>
+
+ <prefix-handlers>
+ <prefix-handler>
+ <name>checkbox_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.CheckBox$CheckBoxPrefixHandler</handler-class>
+ </prefix-handler>
+ <prefix-handler>
+ <name>checkbox_group_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.CheckBoxGroup$CheckboxGroupPrefixHandler</handler-class>
+ </prefix-handler>
+ <prefix-handler>
+ <name>radio_button_group_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.RadioButtonGroup$RadioButtonGroupPrefixHandler</handler-class>
+ </prefix-handler>
+ <prefix-handler>
+ <name>select_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.Select$SelectPrefixHandler</handler-class>
+ </prefix-handler>
+ </prefix-handlers>
+
+ <catalog>
+ <chain name="xhr-commands">
+ <command>
+ <command-class>org.apache.beehive.netui.tags.tree.TreeCRI</command-class>
+ </command>
+ <command>
+ <command-class>org.apache.beehive.netui.tags.divpanel.DivPanelCRI</command-class>
+ </command>
+ </chain>
+ </catalog>
</netui-config>
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-default-1.x.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-fail-validation.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-with-chain.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-with-chain.xml?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-with-chain.xml (original)
+++ beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-with-chain.xml Wed May 10 08:49:42 2006
@@ -1,64 +1,64 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<netui-config xmlns="http://beehive.apache.org/netui/2004/server/config">
-
- <expression-languages>
- <default-language>netuiel</default-language>
- <expression-language>
- <name>netuiel</name>
- <factory-class>org.apache.beehive.netui.script.el.ExpressionEvaluatorImpl$NetUIELEngineFactory</factory-class>
- </expression-language>
- </expression-languages>
-
- <type-converters>
- <type-converter>
- <type>org.foo.FooBean</type>
- <converter-class>org.foo.FooBeanConverter</converter-class>
- </type-converter>
- </type-converters>
-
- <request-interceptors>
- <global>
- <request-interceptor>
- <interceptor-class>org.apache.beehive.netui.tags.tree.TreeCRI</interceptor-class>
- </request-interceptor>
- <request-interceptor>
- <interceptor-class>org.apache.beehive.netui.tags.divpanel.DivPanelCRI</interceptor-class>
- </request-interceptor>
- </global>
- </request-interceptors>
-
- <prefix-handlers>
- <prefix-handler>
- <name>checkbox_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.CheckBox$CheckBoxPrefixHandler</handler-class>
- </prefix-handler>
- <prefix-handler>
- <name>checkbox_group_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.CheckBoxGroup$CheckboxGroupPrefixHandler</handler-class>
- </prefix-handler>
- <prefix-handler>
- <name>radio_button_group_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.RadioButtonGroup$RadioButtonGroupPrefixHandler</handler-class>
- </prefix-handler>
- <prefix-handler>
- <name>select_key</name>
- <handler-class>org.apache.beehive.netui.tags.html.Select$SelectPrefixHandler</handler-class>
- </prefix-handler>
- </prefix-handlers>
-
- <catalog>
- <chain name="xhr-servlet">
- <command>
- <id>1</id>
- <command-class>Foobar</command-class>
- </command>
- <command>
- <id>2</id>
- <command-class>Raboof</command-class>
- </command>
- </chain>
- </catalog>
-
-</netui-config>
-
+<?xml version="1.0" encoding="UTF-8"?>
+
+<netui-config xmlns="http://beehive.apache.org/netui/2004/server/config">
+
+ <expression-languages>
+ <default-language>netuiel</default-language>
+ <expression-language>
+ <name>netuiel</name>
+ <factory-class>org.apache.beehive.netui.script.el.ExpressionEvaluatorImpl$NetUIELEngineFactory</factory-class>
+ </expression-language>
+ </expression-languages>
+
+ <type-converters>
+ <type-converter>
+ <type>org.foo.FooBean</type>
+ <converter-class>org.foo.FooBeanConverter</converter-class>
+ </type-converter>
+ </type-converters>
+
+ <request-interceptors>
+ <global>
+ <request-interceptor>
+ <interceptor-class>org.apache.beehive.netui.tags.tree.TreeCRI</interceptor-class>
+ </request-interceptor>
+ <request-interceptor>
+ <interceptor-class>org.apache.beehive.netui.tags.divpanel.DivPanelCRI</interceptor-class>
+ </request-interceptor>
+ </global>
+ </request-interceptors>
+
+ <prefix-handlers>
+ <prefix-handler>
+ <name>checkbox_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.CheckBox$CheckBoxPrefixHandler</handler-class>
+ </prefix-handler>
+ <prefix-handler>
+ <name>checkbox_group_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.CheckBoxGroup$CheckboxGroupPrefixHandler</handler-class>
+ </prefix-handler>
+ <prefix-handler>
+ <name>radio_button_group_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.RadioButtonGroup$RadioButtonGroupPrefixHandler</handler-class>
+ </prefix-handler>
+ <prefix-handler>
+ <name>select_key</name>
+ <handler-class>org.apache.beehive.netui.tags.html.Select$SelectPrefixHandler</handler-class>
+ </prefix-handler>
+ </prefix-handlers>
+
+ <catalog>
+ <chain name="xhr-servlet">
+ <command>
+ <id>1</id>
+ <command-class>Foobar</command-class>
+ </command>
+ <command>
+ <id>2</id>
+ <command-class>Raboof</command-class>
+ </command>
+ </chain>
+ </catalog>
+
+</netui-config>
+
Propchange: beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/util/config/xmls/beehive-netui-config-with-chain.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/webapps/drt/src/META-INF/services/org.apache.beehive.netui.pageflow.ServletContainerAdapter
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/src/META-INF/services/org.apache.beehive.netui.pageflow.ServletContainerAdapter?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/src/META-INF/services/org.apache.beehive.netui.pageflow.ServletContainerAdapter (original)
+++ beehive/trunk/netui/test/webapps/drt/src/META-INF/services/org.apache.beehive.netui.pageflow.ServletContainerAdapter Wed May 10 08:49:42 2006
@@ -1 +1 @@
-test.TestServletContainerAdapter
+test.TestServletContainerAdapter
Propchange: beehive/trunk/netui/test/webapps/drt/src/META-INF/services/org.apache.beehive.netui.pageflow.ServletContainerAdapter
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/webapps/drt/src/bugs/j1091/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/src/bugs/j1091/Controller.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/src/bugs/j1091/Controller.java (original)
+++ beehive/trunk/netui/test/webapps/drt/src/bugs/j1091/Controller.java Wed May 10 08:49:42 2006
@@ -1,58 +1,58 @@
-package bugs.j1091;
-
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
-@Jpf.Controller()
-public class Controller
- extends PageFlowController {
- @Jpf.Action(forwards = {
- @Jpf.Forward(name = "index",
- path = "index.jsp")
- })
- protected Forward begin()
- {
- return new Forward("index");
- }
-
- @Jpf.Action(forwards = {
- @Jpf.Forward(name = "success",
- path = "index.jsp")
- })
- protected Forward submit(ColorForm form)
- {
- return new Forward("success");
- }
-
- public static class ColorForm extends FormData {
- private String _color = null;
- private String _shade = null;
- private String[] _colors = null;
-
- public String getShade() {
- return _shade;
- }
-
- public void setShade(String shade) {
- _shade = shade;
- }
-
- public String getColor() {
- return _color;
- }
-
- public void setColor(String color) {
- _color = color;
- }
-
- public String[] getColors() {
- return _colors;
- }
-
- public void setColors(String[] colors) {
- _colors = colors;
- }
- }
-}
+package bugs.j1091;
+
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+@Jpf.Controller()
+public class Controller
+ extends PageFlowController {
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "index",
+ path = "index.jsp")
+ })
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward submit(ColorForm form)
+ {
+ return new Forward("success");
+ }
+
+ public static class ColorForm extends FormData {
+ private String _color = null;
+ private String _shade = null;
+ private String[] _colors = null;
+
+ public String getShade() {
+ return _shade;
+ }
+
+ public void setShade(String shade) {
+ _shade = shade;
+ }
+
+ public String getColor() {
+ return _color;
+ }
+
+ public void setColor(String color) {
+ _color = color;
+ }
+
+ public String[] getColors() {
+ return _colors;
+ }
+
+ public void setColors(String[] colors) {
+ _colors = colors;
+ }
+ }
+}
Propchange: beehive/trunk/netui/test/webapps/drt/src/bugs/j1091/Controller.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/webapps/drt/src/controls/pfbeancontext/PageFlowBeanContextController.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/src/controls/pfbeancontext/PageFlowBeanContextController.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/src/controls/pfbeancontext/PageFlowBeanContextController.java (original)
+++ beehive/trunk/netui/test/webapps/drt/src/controls/pfbeancontext/PageFlowBeanContextController.java Wed May 10 08:49:42 2006
@@ -1,55 +1,55 @@
-package controls.pfbeancontext;
-
-import javax.servlet.http.HttpSession;
-
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-import org.apache.beehive.netui.test.controls.pfcontainer.PageFlowContextControl;
-import org.apache.beehive.controls.api.bean.Control;
-
-/**
- *
- */
-@Jpf.Controller(forwards={@Jpf.Forward(name="index", path="index.jsp")})
-public class PageFlowBeanContextController
- extends PageFlowController {
-
- @Control
- private PageFlowContextControl _pfContextControl;
-
- public boolean isMatch() {
- return check();
- }
-
- protected void onCreate() {
- check();
- }
-
- protected void beforeAction() {
- check();
- }
-
- @Jpf.Action()
- public Forward begin() {
- check();
- return new Forward("index");
- }
-
- protected void afterAction() {
- check();
- }
-
- protected void onDestroy(HttpSession httpSession) {
- // This check is disabled because of a bug in JPF + Controls integration where the Page Flow
- // runtime doesn't "beginContext" on a ControlContainerContext during JPF destruction.
- // check();
- }
-
- private boolean check() {
- if(!_pfContextControl.checkPageFlow(this))
- throw new IllegalStateException("The Control's PageFlow and this PageFlow are not the same!");
-
- return true;
- }
-}
+package controls.pfbeancontext;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.netui.test.controls.pfcontainer.PageFlowContextControl;
+import org.apache.beehive.controls.api.bean.Control;
+
+/**
+ *
+ */
+@Jpf.Controller(forwards={@Jpf.Forward(name="index", path="index.jsp")})
+public class PageFlowBeanContextController
+ extends PageFlowController {
+
+ @Control
+ private PageFlowContextControl _pfContextControl;
+
+ public boolean isMatch() {
+ return check();
+ }
+
+ protected void onCreate() {
+ check();
+ }
+
+ protected void beforeAction() {
+ check();
+ }
+
+ @Jpf.Action()
+ public Forward begin() {
+ check();
+ return new Forward("index");
+ }
+
+ protected void afterAction() {
+ check();
+ }
+
+ protected void onDestroy(HttpSession httpSession) {
+ // This check is disabled because of a bug in JPF + Controls integration where the Page Flow
+ // runtime doesn't "beginContext" on a ControlContainerContext during JPF destruction.
+ // check();
+ }
+
+ private boolean check() {
+ if(!_pfContextControl.checkPageFlow(this))
+ throw new IllegalStateException("The Control's PageFlow and this PageFlow are not the same!");
+
+ return true;
+ }
+}
Propchange: beehive/trunk/netui/test/webapps/drt/src/controls/pfbeancontext/PageFlowBeanContextController.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/controls/PortfolioBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/controls/StockBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/scoping/grid1/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/scoping/grid1/Controller.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/scoping/grid1/Controller.java (original)
+++ beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/scoping/grid1/Controller.java Wed May 10 08:49:42 2006
@@ -1,40 +1,40 @@
-/**
- * Created by IntelliJ IDEA.
- * User: ekoneil
- * Date: Apr 25, 2006
- * Time: 3:31:14 PM
- * To change this template use File | Settings | File Templates.
- */
-package databinding.datagrid.scoping.grid1;
-
-import javax.servlet.http.HttpSession;
-
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-@Jpf.Controller()
-public class Controller
- extends PageFlowController {
-
- private static final Log LOG = LogFactory.getLog("webapp");
-
- @Jpf.Action(forwards={@Jpf.Forward(name="index", path="grid.jsp")})
- public Forward begin() {
- return new Forward("index");
- }
-
- public void beforeAction() {
- }
-
- public void afterAction() {
- }
-
- public void onCreate() {
- }
-
- public void onDestroy(HttpSession httpSession) {
- }
-}
+/**
+ * Created by IntelliJ IDEA.
+ * User: ekoneil
+ * Date: Apr 25, 2006
+ * Time: 3:31:14 PM
+ * To change this template use File | Settings | File Templates.
+ */
+package databinding.datagrid.scoping.grid1;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+@Jpf.Controller()
+public class Controller
+ extends PageFlowController {
+
+ private static final Log LOG = LogFactory.getLog("webapp");
+
+ @Jpf.Action(forwards={@Jpf.Forward(name="index", path="grid.jsp")})
+ public Forward begin() {
+ return new Forward("index");
+ }
+
+ public void beforeAction() {
+ }
+
+ public void afterAction() {
+ }
+
+ public void onCreate() {
+ }
+
+ public void onDestroy(HttpSession httpSession) {
+ }
+}
Propchange: beehive/trunk/netui/test/webapps/drt/src/databinding/datagrid/scoping/grid1/Controller.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/netui/test/webapps/drt/src/databinding/expressions/actionforminclude/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/drt/src/databinding/expressions/actionforminclude/Controller.java?rev=405785&r1=405784&r2=405785&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/drt/src/databinding/expressions/actionforminclude/Controller.java (original)
+++ beehive/trunk/netui/test/webapps/drt/src/databinding/expressions/actionforminclude/Controller.java Wed May 10 08:49:42 2006
@@ -1,77 +1,77 @@
-/**
- * Created by IntelliJ IDEA.
- * User: ekoneil
- * Date: May 4, 2006
- * Time: 11:17:41 AM
- * To change this template use File | Settings | File Templates.
- */
-package databinding.expressions.actionforminclude;
-
-import javax.servlet.http.HttpSession;
-
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-@Jpf.Controller(
- forwards = {
- @Jpf.Forward(name = "index", path = "index.jsp"),
- @Jpf.Forward(name = "fileinclude", path = "formwithfileinclude.jsp"),
- @Jpf.Forward(name = "jspinclude", path = "formwithjspinclude.jsp"),
- @Jpf.Forward(name = "tagfile", path = "formwithtagfile.jsp")
- }
-)
-public class Controller
- extends PageFlowController {
-
- private static final Log LOG = LogFactory.getLog("webapp");
-
- @Jpf.Action()
- public Forward begin() {
- return new Forward("index");
- }
-
- @Jpf.Action
- public Forward showFileInclude() {
- return new Forward("fileinclude");
- }
-
- @Jpf.Action
- public Forward submitFileInclude(MessageForm form) {
- return new Forward("fileinclude", form);
- }
-
- @Jpf.Action
- public Forward showJspInclude() {
- return new Forward("jspinclude");
- }
-
- @Jpf.Action
- public Forward submitJspInclude(MessageForm form) {
- return new Forward("jspinclude", form);
- }
-
- @Jpf.Action
- public Forward showTagFile() {
- return new Forward("jspinclude");
- }
-
- @Jpf.Action
- public Forward submitTagFile(MessageForm form) {
- return new Forward("tagfile", form);
- }
-
- public static class MessageForm {
- private String _message;
-
- public String getMessage() {
- return _message;
- }
-
- public void setMessage(String message) {
- _message = message;
- }
- }
-}
+/**
+ * Created by IntelliJ IDEA.
+ * User: ekoneil
+ * Date: May 4, 2006
+ * Time: 11:17:41 AM
+ * To change this template use File | Settings | File Templates.
+ */
+package databinding.expressions.actionforminclude;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+@Jpf.Controller(
+ forwards = {
+ @Jpf.Forward(name = "index", path = "index.jsp"),
+ @Jpf.Forward(name = "fileinclude", path = "formwithfileinclude.jsp"),
+ @Jpf.Forward(name = "jspinclude", path = "formwithjspinclude.jsp"),
+ @Jpf.Forward(name = "tagfile", path = "formwithtagfile.jsp")
+ }
+)
+public class Controller
+ extends PageFlowController {
+
+ private static final Log LOG = LogFactory.getLog("webapp");
+
+ @Jpf.Action()
+ public Forward begin() {
+ return new Forward("index");
+ }
+
+ @Jpf.Action
+ public Forward showFileInclude() {
+ return new Forward("fileinclude");
+ }
+
+ @Jpf.Action
+ public Forward submitFileInclude(MessageForm form) {
+ return new Forward("fileinclude", form);
+ }
+
+ @Jpf.Action
+ public Forward showJspInclude() {
+ return new Forward("jspinclude");
+ }
+
+ @Jpf.Action
+ public Forward submitJspInclude(MessageForm form) {
+ return new Forward("jspinclude", form);
+ }
+
+ @Jpf.Action
+ public Forward showTagFile() {
+ return new Forward("jspinclude");
+ }
+
+ @Jpf.Action
+ public Forward submitTagFile(MessageForm form) {
+ return new Forward("tagfile", form);
+ }
+
+ public static class MessageForm {
+ private String _message;
+
+ public String getMessage() {
+ return _message;
+ }
+
+ public void setMessage(String message) {
+ _message = message;
+ }
+ }
+}