org.pietschy.command
Interface GroupFactory


public interface GroupFactory

This factory interface is used by the library when ever a new GroupCommand is required. The factory can be configured by calling CommandManager.setGroupFactory(org.pietschy.command.GroupFactory).

Version:
$Revision: 1.6 $
Author:
andrewp

Method Summary
 CommandGroup createGroup(CommandManager commandManager)
          Creates a new anonymous group that uses the specified container.
 CommandGroup createGroup(CommandManager commandManager, java.lang.String commandId)
          Creates a new group with the specified Id that uses the specified container.
 ToggleCommandGroup createToggleGroup(CommandManager commandManager)
          Creates a new anonymous exclusive group that uses the specified container.
 ToggleCommandGroup createToggleGroup(CommandManager commandManager, java.lang.String commandId)
          Creates a new exclusive group with the specified Id that uses the specified container.
 

Method Detail

createGroup

CommandGroup createGroup(CommandManager commandManager)
Creates a new anonymous group that uses the specified container.

Parameters:
commandManager - the CommandManager the group is to use.
Returns:
a new GroupCommand instance.

createGroup

CommandGroup createGroup(CommandManager commandManager,
                         java.lang.String commandId)
Creates a new group with the specified Id that uses the specified container.

Parameters:
commandId - the Id of the group
commandManager - the CommandManager the group is to use.
Returns:
a new GroupCommand instance.

createToggleGroup

ToggleCommandGroup createToggleGroup(CommandManager commandManager)
Creates a new anonymous exclusive group that uses the specified container.

Parameters:
commandManager - the CommandManager the group is to use.
Returns:
a new ToggleGroupCommand instance.

createToggleGroup

ToggleCommandGroup createToggleGroup(CommandManager commandManager,
                                     java.lang.String commandId)
Creates a new exclusive group with the specified Id that uses the specified container.

Parameters:
commandId - the Id of the group
commandManager - the CommandManager the group is to use.
Returns:
a new ToggleGroupCommand instance.