PTP
Release 7.0

org.eclipse.ptp.ems.core
Class EnvManagerConfigString

java.lang.Object
  extended by org.eclipse.ptp.ems.core.EnvManagerConfigString
All Implemented Interfaces:
IEnvManagerConfig

public final class EnvManagerConfigString
extends Object
implements IEnvManagerConfig

Provides methods to persist an environment management configuration to a string.

See IEnvManagerConfig for a description of the settings that are persisted.

Since:
6.0

Constructor Summary
EnvManagerConfigString()
          Default constructor.
EnvManagerConfigString(String configuration)
          Creates an EnvManagerConfigString from a given configuration string.
 
Method Summary
 List<String> getConfigElements()
          Returns the value of a configuration setting containing the list of selected environment configuration elements (modules/SoftEnv macros/etc.).
 String getConnectionName()
          Returns the value of the connection name configuration setting.
 String getManualConfigText()
          Returns the value of a configuration setting containing manually-entered configuration commands.
static boolean isEnvMgmtConfigString(String string)
          Returns true iff string is a valid environment management configuration string
 boolean isEnvMgmtEnabled()
          Returns the value of a configuration setting indicating whether environment management support is enabled for this project.
 boolean isManualConfigEnabled()
          Returns the value of a configuration setting indicating whether manually-entered configuration commands should be used.
 void setConfigElements(List<String> selectedModules)
          Sets a configuration setting containing the list of selected environment configuration elements (environment modules/SoftEnv macros/etc.).
 void setConnectionName(String connectionName)
          Sets the connection name configuration setting.
 void setEnvMgmtEnabled(boolean enabled)
          Sets a configuration setting indicating whether environment management support is enabled.
 void setManualConfig(boolean enabled)
          Sets a configuration setting indicating whether manually-entered configuration commands should be used.
 void setManualConfigText(String manualConfigText)
          Sets a configuration setting containing manually-entered configuration commands.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnvManagerConfigString

public EnvManagerConfigString()
Default constructor.


EnvManagerConfigString

public EnvManagerConfigString(String configuration)
Creates an EnvManagerConfigString from a given configuration string.

Parameters:
configuration - an environment configuration string, as returned by toString()
Method Detail

isEnvMgmtConfigString

public static boolean isEnvMgmtConfigString(String string)
Returns true iff string is a valid environment management configuration string

Parameters:
string - string to test
Returns:
true iff string is a valid environment management configuration string

toString

public String toString()
Overrides:
toString in class Object

setEnvMgmtEnabled

public void setEnvMgmtEnabled(boolean enabled)
Description copied from interface: IEnvManagerConfig
Sets a configuration setting indicating whether environment management support is enabled.

Specified by:
setEnvMgmtEnabled in interface IEnvManagerConfig
Parameters:
enabled - true to use a custom set of modules; false to use defaults

isEnvMgmtEnabled

public boolean isEnvMgmtEnabled()
Description copied from interface: IEnvManagerConfig
Returns the value of a configuration setting indicating whether environment management support is enabled for this project.

Specified by:
isEnvMgmtEnabled in interface IEnvManagerConfig
Returns:
non-null

setManualConfig

public void setManualConfig(boolean enabled)
Description copied from interface: IEnvManagerConfig
Sets a configuration setting indicating whether manually-entered configuration commands should be used.

Specified by:
setManualConfig in interface IEnvManagerConfig
Parameters:
enabled - true to use a custom set of modules; false to use defaults

isManualConfigEnabled

public boolean isManualConfigEnabled()
Description copied from interface: IEnvManagerConfig
Returns the value of a configuration setting indicating whether manually-entered configuration commands should be used.

Specified by:
isManualConfigEnabled in interface IEnvManagerConfig
Returns:
non-null

setManualConfigText

public void setManualConfigText(String manualConfigText)
Description copied from interface: IEnvManagerConfig
Sets a configuration setting containing manually-entered configuration commands.

Note that null is indistinguishable from the empty string: in both cases, IEnvManagerConfig.getManualConfigText() will return the empty string.

Specified by:
setManualConfigText in interface IEnvManagerConfig

getManualConfigText

public String getManualConfigText()
Description copied from interface: IEnvManagerConfig
Returns the value of a configuration setting containing manually-entered configuration commands.

Specified by:
getManualConfigText in interface IEnvManagerConfig
Returns:
non-null

setConnectionName

public void setConnectionName(String connectionName)
Description copied from interface: IEnvManagerConfig
Sets the connection name configuration setting.

Note that null is indistinguishable from the empty string: in both cases, IEnvManagerConfig.getConnectionName() will return the empty string.

Specified by:
setConnectionName in interface IEnvManagerConfig
Parameters:
connectionName - (may be null)

getConnectionName

public String getConnectionName()
Description copied from interface: IEnvManagerConfig
Returns the value of the connection name configuration setting.

This may return the empty string but will never return null.

Specified by:
getConnectionName in interface IEnvManagerConfig
Returns:
non-null

setConfigElements

public void setConfigElements(List<String> selectedModules)
Description copied from interface: IEnvManagerConfig
Sets a configuration setting containing the list of selected environment configuration elements (environment modules/SoftEnv macros/etc.).

Note that null is indistinguishable from the empty string: in both cases, IEnvManagerConfig.getConfigElements() will return an empty list.

Specified by:
setConfigElements in interface IEnvManagerConfig
Parameters:
selectedModules - (may be null)
Since:
2.0

getConfigElements

public List<String> getConfigElements()
Description copied from interface: IEnvManagerConfig
Returns the value of a configuration setting containing the list of selected environment configuration elements (modules/SoftEnv macros/etc.).

This may return an empty set but will never return null.

Specified by:
getConfigElements in interface IEnvManagerConfig
Returns:
non-null
Since:
2.0

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.