|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.command.support.DefaultCommandManager
public class DefaultCommandManager
Constructor Summary | |
---|---|
DefaultCommandManager()
|
|
DefaultCommandManager(CommandRegistry parent)
|
|
DefaultCommandManager(CommandServices commandServices)
|
Method Summary | |
---|---|
void |
addCommandInterceptor(String commandId,
ActionCommandInterceptor interceptor)
|
void |
addCommandRegistryListener(CommandRegistryListener l)
Adds the given listener to the colleciton of listeners that will be notified of registry events. |
AbstractCommand |
configure(AbstractCommand command)
Configures the given command. |
boolean |
containsActionCommand(String commandId)
Returns true if the registry contains a command of type ActionCommand with the
given id. |
boolean |
containsCommand(String commandId)
Returns true if the registry contains a command with the given identifier. |
boolean |
containsCommandGroup(String groupId)
Returns true if the registry contains a command of type CommandGroup with the
given id. |
CommandGroup |
createCommandGroup(String groupId,
Object[] members)
|
ExclusiveCommandGroup |
createExclusiveCommandGroup(String groupId,
Object[] members)
|
TargetableActionCommand |
createTargetableActionCommand(String commandId,
ActionCommandExecutor delegate)
|
ActionCommand |
getActionCommand(String commandId)
Returns the ActionCommand that has the given id. |
ButtonFactory |
getButtonFactory()
|
Object |
getCommand(String commandId)
Retrieves from the registry the command with the given identifier. |
Object |
getCommand(String commandId,
Class requiredType)
Retrieves from the registry the command with the given identifier. |
CommandConfigurer |
getCommandConfigurer()
|
CommandGroup |
getCommandGroup(String groupId)
Returns the CommandGroup that has the given id. |
CommandServices |
getCommandServices()
|
ComponentFactory |
getComponentFactory()
|
CommandButtonConfigurer |
getDefaultButtonConfigurer()
|
CommandFaceDescriptor |
getFaceDescriptor(AbstractCommand command,
String faceDescriptorId)
|
MenuFactory |
getMenuFactory()
|
CommandButtonConfigurer |
getMenuItemButtonConfigurer()
|
CommandButtonConfigurer |
getPullDownMenuButtonConfigurer()
|
CommandButtonConfigurer |
getToolBarButtonConfigurer()
|
ButtonFactory |
getToolBarButtonFactory()
|
Class |
getType(String commandId)
Returns the type of the command with the given identifier, if it is contained in the registry. |
boolean |
isTypeMatch(String commandId,
Class targetType)
Returns true if the command with the given identifier is assignable to the given type. |
Object |
postProcessAfterInitialization(Object bean,
String beanName)
|
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
|
void |
registerCommand(AbstractCommand command)
Registers the given command with the registry. |
void |
removeCommandInterceptor(String commandId,
ActionCommandInterceptor interceptor)
|
void |
removeCommandRegistryListener(CommandRegistryListener l)
Remove the given listener from the collection of listeners that will be notified of registry events. |
void |
setBeanFactory(BeanFactory beanFactory)
|
void |
setCommandConfigurer(CommandConfigurer commandConfigurer)
|
void |
setCommandServices(CommandServices commandServices)
|
void |
setParent(CommandRegistry parent)
|
void |
setTargetableActionCommandExecutor(String commandId,
ActionCommandExecutor executor)
Sets a command executor for the command with the given id. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultCommandManager()
public DefaultCommandManager(CommandRegistry parent)
public DefaultCommandManager(CommandServices commandServices)
Method Detail |
---|
public void setCommandServices(CommandServices commandServices)
public CommandServices getCommandServices()
public void setParent(CommandRegistry parent)
public CommandConfigurer getCommandConfigurer()
public void setCommandConfigurer(CommandConfigurer commandConfigurer)
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
public ComponentFactory getComponentFactory()
getComponentFactory
in interface CommandServices
public ButtonFactory getToolBarButtonFactory()
getToolBarButtonFactory
in interface CommandServices
public ButtonFactory getButtonFactory()
getButtonFactory
in interface CommandServices
public MenuFactory getMenuFactory()
getMenuFactory
in interface CommandServices
public CommandButtonConfigurer getDefaultButtonConfigurer()
getDefaultButtonConfigurer
in interface CommandServices
public CommandButtonConfigurer getToolBarButtonConfigurer()
getToolBarButtonConfigurer
in interface CommandServices
public CommandButtonConfigurer getMenuItemButtonConfigurer()
getMenuItemButtonConfigurer
in interface CommandServices
public CommandButtonConfigurer getPullDownMenuButtonConfigurer()
getPullDownMenuButtonConfigurer
in interface CommandServices
public CommandFaceDescriptor getFaceDescriptor(AbstractCommand command, String faceDescriptorId)
getFaceDescriptor
in interface CommandFaceDescriptorRegistry
public ActionCommand getActionCommand(String commandId)
CommandRegistry
ActionCommand
that has the given id.
getActionCommand
in interface CommandRegistry
commandId
- The id of the action command to be returned.
public CommandGroup getCommandGroup(String groupId)
CommandRegistry
CommandGroup
that has the given id.
getCommandGroup
in interface CommandRegistry
groupId
- The id of the command group to be returned.
public boolean containsCommandGroup(String groupId)
CommandRegistry
CommandGroup
with the
given id.
containsCommandGroup
in interface CommandRegistry
groupId
- The id of the command group to be searched for.
CommandGroup
.public boolean containsActionCommand(String commandId)
CommandRegistry
ActionCommand
with the
given id.
containsActionCommand
in interface CommandRegistry
commandId
- The id of the command to be searched for.
ActionCommand
.public void addCommandInterceptor(String commandId, ActionCommandInterceptor interceptor)
addCommandInterceptor
in interface CommandManager
public void removeCommandInterceptor(String commandId, ActionCommandInterceptor interceptor)
removeCommandInterceptor
in interface CommandManager
public void registerCommand(AbstractCommand command)
CommandRegistry
CommandRegistryListener.commandRegistered(CommandRegistryEvent)
method. If the
given command is an instance of CommandGroup
, its
CommandGroup.setCommandRegistry(CommandRegistry)
method must be called to set this
instance as the registry for the command group.
registerCommand
in interface CommandRegistry
command
- The command to be registered. Must not be null.public void setTargetableActionCommandExecutor(String commandId, ActionCommandExecutor executor)
CommandRegistry
TargetableActionCommand
.
setTargetableActionCommandExecutor
in interface CommandRegistry
commandId
- The id of the targetable command that will have its executor set.
Must not be null.executor
- The command executor. May be null.public void addCommandRegistryListener(CommandRegistryListener l)
CommandRegistry
addCommandRegistryListener
in interface CommandRegistry
l
- The listener to be added. Must not be null.public void removeCommandRegistryListener(CommandRegistryListener l)
CommandRegistry
removeCommandRegistryListener
in interface CommandRegistry
l
- The listener to be removed.public TargetableActionCommand createTargetableActionCommand(String commandId, ActionCommandExecutor delegate)
createTargetableActionCommand
in interface CommandFactory
public CommandGroup createCommandGroup(String groupId, Object[] members)
createCommandGroup
in interface CommandFactory
public ExclusiveCommandGroup createExclusiveCommandGroup(String groupId, Object[] members)
createExclusiveCommandGroup
in interface CommandFactory
public AbstractCommand configure(AbstractCommand command)
CommandConfigurer
configure
in interface CommandConfigurer
command
- The command to be configured. Must not be null.
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException
postProcessAfterInitialization
in interface BeanPostProcessor
BeansException
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException
postProcessBeforeInitialization
in interface BeanPostProcessor
BeansException
public boolean containsCommand(String commandId)
containsCommand
in interface CommandRegistry
commandId
- The ID of the command to search for.
public Object getCommand(String commandId, Class requiredType) throws CommandNotOfRequiredTypeException
getCommand
in interface CommandRegistry
commandId
- The identifier of the command to be retrieved. Must not be null.requiredType
- The required type of the command with the given id.
CommandNotOfRequiredTypeException
- if the retrieved command is not assignable to
the required type.public Object getCommand(String commandId)
getCommand
in interface CommandRegistry
commandId
- The ID of the command to be retrieved.
public Class getType(String commandId)
getType
in interface CommandRegistry
commandId
- The ID of the command whose type is to be returned. Must not be null.
public boolean isTypeMatch(String commandId, Class targetType)
isTypeMatch
in interface CommandRegistry
commandId
- The ID of the command whose type will be checked. Must not be null.targetType
- The type to be checked against the type of the command. Must not be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |