You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2006/03/10 05:08:32 UTC
svn commit: r384698 - in /incubator/tuscany/java:
sca/container.java/src/test/java/org/apache/tuscany/container/java/mock/
sca/core/src/test/java/org/apache/tuscany/core/mock/
sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/
sdo/impl/src...
Author: jboynes
Date: Thu Mar 9 20:08:30 2006
New Revision: 384698
URL: http://svn.apache.org/viewcvs?rev=384698&view=rev
Log:
cosmetic - remove import * that crept in with bad ide settings
Modified:
incubator/tuscany/java/sca/container.java/src/test/java/org/apache/tuscany/container/java/mock/MockFactory.java
incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java
incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java
incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java
Modified: incubator/tuscany/java/sca/container.java/src/test/java/org/apache/tuscany/container/java/mock/MockFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/container.java/src/test/java/org/apache/tuscany/container/java/mock/MockFactory.java?rev=384698&r1=384697&r2=384698&view=diff
==============================================================================
--- incubator/tuscany/java/sca/container.java/src/test/java/org/apache/tuscany/container/java/mock/MockFactory.java (original)
+++ incubator/tuscany/java/sca/container.java/src/test/java/org/apache/tuscany/container/java/mock/MockFactory.java Thu Mar 9 20:08:30 2006
@@ -23,6 +23,10 @@
import java.util.Set;
import junit.framework.Assert;
+import org.osoa.sca.annotations.ComponentName;
+import org.osoa.sca.annotations.Context;
+import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Init;
import org.apache.tuscany.container.java.assembly.JavaAssemblyFactory;
import org.apache.tuscany.container.java.assembly.JavaImplementation;
@@ -70,17 +74,25 @@
import org.apache.tuscany.core.system.builder.SystemEntryPointBuilder;
import org.apache.tuscany.core.system.builder.SystemExternalServiceBuilder;
import org.apache.tuscany.core.system.context.SystemAggregateContextImpl;
-import org.apache.tuscany.model.assembly.*;
+import org.apache.tuscany.model.assembly.AggregatePart;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.Component;
+import org.apache.tuscany.model.assembly.ComponentType;
+import org.apache.tuscany.model.assembly.ConfiguredReference;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.tuscany.model.assembly.ExternalService;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.Reference;
+import org.apache.tuscany.model.assembly.Scope;
+import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.SimpleComponent;
import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
import org.apache.tuscany.model.types.java.JavaServiceContract;
-import org.osoa.sca.annotations.ComponentName;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
/**
* Generates test components, modules, and runtime artifacts
- *
+ *
* @version $Rev$ $Date$
*/
public class MockFactory {
@@ -103,9 +115,9 @@
/**
* Creates an initialized simple component
- *
- * @param name the component name
- * @param type the implementation type
+ *
+ * @param name the component name
+ * @param type the implementation type
* @param scope the component scope
*/
public static SimpleComponent createComponent(String name, Class type, Scope scope) {
@@ -228,11 +240,11 @@
/**
* Creates an entry point wired to the given target (e.g. component, external service) using the system binding
- *
- * @param name the name of the entry point
+ *
+ * @param name the name of the entry point
* @param interfaz the inteface exposed by the entry point
- * @param refName the name of the entry point reference
- * @param target the target the entry point is wired to
+ * @param refName the name of the entry point reference
+ * @param target the target the entry point is wired to
*/
public static EntryPoint createEPSystemBinding(String name, Class interfaz, String refName, AggregatePart target) {
JavaServiceContract contract = systemFactory.createJavaServiceContract();
@@ -383,12 +395,12 @@
/**
* Creates a module with an entry point named "source" configured with the {@link FooBinding} wired to a service
* offered by a Java-based component named "target"
- *
+ *
* @param scope the scope of the target service
*/
public static Module createModuleWithEntryPoint(Scope scope) {
EntryPoint sourceEP = createFooBindingEntryPoint("source", HelloWorldService.class);
- Component targetComponent = createComponent("target", HelloWorldImpl.class, scope);
+ Component targetComponent = createComponent("target", HelloWorldImpl.class, scope);
Service targetService = factory.createService();
JavaServiceContract targetContract = factory.createJavaServiceContract();
@@ -420,12 +432,11 @@
module.initialize(assemblyContext);
return module;
}
-
-
-
+
+
/**
* Creates a test system module with source and target components wired together.
- *
+ *
* @see org.apache.tuscany.core.mock.component.Source
* @see org.apache.tuscany.core.mock.component.Target
*/
@@ -506,8 +517,8 @@
cReference3.initialize(assemblyContext);
source.getConfiguredReferences().add(cReference3);
source.initialize(assemblyContext);
-
-
+
+
Module module = systemFactory.createModule();
module.setName("system.module");
@@ -530,14 +541,14 @@
/**
* Creates an aggregate runtime configuration
- *
- * @param name the name of the component
+ *
+ * @param name the name of the component
* @param aggregateContext the containing aggregate context
* @throws BuilderException
* @see RuntimeConfiguration
*/
public static RuntimeConfiguration<InstanceContext> createAggregateConfiguration(String name,
- AggregateContext aggregateContext) throws BuilderException {
+ AggregateContext aggregateContext) throws BuilderException {
Component sc = createAggregateComponent(name);
SystemComponentContextBuilder builder = new SystemComponentContextBuilder();
@@ -547,15 +558,15 @@
/**
* Creates a Java POJO component context
- *
- * @param name the name of the context
- * @param implType the POJO class
- * @param scope the component scope
+ *
+ * @param name the name of the context
+ * @param implType the POJO class
+ * @param scope the component scope
* @param moduleComponentContext the containing aggregate context
* @throws NoSuchMethodException if the POJO does not have a default noi-args constructor
*/
public static JavaComponentContext createPojoContext(String name, Class implType, Scope scope,
- AggregateContext moduleComponentContext) throws NoSuchMethodException {
+ AggregateContext moduleComponentContext) throws NoSuchMethodException {
SimpleComponent component = createComponent(name, implType, scope);
Set<Field> fields = JavaIntrospectionHelper.getAllFields(implType);
@@ -608,7 +619,7 @@
/**
* Creates a default {@link RuntimeContext} configured with support for Java component implementations
- *
+ *
* @throws ConfigurationException
*/
public static RuntimeContext createJavaRuntime() throws ConfigurationException {
@@ -624,7 +635,7 @@
/**
* Registers the {@link FooBinding} builders with a given runtime
- *
+ *
* @throws ConfigurationException
*/
public static RuntimeContext registerFooBinding(RuntimeContext runtime) throws ConfigurationException {
Modified: incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java?rev=384698&r1=384697&r2=384698&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java (original)
+++ incubator/tuscany/java/sca/core/src/test/java/org/apache/tuscany/core/mock/MockFactory.java Thu Mar 9 20:08:30 2006
@@ -36,13 +36,25 @@
import org.apache.tuscany.core.system.builder.SystemEntryPointBuilder;
import org.apache.tuscany.core.system.builder.SystemExternalServiceBuilder;
import org.apache.tuscany.core.system.context.SystemAggregateContextImpl;
-import org.apache.tuscany.model.assembly.*;
+import org.apache.tuscany.model.assembly.AggregatePart;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.Component;
+import org.apache.tuscany.model.assembly.ComponentType;
+import org.apache.tuscany.model.assembly.ConfiguredReference;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.tuscany.model.assembly.ExternalService;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.Reference;
+import org.apache.tuscany.model.assembly.Scope;
+import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.SimpleComponent;
import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
import org.apache.tuscany.model.types.java.JavaServiceContract;
/**
* Generates test components, modules, and runtime artifacts
- *
+ *
* @version $Rev$ $Date$
*/
public class MockFactory {
@@ -128,10 +140,10 @@
/**
* Creates a basic entry point with no configured reference using the system binding
- *
- * @param name the name of the entry point
+ *
+ * @param name the name of the entry point
* @param interfaz the inteface exposed by the entry point
- * @param refName the name of the entry point reference
+ * @param refName the name of the entry point reference
*/
public static EntryPoint createEPSystemBinding(String name, Class interfaz, String refName) {
return createEPSystemBinding(name, interfaz, refName, null);
@@ -139,11 +151,11 @@
/**
* Creates an entry point wired to the given target (e.g. component, external service) using the system binding
- *
- * @param name the name of the entry point
+ *
+ * @param name the name of the entry point
* @param interfaz the inteface exposed by the entry point
- * @param refName the name of the entry point reference
- * @param target the target the entry point is wired to
+ * @param refName the name of the entry point reference
+ * @param target the target the entry point is wired to
*/
public static EntryPoint createEPSystemBinding(String name, Class interfaz, String refName, AggregatePart target) {
JavaServiceContract contract = systemFactory.createJavaServiceContract();
@@ -193,10 +205,10 @@
/**
* Creates an entry point that should be wired to the given target (e.g. component, external service) using the
* system binding. The system assembly process should resolve the target name to an actual target configuration.
- *
- * @param name the name of the entry point
- * @param interfaz the inteface exposed by the entry point
- * @param refName the name of the entry point reference
+ *
+ * @param name the name of the entry point
+ * @param interfaz the inteface exposed by the entry point
+ * @param refName the name of the entry point reference
* @param componentName the name of the target to resolve
*/
public static EntryPoint createEntryPointWithStringRef(String name, Class interfaz, String refName, String componentName) {
@@ -285,7 +297,7 @@
/**
* Creates a test system module with source and target components wired together.
- *
+ *
* @see org.apache.tuscany.core.mock.component.Source
* @see org.apache.tuscany.core.mock.component.Target
*/
@@ -371,8 +383,8 @@
cReference3.initialize(assemblyContext);
source.getConfiguredReferences().add(cReference3);
source.initialize(assemblyContext);
-
-
+
+
Module module = systemFactory.createModule();
module.setName("system.module");
@@ -422,10 +434,10 @@
builders.add(new SystemExternalServiceBuilder());
return builders;
}
-
+
/**
* Creates a default {@link RuntimeContext} configured with support for Java component implementations
- *
+ *
* @throws ConfigurationException
*/
public static RuntimeContext createCoreRuntime() throws ConfigurationException {
Modified: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java?rev=384698&r1=384697&r2=384698&view=diff
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java (original)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java Thu Mar 9 20:08:30 2006
@@ -22,18 +22,28 @@
import java.util.List;
import java.util.Map;
-import org.apache.tuscany.model.assembly.*;
+import org.apache.tuscany.model.assembly.AssemblyFactory;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
+import org.apache.tuscany.model.assembly.Component;
+import org.apache.tuscany.model.assembly.ComponentImplementation;
+import org.apache.tuscany.model.assembly.ComponentType;
+import org.apache.tuscany.model.assembly.ConfiguredProperty;
+import org.apache.tuscany.model.assembly.ConfiguredReference;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.Reference;
+import org.apache.tuscany.model.assembly.Service;
/**
* An implementation of Component.
*/
public abstract class ComponentImpl extends AggregatePartImpl implements Component {
- private List<ConfiguredReference> configuredReferences=new ArrayList<ConfiguredReference>();
+ private List<ConfiguredReference> configuredReferences = new ArrayList<ConfiguredReference>();
private Map<String, ConfiguredReference> configuredReferencesMap;
- private List<ConfiguredService> configuredServices=new ArrayList<ConfiguredService>();
+ private List<ConfiguredService> configuredServices = new ArrayList<ConfiguredService>();
private Map<String, ConfiguredService> configuredServicesMap;
- private List<ConfiguredProperty> configuredProperties=new ArrayList<ConfiguredProperty>();
+ private List<ConfiguredProperty> configuredProperties = new ArrayList<ConfiguredProperty>();
private Map<String, ConfiguredProperty> configuredPropertiesMap;
private ComponentImplementation implementation;
@@ -49,7 +59,7 @@
*/
public void setComponentImplementation(ComponentImplementation value) {
checkNotFrozen();
- implementation=value;
+ implementation = value;
}
/**
@@ -122,7 +132,7 @@
configuredService.setPort(service);
configuredServices.add(configuredService);
configuredServicesMap.put(service.getName(), configuredService);
- ((ConfiguredPortImpl)configuredService).setAggregatePart(this);
+ ((ConfiguredPortImpl) configuredService).setAggregatePart(this);
configuredService.initialize(modelContext);
}
} else {
@@ -131,7 +141,7 @@
// the corresponding lists
for (ConfiguredService configuredService : configuredServices) {
configuredServicesMap.put(configuredService.getService().getName(), configuredService);
- ((ConfiguredPortImpl)configuredService).setAggregatePart(this);
+ ((ConfiguredPortImpl) configuredService).setAggregatePart(this);
configuredService.initialize(modelContext);
}
@@ -150,7 +160,7 @@
configuredReferencesMap = new HashMap<String, ConfiguredReference>(configuredReferences.size());
for (ConfiguredReference configuredReference : configuredReferences) {
String name = configuredReference.getName();
- ((ConfiguredPortImpl)configuredReference).setAggregatePart(this);
+ ((ConfiguredPortImpl) configuredReference).setAggregatePart(this);
Reference reference = componentType.getReference(name);
configuredReference.setReference(reference);
configuredReference.initialize(modelContext);
@@ -167,13 +177,13 @@
super.freeze();
// Freeze configured services, references and properties
- configuredServices=Collections.unmodifiableList(configuredServices);
+ configuredServices = Collections.unmodifiableList(configuredServices);
freeze(configuredServices);
- configuredReferences=Collections.unmodifiableList(configuredReferences);
+ configuredReferences = Collections.unmodifiableList(configuredReferences);
freeze(configuredReferences);
- configuredProperties=Collections.unmodifiableList(configuredProperties);
+ configuredProperties = Collections.unmodifiableList(configuredProperties);
freeze(configuredProperties);
- if (implementation!=null)
+ if (implementation != null)
implementation.freeze();
}
@@ -190,7 +200,7 @@
return false;
if (!accept(configuredProperties, visitor))
return false;
- if (implementation!=null) {
+ if (implementation != null) {
if (!implementation.accept(visitor))
return false;
}
Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java?rev=384698&r1=384697&r2=384698&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java (original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java Thu Mar 9 20:08:30 2006
@@ -21,7 +21,10 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
import org.objectweb.asm.ClassWriter;
-import static org.objectweb.asm.Opcodes.*;
+import static org.objectweb.asm.Opcodes.ACC_ABSTRACT;
+import static org.objectweb.asm.Opcodes.ACC_INTERFACE;
+import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
+import static org.objectweb.asm.Opcodes.V1_5;
import org.apache.tuscany.sdo.SDOTypeVisitor;
Modified: incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java?rev=384698&r1=384697&r2=384698&view=diff
==============================================================================
--- incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java (original)
+++ incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java Thu Mar 9 20:08:30 2006
@@ -16,7 +16,9 @@
*/
package org.osoa.sca.annotations;
-import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;