info.magnolia.commands
Class MgnlCatalog

java.lang.Object
  extended by info.magnolia.commands.MgnlCatalog
All Implemented Interfaces:
Catalog

public class MgnlCatalog
extends Object
implements Catalog

Named command catalogs. Used to choose from multiple commands of the same name. The commands from catalog with name matching the repository will be used. Replaces the functionality of the org.apache.commons.chain.CatalogBase class.


Field Summary
protected  Map<String,Command> commands
           
 
Constructor Summary
MgnlCatalog()
           
MgnlCatalog(Map<String,Command> commands)
           
 
Method Summary
 void addCommand(String name, Command command)
           
 Command getCommand(String name)
           
 String getName()
           
 Set<String> getNames()
           
 void setName(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

commands

protected Map<String,Command> commands
Constructor Detail

MgnlCatalog

public MgnlCatalog()

MgnlCatalog

public MgnlCatalog(Map<String,Command> commands)
Method Detail

addCommand

public void addCommand(String name,
                       Command command)
Specified by:
addCommand in interface Catalog

getCommand

public Command getCommand(String name)
Specified by:
getCommand in interface Catalog

getNames

public Set<String> getNames()
Specified by:
getNames in interface Catalog

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()

setName

public void setName(String name)


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.