Novell exteNd
Director 5.2 API

com.novell.afw.portlet.api
Interface EbiPortletPreferenceBoolean

All Superinterfaces:
Cloneable, EbiPortletPreference

public interface EbiPortletPreferenceBoolean
extends EbiPortletPreference

Interface representing an Boolean type of EbiPortletPreference. It provides methods that are useful for working with single valued Boolean preferences.

Note that implementations of this interface will always return false for the EbiPortletPreference.isMultiValued() method since this type of preference only works with the first value of the preferrence.

Since:
v5.0

Field Summary
static String BOOLEAN_0
          Constant for string representation of an integer that equates to a boolean false value.
static String BOOLEAN_1
          Constant for string representation of an integer that equates to a boolean true value.
static String BOOLEAN_FALSE
          Constant for string representation of a boolean false value.
static String BOOLEAN_TRUE
          Constant for string representation of a boolean true value.
 
Fields inherited from interface com.novell.afw.portlet.api.EbiPortletPreference
TYPE_BOOLEAN, TYPE_COMPLEX, TYPE_INTEGER, TYPE_PASSWORD, TYPE_SELECT, TYPE_STRING
 
Method Summary
 boolean getBooleanValue()
          A convienence method that allows getting of the boolean value of the preference.
 void setBooleanValue(boolean value)
          A convienence method that allows setting of the boolean value of the preference.
 
Methods implemented from interface com.novell.afw.portlet.api.EbiPortletPreference
getDataType, getDescription, getDisplayableXML, getDisplayName, getLocale, getName, getValue, getValue, getValues, getValues, isEncrypted, isHiddenFromUser, isMultiValued, isReadOnly, isRequired, setDescription, setDisplayName, setHiddenFromUser, setMultiValued, setReadOnly, setRequired, setValue, setValues, validate
 

Field Detail

BOOLEAN_TRUE

public static final String BOOLEAN_TRUE
Constant for string representation of a boolean true value.
Since:
v5.0

BOOLEAN_FALSE

public static final String BOOLEAN_FALSE
Constant for string representation of a boolean false value.
Since:
v5.0

BOOLEAN_0

public static final String BOOLEAN_0
Constant for string representation of an integer that equates to a boolean false value.
Since:
v5.0

BOOLEAN_1

public static final String BOOLEAN_1
Constant for string representation of an integer that equates to a boolean true value.
Since:
v5.0
Method Detail

getBooleanValue

public boolean getBooleanValue()
A convienence method that allows getting of the boolean value of the preference. This will return true only when the preference's underlying string value is equal to "true" case insensitive. This method operates on only the first element if the preference has multiple values.
Returns:
boolean value of the preference, or false if not a boolean value.
Since:
v5.0
See Also:
EbiPortletPreference.getValue()

setBooleanValue

public void setBooleanValue(boolean value)
A convienence method that allows setting of the boolean value of the preference. This method operates on only the first element if the preference has multiple values.
Parameters:
value - boolean value to set the preference to.
Since:
v5.0
See Also:
EbiPortletPreference.setValue(String)

Novell exteNd
Director 5.2 API