org.eclipse.emf.cdo.spi.server

## Class CDOCommand

- java.lang.Object
- - org.eclipse.net4j.util.factory.Factory
  - - org.eclipse.emf.cdo.spi.server.CDOCommand

- All Implemented Interfaces:
    IFactory
  Direct Known Subclasses:
    CDOCommand.WithRepository

      public abstract class CDOCommand
      extends Factory

  Since:
    4.3
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CDOCommand.CommandException`
    `static class` | `CDOCommand.CommandParameter`
    `static class` | `CDOCommand.WithAccessor`
    `static class` | `CDOCommand.WithRepository`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `INDENT`
    `static java.lang.String` | `PRODUCT_GROUP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDOCommand(java.lang.String name, java.lang.String description)`
    `CDOCommand(java.lang.String name, java.lang.String description, CDOCommand.CommandParameter... parameters)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CDOCommand` | `create(java.lang.String description)`
    `protected java.lang.String` | `duration()`
    `void` | `execute()`
    `abstract void` | `execute(java.lang.String[] args)`
    `java.lang.Object` | `executeCommand(java.lang.String cmd)`
    `java.lang.String` | `getDescription()`
    `CommandInterpreter` | `getInterpreter()`
    `java.lang.String` | `getName()`
    `CDOCommand.CommandParameter[]` | `getParameters()`
    `java.lang.String` | `getSyntax()`
    `static CDOCommand.CommandParameter` | `optional(java.lang.String name)`
    `static CDOCommand.CommandParameter` | `parameter(java.lang.String name)`
    `static CDOCommand.CommandParameter` | `parameter(java.lang.String name, boolean optional)`
    `static CDOCommand.CommandParameter[]` | `parameters(CDOCommand.CommandParameter parameter, CDOCommand.CommandParameter[] parameters)`
    `void` | `print(java.lang.Object o)`
    `void` | `printBundleResource(org.osgi.framework.Bundle bundle, java.lang.String resource)`
    `void` | `printDictionary(java.util.Dictionary<?,?> dic, java.lang.String title)`
    `void` | `println()`
    `void` | `println(java.lang.Object o)`
    `void` | `printStackTrace(java.lang.Throwable t)`
    `void` | `setInterpreter(CommandInterpreter interpreter)`
    `protected static java.lang.String[]` | `trimFirstArgument(java.lang.String[] args)`

    - ### Methods inherited from class org.eclipse.net4j.util.factory.Factory

      `getDescriptionFor, getKey, getProductGroup, getType, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### PRODUCT_GROUP

          public static final java.lang.String PRODUCT_GROUP

      See Also:
        Constant Field Values

    - #### INDENT

          public static final java.lang.String INDENT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CDOCommand

          public CDOCommand(java.lang.String name,
                            java.lang.String description,
                            CDOCommand.CommandParameter... parameters)

    - #### CDOCommand

          public CDOCommand(java.lang.String name,
                            java.lang.String description)

  - ### Method Detail

    - #### create

          public final CDOCommand create(java.lang.String description)
                                  throws ProductCreationException

      Throws:
        `ProductCreationException`

    - #### getInterpreter

          public final CommandInterpreter getInterpreter()

    - #### setInterpreter

          public final void setInterpreter(CommandInterpreter interpreter)

    - #### getName

          public final java.lang.String getName()

    - #### getDescription

          public final java.lang.String getDescription()

    - #### getParameters

          public final CDOCommand.CommandParameter[] getParameters()

    - #### getSyntax

          public final java.lang.String getSyntax()

    - #### executeCommand

          public final java.lang.Object executeCommand(java.lang.String cmd)

    - #### print

          public final void print(java.lang.Object o)

    - #### println

          public final void println()

    - #### println

          public final void println(java.lang.Object o)

    - #### printStackTrace

          public final void printStackTrace(java.lang.Throwable t)

    - #### printDictionary

          public final void printDictionary(java.util.Dictionary<?,?> dic,
                                            java.lang.String title)

    - #### printBundleResource

          public final void printBundleResource(org.osgi.framework.Bundle bundle,
                                                java.lang.String resource)

    - #### execute

          public final void execute()
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### duration

          protected final java.lang.String duration()

      Since:
        4.8

    - #### execute

          public abstract void execute(java.lang.String[] args)
                                throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### parameters

          public static CDOCommand.CommandParameter[] parameters(CDOCommand.CommandParameter parameter,
                                                                 CDOCommand.CommandParameter[] parameters)

    - #### parameter

          public static CDOCommand.CommandParameter parameter(java.lang.String name,
                                                              boolean optional)

    - #### parameter

          public static CDOCommand.CommandParameter parameter(java.lang.String name)

    - #### optional

          public static CDOCommand.CommandParameter optional(java.lang.String name)

    - #### trimFirstArgument

          protected static java.lang.String[] trimFirstArgument(java.lang.String[] args)

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html