Package org.mycore.frontend.cli
Class MCRAbstractCommands
java.lang.Object
org.mycore.frontend.cli.MCRAbstractCommands
- All Implemented Interfaces:
MCRExternalCommandInterface
- Direct Known Subclasses:
MCRAccessCommands
,MCRAccessCtrlCommands
,MCRBatchEditorCommands
,MCRClassification2Commands
,MCRCryptCommands
,MCRDerivateCommands
,MCRGoogleSitemapCommands
,MCRIView2Commands
,MCRLoggingCommands
,MCRMetsCommands
,MCRMODSCommands
,MCRObjectCommands
,MCRSolrCommands
,MCRUserCommands
This class is an abstract for the implementation of command classes for the
MyCoRe commandline system.
- Version:
- $Revision$ $Date: 2009-07-28 11:32:04 +0200 (Tue, 28 Jul 2009) $
- Author:
- Jens Kupferschmidt
-
Field Summary
Modifier and TypeFieldDescriptionprotected ArrayList<MCRCommand>
The array holding all known commands -
Constructor Summary
ModifierConstructorDescriptionprotected
The constructor.protected
MCRAbstractCommands
(String displayName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(MCRCommand cmd) Returns the display name of the external commands.The method return the list of possible commands of this class.void
Sets the display name.
-
Field Details
-
command
The array holding all known commands
-
-
Constructor Details
-
MCRAbstractCommands
protected MCRAbstractCommands()The constructor. -
MCRAbstractCommands
- Parameters:
displayName
- a human readable name for this collection of commands
-
-
Method Details
-
getPossibleCommands
The method return the list of possible commands of this class. Each command has TWO Strings, a String of the user command syntax and a String of the called method.- Specified by:
getPossibleCommands
in interfaceMCRExternalCommandInterface
- Returns:
- a ascending sorted command pair ArrayList
-
getDisplayName
Description copied from interface:MCRExternalCommandInterface
Returns the display name of the external commands. If the display name has not been set the simple class name is returned- Specified by:
getDisplayName
in interfaceMCRExternalCommandInterface
- Returns:
- the display name of the external commands
-
setDisplayName
Description copied from interface:MCRExternalCommandInterface
Sets the display name.- Specified by:
setDisplayName
in interfaceMCRExternalCommandInterface
-
addCommand
-