org.apache.jsieve.commands.extensions
Class Log

java.lang.Object
  extended by org.apache.jsieve.commands.AbstractCommand
      extended by org.apache.jsieve.commands.extensions.Log
All Implemented Interfaces:
ExecutableCommand

public class Log
extends AbstractCommand

Class Log is an extension that implements a Command to write messages to the Sieve Log. The BNF syntax is...

log [(:fatal / :error / :warn / :info / :debug / :trace)] string

The default log level is :info.


Constructor Summary
Log()
          Constructor for Log.
 
Method Summary
protected  java.lang.Object executeBasic(MailAdapter mail, Arguments arguments, Block block, SieveContext context)
          Abstract method executeBasic invokes a Sieve Command.
protected  void log(java.lang.String logLevel, java.lang.String message, SieveContext context)
          Method log.
protected  void logDebug(java.lang.String message, SieveContext context)
          Method logDebug.
protected  void logError(java.lang.String message, SieveContext context)
          Method logError.
protected  void logFatal(java.lang.String message, SieveContext sieveContext)
          Method logFatal.
protected  void logInfo(java.lang.String message, SieveContext context)
          Method logInfo.
protected  void logTrace(java.lang.String message, SieveContext context)
          Method logTrace.
protected  void logWarn(java.lang.String message, SieveContext context)
          Method logWarn.
protected  void validateArguments(Arguments arguments, SieveContext context)
          Framework method validateArguments is invoked before a Sieve Command is executed to validate its arguments.
 
Methods inherited from class org.apache.jsieve.commands.AbstractCommand
execute, updateState, validateBlock, validateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Constructor for Log.

Method Detail

executeBasic

protected java.lang.Object executeBasic(MailAdapter mail,
                                        Arguments arguments,
                                        Block block,
                                        SieveContext context)
                                 throws SieveException
Description copied from class: AbstractCommand
Abstract method executeBasic invokes a Sieve Command.

Specified by:
executeBasic in class AbstractCommand
context - SieveContext giving contextual information, not null
Returns:
Object
Throws:
SieveException
See Also:
AbstractCommand.executeBasic(MailAdapter, Arguments, Block, SieveContext)

log

protected void log(java.lang.String logLevel,
                   java.lang.String message,
                   SieveContext context)
            throws SyntaxException
Method log.

Parameters:
logLevel -
message -
Throws:
SyntaxException

logFatal

protected void logFatal(java.lang.String message,
                        SieveContext sieveContext)
Method logFatal.

Parameters:
message - not null
sieveContext - not null

logWarn

protected void logWarn(java.lang.String message,
                       SieveContext context)
Method logWarn.

Parameters:
message - not null
context - not null

logInfo

protected void logInfo(java.lang.String message,
                       SieveContext context)
Method logInfo.

Parameters:
message - not null
context - not null

logDebug

protected void logDebug(java.lang.String message,
                        SieveContext context)
Method logDebug.

Parameters:
message - not null
context - not null

logTrace

protected void logTrace(java.lang.String message,
                        SieveContext context)
Method logTrace.

Parameters:
message - not null
context - not null

logError

protected void logError(java.lang.String message,
                        SieveContext context)
Method logError.

Parameters:
message - not null
context - not null

validateArguments

protected void validateArguments(Arguments arguments,
                                 SieveContext context)
                          throws SieveException
Description copied from class: AbstractCommand
Framework method validateArguments is invoked before a Sieve Command is executed to validate its arguments. Subclass methods are expected to override or extend this method to perform their own validation as appropriate.

Overrides:
validateArguments in class AbstractCommand
context - SieveContext giving contextual information, not null
Throws:
SieveException
See Also:
AbstractCommand.validateArguments(Arguments, SieveContext)


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.