|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.user.AbstractUserPropertyHandler
org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler
org.olat.user.propertyhandlers.URLPropertyHandler
public class URLPropertyHandler
Initial Date: 27.07.2007
| Constructor Summary | |
|---|---|
URLPropertyHandler()
|
|
| 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 |
isValid(FormElement ui,
java.util.Map formContext)
Check if this form is valid |
boolean |
isValid(FormItem formItem,
java.util.Map formContext)
Checks if a form item for a property has a valid value and sets the appropriate error key if necessary. |
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.propertyhandlers.Generic127CharTextPropertyHandler |
|---|
getStringValue, getStringValue, getStringValue, updateFormElementFromUser, updateUserFromFormElement, updateUserFromFormItem |
| 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 |
| Constructor Detail |
|---|
public URLPropertyHandler()
| Method Detail |
|---|
public java.lang.String getUserPropertyAsHTML(User user,
java.util.Locale locale)
getUserPropertyAsHTML in interface UserPropertyHandlergetUserPropertyAsHTML in class AbstractUserPropertyHandleruser - the user for which we want to get the valuelocale - the current users locale or NULL if default locale should be
used.
AbstractUserPropertyHandler.getUserPropertyAsHTML(org.olat.core.id.User, java.util.Locale)
public FormElement getFormElement(java.util.Locale locale,
User user,
java.lang.String usageIdentifyer,
boolean isAdministrativeUser)
UserPropertyHandler
getFormElement in interface UserPropertyHandlergetFormElement in class Generic127CharTextPropertyHandlerlocale - 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
Generic127CharTextPropertyHandler.getFormElement(java.util.Locale, org.olat.core.id.User, java.lang.String, boolean)
public FormItem addFormItem(java.util.Locale locale,
User user,
java.lang.String usageIdentifyer,
boolean isAdministrativeUser,
FormItemContainer formItemContainer)
UserPropertyHandler
addFormItem in interface UserPropertyHandleraddFormItem in class Generic127CharTextPropertyHandlerlocale - 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
UserPropertyHandler.addFormItem(java.util.Locale, org.olat.core.id.User, java.lang.String, boolean, org.olat.core.gui.components.form.flexible.FormItemContainer)
public boolean isValid(FormElement ui,
java.util.Map formContext)
UserPropertyHandler
isValid in interface UserPropertyHandlerisValid in class Generic127CharTextPropertyHandlerui - The form element previously created with the getFormElement
methodformContext - Map containing some variables used in this form context,
e.g. for cross form value checks. NULL to not use any form context
variables
org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler#isValid(org.olat.core.gui.formelements.FormElement)
public boolean isValid(FormItem formItem,
java.util.Map formContext)
UserPropertyHandlerUserPropertyHandler.isValidValue(String, ValidationError, Locale)
since it takes the value of the form item associated with this user
property into account. Do all validations which depend on a form item here.
isValid in interface UserPropertyHandlerisValid in class Generic127CharTextPropertyHandlerformItem - The flexi form item previously created with the addFormItem
methodformContext - Map containing some variables used in this form context,
e.g. for cross form value checks. NULL to not use any form context
variables
UserPropertyHandler.isValid(org.olat.core.gui.components.form.flexible.FormItem, java.util.Map)
public boolean isValidValue(java.lang.String value,
ValidationError validationError,
java.util.Locale locale)
UserPropertyHandlerUserPropertyHandler.isValid(FormItem, Map), so all validations
which do not depend on a form item can be done here.
isValidValue in interface ItemValidatorProviderisValidValue in interface UserPropertyHandlerisValidValue in class Generic127CharTextPropertyHandlervalue - The value to be checkedvalidationError - Callback to get the error key in case of
validation=false
UserPropertyHandler.isValidValue(java.lang.String, org.olat.core.gui.components.form.ValidationError, java.util.Locale)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||