org.rhq.enterprise.agent
Class JavaServiceWrapperEnvironmentScriptFileUpdate

java.lang.Object
  extended by org.rhq.enterprise.agent.EnvironmentScriptFileUpdate
      extended by org.rhq.enterprise.agent.JavaServiceWrapperEnvironmentScriptFileUpdate

public class JavaServiceWrapperEnvironmentScriptFileUpdate
extends EnvironmentScriptFileUpdate

Updates Java Service Wrapper environment files (e.g. *.env files)

Author:
John Mazzitelli

Nested Class Summary
 
Nested classes/interfaces inherited from class org.rhq.enterprise.agent.EnvironmentScriptFileUpdate
EnvironmentScriptFileUpdate.NameValuePair
 
Constructor Summary
JavaServiceWrapperEnvironmentScriptFileUpdate(String location)
          Constructor given the full path to config file.
 
Method Summary
protected  String createEnvironmentVariableLine(EnvironmentScriptFileUpdate.NameValuePair nvp)
          Creates a line that defines an environment variable name and its value.
protected  EnvironmentScriptFileUpdate.NameValuePair parseEnvironmentVariableLine(String line)
          Parses the given string that is a line from a environment script file.
 
Methods inherited from class org.rhq.enterprise.agent.EnvironmentScriptFileUpdate
convertNameValuePairListToProperties, convertPropertiesToNameValuePairList, create, loadExisting, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaServiceWrapperEnvironmentScriptFileUpdate

public JavaServiceWrapperEnvironmentScriptFileUpdate(String location)
Constructor given the full path to config file.

Parameters:
location - location of the file
Method Detail

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.