jetbrains.buildServer.serverSide
Class BaseParameter

java.lang.Object
  extended by jetbrains.buildServer.serverSide.BaseParameter
All Implemented Interfaces:
java.lang.Comparable<Parameter>, Parameter
Direct Known Subclasses:
SimpleParameter

public abstract class BaseParameter
extends java.lang.Object
implements Parameter

Created by Eugene Petrenko (eugene.petrenko@gmail.com) Date: 26.01.12 13:07


Field Summary
protected  ControlDescription myDescription
           
protected  java.lang.String myName
           
protected  java.lang.String myValue
           
 
Constructor Summary
protected BaseParameter(java.lang.String name, java.lang.String value, ControlDescription description)
           
 
Method Summary
 int compareTo(Parameter o)
           
 boolean equals(java.lang.Object o)
           
protected abstract  java.lang.String getCompareValue()
           
 ControlDescription getControlDescription()
           
 java.lang.String getName()
           
 java.lang.String getValue()
           
 int hashCode()
           
static boolean isConfigParameter(java.lang.String parameterName)
           
 boolean isEnvironmentVariable()
          Returns true if this parameter is an environment variable
static boolean isEnvironmentVariable(java.lang.String parameterName)
           
 boolean isSystemProperty()
          Returns true if this parameter is a system property
static boolean isSystemProperty(java.lang.String parameterName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

myName

protected final java.lang.String myName

myValue

protected final java.lang.String myValue

myDescription

protected final ControlDescription myDescription
Constructor Detail

BaseParameter

protected BaseParameter(@NotNull
                        java.lang.String name,
                        @NotNull
                        java.lang.String value,
                        @Nullable
                        ControlDescription description)
Method Detail

isConfigParameter

public static boolean isConfigParameter(java.lang.String parameterName)

isSystemProperty

public static boolean isSystemProperty(java.lang.String parameterName)

isEnvironmentVariable

public static boolean isEnvironmentVariable(java.lang.String parameterName)

getName

@NotNull
public final java.lang.String getName()
Specified by:
getName in interface Parameter
Returns:
parameter name.

getValue

@NotNull
public java.lang.String getValue()
Specified by:
getValue in interface Parameter
Returns:
parameter value.

isSystemProperty

public final boolean isSystemProperty()
Description copied from interface: Parameter
Returns true if this parameter is a system property

Specified by:
isSystemProperty in interface Parameter
Returns:
see above

isEnvironmentVariable

public final boolean isEnvironmentVariable()
Description copied from interface: Parameter
Returns true if this parameter is an environment variable

Specified by:
isEnvironmentVariable in interface Parameter
Returns:
see above

getControlDescription

@Nullable
public final ControlDescription getControlDescription()
Specified by:
getControlDescription in interface Parameter
Returns:
parameter description

getCompareValue

@NotNull
protected abstract java.lang.String getCompareValue()
Returns:
internal value used to check parameter equality
Since:
7.0

equals

public final boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public final int compareTo(@NotNull
                           Parameter o)
Specified by:
compareTo in interface java.lang.Comparable<Parameter>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object