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/13 15:14:56 UTC

svn commit: r406090 [3/10] - in /beehive/trunk: ./ ant/ controls/ controls/src/ controls/src/api/org/apache/beehive/controls/api/context/ controls/src/api/org/apache/beehive/controls/api/events/ controls/src/api/org/apache/beehive/controls/api/packagin...

Modified: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/WebContextFactoryProvider.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/WebContextFactoryProvider.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/WebContextFactoryProvider.java (original)
+++ beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/WebContextFactoryProvider.java Sat May 13 06:14:42 2006
@@ -1,98 +1,98 @@
-/*
- * 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.controls.runtime.bean;
-
-import java.beans.beancontext.BeanContextServices;
-import java.beans.beancontext.BeanContextServiceProvider;
-import java.util.Iterator;
-import java.util.Collections;
-
-import org.apache.beehive.controls.spi.context.ControlBeanContextFactory;
-
-/**
- * <p>
- * This class acts as a ControlBeanContextFactoryProvider that exposes this factory as a contextual service
- * from inside of a ControlBeanContext.
- * </p>
- * <p>
- * <b>Note:</b> This class, the service provider, and the contextual service it provides are considerd an implementation
- * detail and <b>should not</b> be used from user code.
- * </p>
- */
-public class WebContextFactoryProvider
-    implements BeanContextServiceProvider {
-
-    private static final WebContextFactoryProvider theProvider = new WebContextFactoryProvider();
-    private static final WebControlBeanContextFactory theFactory = new WebControlBeanContextFactory();
-
-    public static final ControlBeanContext.BeanContextServicesFactory WEB_CONTEXT_BCS_FACTORY =
-        new WebContextBeanContextServicesFactory();
-
-    public static BeanContextServiceProvider getProvider() {
-        return theProvider;
-    }
-
-    private WebContextFactoryProvider() {
-    }
-
-    public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
-        return theFactory;
-    }
-
-    public void releaseService(BeanContextServices bcs, Object requestor, Object service) {
-    }
-
-    public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
-        return Collections.EMPTY_LIST.iterator();
-    }
-
-    /**
-     * <p>
-     * {@link ControlBeanContextFactory} implementation that provides a {@link ControlBeanContext} object
-     * used for web-tier control containment.
-     * </p>
-     * <p>
-     * <b>Note:</b> This factory is considerd an implementation detail and <b>should not</b> be referenced from user code.
-     * </p>
-     */
-    /*package*/ static class WebControlBeanContextFactory
-        implements ControlBeanContextFactory {
-
-        public org.apache.beehive.controls.api.context.ControlBeanContext instantiate
-            (org.apache.beehive.controls.api.bean.ControlBean controlBean) {
-
-            if(!(controlBean instanceof ControlBean))
-                throw new IllegalArgumentException("The ControlBean of type \"" +
-                    controlBean.getClass().getName() +
-                    "\" is unsupported.  The ControlBean must extend " +
-                    ControlBean.class.getName());
-
-            ControlBean runtimeControlBean = (ControlBean)controlBean;
-
-            return new ControlBeanContext(runtimeControlBean, WEB_CONTEXT_BCS_FACTORY);
-        }
-    }
-
-    /*package*/ static class WebContextBeanContextServicesFactory
-        extends ControlBeanContext.BeanContextServicesFactory {
-        protected BeanContextServices instantiate(ControlBeanContext controlBeanContext) {
-            //return new ControlBeanContextServicesSupport(controlBeanContext);
-            return new java.beans.beancontext.BeanContextServicesSupport(controlBeanContext);
-        }
-    }
-}
+/*
+ * 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.controls.runtime.bean;
+
+import java.beans.beancontext.BeanContextServices;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.util.Iterator;
+import java.util.Collections;
+
+import org.apache.beehive.controls.spi.context.ControlBeanContextFactory;
+
+/**
+ * <p>
+ * This class acts as a ControlBeanContextFactoryProvider that exposes this factory as a contextual service
+ * from inside of a ControlBeanContext.
+ * </p>
+ * <p>
+ * <b>Note:</b> This class, the service provider, and the contextual service it provides are considerd an implementation
+ * detail and <b>should not</b> be used from user code.
+ * </p>
+ */
+public class WebContextFactoryProvider
+    implements BeanContextServiceProvider {
+
+    private static final WebContextFactoryProvider theProvider = new WebContextFactoryProvider();
+    private static final WebControlBeanContextFactory theFactory = new WebControlBeanContextFactory();
+
+    public static final ControlBeanContext.BeanContextServicesFactory WEB_CONTEXT_BCS_FACTORY =
+        new WebContextBeanContextServicesFactory();
+
+    public static BeanContextServiceProvider getProvider() {
+        return theProvider;
+    }
+
+    private WebContextFactoryProvider() {
+    }
+
+    public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) {
+        return theFactory;
+    }
+
+    public void releaseService(BeanContextServices bcs, Object requestor, Object service) {
+    }
+
+    public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) {
+        return Collections.EMPTY_LIST.iterator();
+    }
+
+    /**
+     * <p>
+     * {@link ControlBeanContextFactory} implementation that provides a {@link ControlBeanContext} object
+     * used for web-tier control containment.
+     * </p>
+     * <p>
+     * <b>Note:</b> This factory is considerd an implementation detail and <b>should not</b> be referenced from user code.
+     * </p>
+     */
+    /*package*/ static class WebControlBeanContextFactory
+        implements ControlBeanContextFactory {
+
+        public org.apache.beehive.controls.api.context.ControlBeanContext instantiate
+            (org.apache.beehive.controls.api.bean.ControlBean controlBean) {
+
+            if(!(controlBean instanceof ControlBean))
+                throw new IllegalArgumentException("The ControlBean of type \"" +
+                    controlBean.getClass().getName() +
+                    "\" is unsupported.  The ControlBean must extend " +
+                    ControlBean.class.getName());
+
+            ControlBean runtimeControlBean = (ControlBean)controlBean;
+
+            return new ControlBeanContext(runtimeControlBean, WEB_CONTEXT_BCS_FACTORY);
+        }
+    }
+
+    /*package*/ static class WebContextBeanContextServicesFactory
+        extends ControlBeanContext.BeanContextServicesFactory {
+        protected BeanContextServices instantiate(ControlBeanContext controlBeanContext) {
+            //return new ControlBeanContextServicesSupport(controlBeanContext);
+            return new java.beans.beancontext.BeanContextServicesSupport(controlBeanContext);
+        }
+    }
+}

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/bean/WebContextFactoryProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptAnnotationHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptClientField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptContextField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptControlClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptControlField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptControlImplementation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptControlInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptEventField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptEventHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptEventSet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptMethodSet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptProperty.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptPropertySet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/AptType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/ControlBeanInfo.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/ControlMacros.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/ControlManifest.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/Generator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/ImplInitializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/ImplInitializer.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/VelocityAptLogSystem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessor.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessor.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessor.java (original)
+++ beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessor.java Sat May 13 06:14:42 2006
@@ -1,95 +1,95 @@
-/*
- * 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.controls.runtime.generator.apt;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-
-import org.apache.beehive.controls.api.bean.AnnotationMemberTypes;
-import org.apache.beehive.controls.runtime.generator.AptControlInterface;
-import org.apache.beehive.controls.runtime.generator.apt.TwoPhaseAnnotationProcessor;
-import org.apache.beehive.controls.runtime.bean.AnnotationConstraintValidator;
-
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.AnnotationTypeDeclaration;
-import com.sun.mirror.declaration.Declaration;
-import com.sun.mirror.declaration.MethodDeclaration;
-import com.sun.mirror.type.VoidType;
-
-public class ControlMemberTypeAnnotationProcessor extends TwoPhaseAnnotationProcessor
-{
-    /**
-     * @param atds
-     * @param env
-     */
-    public ControlMemberTypeAnnotationProcessor(
-            Set<AnnotationTypeDeclaration> atds,
-            AnnotationProcessorEnvironment env)
-    {
-        super(atds, env);
-    }
-
-    public void check()
-    {
-        super.check();
-        
-    }
-    public void check(Declaration decl)
-    {
-        if (decl.getAnnotation(AnnotationMemberTypes.Date.class) != null)
-        {
-        	checkDate(decl);
-        }
-    }
-
-    public void generate(Declaration decl)
-    {
-    }
-
-    public void checkDate(Declaration decl)
-    {
-    	AnnotationMemberTypes.Date date = decl.getAnnotation(AnnotationMemberTypes.Date.class);
-    	
-    	try
-    	{
-    		String dateValue = date.minValue();
-    		String format = date.format();
-    		
-        	//Validate the date format specified
-    		SimpleDateFormat sdFormat = new SimpleDateFormat(date.format());
-
-        	//Validate that the date specified is in the specified format.
-    		if (dateValue != null && dateValue.length() > 0)
-    			AnnotationConstraintValidator.parseDate(format, dateValue);
-    		dateValue = date.maxValue();
-    		if (dateValue != null && dateValue.length() > 0)
-    			AnnotationConstraintValidator.parseDate(format, dateValue);
-    	} 
-    	catch (ParseException pe)
-    	{
-    		printError( decl, "control.member.type.invalid.date.value.error");
-    	}
-    	catch (Exception e)
-    	{
-    		printError( decl, "control.member.type.invalid.date.format.error");    		
-    	}
-
-    }
-}
+/*
+ * 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.controls.runtime.generator.apt;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+
+import org.apache.beehive.controls.api.bean.AnnotationMemberTypes;
+import org.apache.beehive.controls.runtime.generator.AptControlInterface;
+import org.apache.beehive.controls.runtime.generator.apt.TwoPhaseAnnotationProcessor;
+import org.apache.beehive.controls.runtime.bean.AnnotationConstraintValidator;
+
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import com.sun.mirror.declaration.Declaration;
+import com.sun.mirror.declaration.MethodDeclaration;
+import com.sun.mirror.type.VoidType;
+
+public class ControlMemberTypeAnnotationProcessor extends TwoPhaseAnnotationProcessor
+{
+    /**
+     * @param atds
+     * @param env
+     */
+    public ControlMemberTypeAnnotationProcessor(
+            Set<AnnotationTypeDeclaration> atds,
+            AnnotationProcessorEnvironment env)
+    {
+        super(atds, env);
+    }
+
+    public void check()
+    {
+        super.check();
+        
+    }
+    public void check(Declaration decl)
+    {
+        if (decl.getAnnotation(AnnotationMemberTypes.Date.class) != null)
+        {
+        	checkDate(decl);
+        }
+    }
+
+    public void generate(Declaration decl)
+    {
+    }
+
+    public void checkDate(Declaration decl)
+    {
+    	AnnotationMemberTypes.Date date = decl.getAnnotation(AnnotationMemberTypes.Date.class);
+    	
+    	try
+    	{
+    		String dateValue = date.minValue();
+    		String format = date.format();
+    		
+        	//Validate the date format specified
+    		SimpleDateFormat sdFormat = new SimpleDateFormat(date.format());
+
+        	//Validate that the date specified is in the specified format.
+    		if (dateValue != null && dateValue.length() > 0)
+    			AnnotationConstraintValidator.parseDate(format, dateValue);
+    		dateValue = date.maxValue();
+    		if (dateValue != null && dateValue.length() > 0)
+    			AnnotationConstraintValidator.parseDate(format, dateValue);
+    	} 
+    	catch (ParseException pe)
+    	{
+    		printError( decl, "control.member.type.invalid.date.value.error");
+    	}
+    	catch (Exception e)
+    	{
+    		printError( decl, "control.member.type.invalid.date.format.error");    		
+    	}
+
+    }
+}

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessorFactory.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessorFactory.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessorFactory.java (original)
+++ beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessorFactory.java Sat May 13 06:14:42 2006
@@ -1,71 +1,71 @@
-/*
- * 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.controls.runtime.generator.apt;
-
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Date;
-
-import com.sun.mirror.apt.AnnotationProcessor;
-import com.sun.mirror.apt.AnnotationProcessorFactory;
-import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.AnnotationTypeDeclaration;
-
-public class ControlMemberTypeAnnotationProcessorFactory implements AnnotationProcessorFactory
-{
-    private static final Collection<String> _supportedAnnotations =
-            Collections.unmodifiableCollection(
-                Arrays.asList(new String[] {
-                		org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Date.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Decimal.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.FilePath.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Int.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.JndiName.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Optional.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.QName.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Text.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.URI.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.URL.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.URN.class.getName(),
-                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.XML.class.getName()
-                }));
-
-    private static final Collection<String> _supportedOptions =
-            Collections.unmodifiableCollection(
-                Arrays.asList( new String[0] ) );
-
-    public Collection<String> supportedOptions()
-    {
-        return _supportedOptions;
-    }
-
-    public Collection<String> supportedAnnotationTypes()
-    {
-        return _supportedAnnotations;
-    }
-
-    public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds,
-                                               AnnotationProcessorEnvironment env)
-    {
-        return new ControlMemberTypeAnnotationProcessor(atds, env);   
-    }
-}
+/*
+ * 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.controls.runtime.generator.apt;
+
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Date;
+
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorFactory;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+
+public class ControlMemberTypeAnnotationProcessorFactory implements AnnotationProcessorFactory
+{
+    private static final Collection<String> _supportedAnnotations =
+            Collections.unmodifiableCollection(
+                Arrays.asList(new String[] {
+                		org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Date.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Decimal.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.FilePath.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Int.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.JndiName.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Optional.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.QName.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.Text.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.URI.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.URL.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.URN.class.getName(),
+                        org.apache.beehive.controls.api.bean.AnnotationMemberTypes.XML.class.getName()
+                }));
+
+    private static final Collection<String> _supportedOptions =
+            Collections.unmodifiableCollection(
+                Arrays.asList( new String[0] ) );
+
+    public Collection<String> supportedOptions()
+    {
+        return _supportedOptions;
+    }
+
+    public Collection<String> supportedAnnotationTypes()
+    {
+        return _supportedAnnotations;
+    }
+
+    public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds,
+                                               AnnotationProcessorEnvironment env)
+    {
+        return new ControlMemberTypeAnnotationProcessor(atds, env);   
+    }
+}

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlMemberTypeAnnotationProcessorFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/packaging/ControlEventSetDescriptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/packaging/ControlJarTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/packaging/ControlJarTask.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/packaging/ControlJarTask.java (original)
+++ beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/packaging/ControlJarTask.java Sat May 13 06:14:42 2006
@@ -1,156 +1,156 @@
-/*
- * 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.controls.runtime.packaging;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.taskdefs.Jar;
-import org.apache.tools.ant.taskdefs.Manifest;
-import org.apache.tools.ant.taskdefs.ManifestException;
-import org.apache.tools.ant.types.Resource;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.util.FileUtils;
-import org.apache.tools.zip.ZipOutputStream;
-
-/**
- * The ControlTask class extends the standard ant Jar task to perform
- * additional processing for JAR files that contain Beehive Controls.
- */
-public class ControlJarTask extends Jar
-{
-    private static FileUtils fileUtils = FileUtils.newFileUtils();
-
-    /**
-     * Step #1: Wrap the implementation of Zip.grabResources.  This method identifies the
-     * set of resources to be stored in the JAR file.   For each added/updated resource,
-     * the overrided method will look for an associated .manifest file that any
-     * JAR manifest data to add/update in the JAR manifest.
-     */
-    protected Resource[][] grabResources(FileSet[] filesets) 
-    {
-        //
-        // Get the list of resources being added/updated by calling Zip.grabResources
-        //
-        Resource [][] resources = super.grabResources(filesets);
-
-        //
-        // Iterate through the resources for each input FileSet, looking for an associated
-        // manifest file.
-        //
-        for (int i = 0; i < filesets.length; i++)
-        {
-            if (resources[i].length == 0)
-                continue;
-
-            File base = filesets[i].getDir(getProject());
-            Resource [] setResources = resources[i];
-
-            for (int j = 0; j < setResources.length; j++)
-            {
-                File manifestFile = 
-                    fileUtils.resolveFile(base, setResources[j].getName() + ".manifest");
-                if (manifestFile.exists())
-                    manifestFiles.add(manifestFile);
-            }
-        }
-
-        return resources;
-    }
-
-    /**
-     * Step #2: Override Jar.initZipOutputStream to inject manifest sections.  This is done
-     * by treating them as if they were 'inline' entries, from a <jar> task perspective.
-     */
-    protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException 
-    {
-        if (manifestFiles.size() != 0)
-        {
-            //
-            // Create a default (empty) manifest
-            //
-            Manifest mergeManifest = Manifest.getDefaultManifest();
-
-            //
-            // Iterate through each found manifest file, merging its contents into the
-            // merge manifest
-            //
-            for (File manifestFile : manifestFiles)
-            {
-                FileInputStream fis = null;
-                try
-                {
-                    fis = new FileInputStream(manifestFile);
-                    Manifest resourceManifest = new Manifest(new InputStreamReader(fis));
-                    mergeManifest.merge(resourceManifest);
-                }
-                catch (IOException ioe)
-                {
-                    throw new BuildException("Unable to read manifest file:" + manifestFile, ioe);
-                }
-                catch (ManifestException me)
-                {
-                    throw new BuildException("Unable to process manifest file: "+ manifestFile, me);
-                }
-                finally 
-                {
-                    if (fis != null) fis.close();
-                }
-            }
-
-            //
-            // Set the merge manifest as the 'configured' manifest.   This will treat its
-            // contents as if they had been included inline with the <jar> task, with
-            // similar precedence rules.
-            //
-            try
-            {
-                addConfiguredManifest(mergeManifest);
-            }
-            catch (ManifestException me)
-            {
-                throw new BuildException("Unable to add new manifest entries:" + me);
-            }
-        }
-
-        super.initZipOutputStream(zOut);
-    }
-
-    protected void addToManifest(Manifest jarManifest, List<File> mergeList)
-    {
-    }
-
-    /**
-     * Reset the manifest file list to be empty
-     */
-    protected void cleanUp()
-    {
-        manifestFiles = new Vector<File>();
-    }
-
-    /**
-     * Contains the set of manifest entries to merge into the JAR manifest
-     */
-    private List<File> manifestFiles = new Vector<File>();
-}
+/*
+ * 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.controls.runtime.packaging;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.Jar;
+import org.apache.tools.ant.taskdefs.Manifest;
+import org.apache.tools.ant.taskdefs.ManifestException;
+import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.zip.ZipOutputStream;
+
+/**
+ * The ControlTask class extends the standard ant Jar task to perform
+ * additional processing for JAR files that contain Beehive Controls.
+ */
+public class ControlJarTask extends Jar
+{
+    private static FileUtils fileUtils = FileUtils.newFileUtils();
+
+    /**
+     * Step #1: Wrap the implementation of Zip.grabResources.  This method identifies the
+     * set of resources to be stored in the JAR file.   For each added/updated resource,
+     * the overrided method will look for an associated .manifest file that any
+     * JAR manifest data to add/update in the JAR manifest.
+     */
+    protected Resource[][] grabResources(FileSet[] filesets) 
+    {
+        //
+        // Get the list of resources being added/updated by calling Zip.grabResources
+        //
+        Resource [][] resources = super.grabResources(filesets);
+
+        //
+        // Iterate through the resources for each input FileSet, looking for an associated
+        // manifest file.
+        //
+        for (int i = 0; i < filesets.length; i++)
+        {
+            if (resources[i].length == 0)
+                continue;
+
+            File base = filesets[i].getDir(getProject());
+            Resource [] setResources = resources[i];
+
+            for (int j = 0; j < setResources.length; j++)
+            {
+                File manifestFile = 
+                    fileUtils.resolveFile(base, setResources[j].getName() + ".manifest");
+                if (manifestFile.exists())
+                    manifestFiles.add(manifestFile);
+            }
+        }
+
+        return resources;
+    }
+
+    /**
+     * Step #2: Override Jar.initZipOutputStream to inject manifest sections.  This is done
+     * by treating them as if they were 'inline' entries, from a <jar> task perspective.
+     */
+    protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException 
+    {
+        if (manifestFiles.size() != 0)
+        {
+            //
+            // Create a default (empty) manifest
+            //
+            Manifest mergeManifest = Manifest.getDefaultManifest();
+
+            //
+            // Iterate through each found manifest file, merging its contents into the
+            // merge manifest
+            //
+            for (File manifestFile : manifestFiles)
+            {
+                FileInputStream fis = null;
+                try
+                {
+                    fis = new FileInputStream(manifestFile);
+                    Manifest resourceManifest = new Manifest(new InputStreamReader(fis));
+                    mergeManifest.merge(resourceManifest);
+                }
+                catch (IOException ioe)
+                {
+                    throw new BuildException("Unable to read manifest file:" + manifestFile, ioe);
+                }
+                catch (ManifestException me)
+                {
+                    throw new BuildException("Unable to process manifest file: "+ manifestFile, me);
+                }
+                finally 
+                {
+                    if (fis != null) fis.close();
+                }
+            }
+
+            //
+            // Set the merge manifest as the 'configured' manifest.   This will treat its
+            // contents as if they had been included inline with the <jar> task, with
+            // similar precedence rules.
+            //
+            try
+            {
+                addConfiguredManifest(mergeManifest);
+            }
+            catch (ManifestException me)
+            {
+                throw new BuildException("Unable to add new manifest entries:" + me);
+            }
+        }
+
+        super.initZipOutputStream(zOut);
+    }
+
+    protected void addToManifest(Manifest jarManifest, List<File> mergeList)
+    {
+    }
+
+    /**
+     * Reset the manifest file list to be empty
+     */
+    protected void cleanUp()
+    {
+        manifestFiles = new Vector<File>();
+    }
+
+    /**
+     * Contains the set of manifest entries to merge into the JAR manifest
+     */
+    private List<File> manifestFiles = new Vector<File>();
+}

