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(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, 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, String commandId)
Creates a new exclusive group with the specified Id that uses the specified container.

Method Details

createGroup

public 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

public CommandGroup createGroup(CommandManager commandManager,
                                String commandId)
Creates a new group with the specified Id that uses the specified container.
Parameters:
commandManager - the CommandManager the group is to use.
commandId - the Id of the group
Returns:
a new GroupCommand instance.

createToggleGroup

public 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

public ToggleCommandGroup createToggleGroup(CommandManager commandManager,
                                            String commandId)
Creates a new exclusive group with the specified Id that uses the specified container.
Parameters:
commandManager - the CommandManager the group is to use.
commandId - the Id of the group
Returns:
a new ToggleGroupCommand instance.