Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.fieldvalue
Class DefaultFieldValueItemHolder

    java.lang.Object
      com.atlassian.bamboo.fieldvalue.DefaultFieldValueItemHolder

All Implemented Interfaces:
  FieldValueItemHolder

    public class DefaultFieldValueItemHolder

extends Object
implements FieldValueItemHolder

Field Summary

Fields inherited from interface com.atlassian.bamboo.fieldvalue.FieldValueItemHolder
`DEFAULT_INT_VALUE, DEFAULT_ROW`

Constructor Summary
`DefaultFieldValueItemHolder()`
`DefaultFieldValueItemHolder(List fieldValueItems)`

Method Summary
`void` | `addFieldValueItems(String keyField, FieldValueItemHolder fieldValueItemHolder)` This method appends of the current holder with passed holder.
`FilteredMap` | `asFilteredMap(String prefix)` Returns the current object represented as a series of key value pairs, if the `FieldValueItem`'s key begins with the passed prefix.
`List` | `asList()` Returns the current object representation as a list of FieldValueItemHolder objects
`boolean` | `getBoolean(String key)`
`FieldValueItem` | `getFieldItemValue(String key, Integer row)`
`int` | `getInt(String key)` Returns the value as a int, using the `DEFAULT_ROW` as the row
`List` | `getListOfStrings(String key)` Gets all of the matching keys as a `List` of `String`s
`String` | `getString(String key)` Gets a string value for the passsed key, using the `DEFAULT_ROW` as the row.
`String` | `getString(String key, Integer row)` Gets a string value for the passsed key and row
`void` | `setFieldValueItem(FieldValueItem fieldValueItem)` Adds a `FieldValueItem` to the list.
`void` | `setFieldValueItem(String key, boolean value)` Adds a simple `FieldValueItem` for with the given keys.
`void` | `setFieldValueItem(String key, int value)` Adds a simple `FieldValueItem` for with the given keys.
`void` | `setFieldValueItem(String key, String value, int row)`
`void` | `setFieldValueItems(FieldValueItemHolder fieldValueItemHolder)` Sets the values of the passed holder into the current object.
`void` | `setFieldValueItems(List fieldValueItems)`
`void` | `setFieldValueItems(Map params)` Sets the values of the passed holder into the current object.
`void` | `setFieldValueItems(String key, List values)` Sets a list of strings given a key
`void` | `setProperty(String key, String value)` Adds a simple `FieldValueItem` for with the given keys.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultFieldValueItemHolder

    public DefaultFieldValueItemHolder()

### DefaultFieldValueItemHolder

    public DefaultFieldValueItemHolder(List fieldValueItems)

Method Detail

### setFieldValueItem

    public void setFieldValueItem(FieldValueItem fieldValueItem)

  Description copied from interface: `FieldValueItemHolder`
  Adds a `FieldValueItem` to the list. Overrodes if exists.

  Specified by:
    `setFieldValueItem` in interface `FieldValueItemHolder`
  Parameters:
    `fieldValueItem` - - must not be null

### setProperty

    public void setProperty(String key,
                            String value)

  Description copied from interface: `FieldValueItemHolder`
  Adds a simple `FieldValueItem` for with the given keys. This will over-ride field if the property already exists.

  Specified by:
    `setProperty` in interface `FieldValueItemHolder`
  Parameters:
    `key` - - must not be null
    `value` - - can be null

### setFieldValueItem

    public void setFieldValueItem(String key,
                                  String value,
                                  int row)

### setFieldValueItem

    public void setFieldValueItem(String key,
                                  int value)

  Description copied from interface: `FieldValueItemHolder`
  Adds a simple `FieldValueItem` for with the given keys. This will over-ride field if the property already exists. This will still store the int as a string

  Specified by:
    `setFieldValueItem` in interface `FieldValueItemHolder`
  Parameters:
    `key` - - must not be null

### setFieldValueItem

    public void setFieldValueItem(String key,
                                  boolean value)

  Description copied from interface: `FieldValueItemHolder`
  Adds a simple `FieldValueItem` for with the given keys. This will over-ride field if the property already exists.

  Specified by:
    `setFieldValueItem` in interface `FieldValueItemHolder`
  Parameters:
    `key` - - must not be null

