|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition com.sonyericsson.hudson.plugins.metadata.model.definitions.TreeNodeMetadataDefinition
public class TreeNodeMetadataDefinition
A metadata definition containing other metadata definitions as children.
Nested Class Summary | |
---|---|
static class |
TreeNodeMetadataDefinition.TreeNodeMetaDataDefinitionDescriptor
The Descriptor. |
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition |
---|
AbstractMetadataDefinition.AbstractMetaDataDefinitionDescriptor |
Constructor Summary | |
---|---|
TreeNodeMetadataDefinition(String name)
Standard constructor. |
|
TreeNodeMetadataDefinition(String name,
List<MetadataDefinition> children)
Standard constructor. |
|
TreeNodeMetadataDefinition(String name,
String description)
Standard Constructor. |
|
TreeNodeMetadataDefinition(String name,
String description,
List<MetadataDefinition> children)
Standard constructor. |
Method Summary | |
---|---|
Collection<MetadataDefinition> |
addChild(MetadataDefinition definition)
Adds the child to the list of children. |
Collection<MetadataDefinition> |
addChildren(Collection<MetadataDefinition> definitions)
Adds the children to this parent's list of children. |
AbstractMetadataValue |
createValue(Object o)
Creates an AbstractMetadataValue from this definition. |
MetadataDefinition |
getChild(String name)
Returns the child with the given name, or null if there is none. |
Collection<String> |
getChildNames()
The child names of this parent. |
Collection<MetadataDefinition> |
getChildren()
Getter for the children of this tree node, used by stapler to create the entire tree. |
Object |
getDefaultValue()
Returns default metadata values for this definition. |
int |
indexOf(String name)
The index of the child with the provided name. |
boolean |
requiresReplacement()
If this parent type requires to be replaced or not when a replacement command is issued. |
MetadataDefinition |
setChild(int index,
MetadataDefinition value)
Sets the child on index with the provided value, replacing any object currently on that index. |
net.sf.json.JSON |
toJson()
Convert this object into a JSON object. |
Methods inherited from class com.sonyericsson.hudson.plugins.metadata.model.definitions.AbstractMetadataDefinition |
---|
getAll, getDescription, getDescriptor, getFullName, getFullName, getFullNameFrom, getFullPath, getName, getParent, getType, getValue, isExposedToEnvironment, setExposeToEnvironment, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sonyericsson.hudson.plugins.metadata.model.MetadataParent |
---|
getFullName, getFullName, getFullNameFrom |
Constructor Detail |
---|
@DataBoundConstructor public TreeNodeMetadataDefinition(String name, String description, List<MetadataDefinition> children)
name
- the name.description
- the description.children
- the children of this node.public TreeNodeMetadataDefinition(String name)
name
- the name.public TreeNodeMetadataDefinition(String name, String description)
name
- the namedescription
- the description.public TreeNodeMetadataDefinition(String name, List<MetadataDefinition> children)
name
- the name.children
- the children of this node.Method Detail |
---|
public MetadataDefinition getChild(String name)
MetadataParent
getChild
in interface MetadataParent<MetadataDefinition>
name
- the name to search for.
public int indexOf(String name)
MetadataParent
indexOf
in interface MetadataParent<MetadataDefinition>
name
- the name of the child to find.
public MetadataDefinition setChild(int index, MetadataDefinition value)
MetadataParent
index
with the provided value, replacing any object currently on that index.
setChild
in interface MetadataParent<MetadataDefinition>
index
- the index to set.value
- the child to set.
public Collection<MetadataDefinition> addChild(MetadataDefinition definition)
MetadataParent
addChild
in interface MetadataParent<MetadataDefinition>
definition
- the child to add.
public Collection<MetadataDefinition> addChildren(Collection<MetadataDefinition> definitions)
MetadataParent
addChildren
in interface MetadataParent<MetadataDefinition>
definitions
- the children to add.
public Collection<MetadataDefinition> getChildren()
getChildren
in interface MetadataParent<MetadataDefinition>
public Collection<String> getChildNames()
MetadataParent
getChildNames
in interface MetadataParent<MetadataDefinition>
public AbstractMetadataValue createValue(Object o)
AbstractMetadataDefinition
createValue
in interface MetadataDefinition
createValue
in class AbstractMetadataDefinition
o
- the value to use as input for creating the AbstractMetadataValue.
public net.sf.json.JSON toJson()
MetadataParent
toJson
in interface MetadataParent<MetadataDefinition>
public boolean requiresReplacement()
MetadataParent
requiresReplacement
in interface MetadataParent<MetadataDefinition>
MetadataValue.replacementOf(
com.sonyericsson.hudson.plugins.metadata.model.values.MetadataValue)
public Object getDefaultValue()
AbstractMetadataDefinition
getDefaultValue
in class AbstractMetadataDefinition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |