org.rhq.enterprise.agent
Class WindowsEnvironmentScriptFileUpdate
java.lang.Object
org.rhq.enterprise.agent.EnvironmentScriptFileUpdate
org.rhq.enterprise.agent.WindowsEnvironmentScriptFileUpdate
public class WindowsEnvironmentScriptFileUpdate
- extends EnvironmentScriptFileUpdate
Updates Windows environment scripts (e.g. *.bat, *.cmd files)
- Author:
- John Mazzitelli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WindowsEnvironmentScriptFileUpdate
public WindowsEnvironmentScriptFileUpdate(String location)
- Constructor given the full path to script file.
- Parameters:
location - location of the file
createEnvironmentVariableLine
protected String createEnvironmentVariableLine(EnvironmentScriptFileUpdate.NameValuePair nvp)
- Description copied from class:
EnvironmentScriptFileUpdate
- Creates a line that defines an environment variable name and its value.
- Specified by:
createEnvironmentVariableLine in class EnvironmentScriptFileUpdate
- Parameters:
nvp - the environment variable definition
- Returns:
- the line that is to be used in the script file to define the environment variable
parseEnvironmentVariableLine
protected EnvironmentScriptFileUpdate.NameValuePair parseEnvironmentVariableLine(String line)
- Description copied from class:
EnvironmentScriptFileUpdate
- Parses the given string that is a line from a environment script file.
If this is not a line that defines an environment variable,
null
is returned, otherwise, the environment variable name and value is returned.
- Specified by:
parseEnvironmentVariableLine in class EnvironmentScriptFileUpdate
- Parameters:
line - the line from the environment script file
- Returns:
- the name, value of the environment that is defined in the line, or
null
if the line doesn't define an env var.
Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.