-
-* Styling of the site based on http://svn.apache.org/repos/asf/maven/skins/tags/maven-stylus-skin-1.2
+* Add and test the JtaRequestCycle.
+* Rename packages under test to org.wamblee.test.general/persistence/jndi
+* Add JTA testing support to the test lib.
* DatabaseUtils: deletion of tables must be more generic
First drop all constraints then drop all tables.
Or use JPA to drop the tables but that is a short-term solution
-* Get rid of use of detached objects in security
- - Use only basic types in UserAdministration
- - Put API in separate package
-* add cdi subproject
+
* update mythtv project for java ee 6
* reimplement photos application using wicket
* change tracking for all projects with changes plugin
-* complete presentation of all wamblee stuff on wamblee.org.
-* maven sites for each subproject accessible through wamblee.org
* overview pages for separate areas
* create user mgt application
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
-#Wed Jul 14 20:45:46 CEST 2010
+#Sat Jul 17 14:01:46 CEST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
* 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.wamblee.system.adapters;
import org.wamblee.collections.CollectionFilter;
public boolean matches(Constructor<?> aObject) {
if (!publicOnly) {
return true;
- } else {
- return Modifier.isPublic(aObject.getModifiers());
}
+ return Modifier.isPublic(aObject.getModifiers());
}
});
*/
package org.wamblee.system.adapters;
-import org.wamblee.collections.CollectionFilter;
-
-import org.wamblee.conditions.Condition;
-import org.wamblee.conditions.FixedCondition;
-
-import org.wamblee.general.Pair;
-
-import org.wamblee.reflection.ReflectionUtils;
-
-import org.wamblee.system.core.DefaultProvidedInterface;
-import org.wamblee.system.core.DefaultRequiredInterface;
-import org.wamblee.system.core.ProvidedInterface;
-import org.wamblee.system.core.RequiredInterface;
-import org.wamblee.system.core.Scope;
-import org.wamblee.system.core.SystemAssemblyException;
-
-import java.awt.CompositeContext;
-
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Set;
+
+import org.wamblee.collections.CollectionFilter;
+import org.wamblee.conditions.Condition;
+import org.wamblee.reflection.ReflectionUtils;
+import org.wamblee.system.core.RequiredInterface;
+import org.wamblee.system.core.Scope;
+import org.wamblee.system.core.SystemAssemblyException;
/**
* Represents the configuration for exposing the setters of a class as required
}
if (result.size() > 1) {
- StringBuffer setters = new StringBuffer();
+ StringBuffer settersString = new StringBuffer();
for (Method method : result) {
- setters.append((method.getName() + " "));
+ settersString.append((method.getName() + " "));
}
throw new IllegalArgumentException(
"Multiple setters found in class '" + clazz.getName() +
- " that accept type '" + aType.getName() + "': " + setters);
+ " that accept type '" + aType.getName() + "': " + settersString);
}
Method method = result.get(0);
if (remaining.get().size() > 0) {
StringBuffer notProvided = new StringBuffer();
- for (ProvidedInterface provided : remaining.get()) {
+ for (ProvidedInterface providedIntf : remaining.get()) {
notProvided.append("\nComponent " + getQualifiedName() +
- " did not start interface " + provided);
+ " did not start interface " + providedIntf);
}
throw new SystemAssemblyException(notProvided.toString());
}
public ProvidedInterface findProvidedInterface(String aName) {
- for (ProvidedInterface provided : getProvidedInterfaces()) {
- if (provided.getName().equals(aName)) {
- return provided;
+ for (ProvidedInterface providedIntf : getProvidedInterfaces()) {
+ if (providedIntf.getName().equals(aName)) {
+ return providedIntf;
}
}
}
public RequiredInterface findRequiredInterface(String aName) {
- for (RequiredInterface required : getRequiredInterfaces()) {
- if (required.getName().equals(aName)) {
- return required;
+ for (RequiredInterface requiredIntf : getRequiredInterfaces()) {
+ if (requiredIntf.getName().equals(aName)) {
+ return requiredIntf;
}
}
* 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.wamblee.system.core;
import java.util.ArrayList;
}
return null;
- } else {
- return providedIntf.getImplementation(aType);
}
+ return providedIntf.getImplementation(aType);
}
}
*/
package org.wamblee.system.core;
-import java.util.Collection;
/**
* Represents an interface provided by a component. Different component objects
* Visitor.
*/
public void accept(Visitor aVisitor) {
- List<Node> nodes = getNodes(); // copy to make sure the visitor can
+ List<Node> allNodes = getNodes(); // copy to make sure the visitor can
// modify the
// list of nodes as part of the loop.
- List<Edge> edges = getEdges(); // copy ..... (see above).
+ List<Edge> allEdges = getEdges(); // copy ..... (see above).
- for (Node node : nodes) {
+ for (Node node : allNodes) {
aVisitor.visitNode(node);
}
- for (Edge edge : edges) {
+ for (Edge edge : allEdges) {
aVisitor.visitEdge(edge);
}
}
* 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.wamblee.system.graph.component;
import org.wamblee.system.graph.Edge;
.getName()))) {
// to part matches also
return false;
- } else {
- // From matches and to doesn't so edgefilter is violated.
- return true;
}
- } else {
- // From part does not match, restriction does not apply.
- return false;
+ // From matches and to doesn't so edgefilter is violated.
+ return true;
}
+ // From part does not match, restriction does not apply.
+ return false;
}
}
import org.wamblee.system.core.ProvidedInterface;
import org.wamblee.system.core.SystemAssemblyException;
-import org.wamblee.system.graph.DefaultEdge;
import org.wamblee.system.graph.Edge;
import org.wamblee.system.graph.Node;
import org.wamblee.system.graph.Visitor;
*/
package org.wamblee.system.graph.component;
-import org.wamblee.system.core.Component;
-import org.wamblee.system.core.ProvidedInterface;
-import org.wamblee.system.core.RequiredInterface;
import org.wamblee.system.container.Container;
import org.wamblee.system.core.Component;
-import org.wamblee.system.core.DefaultProvidedInterface;
import org.wamblee.system.core.ProvidedInterface;
import org.wamblee.system.core.RequiredInterface;
-import org.wamblee.system.core.RequiredInterfaceComparator;
import org.wamblee.system.core.Scope;
-
import org.wamblee.test.AssertionUtils;
-import java.util.Collections;
-import java.util.List;
-
/**
*
* @author $author$
*/
package org.wamblee.system.container;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
import junit.framework.TestCase;
-import org.junit.internal.requests.IgnoredClassRunner;
import org.wamblee.general.Pair;
-
import org.wamblee.system.core.Component;
import org.wamblee.system.core.DefaultProvidedInterface;
import org.wamblee.system.core.DefaultRequiredInterface;
import org.wamblee.system.core.Scope;
import org.wamblee.system.core.StringComponent;
import org.wamblee.system.core.SystemAssemblyException;
-
import org.wamblee.test.AssertionUtils;
import org.wamblee.test.EventTracker;
-import java.io.Serializable;
-
-import java.util.ArrayList;
-import java.util.List;
-
/**
*
* @author $author$
*/
package org.wamblee.system.core;
-import org.wamblee.system.core.AbstractComponent;
-import org.wamblee.system.core.DefaultProvidedInterface;
-import org.wamblee.system.core.ProvidedInterface;
-import org.wamblee.system.core.RequiredInterface;
-
import org.wamblee.test.EventTracker;
-import javax.sql.DataSource;
-
/**
*
* @author $author$
*/
package org.wamblee.system.core;
-import org.wamblee.system.core.AbstractComponent;
-import org.wamblee.system.core.DefaultProvidedInterface;
-import org.wamblee.system.core.ProvidedInterface;
-import org.wamblee.system.core.RequiredInterface;
-
import org.wamblee.test.EventTracker;
-import javax.sql.DataSource;
-
/**
*
* @author $author$
*/
package org.wamblee.system.core;
-import org.wamblee.system.core.AbstractComponent;
-import org.wamblee.system.core.DefaultProvidedInterface;
-import org.wamblee.system.core.ProvidedInterface;
-import org.wamblee.system.core.RequiredInterface;
-
import org.wamblee.test.EventTracker;
-import javax.sql.DataSource;
-
/**
*
* @author $author$
public void testWrongEdgeType() {
EdgeFilter filter = new ConnectExternalProvidedProvidedFilter(
externalInterfaceName, internalComponentName, internalInterfaceName);
- DefaultEdge edge = new DefaultEdge(new DefaultNode("x"),
+ DefaultEdge edge1 = new DefaultEdge(new DefaultNode("x"),
new DefaultNode("y"));
- assertFalse(filter.isViolated(edge));
+ assertFalse(filter.isViolated(edge1));
}
}
}
public void testWrongEdgeType() {
- DefaultEdge edge = new DefaultEdge(new DefaultNode("x"),
+ DefaultEdge edge1 = new DefaultEdge(new DefaultNode("x"),
new DefaultNode("y"));
EdgeFilter filter = new ConnectRequiredExternallyRequiredEdgeFilter(
comp.getName(), comp.getRequiredInterfaces().get(0).getName(),
container.getRequiredInterfaces().get(0).getName());
- assertFalse(filter.isViolated(edge));
+ assertFalse(filter.isViolated(edge1));
}
}
*/
package org.wamblee.system.spring;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
-
import java.util.Properties;
+import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
+
/**
* Bean that provides postprocessing of the bean factory based on a given set of
* properties.
*/
package org.wamblee.system.spring.component;
-import org.springframework.core.io.ClassPathResource;
+import java.util.Properties;
-import org.springframework.jdbc.datasource.DriverManagerDataSource;
+import javax.sql.DataSource;
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.wamblee.system.components.ORMappingConfig;
import org.wamblee.system.components.ORMappingConfig.DatabaseType;
import org.wamblee.system.core.AbstractComponent;
import org.wamblee.system.core.ProvidedInterface;
import org.wamblee.system.core.RequiredInterface;
import org.wamblee.system.core.Scope;
-import org.wamblee.system.spring.SpringComponent;
-
-import java.io.IOException;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
-
-import javax.sql.DataSource;
/**
*
*
*
*/
- public DatasourceComponent(String aName) throws IOException {
+ public DatasourceComponent(String aName) {
super(aName);
addRequiredInterface(PROPS);
*/
package org.wamblee.system.spring.component;
-import org.hibernate.SessionFactory;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import javax.sql.DataSource;
+
+import org.hibernate.SessionFactory;
import org.hibernate.dialect.DerbyDialect;
import org.hibernate.dialect.MySQLInnoDBDialect;
-
import org.springframework.orm.hibernate3.HibernateTemplate;
-
import org.springframework.transaction.PlatformTransactionManager;
-
import org.wamblee.persistence.hibernate.HibernateMappingFiles;
-
import org.wamblee.system.components.ORMappingConfig;
import org.wamblee.system.components.ORMappingConfig.DatabaseType;
import org.wamblee.system.core.DefaultProvidedInterface;
import org.wamblee.system.core.Scope;
import org.wamblee.system.spring.SpringComponent;
-import java.io.IOException;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.sql.DataSource;
-
/**
*
* @author $author$
*
*
*/
- public HibernateComponent(String aName) throws IOException {
+ public HibernateComponent(String aName) {
super(aName, new String[] { HIBERNATE_SPRING_CONFIG },
createProvided(), createRequired());