org.alfresco.web.app.servlet.command
Class CommandFactory

java.lang.Object
  extended by org.alfresco.web.app.servlet.command.CommandFactory

public final class CommandFactory
extends java.lang.Object

Command Factory helper


Method Summary
 Command createCommand(java.lang.String name)
          Create a command instance of the specified command name
static CommandFactory getInstance()
           
 void registerCommand(java.lang.String name, java.lang.Class clazz)
          Register a command name against an implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CommandFactory getInstance()
Returns:
the singleton CommandFactory instance

registerCommand

public void registerCommand(java.lang.String name,
                            java.lang.Class clazz)
Register a command name against an implementation

Parameters:
name - Unique name of the command
clazz - Class implementation of the command

createCommand

public Command createCommand(java.lang.String name)
Create a command instance of the specified command name

Parameters:
name - Name of the command to create (must be registered)
Returns:
the Command instance or null if not found


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.