You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cs...@apache.org on 2007/06/06 17:56:47 UTC

svn commit: r544871 - in /beehive/trunk/controls/test: ./ src/junit-controls/org/apache/beehive/controls/test/controls/bindings/

Author: cschoett
Date: Wed Jun  6 08:56:46 2007
New Revision: 544871

URL: http://svn.apache.org/viewvc?view=rev&rev=544871
Log:
Added new controls drt to test the use of the controlbindings.properties to override an control implemenation at runtime.

Added:
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl2.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties   (with props)
Modified:
    beehive/trunk/controls/test/build.xml

Modified: beehive/trunk/controls/test/build.xml
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/build.xml?view=diff&rev=544871&r1=544870&r2=544871
==============================================================================
--- beehive/trunk/controls/test/build.xml (original)
+++ beehive/trunk/controls/test/build.xml Wed Jun  6 08:56:46 2007
@@ -155,6 +155,9 @@
             </fileset>
         </copy>
 
+        <copy file="${controls.src.dir}/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties"
+              todir = "${controls.classes.dir}"></copy>
+
         <assemble moduleDir="${controls.classes.dir}"
                   srcOutputDir="${controls.beansrc.dir}"
                   contextFactoryClassname="org.apache.beehive.controls.runtime.assembly.EJBAssemblyContext$Factory">

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrl.java?view=auto&rev=544871
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrl.java Wed Jun  6 08:56:46 2007
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.beehive.controls.test.controls.bindings;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * Control interface used for testing the controlbindings.properties file
+ * use for changing a control implementation at runtime.
+ */
+@ControlInterface
+public interface HelloCtrl {
+
+    public String echo(String message);
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl.java?view=auto&rev=544871
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl.java Wed Jun  6 08:56:46 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.beehive.controls.test.controls.bindings;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+/**
+ * Default control impl used if not changed in controlbingings.properties
+ */
+@ControlImplementation(isTransient = true)
+public class HelloCtrlImpl implements HelloCtrl {
+
+    public String echo(String message) {
+        return "HelloCtrlImpl: " + message;
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl2.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl2.java?view=auto&rev=544871
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl2.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl2.java Wed Jun  6 08:56:46 2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.beehive.controls.test.controls.bindings;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+/**
+ * This is the control implementation which should be used at runtime
+ * since it is the one specified in controlbindings.properties
+ */
+@ControlImplementation(isTransient = true)
+public class HelloCtrlImpl2 implements HelloCtrl {
+
+    public String echo(String message) {
+        return "HelloCtrlImpl2: " + message;
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/HelloCtrlImpl2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties?view=auto&rev=544871
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties Wed Jun  6 08:56:46 2007
@@ -0,0 +1 @@
+org.apache.beehive.controls.test.controls.bindings.HelloCtrlBean=org.apache.beehive.controls.test.controls.bindings.HelloCtrlImpl2
\ No newline at end of file

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/bindings/controlbindings.properties
------------------------------------------------------------------------------
    svn:eol-style = native