|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonyericsson.hudson.plugins.metadata.model.values.AbstractMetadataValue
@ExportedBean public abstract class AbstractMetadataValue
A metadata value to be set in a job or node.
Nested Class Summary | |
---|---|
static class |
AbstractMetadataValue.AbstractMetaDataValueDescriptor
The descriptor for the AbstractMetadataValue. |
Field Summary | |
---|---|
protected String |
name
The name of this metadata value. |
Constructor Summary | |
---|---|
protected |
AbstractMetadataValue(String name)
Constructor with only a name. |
protected |
AbstractMetadataValue(String name,
String description)
Constructor with name and description. |
protected |
AbstractMetadataValue(String name,
String description,
boolean exposedToEnvironment)
Constructor with name, description and exposedToEnvironment. |
Method Summary | |
---|---|
void |
addEnvironmentVariables(hudson.EnvVars variables,
boolean exposeAll)
Adds the environment variables for this Metadata to the variables map. |
AbstractMetadataValue |
clone()
Clones this MetadataValue. |
String |
getDescription()
Get the description of this value. |
String |
getEnvironmentName()
This function will generate the full environment variable name. |
String |
getFullName()
This function will generate the full name. |
String |
getFullName(String separator)
This function will generate the full name, using the chosen separator. |
String |
getFullNameFrom(MetadataParent<MetadataValue> base)
Gives the full name. |
String[] |
getFullPath()
Gives the full path as a String array.. |
String |
getName()
Get the name of this value. |
MetadataParent<MetadataValue> |
getParent()
This value's parent. |
Object |
getValue()
Get the value. |
boolean |
isExposedToEnvironment()
Returns whether or not this should be exposed to the environment. |
boolean |
isGenerated()
If this value is generated or user created. |
void |
replacementOf(MetadataValue old)
A signal sent to this object that it is the replacement of another object. |
void |
setDescription(String description)
Set the description of this value. |
void |
setExposeToEnvironment(boolean expose)
Set whether this should be exposed to the environment or not. |
void |
setGenerated(boolean generated)
Set if this value is generated or user created. |
protected void |
setName(String name)
Set the name of this value. |
void |
setParent(MetadataParent<MetadataValue> parent)
This value's parent. |
protected net.sf.json.JSONObject |
toAbstractJson()
Converts this into a JSON Object without the value. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface hudson.model.Describable |
---|
getDescriptor |
Methods inherited from interface com.sonyericsson.hudson.plugins.metadata.model.values.MetadataValue |
---|
toJson |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected String name
Constructor Detail |
---|
protected AbstractMetadataValue(String name, String description, boolean exposedToEnvironment)
name
- The name of the definitions.description
- The description of the definitions.exposedToEnvironment
- If this value should be exposed as an environment variable.protected AbstractMetadataValue(String name, String description)
name
- The name of the definitions.description
- The description of the definitions.protected AbstractMetadataValue(String name)
name
- The name of the definitions.Method Detail |
---|
@Exported public String getDescription()
getDescription
in interface Metadata<MetadataValue>
public void setDescription(String description)
description
- the description.@Exported public final String getName()
getName
in interface Metadata<MetadataValue>
protected void setName(String name)
name
- the name.@Exported public Object getValue()
getValue
in interface Metadata<MetadataValue>
public MetadataParent<MetadataValue> getParent()
getParent
in interface Metadata<MetadataValue>
public void setParent(MetadataParent<MetadataValue> parent)
setParent
in interface Metadata<MetadataValue>
parent
- the parent.public boolean isGenerated()
isGenerated
in interface MetadataValue
public void setGenerated(boolean generated)
setGenerated
in interface MetadataValue
generated
- true if generated.@Exported public String getFullName(String separator)
separator
- the separator to use.
@Exported public String getFullName()
getFullName
in interface Metadata<MetadataValue>
public String getFullNameFrom(MetadataParent<MetadataValue> base)
Metadata
getFullNameFrom
in interface Metadata<MetadataValue>
base
- the parent to calculate the path from.
public String[] getFullPath()
Metadata
getFullPath
in interface Metadata<MetadataValue>
public void replacementOf(MetadataValue old)
MetadataValue
replacementOf
in interface MetadataValue
old
- the object that it is the replacement of.public void addEnvironmentVariables(hudson.EnvVars variables, boolean exposeAll)
MetadataValue
addEnvironmentVariables
in interface MetadataValue
variables
- the map of current environment variables.exposeAll
- whether all Metadata should be added to the map. Inherited from the parent.@Exported public String getEnvironmentName()
public boolean isExposedToEnvironment()
Metadata
isExposedToEnvironment
in interface Metadata<MetadataValue>
public void setExposeToEnvironment(boolean expose)
Metadata
setExposeToEnvironment
in interface Metadata<MetadataValue>
expose
- true if this should be exposed, false if not.protected net.sf.json.JSONObject toAbstractJson()
public AbstractMetadataValue clone() throws CloneNotSupportedException
MetadataValue
clone
in interface MetadataValue
clone
in class Object
CloneNotSupportedException
- if it cannot be cloned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |