org.olat.user
Class ProfileFormController

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.controller.BasicController
          extended by org.olat.core.gui.components.form.flexible.impl.FormBasicController
              extended by org.olat.user.ProfileFormController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable

public class ProfileFormController
extends FormBasicController

Provides a controller which lets the user edit their user profile and choose the fields which are made publicly visible.

Author:
twuersch

Field Summary
 
Fields inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
LAYOUT_CUSTOM, LAYOUT_DEFAULT, LAYOUT_HORIZONTAL, LAYOUT_VERTICAL
 
Constructor Summary
ProfileFormController(UserRequest ureq, WindowControl wControl, HomePageConfig conf, Identity identity, boolean isAdministrativeUser)
          Creates this controller.
 
Method Summary
 void setDirtyMarking(boolean isDirtyMarking)
          Sets the dirty mark for this form.
 void updateFromFormData(HomePageConfig config, Identity identity)
          Stores the data from the form into a) the user's home page configuration and b) the user's properties.
 Identity updateIdentityFromFormData(Identity id)
          Take form data and set it in the user fields for the current subject
 
Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
dispose, event
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProfileFormController

public ProfileFormController(UserRequest ureq,
                             WindowControl wControl,
                             HomePageConfig conf,
                             Identity identity,
                             boolean isAdministrativeUser)
Creates this controller.

Parameters:
ureq - The user request.
wControl - The window control.
conf - The homepage configuration (decides which user profile fields are visible for everyone).
identity - The identity of the user.
isAdministrativeUser - true: user is editing another users profile as user manager; false: use is editing his own profile
Method Detail

updateFromFormData

public void updateFromFormData(HomePageConfig config,
                               Identity identity)
Stores the data from the form into a) the user's home page configuration and b) the user's properties.

Parameters:
config - The user's home page configuration (i.e. flags for publicly visible fields).
identity - The user's identity

updateIdentityFromFormData

public Identity updateIdentityFromFormData(Identity id)
Take form data and set it in the user fields for the current subject

Parameters:
id - The identity to be updated (transient, does not do any db calls)
Returns:
the updated identity object

setDirtyMarking

public void setDirtyMarking(boolean isDirtyMarking)
Sets the dirty mark for this form.

Parameters:
isDirtyMarking - true sets this form dirty.