Propchange: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/packaging/ControlJarTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/bean/ControlFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: beehive/trunk/controls/src/spi/org/apache/beehive/controls/spi/bean/JavaControlFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/build.xml?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/test/build.xml (original)
+++ beehive/trunk/controls/test/build.xml Sat May 13 06:14:42 2006
@@ -183,6 +183,11 @@
 
     <target name="clean" description="Clean the control tests">
         <delete dir="${build.dir}"/>
+        <delete dir="tools/ant/build"/>
+        <delete dir="tools/mantis/build"/>
+        <delete dir="tools/mantis/deploy"/>
+        <delete dir="tools/tch/build"/>
+        <delete dir="tools/tch/stubs"/>
         <delete dir="${mantis.tch.log.dir}"/>
         <delete dir="${mantis.tch.cases.dir}"/>
         <delete dir="${mantis.milton.log.dir}"/>

Propchange: beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/serialization/HelloControlChildImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControl.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControl.java (original)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControl.java Sat May 13 06:14:42 2006
@@ -1,69 +1,69 @@
-/*
- * 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.controls.test.controls.composition;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.beehive.controls.api.bean.ControlInterface;
-import org.apache.beehive.controls.api.events.EventSet;
-import org.apache.beehive.controls.api.properties.PropertySet;
-
-/**
- * A control interface designed to test control composition
- */
-@ControlInterface
-public interface InnerControl
-{
-	static final String DEFAULT_NAME="Bob";
-	static final String DEFAULT_JOB="cleaner";
-
-    @PropertySet
-    @Target( {ElementType.TYPE, ElementType.FIELD} )
-    @Retention(RetentionPolicy.RUNTIME)
-    public @interface Identity {
-        public String name() default DEFAULT_NAME;
-        //does not have a default value assigned
-		public String job();
-        public int rank() default 0;
-    }
-
-    @EventSet(unicast=true)
-    public interface Activity {
-        void wakeup();
-        int readMessage(String message);
-        String report();
-    }
-
-    @EventSet(unicast=true)
-    public interface Action {
-        public Object[] shopping (double credit);
-        public void doStuff(String value);
-    }
-
-	public void fireAllEvents();
-    public void fireEvent(String eventSet, String eventName);
-
-	/*Gets property value from context*/
-    public String getNameFromContext();
-
-    /*Gets property value from context*/
-    public String getJobFromContext();
-}
+/*
+ * 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.controls.test.controls.composition;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.events.EventSet;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A control interface designed to test control composition
+ */
+@ControlInterface
+public interface InnerControl
+{
+	static final String DEFAULT_NAME="Bob";
+	static final String DEFAULT_JOB="cleaner";
+
+    @PropertySet
+    @Target( {ElementType.TYPE, ElementType.FIELD} )
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface Identity {
+        public String name() default DEFAULT_NAME;
+        //does not have a default value assigned
+		public String job();
+        public int rank() default 0;
+    }
+
+    @EventSet(unicast=true)
+    public interface Activity {
+        void wakeup();
+        int readMessage(String message);
+        String report();
+    }
+
+    @EventSet(unicast=true)
+    public interface Action {
+        public Object[] shopping (double credit);
+        public void doStuff(String value);
+    }
+
+	public void fireAllEvents();
+    public void fireEvent(String eventSet, String eventName);
+
+	/*Gets property value from context*/
+    public String getNameFromContext();
+
+    /*Gets property value from context*/
+    public String getJobFromContext();
+}

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