### setFieldValueItems

    public void setFieldValueItems(FieldValueItemHolder fieldValueItemHolder)

  Description copied from interface: `FieldValueItemHolder`
  Sets the values of the passed holder into the current object. This will over-ride matching `FieldValueItem`s

  Specified by:
    `setFieldValueItems` in interface `FieldValueItemHolder`
  Parameters:
    `fieldValueItemHolder` - - must not be null

### setFieldValueItems

    public void setFieldValueItems(String key,
                                   List values)

  Description copied from interface: `FieldValueItemHolder`
  Sets a list of strings given a key

  Specified by:
    `setFieldValueItems` in interface `FieldValueItemHolder`
  Parameters:
    `key` - not null
    `values` - `List` of Strings. Nullable

### setFieldValueItems

    public void setFieldValueItems(List fieldValueItems)

### setFieldValueItems

    public void setFieldValueItems(Map params)

  Description copied from interface: `FieldValueItemHolder`
  Sets the values of the passed holder into the current object. This will over-ride matching `FieldValueItem`s

  Specified by:
    `setFieldValueItems` in interface `FieldValueItemHolder`
  Parameters:
    `params` - - Map must not be null. It must also have a String for a key and value

### addFieldValueItems

    public void addFieldValueItems(String keyField,
                                   FieldValueItemHolder fieldValueItemHolder)

  Description copied from interface: `FieldValueItemHolder`
  This method appends of the current holder with passed holder. The key field, which must not be null, will be used as the identifier field to see which row the new fieldValueItemHolder will be added to. It will look at

  Specified by:
    `addFieldValueItems` in interface `FieldValueItemHolder`

### asList

    public List asList()

  Description copied from interface: `FieldValueItemHolder`
  Returns the current object representation as a list of FieldValueItemHolder objects

  Specified by:
    `asList` in interface `FieldValueItemHolder`
  Returns:
    `List` of `FieldValueItemHolder`s. Never null.

### asFilteredMap

    public FilteredMap asFilteredMap(String prefix)

  Description copied from interface: `FieldValueItemHolder`
  Returns the current object represented as a series of key value pairs, if the `FieldValueItem`'s key begins with the passed prefix. If there are multiple `FieldValueItem` withe the same key, (ie. multiple rows) then the actual value returned is unpredictable (so obviously should be avoided). Values that do not match the prefix are not added

  Specified by:
    `asFilteredMap` in interface `FieldValueItemHolder`
  Parameters:
    `prefix` - - must not be null
  Returns:
    `FilteredMap` filtered by the prefix. Empty map if no mataches.

### getString

    public String getString(String key)

  Description copied from interface: `FieldValueItemHolder`
  Gets a string value for the passsed key, using the `DEFAULT_ROW` as the row.

  Specified by:
    `getString` in interface `FieldValueItemHolder`
  Parameters:
    `key` - must not be null
  Returns:
    the value - Null if value doesn't exist

### getInt

    public int getInt(String key)

  Description copied from interface: `FieldValueItemHolder`
  Returns the value as a int, using the `DEFAULT_ROW` as the row

  Specified by:
    `getInt` in interface `FieldValueItemHolder`
  Parameters:
    `key` - must not be null
  Returns:
    int value. `DEFAULT_INT_VALUE` if no key exists

### getBoolean

    public boolean getBoolean(String key)

  Specified by:
    `getBoolean` in interface `FieldValueItemHolder`

### getString

    public String getString(String key,
                            Integer row)

  Description copied from interface: `FieldValueItemHolder`
  Gets a string value for the passsed key and row

  Specified by:
    `getString` in interface `FieldValueItemHolder`
  Parameters:
    `key` - must not be null
    `row` - must not be null
  Returns:
    the value - Null if value doesn't exist

### getListOfStrings

    public List getListOfStrings(String key)

  Description copied from interface: `FieldValueItemHolder`
  Gets all of the matching keys as a `List` of `String`s

  Specified by:
    `getListOfStrings` in interface `FieldValueItemHolder`
  Returns:
    `List` of `String`s. Mepty if no values

### getFieldItemValue

    public FieldValueItem getFieldItemValue(String key,
                                            Integer row)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.