aa3cd19dd733d2ae274bbc270091134c2b05eb6c
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / newWizard / NewUserWizard.java
1 /**
2 *
3 */
4 package eu.etaxonomy.taxeditor.newWizard;
5
6 import eu.etaxonomy.cdm.api.service.IUserService;
7 import eu.etaxonomy.cdm.model.common.User;
8 import eu.etaxonomy.taxeditor.store.CdmStore;
9 import eu.etaxonomy.taxeditor.ui.section.user.UserDetailWizardPage;
10
11 /**
12 * @author n.hoffmann
13 *
14 */
15 public class NewUserWizard extends AbstractNewEntityWizard<User> {
16
17 private UserDetailWizardPage userPage;
18
19 @Override
20 public void addPages() {
21 userPage = new UserDetailWizardPage(formFactory, getConversationHolder(), getEntity());
22 addPage(userPage);
23 }
24
25 @Override
26 protected void saveEntity() {
27 CdmStore.getService(IUserService.class).saveOrUpdate(getEntity());
28 }
29
30 @Override
31 protected User createNewEntity() {
32 return User.NewInstance(null, null);
33 }
34
35 @Override
36 protected String getEntityName() {
37 return "Institution";
38 }
39
40 }