Modified: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlEventListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlEventListener.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlEventListener.java (original)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlEventListener.java Sat May 13 06:14:42 2006
@@ -1,112 +1,112 @@
-/*
- * 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.controls.test.controls.composition;
-
-/**
- * A listener class for event raised by InnerControl
- */
-public class InnerControlEventListener
-    implements InnerControl.Activity,
-    InnerControl.Action,
-    java.io.Serializable {
-
-	private boolean wakeupReceived=false;
-	private boolean readMessageReceived=false;
-	private boolean reportReceived=false;
-	private boolean shoppingReceived=false;
-	private boolean doStuffReceived=false;
-
-	/*
-	 * BUG!!?? although the event declares methods wakeup, readMessage and
-	 * report using default accessor,
-	 * implmentation must change the method accessor to public,
-	 * or, a compile error!
-	 *
-	 *  attempting to assign weaker access privileges; was public
-     * [apt]     void wakeup(){wakeupReceived=true;}
-     *
-	 */
-
-	public void wakeup(){
-        wakeupReceived=true;
-    }
-
-    public int readMessage(String message){
-		readMessageReceived=true;
-		return 0;
-    }
-
-    public String report(){
-		reportReceived=true;
-		return "a report from event listener";
-    }
-
-    public Object[] shopping (double credit){
-		shoppingReceived=true;
-		//return (Object){"clothes","shoes","food"};
-		return null;
-    }
-
-    public void doStuff(String value){
-		doStuffReceived=true;
-    }
-
-	public boolean getWakeupResult(){
-        return wakeupReceived;
-    }
-
-	public boolean getReadMessageResult(){
-        return readMessageReceived;
-    }
-
-	public boolean getReportResult(){
-        return reportReceived;
-    }
-
-	public boolean getShoppingResult(){
-        return shoppingReceived;
-    }
-
-	public boolean getDoStuffResult(){
-        return doStuffReceived;
-    }
-
-	/**
-     * Checks all the event records and returns '0' if all the events have been received.
-	 */
-	public String getFinalResult(){
-
-		String result="";
-
-		if (!wakeupReceived)
-			result="WakeUp not received.";
-		if (!readMessageReceived)
-			result=result+"readMessage not received.";
-		if (!reportReceived)
-			result=result+"report not received.";
-		if (!shoppingReceived)
-			result=result+"shopping not received.";
-		if (!doStuffReceived)
-			result=result+"dostuff not received.";
-
-		if (result.length()==0)
-			result="0";
-
-		return result;
-	}
-}
+/*
+ * 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.controls.test.controls.composition;
+
+/**
+ * A listener class for event raised by InnerControl
+ */
+public class InnerControlEventListener
+    implements InnerControl.Activity,
+    InnerControl.Action,
+    java.io.Serializable {
+
+	private boolean wakeupReceived=false;
+	private boolean readMessageReceived=false;
+	private boolean reportReceived=false;
+	private boolean shoppingReceived=false;
+	private boolean doStuffReceived=false;
+
+	/*
+	 * BUG!!?? although the event declares methods wakeup, readMessage and
+	 * report using default accessor,
+	 * implmentation must change the method accessor to public,
+	 * or, a compile error!
+	 *
+	 *  attempting to assign weaker access privileges; was public
+     * [apt]     void wakeup(){wakeupReceived=true;}
+     *
+	 */
+
+	public void wakeup(){
+        wakeupReceived=true;
+    }
+
+    public int readMessage(String message){
+		readMessageReceived=true;
+		return 0;
+    }
+
+    public String report(){
+		reportReceived=true;
+		return "a report from event listener";
+    }
+
+    public Object[] shopping (double credit){
+		shoppingReceived=true;
+		//return (Object){"clothes","shoes","food"};
+		return null;
+    }
+
+    public void doStuff(String value){
+		doStuffReceived=true;
+    }
+
+	public boolean getWakeupResult(){
+        return wakeupReceived;
+    }
+
+	public boolean getReadMessageResult(){
+        return readMessageReceived;
+    }
+
+	public boolean getReportResult(){
+        return reportReceived;
+    }
+
+	public boolean getShoppingResult(){
+        return shoppingReceived;
+    }
+
+	public boolean getDoStuffResult(){
+        return doStuffReceived;
+    }
+
+	/**
+     * Checks all the event records and returns '0' if all the events have been received.
+	 */
+	public String getFinalResult(){
+
+		String result="";
+
+		if (!wakeupReceived)
+			result="WakeUp not received.";
+		if (!readMessageReceived)
+			result=result+"readMessage not received.";
+		if (!reportReceived)
+			result=result+"report not received.";
+		if (!shoppingReceived)
+			result=result+"shopping not received.";
+		if (!doStuffReceived)
+			result=result+"dostuff not received.";
+
+		if (result.length()==0)
+			result="0";
+
+		return result;
+	}
+}

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

