2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.newWizard
;
12 import eu
.etaxonomy
.cdm
.api
.service
.IGrantedAuthorityService
;
13 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
14 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
15 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailWizardPage
;
18 * @author a.kohlbecker
19 * @created Sept 13 2012
21 public class NewGrantedAuthorityWizard
extends AbstractNewEntityWizard
<GrantedAuthorityImpl
> {
23 private GrantedAuthorityDetailWizardPage authorityPage
;
26 * @see org.eclipse.jface.wizard.Wizard#addPages()
29 public void addPages() {
30 authorityPage
= new GrantedAuthorityDetailWizardPage(formFactory
, getConversationHolder(), getEntity());
31 super.addPage(authorityPage
);
36 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#saveEntity()
39 protected void saveEntity() {
40 CdmStore
.getService(IGrantedAuthorityService
.class).merge(getEntity(), true);
45 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#createNewEntity()
48 protected GrantedAuthorityImpl
createNewEntity() {
49 return GrantedAuthorityImpl
.NewInstance();
53 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#getEntityName()
56 protected String
getEntityName() {
57 return "GrantedAuthority";