Package org.sourceid.saml20.adapter.conf
Class FieldList
- java.lang.Object
-
- org.sourceid.saml20.adapter.conf.FieldList
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Configuration,Row,SimpleFieldList
public abstract class FieldList extends Object implements Serializable
A base class that represents a list of Fields.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddField(Field field)Adds a Field to FieldListbooleangetBooleanFieldValue(String name)Gets the value of the Field with the specified name as a boolean.booleangetBooleanFieldValue(String name, boolean defaultValue)Gets the value of the Field with the specified name as a boolean.doublegetDoubleFieldValue(String name)Gets the value of the Field with the specified name as a double.FieldgetField(String name)Gets the Field by nameList<Field>getFields()Gets the list of FieldsStringgetFieldValue(String name)Gets the value of the Field with the specified name.byte[]getFileFieldValueAsByteArray(String name)This method just callsField.getFileValueAsByteArray().StringgetFileFiledValueAsString(String name)This method just callsField.getFileValueAsString().floatgetFloatFieldValue(String name)Gets the value of the Field with the specified name as a float.intgetIntFieldValue(String name)Gets the value of the Field with the specified name as an int.longgetLongFieldValue(String name)Gets the value of the Field with the specified name as a long.Map<String,Field>getReadOnlyFieldMap()Returns an unmodifiable copy of the fieldsMapbooleanisEmpty()Returns whether the fieldsMap is emptyStringtoString()
-
-
-
Method Detail
-
getReadOnlyFieldMap
public Map<String,Field> getReadOnlyFieldMap()
Returns an unmodifiable copy of the fieldsMap- Returns:
- copy of the fields map that is read-only
-
getFieldValue
public String getFieldValue(String name)
Gets the value of the Field with the specified name.- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field (could be null or empty).
-
getIntFieldValue
public int getIntFieldValue(String name)
Gets the value of the Field with the specified name as an int. This method just callsField.getValueAsInt().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field (could be null or empty).
-
getLongFieldValue
public long getLongFieldValue(String name)
Gets the value of the Field with the specified name as a long. This method just callsField.getValueAsLong().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field.
-
getFloatFieldValue
public float getFloatFieldValue(String name)
Gets the value of the Field with the specified name as a float. This method just callsField.getValueAsFloat().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field.
-
getDoubleFieldValue
public double getDoubleFieldValue(String name)
Gets the value of the Field with the specified name as a double. This method just callsField.getValueAsDouble().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field.
-
getBooleanFieldValue
public boolean getBooleanFieldValue(String name)
Gets the value of the Field with the specified name as a boolean. This method just callsField.getValueAsBoolean().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field.
-
getBooleanFieldValue
public boolean getBooleanFieldValue(String name, boolean defaultValue)
Gets the value of the Field with the specified name as a boolean. This method just callsField.getValueAsBoolean().- Parameters:
name- the name of the Field that you want the value of.defaultValue- the default value of the Field.- Returns:
- the value of the named field.
-
getFileFieldValueAsByteArray
public byte[] getFileFieldValueAsByteArray(String name)
This method just callsField.getFileValueAsByteArray().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field.
-
getFileFiledValueAsString
public String getFileFiledValueAsString(String name)
This method just callsField.getFileValueAsString().- Parameters:
name- the name of the Field that you want the value of.- Returns:
- the value of the named field.
-
getField
public Field getField(String name)
Gets the Field by name- Parameters:
name- name the name of the Field that you want.- Returns:
- the named Field.
-
isEmpty
public boolean isEmpty()
Returns whether the fieldsMap is empty- Returns:
- boolean
-
addField
public void addField(Field field)
Adds a Field to FieldList- Parameters:
field- field to add to FieldList
-
-