|
||||||||||
| 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 BeanFactoryAwarepublic ComponentFactory getComponentFactory()
getComponentFactory in interface CommandServicespublic ButtonFactory getToolBarButtonFactory()
getToolBarButtonFactory in interface CommandServicespublic ButtonFactory getButtonFactory()
getButtonFactory in interface CommandServicespublic MenuFactory getMenuFactory()
getMenuFactory in interface CommandServicespublic CommandButtonConfigurer getDefaultButtonConfigurer()
getDefaultButtonConfigurer in interface CommandServicespublic CommandButtonConfigurer getToolBarButtonConfigurer()
getToolBarButtonConfigurer in interface CommandServicespublic CommandButtonConfigurer getMenuItemButtonConfigurer()
getMenuItemButtonConfigurer in interface CommandServicespublic CommandButtonConfigurer getPullDownMenuButtonConfigurer()
getPullDownMenuButtonConfigurer in interface CommandServices
public CommandFaceDescriptor getFaceDescriptor(AbstractCommand command,
String faceDescriptorId)
getFaceDescriptor in interface CommandFaceDescriptorRegistrypublic ActionCommand getActionCommand(String commandId)
CommandRegistryActionCommand that has the given id.
getActionCommand in interface CommandRegistrycommandId - The id of the action command to be returned.
public CommandGroup getCommandGroup(String groupId)
CommandRegistryCommandGroup that has the given id.
getCommandGroup in interface CommandRegistrygroupId - The id of the command group to be returned.
public boolean containsCommandGroup(String groupId)
CommandRegistryCommandGroup with the
given id.
containsCommandGroup in interface CommandRegistrygroupId - The id of the command group to be searched for.
CommandGroup.public boolean containsActionCommand(String commandId)
CommandRegistryActionCommand with the
given id.
containsActionCommand in interface CommandRegistrycommandId - 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 CommandManagerpublic void registerCommand(AbstractCommand command)
CommandRegistryCommandRegistryListener.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 CommandRegistrycommand - The command to be registered. Must not be null.
public void setTargetableActionCommandExecutor(String commandId,
ActionCommandExecutor executor)
CommandRegistryTargetableActionCommand.
setTargetableActionCommandExecutor in interface CommandRegistrycommandId - 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 CommandRegistryl - The listener to be added. Must not be null.public void removeCommandRegistryListener(CommandRegistryListener l)
CommandRegistry
removeCommandRegistryListener in interface CommandRegistryl - 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 CommandFactorypublic AbstractCommand configure(AbstractCommand command)
CommandConfigurer
configure in interface CommandConfigurercommand - The command to be configured. Must not be null.
public Object postProcessAfterInitialization(Object bean,
String beanName)
throws BeansException
postProcessAfterInitialization in interface BeanPostProcessorBeansException
public Object postProcessBeforeInitialization(Object bean,
String beanName)
throws BeansException
postProcessBeforeInitialization in interface BeanPostProcessorBeansExceptionpublic boolean containsCommand(String commandId)
containsCommand in interface CommandRegistrycommandId - The ID of the command to search for.
public Object getCommand(String commandId,
Class requiredType)
throws CommandNotOfRequiredTypeException
getCommand in interface CommandRegistrycommandId - 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 CommandRegistrycommandId - The ID of the command to be retrieved.
public Class getType(String commandId)
getType in interface CommandRegistrycommandId - 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 CommandRegistrycommandId - 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 | |||||||||