Modified: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlImpl.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlImpl.java (original)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/InnerControlImpl.java Sat May 13 06:14:42 2006
@@ -1,83 +1,83 @@
-/*
- * 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.controls.test.controls.composition;
-
-import org.apache.beehive.controls.api.bean.ControlImplementation;
-import org.apache.beehive.controls.api.events.Client;
-import org.apache.beehive.controls.api.context.Context;
-import org.apache.beehive.controls.api.context.ControlBeanContext;
-
-/*
- * A control impl to test control composition.
- * This control shall be instantiated by another control.
- */
-@ControlImplementation
-public class InnerControlImpl
-    implements InnerControl, java.io.Serializable {
-
-    @Context
-    ControlBeanContext context;
-
-    @Client
-    Activity activity;
-
-    @Client
-    Action action;
-
-    /*Gets property value from context*/
-    public String getNameFromContext(){
-        Identity identity = context.getControlPropertySet(InnerControl.Identity.class);
-        return identity.name();
-    }
-
-    /*Gets property value from context*/
-    public String getJobFromContext(){
-        Identity identity = context.getControlPropertySet(InnerControl.Identity.class);
-        return identity.job();
-    }
-    
-    public void fireEvent(String eventSet, String eventName){
-    	
-    	if ((eventSet!=null)&&(eventName!=null)){
-    	
-    		if (eventSet.equalsIgnoreCase("Activity")){
-    			if (eventName.equalsIgnoreCase("wakeup"))
-    				activity.wakeup();
-    			else if(eventName.equalsIgnoreCase("readMessage"))
-    				activity.readMessage("message from nested control");
-    			else if(eventName.equalsIgnoreCase("report"))
-    				activity.report();    			
-    		}
-    		else if (eventSet.equalsIgnoreCase("Action")){
-    		    	if (eventName.equalsIgnoreCase("shopping"))
-		    		action.shopping(999.99d);
-		    	else if(eventName.equalsIgnoreCase("doStuff"))
-		    		action.doStuff("stuff to do");
-    		}
-    	}
-    	
-    }
-
-    public void fireAllEvents(){
-    	activity.wakeup();
-        activity.readMessage("message from nested control");
-        activity.report();
-        action.shopping(999.99d);
-        action.doStuff("stuff to do");
-    }
-}
+/*
+ * 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.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.events.Client;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+
+/*
+ * A control impl to test control composition.
+ * This control shall be instantiated by another control.
+ */
+@ControlImplementation
+public class InnerControlImpl
+    implements InnerControl, java.io.Serializable {
+
+    @Context
+    ControlBeanContext context;
+
+    @Client
+    Activity activity;
+
+    @Client
+    Action action;
+
+    /*Gets property value from context*/
+    public String getNameFromContext(){
+        Identity identity = context.getControlPropertySet(InnerControl.Identity.class);
+        return identity.name();
+    }
+
+    /*Gets property value from context*/
+    public String getJobFromContext(){
+        Identity identity = context.getControlPropertySet(InnerControl.Identity.class);
+        return identity.job();
+    }
+    
+    public void fireEvent(String eventSet, String eventName){
+    	
+    	if ((eventSet!=null)&&(eventName!=null)){
+    	
+    		if (eventSet.equalsIgnoreCase("Activity")){
+    			if (eventName.equalsIgnoreCase("wakeup"))
+    				activity.wakeup();
+    			else if(eventName.equalsIgnoreCase("readMessage"))
+    				activity.readMessage("message from nested control");
+    			else if(eventName.equalsIgnoreCase("report"))
+    				activity.report();    			
+    		}
+    		else if (eventSet.equalsIgnoreCase("Action")){
+    		    	if (eventName.equalsIgnoreCase("shopping"))
+		    		action.shopping(999.99d);
+		    	else if(eventName.equalsIgnoreCase("doStuff"))
+		    		action.doStuff("stuff to do");
+    		}
+    	}
+    	
+    }
+
+    public void fireAllEvents(){
+    	activity.wakeup();
+        activity.readMessage("message from nested control");
+        activity.report();
+        action.shopping(999.99d);
+        action.doStuff("stuff to do");
+    }
+}

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

