org.apache.jsieve
Class Command

java.lang.Object
  extended byorg.apache.jsieve.Command
All Implemented Interfaces:
Executable

public class Command
extends java.lang.Object
implements Executable

A parsed representation of the RFC3028 BNF...

command = identifier arguments ( ";" / block )


Constructor Summary
Command(java.lang.String name, Arguments arguments, Block block, SieveContext context)
          Constructor for Command.
 
Method Summary
 java.lang.Object execute(MailAdapter mail)
           
 Arguments getArguments()
          Returns the arguments.
 Block getBlock()
          Returns the block.
 java.lang.String getName()
          Returns the name.
static ExecutableCommand lookup(java.lang.String name)
          Looks up an executable command with the given name.
protected  void setArguments(Arguments arguments)
          Sets the arguments.
protected  void setBlock(Block block)
          Sets the block.
protected  void setName(java.lang.String name)
          Sets the name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Command

public Command(java.lang.String name,
               Arguments arguments,
               Block block,
               SieveContext context)
Constructor for Command.

Parameters:
name -
arguments -
block -
Method Detail

lookup

public static ExecutableCommand lookup(java.lang.String name)
                                throws LookupException
Looks up an executable command with the given name.

Parameters:
name - not null
Returns:
ExecutableCommand, not null
Throws:
LookupException - if the command is not available

getName

public java.lang.String getName()
Returns the name.

Returns:
String

setName

protected void setName(java.lang.String name)
Sets the name.

Parameters:
name - The name to set

toString

public java.lang.String toString()
See Also:
Object.toString()

getArguments

public Arguments getArguments()
Returns the arguments.

Returns:
Arguments

getBlock

public Block getBlock()
Returns the block.

Returns:
Block

setArguments

protected void setArguments(Arguments arguments)
Sets the arguments.

Parameters:
arguments - The arguments to set

setBlock

protected void setBlock(Block block)
Sets the block.

Parameters:
block - The block to set

execute

public java.lang.Object execute(MailAdapter mail)
                         throws SieveException
Specified by:
execute in interface Executable
Throws:
SieveException
See Also:
Executable.execute(MailAdapter)


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