Novell exteNd
Director 5.2 API

com.novell.afw.portlet.api
Interface EbiPortletPreferencePassword

All Superinterfaces:
Cloneable, EbiPortletPreference

public interface EbiPortletPreferencePassword
extends EbiPortletPreference

Interface representing an Password type of EbiPortletPreference. It provides methods that are useful for working with Password preferences or and preference that needs to store its data encrypted. The setValue takes a single string and encrypts the data for storage. The setValues will encrypt each element in the array before storage. The getValue and setValues return the password(s) as unecrypted Strings. The setPassword/getPassword exist for semantic convienence when working with a single valued password. The isMatch will indicate if a given string is the original password (single valued) and thus a match.

Since:
v5.0

Fields inherited from interface com.novell.afw.portlet.api.EbiPortletPreference
TYPE_BOOLEAN, TYPE_COMPLEX, TYPE_INTEGER, TYPE_PASSWORD, TYPE_SELECT, TYPE_STRING
 
Method Summary
 String getPassword()
          Returns the password, in a decrypted form, usable as the string that was used to create the password.
 boolean isMatch(String password)
          Returns true if the string passed in is the same that was used to set the password.
 boolean isPasswordSet()
          Returns true if a password has been set, false if one has never been set.
 void setPassword(String password)
          Sets the password.
 
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
 

Method Detail

setPassword

public void setPassword(String password)
Sets the password. This encrypts the string before storing it.
Parameters:
password - String to be encrypted ans stored.
Since:
v5.0

getPassword

public String getPassword()
Returns the password, in a decrypted form, usable as the string that was used to create the password.
Returns:
The password.
Since:
v5.0

isMatch

public boolean isMatch(String password)
Returns true if the string passed in is the same that was used to set the password.
Parameters:
password - String to test to see if it is the password. If no password has been set, or if the password passed in is null, then false is returned.
Returns:
true if password matches the original password, or false if no password is set, or if the password passed in is null.
Since:
v5.0

isPasswordSet

public boolean isPasswordSet()
Returns true if a password has been set, false if one has never been set.
Returns:
true if a password has been set.
Since:
v5.0

Novell exteNd
Director 5.2 API