Modified: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java?rev=406090&r1=406089&r2=406090&view=diff
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java (original)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/OuterControl.java Sat May 13 06:14:42 2006
@@ -1,74 +1,74 @@
-/*
- * 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.controls.test.controls.composition;
-
-import org.apache.beehive.controls.api.bean.ControlInterface;
-import org.apache.beehive.controls.api.events.EventSet;
-
-/**
- * A control interface to test control composition.
- */
-@ControlInterface
-public interface OuterControl {
-
-    @EventSet(unicast=true)
-    public interface OuterEvents {
-        int report(String message);
-    }
-
-    public void fireOuterEvents(String message);
-
-	public InnerControlBean getDeclaredNestedControl();
-	public InnerControlBean getDeclaredNestedControl2();
-	public InnerControlBean instantiateNestedControlProgrammatically();
-	public InnerControlBean instantiateNestedControlWithProperty();
-
-	/*
-	 * Test outer control receiving event from nested control using
-	 * EventHandler.
-	 */
-	public String testActivityWakeup();
-	public String testActivityReadMessage();
-	public String testActivityReport();
-	public String testActionShopping();
-	public String testActionDostuff();
-
-	/*
-	 * Tests outer control receiving event from nested control using
-	 * event listener. The nested control is instantiated programmatically
-	 */
-	public String testEventListener();
-
-	/*
-	 * Tests outer control receiving event from nested control using
-	 * event listener. The nested control is instantiated decalratively
-	 */
-	public String testEventListenerByDeclare();
-
-	/*
-	 * Tests outer control receiving event from nested control using
-	 * inner class listener. The nested control is instantiated programmatically
-	 */
-	public String testInnerClassListener();
-
-	/*
-	 * Tests outer control receiving event from nested control using
-	 * inner class listener. The nested control is instantiated decalratively
-	 */
-	public String testInnerClassListenerByDeclare();
-}
+/*
+ * 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.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.events.EventSet;
+
+/**
+ * A control interface to test control composition.
+ */
+@ControlInterface
+public interface OuterControl {
+
+    @EventSet(unicast=true)
+    public interface OuterEvents {
+        int report(String message);
+    }
+
+    public void fireOuterEvents(String message);
+
+	public InnerControlBean getDeclaredNestedControl();
+	public InnerControlBean getDeclaredNestedControl2();
+	public InnerControlBean instantiateNestedControlProgrammatically();
+	public InnerControlBean instantiateNestedControlWithProperty();
+
+	/*
+	 * Test outer control receiving event from nested control using
+	 * EventHandler.
+	 */
+	public String testActivityWakeup();
+	public String testActivityReadMessage();
+	public String testActivityReport();
+	public String testActionShopping();
+	public String testActionDostuff();
+
+	/*
+	 * Tests outer control receiving event from nested control using
+	 * event listener. The nested control is instantiated programmatically
+	 */
+	public String testEventListener();
+
+	/*
+	 * Tests outer control receiving event from nested control using
+	 * event listener. The nested control is instantiated decalratively
+	 */
+	public String testEventListenerByDeclare();
+
+	/*
+	 * Tests outer control receiving event from nested control using
+	 * inner class listener. The nested control is instantiated programmatically
+	 */
+	public String testInnerClassListener();
+
+	/*
+	 * Tests outer control receiving event from nested control using
+	 * inner class listener. The nested control is instantiated decalratively
+	 */
+	public String testInnerClassListenerByDeclare();
+}

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