FileDocCategorySizeDatePackage
ICommandEnvironment.javaAPI DocGlassfish v2 API3773Fri May 04 22:25:20 BST 2007com.sun.enterprise.cli.framework

ICommandEnvironment

public interface ICommandEnvironment
All the Subcommands operate in an Environment which itself is set by some other Subcommands. This way, some Subcommands create an Environment and others use this environment. This interface represents such an Environment that provides data required by SubCommands to execute successfully. Any Subcommand can override the data set in an Environment (in which it is executed) by parsing the arguments supplied on its own command line. Potentially there can be multiple Environments. An Environment consists of a variable set of Named Options. The Subcommands that create Environment, modify this set whenever they are executed. Thus any Option in an Environment represents an Environment Setting.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.ObjectgetEnvironmentValue(java.lang.String key)
returns the envrionment value by the given key

public java.util.HashMapgetEnvironments()
Returns an iterator over collection of Option objects.

public intgetNumEnvironments()
Returns the number of environments

public java.lang.ObjectremoveEnvironment(java.lang.String name)
Removes an environment. Does nothing if environment does not exist. returns null if environment could not be removed.

public voidsetEnvironment(java.lang.String name, java.lang.String value)
Adds Environment. Environment have unique names. Successive calls to this method with same name would result in replacement of the environment.

public java.lang.StringtoString()
Returns a string format of the list of options in the environment.