You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rd...@apache.org on 2008/09/04 23:49:53 UTC
svn commit: r692268 [1/2] - in /james/jsieve/trunk/src:
main/java/org/apache/jsieve/ main/java/org/apache/jsieve/commands/
main/java/org/apache/jsieve/commands/extensions/
main/java/org/apache/jsieve/commands/optional/
main/java/org/apache/jsieve/compa...
Author: rdonkin
Date: Thu Sep 4 14:49:51 2008
New Revision: 692268
URL: http://svn.apache.org/viewvc?rev=692268&view=rev
Log:
Ran a reformat and optimise imports in Eclipse as suggested on list. If anyone has any outstanding patches which are now fried, apologies.
Modified:
james/jsieve/trunk/src/main/java/org/apache/jsieve/Arguments.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/BaseSieveContext.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/Block.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/Command.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManager.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManagerImpl.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandStateManager.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/Commands.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManager.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManagerImpl.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/ConditionManager.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/ConfigurationManager.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/Executable.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/ExecutableCommand.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/NumberArgument.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/ScriptCoordinate.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveContext.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveFactory.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveParserVisitorImpl.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveValidationVisitor.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/StringListArgument.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/TagArgument.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/Test.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/TestList.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManager.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManagerImpl.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractActionCommand.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractCommand.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractConditionalCommand.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractPrologCommand.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Elsif.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/If.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Require.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/extensions/Log.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/optional/Reject.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/comparators/ComparatorUtils.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionFileInto.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionRedirect.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionReject.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/AddressImpl.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/MailAdapter.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/SieveNode.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/address/SieveAddressBuilder.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractCompatatorTest.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractTest.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Address.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AllOf.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AnyOf.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/ExecutableTest.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Header.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Not.java
james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/optional/Envelope.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/SieveParserVisitorImplQuoteTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/AddressParseTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/AllOfTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/AnyOfTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/FalseTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/FileIntoTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/HeaderTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/KeepTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/LogTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/MultipleRequireTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/MultipleToTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/NotTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/OpenedAddress.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/QuotingTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/RejectTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/RequireMissingTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/RequireTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/SizeTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/StopTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/TrueTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/commands/ThrowTestException.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/comparator/ComparatorUtilsTest.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/utils/JUnitUtils.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/utils/SieveEnvelopeMailAdapter.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/junit/utils/SieveMailAdapter.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/util/check/ScriptCheckMailAdapter.java
james/jsieve/trunk/src/test/java/org/apache/jsieve/util/check/ScriptChecker.java
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/Arguments.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/Arguments.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/Arguments.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/Arguments.java Thu Sep 4 14:49:51 2008
@@ -120,7 +120,7 @@
* Sets the arguments.
*
* @param arguments
- * The arguments to set
+ * The arguments to set
*/
protected void setArgumentList(List arguments) {
fieldArgumentList = arguments;
@@ -130,7 +130,7 @@
* Sets the testList.
*
* @param testList
- * The testList to set
+ * The testList to set
*/
protected void setTestList(TestList testList) {
fieldTestList = testList;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/BaseSieveContext.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/BaseSieveContext.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/BaseSieveContext.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/BaseSieveContext.java Thu Sep 4 14:49:51 2008
@@ -31,17 +31,22 @@
public class BaseSieveContext extends SieveContext {
private ScriptCoordinate coordinate;
+
private ConditionManager conditionManager;
-
+
private final CommandStateManager commandStateManager;
+
private final CommandManager commandManager;
+
private final ComparatorManager comparatorManager;
+
private final TestManager testManager;
+
private final Log log;
-
- public BaseSieveContext(final CommandManager commandManager, final ComparatorManager comparatorManager,
- final TestManager testManager, final Log log)
- {
+
+ public BaseSieveContext(final CommandManager commandManager,
+ final ComparatorManager comparatorManager,
+ final TestManager testManager, final Log log) {
this.commandStateManager = new CommandStateManager();
this.conditionManager = new ConditionManager();
this.testManager = testManager;
@@ -49,7 +54,7 @@
this.comparatorManager = comparatorManager;
this.log = log;
}
-
+
/**
* Gets the script position of the current operation.
*
@@ -63,7 +68,7 @@
* Sets the script position of the current operation.
*
* @param coordinate
- * <code>ScriptCoordinate</code>, not null
+ * <code>ScriptCoordinate</code>, not null
*/
public void setCoordinate(ScriptCoordinate coordinate) {
this.coordinate = coordinate;
@@ -71,9 +76,8 @@
coordinate.setLog(getLog());
}
}
-
- public CommandStateManager getCommandStateManager()
- {
+
+ public CommandStateManager getCommandStateManager() {
return commandStateManager;
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/Block.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/Block.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/Block.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/Block.java Thu Sep 4 14:49:51 2008
@@ -66,7 +66,7 @@
* Sets the commands.
*
* @param commands
- * The commands to set
+ * The commands to set
*/
protected void setChildren(Commands commands) {
fieldChildren = commands;
@@ -75,7 +75,8 @@
/**
* @see org.apache.jsieve.Executable#execute(MailAdapter, SieveContext)
*/
- public Object execute(MailAdapter mail, SieveContext context) throws SieveException {
+ public Object execute(MailAdapter mail, SieveContext context)
+ throws SieveException {
return getChildren().execute(mail, context);
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/Command.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/Command.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/Command.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/Command.java Thu Sep 4 14:49:51 2008
@@ -31,7 +31,7 @@
* <code>command = identifier arguments ( ";" / block )</code>
*/
public class Command implements Executable {
-
+
/** The name of this Command */
private String fieldName;
@@ -84,7 +84,7 @@
* Sets the name.
*
* @param name
- * The name to set
+ * The name to set
*/
protected void setName(String name) {
fieldName = name;
@@ -124,7 +124,7 @@
* Sets the arguments.
*
* @param arguments
- * The arguments to set
+ * The arguments to set
*/
protected void setArguments(Arguments arguments) {
fieldArguments = arguments;
@@ -134,16 +134,17 @@
* Sets the block.
*
* @param block
- * The block to set
+ * The block to set
*/
protected void setBlock(Block block) {
fieldBlock = block;
}
-
+
/**
* @see org.apache.jsieve.Executable#execute(MailAdapter, SieveContext)
*/
- public Object execute(MailAdapter mail, SieveContext context) throws SieveException {
+ public Object execute(MailAdapter mail, SieveContext context)
+ throws SieveException {
Log log = context.getLog();
if (log.isDebugEnabled()) {
log.debug(toString());
@@ -154,8 +155,8 @@
// so need to use the coordinate recorded from the parse
context.setCoordinate(coordinate);
final ExecutableCommand executable = context.getCommand(getName());
- final Object result = executable.execute(
- mail, getArguments(), getBlock(), context);
+ final Object result = executable.execute(mail, getArguments(),
+ getBlock(), context);
return result;
}
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManager.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManager.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManager.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManager.java Thu Sep 4 14:49:51 2008
@@ -33,7 +33,7 @@
* </p>
*
* @param name -
- * The name of the Command
+ * The name of the Command
* @return Class - The class of the Command
* @throws LookupException
*/
@@ -44,7 +44,7 @@
* configured.
*
* @param name -
- * The Command name
+ * The Command name
* @return boolean - True if the Command name is configured.
*/
public boolean isCommandSupported(String name);
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManagerImpl.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManagerImpl.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManagerImpl.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandManagerImpl.java Thu Sep 4 14:49:51 2008
@@ -30,7 +30,7 @@
public class CommandManagerImpl implements CommandManager {
private final Map classNameMap;
-
+
/**
* Constructor for CommandManager.
*/
@@ -45,7 +45,7 @@
* </p>
*
* @param name -
- * The name of the Command
+ * The name of the Command
* @return Class - The class of the Command
* @throws LookupException
*/
@@ -70,7 +70,7 @@
* </p>
*
* @param name -
- * The name of the Command
+ * The name of the Command
* @return Class - The class of the Command
* @throws LookupException
*/
@@ -89,7 +89,7 @@
* configured.
*
* @param name -
- * The Command name
+ * The Command name
* @return boolean - True if the Command name is configured.
*/
public boolean isCommandSupported(String name) {
@@ -109,7 +109,7 @@
* </p>
*
* @param name -
- * The name of the Command
+ * The name of the Command
* @return String - The name of the class
* @throws LookupException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandStateManager.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandStateManager.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandStateManager.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/CommandStateManager.java Thu Sep 4 14:49:51 2008
@@ -94,7 +94,7 @@
* Sets the hasActions.
*
* @param hasActions
- * The hasActions to set
+ * The hasActions to set
*/
public void setHasActions(boolean hasActions) {
fieldHasActions = hasActions;
@@ -104,7 +104,7 @@
* Sets the inProlog.
*
* @param inProlog
- * The inProlog to set
+ * The inProlog to set
*/
public void setInProlog(boolean inProlog) {
fieldInProlog = inProlog;
@@ -114,7 +114,7 @@
* Sets the isRejected.
*
* @param isRejected
- * The isRejected to set
+ * The isRejected to set
*/
public void setRejected(boolean isRejected) {
fieldRejected = isRejected;
@@ -133,7 +133,7 @@
* Sets the implicitKeep.
*
* @param implicitKeep
- * The implicitKeep to set
+ * The implicitKeep to set
*/
public void setImplicitKeep(boolean implicitKeep) {
fieldImplicitKeep = implicitKeep;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/Commands.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/Commands.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/Commands.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/Commands.java Thu Sep 4 14:49:51 2008
@@ -69,7 +69,7 @@
* Sets the commands.
*
* @param commands
- * The commands to set
+ * The commands to set
*/
protected void setChildren(List commands) {
fieldChildren = commands;
@@ -78,7 +78,8 @@
/**
* @see org.apache.jsieve.Executable#execute(MailAdapter, SieveContext)
*/
- public Object execute(MailAdapter mail, SieveContext context) throws SieveException {
+ public Object execute(MailAdapter mail, SieveContext context)
+ throws SieveException {
Iterator commandsIter = getChildren().iterator();
while (commandsIter.hasNext())
((Executable) commandsIter.next()).execute(mail, context);
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManager.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManager.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManager.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManager.java Thu Sep 4 14:49:51 2008
@@ -23,11 +23,10 @@
import org.apache.jsieve.exception.LookupException;
/**
- * Maps Comparator names to
- * configured Comparator implementation classes.
+ * Maps Comparator names to configured Comparator implementation classes.
*/
public interface ComparatorManager {
-
+
/**
* <p>
* Method newInstance answers an instance of the class to which a Comparator
@@ -35,7 +34,7 @@
* </p>
*
* @param name -
- * The name of the Comparator
+ * The name of the Comparator
* @return Class - The class of the Comparator
* @throws LookupException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManagerImpl.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManagerImpl.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManagerImpl.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/ComparatorManagerImpl.java Thu Sep 4 14:49:51 2008
@@ -29,7 +29,7 @@
* configured Comparator implementation classes.
*/
public class ComparatorManagerImpl implements ComparatorManager {
-
+
private final Map classNameMap;
/**
@@ -46,7 +46,7 @@
* </p>
*
* @param name -
- * The name of the Comparator
+ * The name of the Comparator
* @return Class - The class of the Comparator
* @throws LookupException
*/
@@ -72,7 +72,7 @@
* </p>
*
* @param name -
- * The name of the Comparator
+ * The name of the Comparator
* @return Class - The class of the Comparator
* @throws LookupException
*/
@@ -93,7 +93,7 @@
* </p>
*
* @param name -
- * The name of the Comparator
+ * The name of the Comparator
* @return String - The name of the class
* @throws LookupException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/ConditionManager.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/ConditionManager.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/ConditionManager.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/ConditionManager.java Thu Sep 4 14:49:51 2008
@@ -157,7 +157,7 @@
* Sets the elseAllowed.
*
* @param elseAllowed
- * The elseAllowed to set
+ * The elseAllowed to set
*/
protected void setElseAllowed(boolean elseAllowed) {
fieldElseAllowed = elseAllowed;
@@ -167,7 +167,7 @@
* Sets the testResult.
*
* @param testResult
- * The testResult to set
+ * The testResult to set
*/
protected void setTestResult(boolean testResult) {
fieldTestResult = testResult;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/ConfigurationManager.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/ConfigurationManager.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/ConfigurationManager.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/ConfigurationManager.java Thu Sep 4 14:49:51 2008
@@ -37,15 +37,15 @@
* </p>
*
* <p>
- * The Sieve configuration is read from 3 properties file. They are
- * located by searching the classpath of the current ClassLoader.
+ * The Sieve configuration is read from 3 properties file. They are located by
+ * searching the classpath of the current ClassLoader.
* org/apache/jsieve/commandsmap.properties
* org/apache/jsieve/testsmap.properties
* org/apache/jsieve/comparatorsmap.properties
* </p>
*/
public class ConfigurationManager {
-
+
private static final String COMMANDSMAP_PROPERTIES = "org/apache/jsieve/commandsmap.properties";
private static final String TESTSMAP_PROPERTIES = "org/apache/jsieve/testsmap.properties";
@@ -68,7 +68,7 @@
private Map fieldComparatorMap;
private static final Log log = LogFactory.getLog("org.apache.jsieve");
-
+
/**
* Constructor for ConfigurationManager.
*
@@ -88,7 +88,7 @@
throw new SieveConfigurationException(e);
}
}
-
+
/**
* <p>
* Method getConfigStream answers an InputStream over the Sieve
@@ -192,7 +192,7 @@
* Sets the commandMap.
*
* @param commandMap
- * The commandMap to set
+ * The commandMap to set
*/
private void setCommandMap(Map commandMap) {
fieldCommandMap = commandMap;
@@ -202,7 +202,7 @@
* Sets the testMap.
*
* @param testMap
- * The testMap to set
+ * The testMap to set
*/
private void setTestMap(Map testMap) {
fieldTestMap = testMap;
@@ -212,12 +212,12 @@
* Sets the comparatorMap.
*
* @param comparatorMap
- * The comparatorMap to set
+ * The comparatorMap to set
*/
private void setComparatorMap(Map comparatorMap) {
fieldComparatorMap = comparatorMap;
}
-
+
public ComparatorManager getComparatorManager() {
return new ComparatorManagerImpl(fieldComparatorMap);
}
@@ -225,16 +225,17 @@
public CommandManager getCommandManager() {
return new CommandManagerImpl(fieldCommandMap);
}
-
+
public TestManager getTestManager() {
return new TestManagerImpl(fieldTestMap);
}
-
+
public Log getLog() {
return log;
}
-
+
public SieveFactory build() {
- return new SieveFactory(getCommandManager(), getComparatorManager(), getTestManager(), getLog());
+ return new SieveFactory(getCommandManager(), getComparatorManager(),
+ getTestManager(), getLog());
}
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/Executable.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/Executable.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/Executable.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/Executable.java Thu Sep 4 14:49:51 2008
@@ -26,6 +26,7 @@
* Interface for an Executable operation.
*/
public interface Executable {
- public Object execute(MailAdapter mail, SieveContext context) throws SieveException;
+ public Object execute(MailAdapter mail, SieveContext context)
+ throws SieveException;
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/ExecutableCommand.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/ExecutableCommand.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/ExecutableCommand.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/ExecutableCommand.java Thu Sep 4 14:49:51 2008
@@ -30,14 +30,14 @@
* Method execute executes a Sieve Command.
*
* @param mail -
- * The mail against which the Command is executed.
+ * The mail against which the Command is executed.
* @param arguments -
- * The Command arguments
+ * The Command arguments
* @param block -
- * An optional Block to be evaluated
+ * An optional Block to be evaluated
* @param context
- * <code>SieveContext</code> containing contextual
- * information, not null
+ * <code>SieveContext</code> containing contextual information,
+ * not null
* @return Object - The result of evaluating the Command
* @throws SieveException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/NumberArgument.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/NumberArgument.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/NumberArgument.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/NumberArgument.java Thu Sep 4 14:49:51 2008
@@ -62,7 +62,7 @@
* Sets the value of the reciver to an Integer.
*
* @param number
- * The value to set
+ * The value to set
*/
protected void setValue(Integer number) {
fieldValue = number;
@@ -88,7 +88,7 @@
* Sets the value of the receiver from a Token.
*
* @param aToken
- * The Token from which to extract the value to set
+ * The Token from which to extract the value to set
*/
protected void setValue(Token aToken) {
int endIndex = aToken.image.length();
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/ScriptCoordinate.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/ScriptCoordinate.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/ScriptCoordinate.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/ScriptCoordinate.java Thu Sep 4 14:49:51 2008
@@ -37,7 +37,7 @@
private final int endLineNumber;
private final int endColumnNumber;
-
+
private Log log;
public ScriptCoordinate(final int startLineNumber,
@@ -50,7 +50,6 @@
this.endColumnNumber = endColumnNumber;
}
-
public Log getLog() {
return log;
}
@@ -100,8 +99,8 @@
* of the script position. The message should end with a full stop.
*
* @param message
- * <code>CharSequence</code> containing the base message,
- * not null
+ * <code>CharSequence</code> containing the base message, not
+ * null
* @return <code>SyntaxException</code> with details of the script
* position appended to the message, not null
*/
@@ -122,8 +121,8 @@
* of the script position. The message should end with a full stop.
*
* @param message
- * <code>CharSequence</code> containing the base message,
- * not null
+ * <code>CharSequence</code> containing the base message, not
+ * null
* @return <code>CommandException</code> with details of the script
* position appended to the message, not null
*/
@@ -144,7 +143,7 @@
* should end with a full stop.
*
* @param message
- * <code>CharSequence</code> message, not null
+ * <code>CharSequence</code> message, not null
* @return <code>String</code> containing the original message with
* positional phrase appended, not null
*/
@@ -167,7 +166,7 @@
* Logs diagnotic information about the script coordinate.
*
* @param logger
- * <code>Log</code>, not null
+ * <code>Log</code>, not null
*/
public void logDiagnosticsInfo(Log logger) {
if (logger.isInfoEnabled()) {
@@ -182,7 +181,7 @@
* Logs diagnotic information about the script coordinate.
*
* @param logger
- * <code>Log</code>, not null
+ * <code>Log</code>, not null
*/
public void debugDiagnostics(Log logger) {
if (logger.isDebugEnabled()) {
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveContext.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveContext.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveContext.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveContext.java Thu Sep 4 14:49:51 2008
@@ -41,23 +41,29 @@
* Sets the script position of the current operation.
*
* @param coordinate
- * <code>ScriptCoordinate</code>, not null
+ * <code>ScriptCoordinate</code>, not null
*/
public abstract void setCoordinate(ScriptCoordinate coordinate);
-
- //TODO: simplify interface
+
+ // TODO: simplify interface
public abstract CommandStateManager getCommandStateManager();
-
- //TODO: simplify interface
+
+ // TODO: simplify interface
public abstract ConditionManager getConditionManager();
- //TODO: simplify interface
+
+ // TODO: simplify interface
public abstract void setConditionManager(final ConditionManager manager);
- //TODO: consider whether API can be consolidated
- public abstract ExecutableCommand getCommand(String name) throws LookupException;
- //TODO: consider whether API can be consolidated
- public abstract Comparator getComparator(String name) throws LookupException;
- //TODO: consider whether API can be consolidated
+
+ // TODO: consider whether API can be consolidated
+ public abstract ExecutableCommand getCommand(String name)
+ throws LookupException;
+
+ // TODO: consider whether API can be consolidated
+ public abstract Comparator getComparator(String name)
+ throws LookupException;
+
+ // TODO: consider whether API can be consolidated
public abstract ExecutableTest getTest(String name) throws LookupException;
-
+
public abstract Log getLog();
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveFactory.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveFactory.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveFactory.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveFactory.java Thu Sep 4 14:49:51 2008
@@ -60,14 +60,18 @@
public class SieveFactory {
private final CommandManager commandManager;
+
private final ComparatorManager comparatorManager;
+
private final TestManager testManager;
+
private final Log log;
-
+
/**
* Constructor for SieveFactory.
*/
- public SieveFactory(final CommandManager commandManager, final ComparatorManager comparatorManager,
+ public SieveFactory(final CommandManager commandManager,
+ final ComparatorManager comparatorManager,
final TestManager testManager, final Log log) {
super();
this.commandManager = commandManager;
@@ -89,8 +93,10 @@
*/
public Node parse(InputStream inputStream) throws ParseException {
try {
- final SimpleNode node = new SieveParser(inputStream, "UTF-8").start();
- SieveValidationVisitor visitor = new SieveValidationVisitor(commandManager, testManager);
+ final SimpleNode node = new SieveParser(inputStream, "UTF-8")
+ .start();
+ SieveValidationVisitor visitor = new SieveValidationVisitor(
+ commandManager, testManager);
node.jjtAccept(visitor, null);
return node;
} catch (ParseException ex) {
@@ -130,7 +136,8 @@
*/
public void evaluate(MailAdapter mail, Node startNode)
throws SieveException {
- SieveContext context = new BaseSieveContext(commandManager, comparatorManager, testManager, log);
+ SieveContext context = new BaseSieveContext(commandManager,
+ comparatorManager, testManager, log);
SieveParserVisitor visitor = new SieveParserVisitorImpl(context);
try {
// Evaluate the Nodes
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveParserVisitorImpl.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveParserVisitorImpl.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveParserVisitorImpl.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveParserVisitorImpl.java Thu Sep 4 14:49:51 2008
@@ -78,7 +78,7 @@
*
* @param node
* @param data -
- * Assumes a List
+ * Assumes a List
* @return Object - A List
* @throws SieveException
*/
@@ -169,7 +169,8 @@
context.setCoordinate(node.getCoordinate());
final ScriptCoordinate coordinate = context.getCoordinate();
- Command command = new Command(node.getName(), arguments, block, coordinate);
+ Command command = new Command(node.getName(), arguments, block,
+ coordinate);
((List) data).add(command);
return data;
}
@@ -225,13 +226,13 @@
buffer.deleteCharAt(value.length() - 1);
buffer.deleteCharAt(0);
int i = 0;
- while (i<buffer.length()) {
+ while (i < buffer.length()) {
if ('\\' == buffer.charAt(i)) {
buffer.deleteCharAt(i);
}
i++;
}
-
+
final String result = buffer.toString();
// A String is terminal, add it
((List) data).add(result);
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveValidationVisitor.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveValidationVisitor.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveValidationVisitor.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/SieveValidationVisitor.java Thu Sep 4 14:49:51 2008
@@ -38,19 +38,21 @@
****************************************************************/
/**
- * Validates nodes visited.
- * Some checks are more conveniently carried out what then
- * tree has already been constructed.
+ * Validates nodes visited. Some checks are more conveniently carried out what
+ * then tree has already been constructed.
*/
public class SieveValidationVisitor implements SieveParserVisitor {
private final CommandManager commandManager;
+
private final TestManager testManager;
-
+
private boolean requireAllowed = true;
+
private boolean isInRequire = false;
-
- protected SieveValidationVisitor(final CommandManager commandManager, final TestManager testManager) {
+
+ protected SieveValidationVisitor(final CommandManager commandManager,
+ final TestManager testManager) {
super();
this.commandManager = commandManager;
this.testManager = testManager;
@@ -60,7 +62,8 @@
return visitNode(node, data);
}
- private Object visitNode(SimpleNode node, Object data) throws SieveException {
+ private Object visitNode(SimpleNode node, Object data)
+ throws SieveException {
List children = new ArrayList(node.jjtGetNumChildren());
node.childrenAccept(this, children);
return data;
@@ -81,7 +84,8 @@
if (requireAllowed) {
isInRequire = true;
} else {
- throw new SieveException("'require' is only allowed before other commands");
+ throw new SieveException(
+ "'require' is only allowed before other commands");
}
} else {
requireAllowed = false;
@@ -116,11 +120,12 @@
final Object value = node.getValue();
if (value != null && value instanceof String) {
final String quotedName = (String) value;
- final String name = quotedName.substring(1, quotedName.length()-1);
+ final String name = quotedName.substring(1,
+ quotedName.length() - 1);
try {
commandManager.getCommand(name);
} catch (LookupException e) {
- //TODO: catching is inefficient, should just check
+ // TODO: catching is inefficient, should just check
testManager.getTest(name);
}
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/StringListArgument.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/StringListArgument.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/StringListArgument.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/StringListArgument.java Thu Sep 4 14:49:51 2008
@@ -82,7 +82,7 @@
* Sets the list.
*
* @param list
- * The list to set
+ * The list to set
*/
protected void setList(List list) {
fieldList = list;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/TagArgument.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/TagArgument.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/TagArgument.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/TagArgument.java Thu Sep 4 14:49:51 2008
@@ -74,7 +74,7 @@
* Sets the tag.
*
* @param tag
- * The tag to set
+ * The tag to set
*/
protected void setTag(String tag) {
fieldTag = tag;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/Test.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/Test.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/Test.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/Test.java Thu Sep 4 14:49:51 2008
@@ -33,7 +33,6 @@
*/
public class Test implements Executable {
-
/** The name of this Test */
private String fieldName;
@@ -43,7 +42,8 @@
/**
* @see org.apache.jsieve.Executable#execute(MailAdapter, SieveContext)
*/
- public Object execute(MailAdapter mail, SieveContext context) throws SieveException {
+ public Object execute(MailAdapter mail, SieveContext context)
+ throws SieveException {
Log log = context.getLog();
if (log.isDebugEnabled()) {
log.debug(toString());
@@ -95,7 +95,7 @@
* Sets the arguments.
*
* @param arguments
- * The arguments to set
+ * The arguments to set
*/
protected void setArguments(Arguments arguments) {
fieldArguments = arguments;
@@ -105,7 +105,7 @@
* Sets the name.
*
* @param name
- * The name to set
+ * The name to set
*/
protected void setName(String name) {
fieldName = name;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/TestList.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/TestList.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/TestList.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/TestList.java Thu Sep 4 14:49:51 2008
@@ -50,7 +50,7 @@
* Constructor for TestList.
*
* @param children -
- * A List of Tests
+ * A List of Tests
*/
public TestList(List children) {
this();
@@ -61,7 +61,7 @@
* Constructor for TestList.
*
* @param child -
- * A Test
+ * A Test
*/
public TestList(Test child) {
this();
@@ -73,13 +73,14 @@
/**
* @see org.apache.jsieve.Executable#execute(MailAdapter, SieveContext)
*/
- public Object execute(MailAdapter mail, SieveContext context) throws SieveException {
+ public Object execute(MailAdapter mail, SieveContext context)
+ throws SieveException {
boolean result = true;
Iterator testsIter = getTests().iterator();
while (result && testsIter.hasNext()) {
- result = ((Boolean) ((Test) testsIter.next()).execute(mail, context))
- .booleanValue();
+ result = ((Boolean) ((Test) testsIter.next())
+ .execute(mail, context)).booleanValue();
}
return new Boolean(result);
}
@@ -97,7 +98,7 @@
* Sets the children.
*
* @param children
- * The children to set
+ * The children to set
*/
protected void setTests(List children) {
fieldTests = children;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManager.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManager.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManager.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManager.java Thu Sep 4 14:49:51 2008
@@ -23,8 +23,7 @@
import org.apache.jsieve.tests.ExecutableTest;
/**
- * Maps Test names to configured Test
- * implementation classes.
+ * Maps Test names to configured Test implementation classes.
*/
public interface TestManager {
@@ -35,7 +34,7 @@
* </p>
*
* @param name -
- * The name of the Test
+ * The name of the Test
* @return Class - The class of the Test
* @throws LookupException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManagerImpl.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManagerImpl.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManagerImpl.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/TestManagerImpl.java Thu Sep 4 14:49:51 2008
@@ -31,7 +31,7 @@
public class TestManagerImpl implements TestManager {
private final Map classNameMap;
-
+
/**
* TestManager is instanciated with getInstance
*/
@@ -46,7 +46,7 @@
* </p>
*
* @param name -
- * The name of the Test
+ * The name of the Test
* @return Class - The class of the Test
* @throws LookupException
*/
@@ -72,7 +72,7 @@
* </p>
*
* @param name -
- * The name of the Test
+ * The name of the Test
* @return Class - The class of the Test
* @throws LookupException
*/
@@ -93,7 +93,7 @@
* </p>
*
* @param name -
- * The name of the Test
+ * The name of the Test
* @return String - The name of the class
* @throws LookupException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractActionCommand.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractActionCommand.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractActionCommand.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractActionCommand.java Thu Sep 4 14:49:51 2008
@@ -46,7 +46,10 @@
* Action Command has been processed and to cancel implicit keep.
* </p>
*
- * <p>And also</p>
+ * <p>
+ * And also
+ * </p>
+ *
* @see org.apache.jsieve.commands.AbstractCommand#updateState(SieveContext)
*/
protected void updateState(SieveContext context) {
@@ -61,7 +64,10 @@
* Action Command is legal at this time.
* </p>
*
- * <p>Also,</p>
+ * <p>
+ * Also,
+ * </p>
+ *
* @see org.apache.jsieve.commands.AbstractCommand#validateState(SieveContext)
*/
protected void validateState(SieveContext context) throws CommandException {
@@ -77,17 +83,21 @@
* @see org.apache.jsieve.commands.optional.FileInto
* @see org.apache.jsieve.commands.optional.Reject
*/
- protected void validateSingleStringArguments(Arguments arguments, SieveContext context) throws SieveException {
+ protected void validateSingleStringArguments(Arguments arguments,
+ SieveContext context) throws SieveException {
List args = arguments.getArgumentList();
if (args.size() != 1)
- throw context.getCoordinate().syntaxException("Exactly 1 argument permitted. Found " + args.size());
+ throw context.getCoordinate().syntaxException(
+ "Exactly 1 argument permitted. Found " + args.size());
- Object argument = args.get(0);
+ Object argument = args.get(0);
if (!(argument instanceof StringListArgument))
- throw context.getCoordinate().syntaxException("Expecting a string-list");
+ throw context.getCoordinate().syntaxException(
+ "Expecting a string-list");
if (1 != ((StringListArgument) argument).getList().size())
- throw context.getCoordinate().syntaxException("Expecting exactly one argument");
+ throw context.getCoordinate().syntaxException(
+ "Expecting exactly one argument");
}
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractCommand.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractCommand.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractCommand.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractCommand.java Thu Sep 4 14:49:51 2008
@@ -46,8 +46,8 @@
* or extend this method to perform their own validation as appropriate.
*
* @param context
- * <code>SieveContext</code> giving contextual information,
- * not null
+ * <code>SieveContext</code> giving contextual information, not
+ * null
* @throws CommandException
*/
protected void validateState(SieveContext context) throws CommandException {
@@ -57,7 +57,9 @@
* Framework method updateState is invoked after a Sieve Command has
* executed to update the Sieve state. Subclass methods are expected to
* override or extend this method to update state as appropriate.
- * @param context TODO
+ *
+ * @param context
+ * TODO
*/
protected void updateState(SieveContext context) {
}
@@ -70,8 +72,8 @@
*
* @param arguments
* @param context
- * <code>SieveContext</code> giving contextual information,
- * not null
+ * <code>SieveContext</code> giving contextual information, not
+ * null
* @throws SieveException
*/
protected void validateArguments(Arguments arguments, SieveContext context)
@@ -88,8 +90,8 @@
*
* @param block
* @param context
- * <code>ScriptCoordinate</code> giving positional
- * information, not null
+ * <code>ScriptCoordinate</code> giving positional information,
+ * not null
* @throws SieveException
*/
protected void validateBlock(Block block, SieveContext context)
@@ -107,7 +109,9 @@
* framework method is invoked to update the state.
* </p>
*
- * <p>Also,</p>
+ * <p>
+ * Also,
+ * </p>
*
* @see org.apache.jsieve.Executable#execute(MailAdapter, SieveContext)
*/
@@ -128,8 +132,8 @@
* @param arguments
* @param block
* @param context
- * <code>SieveContext</code> giving contextual information,
- * not null
+ * <code>SieveContext</code> giving contextual information, not
+ * null
* @return Object
* @throws SieveException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractConditionalCommand.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractConditionalCommand.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractConditionalCommand.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractConditionalCommand.java Thu Sep 4 14:49:51 2008
@@ -45,7 +45,8 @@
*
* @param mail
* @param block
- * @param context TODO
+ * @param context
+ * TODO
* @return Object
* @throws SieveException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractPrologCommand.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractPrologCommand.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractPrologCommand.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/AbstractPrologCommand.java Thu Sep 4 14:49:51 2008
@@ -45,7 +45,8 @@
* </p>
*
* <p>
- * Also,</p>
+ * Also,
+ * </p>
*
* @see org.apache.jsieve.commands.AbstractCommand#validateState(SieveContext)
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Elsif.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Elsif.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Elsif.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Elsif.java Thu Sep 4 14:49:51 2008
@@ -62,7 +62,8 @@
return Boolean.FALSE;
// Run the tests
- Boolean isTestPassed = (Boolean) arguments.getTestList().execute(mail, context);
+ Boolean isTestPassed = (Boolean) arguments.getTestList().execute(mail,
+ context);
// If the tests answered TRUE, execute the Block
if (isTestPassed.booleanValue())
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/If.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/If.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/If.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/If.java Thu Sep 4 14:49:51 2008
@@ -61,7 +61,8 @@
return Boolean.FALSE;
// Run the tests
- Boolean isTestPassed = (Boolean) arguments.getTestList().execute(mail, context);
+ Boolean isTestPassed = (Boolean) arguments.getTestList().execute(mail,
+ context);
// If the tests answered TRUE, execute the Block
if (isTestPassed.booleanValue())
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Require.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Require.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Require.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/Require.java Thu Sep 4 14:49:51 2008
@@ -72,11 +72,12 @@
*
* @param name
* @param mail
- * @param context TODO
+ * @param context
+ * TODO
* @throws FeatureException
*/
- protected void validateFeature(String name, MailAdapter mail, SieveContext context)
- throws FeatureException {
+ protected void validateFeature(String name, MailAdapter mail,
+ SieveContext context) throws FeatureException {
// Validate as a Command
try {
validateCommand(name, context);
@@ -100,7 +101,8 @@
* @param name
* @throws LookupException
*/
- protected void validateCommand(String name, SieveContext context) throws LookupException {
+ protected void validateCommand(String name, SieveContext context)
+ throws LookupException {
context.getCommand(name);
}
@@ -108,10 +110,12 @@
* Method validateTest.
*
* @param name
- * @param context TODO
+ * @param context
+ * TODO
* @throws LookupException
*/
- protected void validateTest(String name, SieveContext context) throws LookupException {
+ protected void validateTest(String name, SieveContext context)
+ throws LookupException {
context.getTest(name);
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/extensions/Log.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/extensions/Log.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/extensions/Log.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/extensions/Log.java Thu Sep 4 14:49:51 2008
@@ -140,7 +140,8 @@
* Method logFatal.
*
* @param message
- * @param sieveContext TODO
+ * @param sieveContext
+ * TODO
*/
protected void logFatal(String message, SieveContext sieveContext) {
org.apache.commons.logging.Log log = sieveContext.getLog();
@@ -152,7 +153,8 @@
* Method logWarn.
*
* @param message
- * @param context TODO
+ * @param context
+ * TODO
*/
protected void logWarn(String message, SieveContext context) {
org.apache.commons.logging.Log log = context.getLog();
@@ -164,7 +166,8 @@
* Method logInfo.
*
* @param message
- * @param context TODO
+ * @param context
+ * TODO
*/
protected void logInfo(String message, SieveContext context) {
org.apache.commons.logging.Log log = context.getLog();
@@ -176,7 +179,8 @@
* Method logDebug.
*
* @param message
- * @param context TODO
+ * @param context
+ * TODO
*/
protected void logDebug(String message, SieveContext context) {
org.apache.commons.logging.Log log = context.getLog();
@@ -188,7 +192,8 @@
* Method logTrace.
*
* @param message
- * @param context TODO
+ * @param context
+ * TODO
*/
protected void logTrace(String message, SieveContext context) {
org.apache.commons.logging.Log log = context.getLog();
@@ -200,7 +205,8 @@
* Method logError.
*
* @param message
- * @param context TODO
+ * @param context
+ * TODO
*/
protected void logError(String message, SieveContext context) {
org.apache.commons.logging.Log log = context.getLog();
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/optional/Reject.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/optional/Reject.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/optional/Reject.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/commands/optional/Reject.java Thu Sep 4 14:49:51 2008
@@ -74,7 +74,8 @@
/**
* @see org.apache.jsieve.commands.AbstractCommand#validateState(SieveContext)
*/
- protected void validateState(final SieveContext context) throws CommandException {
+ protected void validateState(final SieveContext context)
+ throws CommandException {
super.validateState(context);
if (context.getCommandStateManager().isHasActions())
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/comparators/ComparatorUtils.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/comparators/ComparatorUtils.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/comparators/ComparatorUtils.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/comparators/ComparatorUtils.java Thu Sep 4 14:49:51 2008
@@ -49,18 +49,22 @@
* @param matchType
* @param matchTarget
* @param matchArgument
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
*/
public static boolean match(String comparatorName, String matchType,
- String matchTarget, String matchArgument, SieveContext context) throws SieveException {
+ String matchTarget, String matchArgument, SieveContext context)
+ throws SieveException {
boolean isMatched = false;
if (matchType.equals(IS_TAG))
isMatched = is(comparatorName, matchTarget, matchArgument, context);
else if (matchType.equals(CONTAINS_TAG))
- isMatched = contains(comparatorName, matchTarget, matchArgument, context);
+ isMatched = contains(comparatorName, matchTarget, matchArgument,
+ context);
else if (matchType.equals(MATCHES_TAG))
- isMatched = matches(comparatorName, matchTarget, matchArgument, context);
+ isMatched = matches(comparatorName, matchTarget, matchArgument,
+ context);
return isMatched;
}
@@ -80,8 +84,7 @@
// TODO Is there a way to re-use the compiled pattern?
try {
String regex = sieveToJavaRegex(glob);
- return Pattern.compile(regex).matcher(
- string).matches();
+ return Pattern.compile(regex).matcher(string).matches();
} catch (PatternSyntaxException e) {
throw new SievePatternException(e.getMessage());
}
@@ -178,8 +181,7 @@
*/
public static boolean contains(String comparatorName, String container,
String contents, SieveContext context) throws LookupException {
- Contains comparatorObj = context.getComparator(
- comparatorName);
+ Contains comparatorObj = context.getComparator(comparatorName);
return comparatorObj.contains(container, contents);
}
@@ -195,8 +197,7 @@
*/
public static boolean is(String comparatorName, String string1,
String string2, SieveContext context) throws LookupException {
- Equals comparatorObj = context.getComparator(
- comparatorName);
+ Equals comparatorObj = context.getComparator(comparatorName);
return comparatorObj.equals(string1, string2);
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionFileInto.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionFileInto.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionFileInto.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionFileInto.java Thu Sep 4 14:49:51 2008
@@ -66,7 +66,7 @@
* Sets the destination.
*
* @param destination
- * The destination to set
+ * The destination to set
*/
protected void setDestination(String destination) {
fieldDestination = destination;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionRedirect.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionRedirect.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionRedirect.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionRedirect.java Thu Sep 4 14:49:51 2008
@@ -61,7 +61,7 @@
* Sets the address.
*
* @param address
- * The address to set
+ * The address to set
*/
protected void setAddress(String address) {
fieldAddress = address;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionReject.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionReject.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionReject.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/ActionReject.java Thu Sep 4 14:49:51 2008
@@ -63,7 +63,7 @@
* Sets the message explaining the reason for rejection.
*
* @param message
- * The message to set
+ * The message to set
*/
protected void setMessage(String message) {
fieldMessage = message;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/AddressImpl.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/AddressImpl.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/AddressImpl.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/AddressImpl.java Thu Sep 4 14:49:51 2008
@@ -25,12 +25,16 @@
public final class AddressImpl implements MailAdapter.Address {
private final String localPart;
+
private final String domain;
-
+
/**
* Constructs an address.
- * @param localPart the local part of the address
- * @param domain the domain part of the address
+ *
+ * @param localPart
+ * the local part of the address
+ * @param domain
+ * the domain part of the address
*/
public AddressImpl(final String localPart, final String domain) {
super();
@@ -40,6 +44,7 @@
/**
* Gets the domain of the address.
+ *
* @return domain
*/
public String getDomain() {
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/MailAdapter.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/MailAdapter.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/MailAdapter.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/mail/MailAdapter.java Thu Sep 4 14:49:51 2008
@@ -42,32 +42,31 @@
*
* <h4>Implementing parseAddresses</h4>
* <p>
- * <a href='http://james.apache.org/mime4j'>Apache Mime4J</a> is a parser
- * for <abbr title='Multipurpose Internet Mail Extensions'>
- * <a href='http://www.faqs.org/rfcs/rfc2045.html'>MIME</a></abbr>.
- * It can easily be used to parse an address string into addresses.
- * For example:
+ * <a href='http://james.apache.org/mime4j'>Apache Mime4J</a> is a parser for
+ * <abbr title='Multipurpose Internet Mail Extensions'> <a
+ * href='http://www.faqs.org/rfcs/rfc2045.html'>MIME</a></abbr>. It can easily
+ * be used to parse an address string into addresses. For example:
* </p>
* <code><pre>
- * import org.apache.james.mime4j.field.address.AddressList;
- * import org.apache.james.mime4j.field.address.Mailbox;
- * import org.apache.james.mime4j.field.address.MailboxList;
- * import org.apache.james.mime4j.field.address.parser.ParseException;
- * ...
- * public Address[] parseAddresses(String arg) throws SieveMailException, InternetAddressException {
- * try {
- * final MailboxList list = AddressList.parse(arg).flatten();
- * final int size = list.size();
- * final Address[] results = new Address[size];
- * for (int i=0;i<size;i++) {
- * final Mailbox mailbox = list.get(i);
- * results[i] = new AddressImpl(mailbox.getLocalPart(), mailbox.getDomain());
- * }
- * return null;
- * } catch (ParseException e) {
- * throw new InternetAddressException(e);
- * }
- * }
+ * import org.apache.james.mime4j.field.address.AddressList;
+ * import org.apache.james.mime4j.field.address.Mailbox;
+ * import org.apache.james.mime4j.field.address.MailboxList;
+ * import org.apache.james.mime4j.field.address.parser.ParseException;
+ * ...
+ * public Address[] parseAddresses(String arg) throws SieveMailException, InternetAddressException {
+ * try {
+ * final MailboxList list = AddressList.parse(arg).flatten();
+ * final int size = list.size();
+ * final Address[] results = new Address[size];
+ * for (int i=0;i<size;i++) {
+ * final Mailbox mailbox = list.get(i);
+ * results[i] = new AddressImpl(mailbox.getLocalPart(), mailbox.getDomain());
+ * }
+ * return null;
+ * } catch (ParseException e) {
+ * throw new InternetAddressException(e);
+ * }
+ * }
* </pre></code>
*/
public interface MailAdapter {
@@ -163,11 +162,11 @@
public String getContentType() throws SieveMailException;
/**
- * Method getContent returns object containing the message content.
- * TODO: This is poorly defined.
- * TODO: This is used to search a mail body and needs to return a string.
- * TODO: But creating a string is not efficient.
+ * Method getContent returns object containing the message content. TODO:
+ * This is poorly defined. TODO: This is used to search a mail body and
+ * needs to return a string. TODO: But creating a string is not efficient.
* TODO: It would be better to allow the adapter to search.
+ *
* @return Object
* @throws SieveMailException
*/
@@ -186,15 +185,15 @@
* </p>
*
* @param headerName
- * name of the header whose value is to be split
+ * name of the header whose value is to be split
* @return addresses listed in the given header not null, possibly empty
* @throws InternetAddressException
- * when the header value is not an address or list of
- * addresses. Implemetations may elect to support only
- * standard headers known to containing one or more
- * addresses rather than parsing the value content
+ * when the header value is not an address or list of addresses.
+ * Implemetations may elect to support only standard headers
+ * known to containing one or more addresses rather than parsing
+ * the value content
* @throws SieveMailException
- * when the header value cannot be read
+ * when the header value cannot be read
*/
public Address[] parseAddresses(String headerName)
throws SieveMailException, InternetAddressException;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/SieveNode.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/SieveNode.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/SieveNode.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/SieveNode.java Thu Sep 4 14:49:51 2008
@@ -72,7 +72,7 @@
* Sets the name.
*
* @param name
- * The name to set
+ * The name to set
*/
public void setName(String name) {
fieldName = name;
@@ -82,7 +82,7 @@
* Sets the value.
*
* @param value
- * The value to set
+ * The value to set
*/
public void setValue(Object value) {
fieldValue = value;
@@ -101,7 +101,7 @@
* Sets the first token comprising this node.
*
* @param firstToken
- * <code>Token</code>, not null
+ * <code>Token</code>, not null
*/
public void setFirstToken(Token firstToken) {
this.firstToken = firstToken;
@@ -120,7 +120,7 @@
* Sets the last token comprising this node.
*
* @param lastToken
- * <code>Token</code>, not null
+ * <code>Token</code>, not null
*/
public void setLastToken(Token lastToken) {
this.lastToken = lastToken;
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/address/SieveAddressBuilder.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/address/SieveAddressBuilder.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/address/SieveAddressBuilder.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/parser/address/SieveAddressBuilder.java Thu Sep 4 14:49:51 2008
@@ -66,7 +66,7 @@
* Adds addresses in the given list.
*
* @param addressList
- * RFC822 address list
+ * RFC822 address list
* @throws ParseException
*/
public void addAddresses(String addressList) throws ParseException {
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractCompatatorTest.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractCompatatorTest.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractCompatatorTest.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractCompatatorTest.java Thu Sep 4 14:49:51 2008
@@ -136,7 +136,8 @@
return match(mail, (addressPart == null ? ALL_TAG : addressPart),
(comparator == null ? ASCII_CASEMAP_COMPARATOR : comparator),
- (matchType == null ? IS_TAG : matchType), headerNames, keys, context);
+ (matchType == null ? IS_TAG : matchType), headerNames, keys,
+ context);
}
/**
@@ -148,13 +149,14 @@
* @param matchType
* @param headerNames
* @param keys
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveMailException
*/
protected boolean match(MailAdapter mail, String addressPart,
- String comparator, String matchType, List headerNames, List keys, SieveContext context)
- throws SieveException {
+ String comparator, String matchType, List headerNames, List keys,
+ SieveContext context) throws SieveException {
// Iterate over the header names looking for a match
boolean isMatched = false;
Iterator headerNamesIter = headerNames.iterator();
@@ -174,13 +176,14 @@
* @param matchType
* @param headerName
* @param keys
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveMailException
*/
protected boolean match(MailAdapter mail, String addressPart,
- String comparator, String matchType, String headerName, List keys, SieveContext context)
- throws SieveException {
+ String comparator, String matchType, String headerName, List keys,
+ SieveContext context) throws SieveException {
// Iterate over the keys looking for a match
boolean isMatched = false;
Iterator keysIter = keys.iterator();
@@ -200,13 +203,14 @@
* @param matchType
* @param headerName
* @param key
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveMailException
*/
protected abstract boolean match(MailAdapter mail, String addressPart,
- String comparator, String matchType, String headerName, String key, SieveContext context)
- throws SieveException;
+ String comparator, String matchType, String headerName, String key,
+ SieveContext context) throws SieveException;
/**
* @see org.apache.jsieve.tests.AbstractTest#validateArguments(Arguments,
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractTest.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractTest.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractTest.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AbstractTest.java Thu Sep 4 14:49:51 2008
@@ -57,7 +57,8 @@
* <p>
* Also,
*
- * @see org.apache.jsieve.tests.ExecutableTest#execute(MailAdapter, Arguments, SieveContext)
+ * @see org.apache.jsieve.tests.ExecutableTest#execute(MailAdapter,
+ * Arguments, SieveContext)
*/
public boolean execute(MailAdapter mail, Arguments arguments,
SieveContext context) throws SieveException {
@@ -71,8 +72,8 @@
* @param mail
* @param arguments
* @param context
- * <code>SieveContext</code> giving contextual information,
- * not null
+ * <code>SieveContext</code> giving contextual information, not
+ * null
* @return boolean
* @throws SieveException
*/
@@ -87,8 +88,8 @@
*
* @param arguments
* @param context
- * <code>SieveContext</code> giving comntextual
- * information, not null
+ * <code>SieveContext</code> giving comntextual information,
+ * not null
* @throws SieveException
*/
protected void validateArguments(Arguments arguments, SieveContext context)
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Address.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Address.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Address.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Address.java Thu Sep 4 14:49:51 2008
@@ -39,8 +39,8 @@
}
protected boolean match(MailAdapter mail, String addressPart,
- String comparator, String matchType, String headerName, String key, SieveContext context)
- throws SieveException {
+ String comparator, String matchType, String headerName, String key,
+ SieveContext context) throws SieveException {
final MailAdapter.Address[] addresses = getMatchingValues(mail,
headerName);
final int length = addresses.length;
@@ -60,8 +60,8 @@
}
protected boolean match(String addressPart, String comparator,
- String matchType, MailAdapter.Address address, String key, SieveContext context)
- throws SieveException {
+ String matchType, MailAdapter.Address address, String key,
+ SieveContext context) throws SieveException {
final String localPart = address.getLocalPart();
final String domain = address.getDomain();
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AllOf.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AllOf.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AllOf.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AllOf.java Thu Sep 4 14:49:51 2008
@@ -48,8 +48,8 @@
boolean result = true;
Iterator testsIter = arguments.getTestList().getTests().iterator();
while (result && testsIter.hasNext()) {
- result = ((Boolean) ((Test) testsIter.next()).execute(mail, context))
- .booleanValue();
+ result = ((Boolean) ((Test) testsIter.next())
+ .execute(mail, context)).booleanValue();
}
return result;
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AnyOf.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AnyOf.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AnyOf.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/AnyOf.java Thu Sep 4 14:49:51 2008
@@ -48,8 +48,8 @@
boolean result = false;
Iterator testsIter = arguments.getTestList().getTests().iterator();
while (!result && testsIter.hasNext()) {
- result = ((Boolean) ((Test) testsIter.next()).execute(mail, context))
- .booleanValue();
+ result = ((Boolean) ((Test) testsIter.next())
+ .execute(mail, context)).booleanValue();
}
return result;
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/ExecutableTest.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/ExecutableTest.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/ExecutableTest.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/ExecutableTest.java Thu Sep 4 14:49:51 2008
@@ -35,8 +35,8 @@
* @param mail
* @param arguments
* @param context
- * <code>SieveContext</code> giving contextual information,
- * not null
+ * <code>SieveContext</code> giving contextual information, not
+ * null
* @return boolean
* @throws SieveException
*/
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Header.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Header.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Header.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Header.java Thu Sep 4 14:49:51 2008
@@ -148,7 +148,8 @@
* @param matchType
* @param headerNames
* @param keys
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveException
*/
@@ -160,7 +161,8 @@
Iterator headerNamesIter = headerNames.iterator();
while (!isMatched && headerNamesIter.hasNext()) {
isMatched = match(comparator, matchType, mail
- .getMatchingHeader((String) headerNamesIter.next()), keys, context);
+ .getMatchingHeader((String) headerNamesIter.next()), keys,
+ context);
}
return isMatched;
}
@@ -172,12 +174,14 @@
* @param matchType
* @param headerValues
* @param keys
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveException
*/
protected boolean match(String comparator, String matchType,
- List headerValues, List keys, SieveContext context) throws SieveException {
+ List headerValues, List keys, SieveContext context)
+ throws SieveException {
// Special case for empty values
// If the matchType is :contains
// add the headerValue of a null string
@@ -208,12 +212,14 @@
* @param matchType
* @param headerValue
* @param keys
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveException
*/
protected boolean match(String comparator, String matchType,
- String headerValue, List keys, SieveContext context) throws SieveException {
+ String headerValue, List keys, SieveContext context)
+ throws SieveException {
// Iterate over the keys looking for a match
boolean isMatched = false;
Iterator keysIter = keys.iterator();
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Not.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Not.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Not.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/Not.java Thu Sep 4 14:49:51 2008
@@ -54,8 +54,8 @@
Iterator testsIter = tests.iterator();
while (testsIter.hasNext()) {
result = result
- && ((Boolean) ((Test) testsIter.next()).execute(mail, context))
- .booleanValue();
+ && ((Boolean) ((Test) testsIter.next()).execute(mail,
+ context)).booleanValue();
}
return !result;
}
Modified: james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/optional/Envelope.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/optional/Envelope.java?rev=692268&r1=692267&r2=692268&view=diff
==============================================================================
--- james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/optional/Envelope.java (original)
+++ james/jsieve/trunk/src/main/java/org/apache/jsieve/tests/optional/Envelope.java Thu Sep 4 14:49:51 2008
@@ -60,13 +60,14 @@
* @param matchType
* @param headerValue
* @param key
- * @param context TODO
+ * @param context
+ * TODO
* @return boolean
* @throws SieveMailException
*/
protected boolean match(String addressPart, String comparator,
- String matchType, String headerValue, String key, SieveContext context)
- throws SieveException {
+ String matchType, String headerValue, String key,
+ SieveContext context) throws SieveException {
// Extract the part of the address we are matching on
String matchAddress = null;
@@ -105,8 +106,8 @@
}
protected boolean match(MailAdapter mail, String addressPart,
- String comparator, String matchType, String headerName, String key, SieveContext context)
- throws SieveException {
+ String comparator, String matchType, String headerName, String key,
+ SieveContext context) throws SieveException {
Iterator headerValuesIter = getMatchingValues(mail, headerName)
.iterator();
boolean isMatched = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org