diff --git a/.gitignore b/.gitignore
index 89bff9f..34f9ada 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
.classpath
+.project
+.settings/
target/
\ No newline at end of file
diff --git a/core/.project b/core/.project
index 404d1a4..1229eba 100644
--- a/core/.project
+++ b/core/.project
@@ -15,11 +15,6 @@
-
- org.springframework.ide.eclipse.core.springbuilder
-
-
- org.eclipse.wst.validation.validationbuilder
@@ -32,7 +27,6 @@
- org.springframework.ide.eclipse.core.springnatureorg.maven.ide.eclipse.maven2Natureorg.eclipse.jdt.core.javanatureorg.eclipse.wst.common.project.facet.core.nature
diff --git a/core/.settings/org.eclipse.jdt.core.prefs b/core/.settings/org.eclipse.jdt.core.prefs
index 21bc0b2..e33afb0 100644
--- a/core/.settings/org.eclipse.jdt.core.prefs
+++ b/core/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,9 @@
-#Wed Aug 05 19:23:44 CEST 2009
+#Wed Feb 15 21:22:56 CET 2012
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/core/.settings/org.eclipse.wst.common.component b/core/.settings/org.eclipse.wst.common.component
index 35c62cd..c03ab12 100644
--- a/core/.settings/org.eclipse.wst.common.component
+++ b/core/.settings/org.eclipse.wst.common.component
@@ -3,5 +3,7 @@
+
+
diff --git a/core/.settings/org.eclipse.wst.common.project.facet.core.xml b/core/.settings/org.eclipse.wst.common.project.facet.core.xml
index 16a4875..318363e 100644
--- a/core/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/core/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/core/pom.xml b/core/pom.xml
index 6735062..2b0888c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -23,6 +23,11 @@
spring-context${spring.version}
+
+ org.springframework
+ spring-aop
+ ${spring.version}
+ org.springframework
@@ -33,16 +38,4 @@
-
-
-
-
- maven-compiler-plugin
-
- 1.5
- 1.5
-
-
-
-
diff --git a/core/src/main/java/org/synyx/hera/core/MutablePluginRegistry.java b/core/src/main/java/org/synyx/hera/core/MutablePluginRegistry.java
index 064d771..960d919 100644
--- a/core/src/main/java/org/synyx/hera/core/MutablePluginRegistry.java
+++ b/core/src/main/java/org/synyx/hera/core/MutablePluginRegistry.java
@@ -1,53 +1,38 @@
/*
- * Copyright 2008-2010 the original author or authors.
- *
- * 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
- *
+ * Copyright 2008-2012 the original author or authors.
+ *
+ * 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.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.synyx.hera.core;
-import java.util.List;
-
-
/**
- * Extension of {@link PluginRegistry} with additional methods to modify the
- * registry.
+ * Extension of {@link PluginRegistry} with additional methods to modify the registry.
*
- * @author Oliver Gierke - gierke@synyx.de
+ * @author Oliver Gierke
*/
-public interface MutablePluginRegistry, S> extends
- PluginRegistry {
+public interface MutablePluginRegistry, S> extends PluginRegistry {
- /**
- * Register plugins.
- *
- * @param plugins the plugins to set
- */
- void setPlugins(List extends T> plugins);
+ /**
+ * Adds a given plugin to the registry.
+ *
+ * @param plugin must not be {@literal null}.
+ */
+ MutablePluginRegistry addPlugin(T plugin);
-
- /**
- * Adds a given plugin to the registry.
- *
- * @param plugin
- */
- MutablePluginRegistry addPlugin(T plugin);
-
-
- /**
- * Removes a given plugin from the registry.
- *
- * @param plugin
- */
- boolean removePlugin(T plugin);
+ /**
+ * Removes a given plugin from the registry.
+ *
+ * @param plugin must not be {@literal null}.
+ */
+ boolean removePlugin(T plugin);
}
diff --git a/core/src/main/java/org/synyx/hera/core/OrderAwarePluginRegistry.java b/core/src/main/java/org/synyx/hera/core/OrderAwarePluginRegistry.java
index 4879f55..76b8acf 100644
--- a/core/src/main/java/org/synyx/hera/core/OrderAwarePluginRegistry.java
+++ b/core/src/main/java/org/synyx/hera/core/OrderAwarePluginRegistry.java
@@ -1,21 +1,21 @@
/*
- * Copyright 2008-2010 the original author or authors.
- *
- * 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
- *
+ * Copyright 2008-2012 the original author or authors.
+ *
+ * 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.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.synyx.hera.core;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -23,192 +23,144 @@ import java.util.List;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.util.comparator.InvertibleComparator;
-
/**
- * {@link PluginRegistry} implementation that be made aware of a certain
- * ordering of {@link Plugin}s. By default it orders {@link Plugin}s by
- * regarding {@link org.springframework.core.Ordered} interface or
- * {@link org.springframework.core.annotation.Order} annotation. To alter
- * ordering behaviour use one of the factory methods accepting a
- * {@link Comparator} as parameter.
+ * {@link PluginRegistry} implementation that be made aware of a certain ordering of {@link Plugin}s. By default it
+ * orders {@link Plugin}s by regarding {@link org.springframework.core.Ordered} interface or
+ * {@link org.springframework.core.annotation.Order} annotation. To alter ordering behaviour use one of the factory
+ * methods accepting a {@link Comparator} as parameter.
*
- * @author Oliver Gierke - gierke@synyx.de
+ * @author Oliver Gierke
*/
-public class OrderAwarePluginRegistry, S> extends
- SimplePluginRegistry {
+public class OrderAwarePluginRegistry, S> extends SimplePluginRegistry {
- /**
- * Comparator regarding {@link org.springframework.core.Ordered} interface
- * or {@link org.springframework.core.annotation.Order} annotation.
- */
- @SuppressWarnings("unchecked")
- private static final Comparator
-
-
-
-
-
diff --git a/metadata/src/main/java/org/synyx/hera/metadata/AbstractMetadataBasedPlugin.java b/metadata/src/main/java/org/synyx/hera/metadata/AbstractMetadataBasedPlugin.java
index 2f9a14d..b64e6d1 100644
--- a/metadata/src/main/java/org/synyx/hera/metadata/AbstractMetadataBasedPlugin.java
+++ b/metadata/src/main/java/org/synyx/hera/metadata/AbstractMetadataBasedPlugin.java
@@ -1,68 +1,57 @@
/*
- * Copyright 2008-2010 the original author or authors.
- *
- * 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
- *
+ * Copyright 2012 the original author or authors.
+ *
+ * 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.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.synyx.hera.metadata;
import org.synyx.hera.core.Plugin;
-
+import org.synyx.hera.core.PluginRegistry;
/**
- * Abstract base class for plugins based on {@code PluginMetadata}. Plugins
- * based on this class can be selected from the {@code PluginRegistry} via an
- * instance of {@code PluginMetadata}. Therefore you can regard this as a role
- * model implementation of a base class for certain delimiter implmentations.
+ * Abstract base class for plugins based on {@link PluginMetadata}. Plugins based on this class can be selected from the
+ * {@link PluginRegistry} via an instance of {@link PluginMetadata}. Therefore you can regard this as a role model
+ * implementation of a base class for certain delimiter implmentations.
*
- * @author Oliver Gierke - gierke@synyx.de
+ * @author Oliver Gierke
*/
-public abstract class AbstractMetadataBasedPlugin implements
- Plugin, MetadataProvider {
+public abstract class AbstractMetadataBasedPlugin implements Plugin, MetadataProvider {
- private PluginMetadata metadata;
+ private final PluginMetadata metadata;
+ /**
+ * Creates a new instance of {@code AbstractMetadataBasedPlugin}.
+ *
+ * @param name must not be {@literal null}.
+ * @param version must not be {@literal null}.
+ */
+ public AbstractMetadataBasedPlugin(String name, String version) {
+ this.metadata = new SimplePluginMetadata(name, version);
+ }
- /**
- * Creates a new instance of {@code AbstractMetadataBasedPlugin}.
- *
- * @param name
- * @param version
- */
- public AbstractMetadataBasedPlugin(String name, String version) {
+ /*
+ * (non-Javadoc)
+ * @see org.synyx.hera.core.Plugin#supports(java.lang.Object)
+ */
+ public boolean supports(PluginMetadata delimiter) {
+ return getMetadata().equals(delimiter);
+ }
- this.metadata = new SimplePluginMetadata(name, version);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.synyx.minos.core.plugin.Plugin#supports(java.lang.Object)
- */
- public boolean supports(PluginMetadata delimiter) {
-
- return getMetadata().equals(delimiter);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.synyx.minos.core.plugin.MetadataProvider#getMetadata()
- */
- public PluginMetadata getMetadata() {
-
- return metadata;
- }
+ /*
+ * (non-Javadoc)
+ * @see org.synyx.hera.metadata.MetadataProvider#getMetadata()
+ */
+ public PluginMetadata getMetadata() {
+ return metadata;
+ }
}
diff --git a/metadata/src/main/java/org/synyx/hera/metadata/MetadataProvider.java b/metadata/src/main/java/org/synyx/hera/metadata/MetadataProvider.java
index d96b4dd..4e0f643 100644
--- a/metadata/src/main/java/org/synyx/hera/metadata/MetadataProvider.java
+++ b/metadata/src/main/java/org/synyx/hera/metadata/MetadataProvider.java
@@ -1,33 +1,31 @@
/*
- * Copyright 2008-2010 the original author or authors.
- *
- * 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
- *
+ * Copyright 2008-2012 the original author or authors.
+ *
+ * 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.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-
package org.synyx.hera.metadata;
/**
- * Interface for plugins providing metadata information. Usually the plugins
- * will implement this interface themselves.
+ * Interface for plugins providing metadata information. Usually the plugins will implement this interface themselves.
*
- * @author Oliver Gierke - gierke@synyx.de
+ * @author Oliver Gierke
*/
public interface MetadataProvider {
- /**
- * Returns the plugins metadata.
- *
- * @return the plugins metadata
- */
- PluginMetadata getMetadata();
+ /**
+ * Returns the plugins metadata.
+ *
+ * @return the plugins metadata
+ */
+ PluginMetadata getMetadata();
}
diff --git a/metadata/src/main/java/org/synyx/hera/metadata/PluginMetadata.java b/metadata/src/main/java/org/synyx/hera/metadata/PluginMetadata.java
index fa3ea0c..7d09c5e 100644
--- a/metadata/src/main/java/org/synyx/hera/metadata/PluginMetadata.java
+++ b/metadata/src/main/java/org/synyx/hera/metadata/PluginMetadata.java
@@ -1,17 +1,17 @@
/*
- * Copyright 2008-2010 the original author or authors.
- *
- * 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
- *
+ * Copyright 2008-2012 the original author or authors.
+ *
+ * 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.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.synyx.hera.metadata;
@@ -19,24 +19,21 @@ package org.synyx.hera.metadata;
/**
* Basic interface to define a set of metadata information for plugins.
*
- * @author Oliver Gierke - gierke@synyx.de
+ * @author Oliver Gierke
*/
public interface PluginMetadata {
- /**
- * Returns a unique plugin name. Plugins return a metadata implementation
- * have to ensure uniqueness of this name.
- *
- * @return the name of the plugin
- */
- String getName();
+ /**
+ * Returns a unique plugin name. Plugins return a metadata implementation have to ensure uniqueness of this name.
+ *
+ * @return the name of the plugin
+ */
+ String getName();
-
- /**
- * Returns the plugin version. This allows rudimentary versioning
- * possibilities.
- *
- * @return the version of the plugin
- */
- String getVersion();
+ /**
+ * Returns the plugin version. This allows rudimentary versioning possibilities.
+ *
+ * @return the version of the plugin
+ */
+ String getVersion();
}
diff --git a/metadata/src/main/java/org/synyx/hera/metadata/SimplePluginMetadata.java b/metadata/src/main/java/org/synyx/hera/metadata/SimplePluginMetadata.java
index 172e46f..0c65a6f 100644
--- a/metadata/src/main/java/org/synyx/hera/metadata/SimplePluginMetadata.java
+++ b/metadata/src/main/java/org/synyx/hera/metadata/SimplePluginMetadata.java
@@ -18,6 +18,7 @@ package org.synyx.hera.metadata;
import static org.springframework.util.ObjectUtils.*;
+import org.springframework.util.Assert;
/**
* Value object style implementation of {@code PluginMetadata}.
@@ -26,90 +27,78 @@ import static org.springframework.util.ObjectUtils.*;
*/
public class SimplePluginMetadata implements PluginMetadata {
- private String name;
- private String version;
+ private final String name;
+ private final String version;
+ /**
+ * Creates a new instance of {@code SimplePluginMetadata}.
+ *
+ * @param name must not be {@literal null}.
+ * @param version must not be {@literal null}.
+ */
+ public SimplePluginMetadata(String name, String version) {
- /**
- * Creates a new instance of {@code SimplePluginMetadata}.
- *
- * @param name
- * @param version
- */
- public SimplePluginMetadata(String name, String version) {
+ Assert.hasText(name, "Name must not be null or empty!");
+ Assert.hasText(version, "Version must not be null or empty!");
- this.name = name;
- this.version = version;
- }
+ this.name = name;
+ this.version = version;
+ }
+ /*
+ * (non-Javadoc)
+ * @see org.synyx.hera.metadata.PluginMetadata#getName()
+ */
+ public String getName() {
+ return name;
+ }
- /*
- * (non-Javadoc)
- *
- * @see com.synyx.minos.core.plugin.PluginMetadata#getName()
- */
- public String getName() {
+ /*
+ * (non-Javadoc)
+ * @see org.synyx.hera.metadata.PluginMetadata#getVersion()
+ */
+ public String getVersion() {
+ return version;
+ }
- return name;
- }
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return String.format("%s:%s", getName(), getVersion());
+ }
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
- /*
- * (non-Javadoc)
- *
- * @see com.synyx.minos.core.plugin.PluginMetadata#getVersion()
- */
- public String getVersion() {
+ if (this == obj) {
+ return true;
+ }
- return version;
- }
+ if (!(obj instanceof PluginMetadata)) {
+ return false;
+ }
+ PluginMetadata that = (PluginMetadata) obj;
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
+ boolean sameName = nullSafeEquals(this.getName(), that.getName());
+ boolean sameVersion = nullSafeEquals(this.getName(), that.getName());
- return String.format("%s:%s", getName(), getVersion());
- }
+ return sameName && sameVersion;
+ }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
-
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof PluginMetadata)) {
- return false;
- }
-
- PluginMetadata that = (PluginMetadata) obj;
-
- boolean sameName = nullSafeEquals(this.getName(), that.getName());
- boolean sameVersion = nullSafeEquals(this.getName(), that.getName());
-
- return sameName && sameVersion;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
-
- return nullSafeHashCode(name) + nullSafeHashCode(version);
- }
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return nullSafeHashCode(name) + nullSafeHashCode(version);
+ }
}
diff --git a/pom.xml b/pom.xml
index 1e62bc2..de85882 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
- 2.5.6.SEC02
+ 3.0.6.RELEASE
@@ -87,16 +87,19 @@
+ org.apache.maven.pluginsmaven-compiler-plugin
+ 2.3.2
- 1.5
- 1.5
+ 1.6
+ 1.6org.apache.maven.pluginsmaven-source-plugin
+ 2.1.2attach-sources
diff --git a/si/.settings/org.eclipse.jdt.core.prefs b/si/.settings/org.eclipse.jdt.core.prefs
index d32fcd7..cc6246d 100644
--- a/si/.settings/org.eclipse.jdt.core.prefs
+++ b/si/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Wed May 25 12:22:34 CEST 2011
+#Wed Feb 15 21:50:38 CET 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
diff --git a/si/pom.xml b/si/pom.xml
index 214016f..a8464f1 100644
--- a/si/pom.xml
+++ b/si/pom.xml
@@ -12,7 +12,6 @@
2.0.5.RELEASE
- 3.0.5.RELEASE
@@ -40,12 +39,6 @@
${spring.version}
-
- org.springframework
- spring-context
- ${spring.version}
-
-
org.springframeworkspring-test
diff --git a/si/src/main/java/org/synyx/hera/si/PluginRegistryAwareMessageHandler.java b/si/src/main/java/org/synyx/hera/si/PluginRegistryAwareMessageHandler.java
index 0bf8f56..bf9de08 100644
--- a/si/src/main/java/org/synyx/hera/si/PluginRegistryAwareMessageHandler.java
+++ b/si/src/main/java/org/synyx/hera/si/PluginRegistryAwareMessageHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -107,6 +107,7 @@ public class PluginRegistryAwareMessageHandler extends AbstractReplyProducingMes
* @param delimiterExpression the delimiterExpression to set
*/
public void setDelimiterExpression(String expression) {
+
Assert.hasText(expression);
this.delimiterExpression = parser.parseExpression(expression);
}
@@ -118,6 +119,7 @@ public class PluginRegistryAwareMessageHandler extends AbstractReplyProducingMes
* @param invocationArgumentsExpression the invocationArgumentsExpression to set
*/
public void setInvocationArgumentsExpression(String expression) {
+
Assert.hasText(expression);
this.invocationArgumentsExpression = parser.parseExpression(expression);
}
@@ -134,7 +136,10 @@ public class PluginRegistryAwareMessageHandler extends AbstractReplyProducingMes
/*
* (non-Javadoc)
- * @see org.springframework.integration.handler.AbstractReplyProducingMessageHandler#handleRequestMessage(org.springframework.integration.Message)
+ *
+ * @see
+ * org.springframework.integration.handler.AbstractReplyProducingMessageHandler
+ * #handleRequestMessage(org.springframework.integration.Message)
*/
@SuppressWarnings("unchecked")
@Override
@@ -163,6 +168,7 @@ public class PluginRegistryAwareMessageHandler extends AbstractReplyProducingMes
}
private List invokePlugins(Collection extends Plugin>> plugins, Message> message) {
+
List results = new ArrayList();
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("Invoking plugin(s) %s with message %s",
@@ -247,6 +253,7 @@ public class PluginRegistryAwareMessageHandler extends AbstractReplyProducingMes
* @return
*/
private Class>[] getTypes(Object[] source) {
+
Class>[] result = new Class>[source.length];
for (int i = 0; i < source.length; i++) {
Object sourceElement = source[i];
@@ -255,10 +262,9 @@ public class PluginRegistryAwareMessageHandler extends AbstractReplyProducingMes
return result;
}
-
/**
* Lookup methods for plugins.
- *
+ *
* @author Oliver Gierke
*/
private enum PluginLookupMethod {
diff --git a/si/src/main/java/org/synyx/hera/si/config/DynamicServiceActivatorParser.java b/si/src/main/java/org/synyx/hera/si/config/DynamicServiceActivatorParser.java
index 1e2290d..8f9048b 100644
--- a/si/src/main/java/org/synyx/hera/si/config/DynamicServiceActivatorParser.java
+++ b/si/src/main/java/org/synyx/hera/si/config/DynamicServiceActivatorParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ import org.w3c.dom.Element;
/**
* {@link BeanDefinitionParser} to create {@link PluginRegistryAwareMessageHandler} beans.
- *
+ *
* @author Oliver Gierke
*/
public class DynamicServiceActivatorParser extends AbstractConsumerEndpointParser {
diff --git a/si/src/main/java/org/synyx/hera/si/config/HeraSpringIntegrationNamespaceHandler.java b/si/src/main/java/org/synyx/hera/si/config/HeraSpringIntegrationNamespaceHandler.java
index d417da3..afd504a 100644
--- a/si/src/main/java/org/synyx/hera/si/config/HeraSpringIntegrationNamespaceHandler.java
+++ b/si/src/main/java/org/synyx/hera/si/config/HeraSpringIntegrationNamespaceHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/si/src/test/java/org/synyx/hera/si/PluginRegistryAwareMessageHandlerUnitTest.java b/si/src/test/java/org/synyx/hera/si/PluginRegistryAwareMessageHandlerUnitTest.java
index f47c01c..abdaf22 100644
--- a/si/src/test/java/org/synyx/hera/si/PluginRegistryAwareMessageHandlerUnitTest.java
+++ b/si/src/test/java/org/synyx/hera/si/PluginRegistryAwareMessageHandlerUnitTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
* limitations under the License.
*/
package org.synyx.hera.si;
+
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
@@ -53,8 +54,9 @@ public class PluginRegistryAwareMessageHandlerUnitTest {
@Before
public void setUp() {
+
registry = OrderAwarePluginRegistry
- .create(Arrays.asList(new FirstSamplePluginImpl(), new SecondSamplePluginImpl()));
+ .create(Arrays.asList(new FirstSamplePluginImpl(), new SecondSamplePluginImpl()));
handler = new PluginRegistryAwareMessageHandler(registry, SamplePlugin.class, "myBusinessMethod");
handler.setOutputChannel(outputChannel);
diff --git a/si/src/test/java/org/synyx/hera/si/config/DynamicServiceActivatorNamespaceIntegrationTest.java b/si/src/test/java/org/synyx/hera/si/config/DynamicServiceActivatorNamespaceIntegrationTest.java
index e025d43..bfd1871 100644
--- a/si/src/test/java/org/synyx/hera/si/config/DynamicServiceActivatorNamespaceIntegrationTest.java
+++ b/si/src/test/java/org/synyx/hera/si/config/DynamicServiceActivatorNamespaceIntegrationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/si/src/test/java/org/synyx/hera/si/sample/FirstSamplePluginImpl.java b/si/src/test/java/org/synyx/hera/si/sample/FirstSamplePluginImpl.java
index 6c71cb1..2f0b4bf 100644
--- a/si/src/test/java/org/synyx/hera/si/sample/FirstSamplePluginImpl.java
+++ b/si/src/test/java/org/synyx/hera/si/sample/FirstSamplePluginImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,19 +16,20 @@
package org.synyx.hera.si.sample;
/**
- *
* @author Oliver Gierke
*/
public class FirstSamplePluginImpl implements SamplePlugin {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.synyx.hera.core.Plugin#supports(java.lang.Object)
*/
public boolean supports(String delimiter) {
return "FOO".equals(delimiter);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.synyx.hera.si.sample.SamplePlugin#myBusinessMethod()
*/
public String myBusinessMethod(String message) {
diff --git a/si/src/test/java/org/synyx/hera/si/sample/SamplePlugin.java b/si/src/test/java/org/synyx/hera/si/sample/SamplePlugin.java
index d30b1c8..fd5fa8b 100644
--- a/si/src/test/java/org/synyx/hera/si/sample/SamplePlugin.java
+++ b/si/src/test/java/org/synyx/hera/si/sample/SamplePlugin.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.synyx.hera.si.sample;
import org.synyx.hera.core.Plugin;
/**
- *
* @author Oliver Gierke
*/
public interface SamplePlugin extends Plugin {
diff --git a/si/src/test/java/org/synyx/hera/si/sample/SecondSamplePluginImpl.java b/si/src/test/java/org/synyx/hera/si/sample/SecondSamplePluginImpl.java
index 637abe8..9019995 100644
--- a/si/src/test/java/org/synyx/hera/si/sample/SecondSamplePluginImpl.java
+++ b/si/src/test/java/org/synyx/hera/si/sample/SecondSamplePluginImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,14 +25,16 @@ import org.springframework.core.annotation.Order;
@Order(10)
public class SecondSamplePluginImpl implements SamplePlugin {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.synyx.hera.core.Plugin#supports(java.lang.Object)
*/
public boolean supports(String delimiter) {
return "BAR".equals(delimiter);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.synyx.hera.si.sample.SamplePlugin#myBusinessMethod()
*/
public String myBusinessMethod(String message) {
diff --git a/si/src/test/java/org/synyx/hera/si/sample/ThirdSamplePluginImpl.java b/si/src/test/java/org/synyx/hera/si/sample/ThirdSamplePluginImpl.java
index 4a59d89..91c803a 100644
--- a/si/src/test/java/org/synyx/hera/si/sample/ThirdSamplePluginImpl.java
+++ b/si/src/test/java/org/synyx/hera/si/sample/ThirdSamplePluginImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,14 +25,16 @@ import org.springframework.core.annotation.Order;
@Order(20)
class ThirdSamplePluginImpl implements SamplePlugin {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.synyx.hera.core.Plugin#supports(java.lang.Object)
*/
public boolean supports(String delimiter) {
return "BAR".equals(delimiter);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.synyx.hera.si.sample.SamplePlugin#myBusinessMethod()
*/
public String myBusinessMethod(String message) {
diff --git a/si/src/test/resources/log4j.properties b/si/src/test/resources/log4j.properties
index 3774e1f..7e1b088 100644
--- a/si/src/test/resources/log4j.properties
+++ b/si/src/test/resources/log4j.properties
@@ -2,7 +2,7 @@
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %40.40c:%4L - %m%n
# Root logger option
log4j.rootLogger=WARN, stdout