org.pentaho.di.core.util
Class StringListPluginProperty

java.lang.Object
  extended by org.pentaho.di.core.util.KeyValue<List<String>>
      extended by org.pentaho.di.core.util.StringListPluginProperty
All Implemented Interfaces:
Serializable, Iterable<String>, PluginProperty

public class StringListPluginProperty
extends KeyValue<List<String>>
implements PluginProperty, Iterable<String>

Author:
Thomas Hödl(asc042)
See Also:
Serialized Form

Field Summary
static char SEPARATOR_CHAR
          The separator character.
static String VALUE_XML_TAG_NAME
          Value XML tag name.
 
Fields inherited from class org.pentaho.di.core.util.KeyValue
DEFAULT_TRUE_VALUES, VALID_KEY_CHARS
 
Fields inherited from interface org.pentaho.di.core.util.PluginProperty
BOOLEAN_STRING_TRUE, DEFAULT_BOOLEAN_VALUE, DEFAULT_DOUBLE_VALUE, DEFAULT_INTEGER_VALUE, DEFAULT_STRING_VALUE
 
Constructor Summary
StringListPluginProperty(String key)
           
 
Method Summary
 void appendXml(StringBuilder builder)
          
 void assertValueNotNull()
          Assert state, value not null.
static String asString(List<String> list)
           
 boolean evaluate()
          
static List<String> fromString(String input)
           
 boolean isEmpty()
           
 Iterator<String> iterator()
          
 void loadXml(Node node)
          
 void readFromPreferences(Preferences node)
          
 void readFromRepositoryStep(Repository repository, ObjectId stepId)
          
 void saveToPreferences(Preferences node)
          
 void saveToRepositoryStep(Repository repository, ObjectId transformationId, ObjectId stepId)
          
 void setValues(String... values)
           
 int size()
           
 
Methods inherited from class org.pentaho.di.core.util.KeyValue
assertKey, booleanValue, booleanValue, booleanValue, booleanValue, booleanValue, doubleValue, doubleValue, floatValue, floatValue, getKey, getValue, integerValue, integerValue, longValue, longValue, setValue, stringValue, stringValue, stringValueDefaultIfBlank, toString, value, value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_XML_TAG_NAME

public static final String VALUE_XML_TAG_NAME
Value XML tag name.

See Also:
Constant Field Values

SEPARATOR_CHAR

public static final char SEPARATOR_CHAR
The separator character.

See Also:
Constant Field Values
Constructor Detail

StringListPluginProperty

public StringListPluginProperty(String key)
Parameters:
key - key to use.
Method Detail

asString

public static String asString(List<String> list)
Parameters:
list - list to transform, maybe null.
Returns:
string, never null.

fromString

public static List<String> fromString(String input)
Parameters:
input - the input.
Returns:
new list, never null.

appendXml

public void appendXml(StringBuilder builder)

Specified by:
appendXml in interface PluginProperty
Parameters:
builder - builder to append to.
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#appendXml(java.lang.StringBuilder)

evaluate

public boolean evaluate()

Specified by:
evaluate in interface PluginProperty
Returns:
true if value not null or 'false'.
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#evaluate()

loadXml

public void loadXml(Node node)

Specified by:
loadXml in interface PluginProperty
Parameters:
node - the node.
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#loadXml(org.w3c.dom.Node)

readFromPreferences

public void readFromPreferences(Preferences node)

Specified by:
readFromPreferences in interface PluginProperty
Parameters:
node - preferences node.
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#readFromPreferences(java.util.prefs.Preferences)

readFromRepositoryStep

public void readFromRepositoryStep(Repository repository,
                                   ObjectId stepId)
                            throws KettleException

Specified by:
readFromRepositoryStep in interface PluginProperty
Parameters:
repository - the repository.
stepId - the stepId.
Throws:
KettleException - ...
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#readFromRepositoryStep(org.pentaho.di.repository.Repository, long)

saveToPreferences

public void saveToPreferences(Preferences node)

Specified by:
saveToPreferences in interface PluginProperty
Parameters:
node - preferences node
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#saveToPreferences(java.util.prefs.Preferences)

saveToRepositoryStep

public void saveToRepositoryStep(Repository repository,
                                 ObjectId transformationId,
                                 ObjectId stepId)
                          throws KettleException

Specified by:
saveToRepositoryStep in interface PluginProperty
Parameters:
repository - the repository.
transformationId - the transformationId.
stepId - the stepId.
Throws:
KettleException - ...
See Also:
at.aschauer.commons.pentaho.plugin.PluginProperty#saveToRepositoryStep(org.pentaho.di.repository.Repository, long, long)

setValues

public void setValues(String... values)
Parameters:
values - values to set, no validation.

iterator

public Iterator<String> iterator()
                          throws IllegalStateException

Specified by:
iterator in interface Iterable<String>
Throws:
IllegalStateException
See Also:
Iterable.iterator()

isEmpty

public boolean isEmpty()
Returns:
true if list is empty .

size

public int size()
         throws IllegalStateException
Returns:
size
Throws:
IllegalStateException - if value is null.

assertValueNotNull

public void assertValueNotNull()
                        throws IllegalStateException
Assert state, value not null.

Throws:
IllegalStateException - if this.value is null.