3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.newWizard
;
13 import eu
.etaxonomy
.cdm
.api
.service
.IGrantedAuthorityService
;
14 import eu
.etaxonomy
.cdm
.api
.service
.IGroupService
;
15 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
16 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailWizardPage
;
18 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailWizardPage
;
21 * @author a.kohlbecker
22 * @created Sept 13 2012
24 public class NewGrantedAuthorityWizard
extends AbstractNewEntityWizard
<GrantedAuthorityImpl
> {
26 private GrantedAuthorityDetailWizardPage authorityPage
;
29 * @see org.eclipse.jface.wizard.Wizard#addPages()
32 public void addPages() {
33 authorityPage
= new GrantedAuthorityDetailWizardPage(formFactory
, getConversationHolder(), getEntity());
34 super.addPage(authorityPage
);
39 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#saveEntity()
42 protected void saveEntity() {
43 CdmStore
.getService(IGrantedAuthorityService
.class).saveOrUpdate(getEntity());
47 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#createNewEntity()
50 protected GrantedAuthorityImpl
createNewEntity() {
51 return GrantedAuthorityImpl
.NewInstance();
55 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#getEntityName()
58 protected String
getEntityName() {
59 return "GrantedAuthority";