org.olat.user.propertyhandlers
Class SkypePropertyHandler
java.lang.Object
org.olat.user.AbstractUserPropertyHandler
org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler
org.olat.user.propertyhandlers.SkypePropertyHandler
- All Implemented Interfaces:
- ItemValidatorProvider, UserPropertyHandler
public class SkypePropertyHandler
- extends Generic127CharTextPropertyHandler
Description:
The skype field provides a user property that contains a valid Skype ID.
Initial Date: 27.07.2007
- Author:
- Florian Gnaegi, frentix GmbH, http://www.frentix.com
|
Method Summary |
FormItem |
addFormItem(java.util.Locale locale,
User user,
java.lang.String usageIdentifyer,
boolean isAdministrativeUser,
FormItemContainer formItemContainer)
Adds a flexi-form Item for this UserPropertyHandler. |
FormElement |
getFormElement(java.util.Locale locale,
User user,
java.lang.String usageIdentifyer,
boolean isAdministrativeUser)
Create a (non-flexi) form element for this UserPropertyHandler. |
java.lang.String |
getUserPropertyAsHTML(User user,
java.util.Locale locale)
|
boolean |
isValidValue(java.lang.String value,
ValidationError validationError,
java.util.Locale locale)
Checks if the given value is a valid value for this property (e.g. |
| Methods inherited from class org.olat.user.AbstractUserPropertyHandler |
getColumnDescriptor, getGroup, getName, getUserProperty, i18nColumnDescriptorLabelKey, i18nFormElementGroupKey, i18nFormElementLabelKey, isDeletable, setDeletable, setGroup, setName, setUserProperty, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SkypePropertyHandler
public SkypePropertyHandler()
getUserPropertyAsHTML
public java.lang.String getUserPropertyAsHTML(User user,
java.util.Locale locale)
- Specified by:
getUserPropertyAsHTML in interface UserPropertyHandler- Overrides:
getUserPropertyAsHTML in class AbstractUserPropertyHandler
- Parameters:
user - the user for which we want to get the valuelocale - the current users locale or NULL if default locale should be
used.
- Returns:
- The value formatted in HTML or an empty String if no value exists
- See Also:
AbstractUserPropertyHandler.getUserPropertyAsHTML(org.olat.core.id.User, java.util.Locale)
getFormElement
public FormElement getFormElement(java.util.Locale locale,
User user,
java.lang.String usageIdentifyer,
boolean isAdministrativeUser)
- Description copied from interface:
UserPropertyHandler
- Create a (non-flexi) form element for this UserPropertyHandler. The
usageIdentifyer indicates in which form the element is to be used.
- Specified by:
getFormElement in interface UserPropertyHandler- Overrides:
getFormElement in class Generic127CharTextPropertyHandler
- Parameters:
locale - The current users localeuser - The user containing data to be prefilled or NULL if it should
be left emptyusageIdentifyer - The identifyer of the form where this form element
is usedisAdministrativeUser - true: Form element will be set to
administrative mode. false: the element is set to user mode. In
some cases the field is then read-only
- Returns:
- The form element or NULL if in this context the element is not
displayed
- See Also:
Generic127CharTextPropertyHandler.getFormElement(java.util.Locale, org.olat.core.id.User, java.lang.String, boolean)
isValidValue
public boolean isValidValue(java.lang.String value,
ValidationError validationError,
java.util.Locale locale)
- Description copied from interface:
UserPropertyHandler
- Checks if the given value is a valid value for this property (e.g. syntax
checking). This is not connected to any form item, in contrast to
UserPropertyHandler.isValid(FormItem, Map), so all validations
which do not depend on a form item can be done here.
- Specified by:
isValidValue in interface ItemValidatorProvider- Specified by:
isValidValue in interface UserPropertyHandler- Overrides:
isValidValue in class Generic127CharTextPropertyHandler
- Parameters:
value - The value to be checkedvalidationError - Callback to get the error key in case of
validation=false
- Returns:
- true: value is valid, false: value is invalid. Check
validationError to get the error message
- See Also:
UserPropertyHandler.isValidValue(java.lang.String, org.olat.core.gui.components.form.ValidationError, java.util.Locale)
addFormItem
public FormItem addFormItem(java.util.Locale locale,
User user,
java.lang.String usageIdentifyer,
boolean isAdministrativeUser,
FormItemContainer formItemContainer)
- Description copied from interface:
UserPropertyHandler
- Adds a flexi-form Item for this UserPropertyHandler. The usageIdentifyer
indicates in which form the element is to be used.
- Specified by:
addFormItem in interface UserPropertyHandler- Overrides:
addFormItem in class Generic127CharTextPropertyHandler
- Parameters:
locale - The current users localeuser - The user containing data to be prefilled or NULL if it should
be left emptyusageIdentifyer - The identifyer of the form where this form element
is usedisAdministrativeUser - true: Form element will be set to
administrative mode. false: the element is set to user mode. In
some cases the field is then read-onlyformItemContainer - Container to which Form Item has to be added
- Returns:
- The formItem will be added to formItemContainer
- See Also:
UserPropertyHandler.addFormItem(java.util.Locale, org.olat.core.id.User, java.lang.String, boolean, org.olat.core.gui.components.form.flexible.FormItemContainer)