1 |
74b9f670
|
n.hoffmann
|
// $Id$
|
2 |
|
|
/**
|
3 |
|
|
* Copyright (C) 2007 EDIT
|
4 |
|
|
* European Distributed Institute of Taxonomy
|
5 |
|
|
* http://www.e-taxonomy.eu
|
6 |
|
|
*
|
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.
|
9 |
|
|
*/
|
10 |
|
|
|
11 |
f211dd28
|
n.hoffmann
|
package eu.etaxonomy.taxeditor.newWizard;
|
12 |
74b9f670
|
n.hoffmann
|
|
13 |
db5e366d
|
n.hoffmann
|
import eu.etaxonomy.cdm.api.service.ICollectionService;
|
14 |
74b9f670
|
n.hoffmann
|
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
15 |
|
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
16 |
f211dd28
|
n.hoffmann
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectionWizardPage;
|
17 |
74b9f670
|
n.hoffmann
|
|
18 |
|
|
/**
|
19 |
3be6ef3e
|
n.hoffmann
|
* <p>NewCollectionWizard class.</p>
|
20 |
|
|
*
|
21 |
74b9f670
|
n.hoffmann
|
* @author n.hoffmann
|
22 |
|
|
* @created Oct 13, 2010
|
23 |
|
|
* @version 1.0
|
24 |
|
|
*/
|
25 |
|
|
public class NewCollectionWizard extends AbstractNewEntityWizard<Collection> {
|
26 |
|
|
|
27 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
28 |
74b9f670
|
n.hoffmann
|
@Override
|
29 |
|
|
public void addPages() {
|
30 |
f211dd28
|
n.hoffmann
|
addPage(new CollectionWizardPage(formFactory, getConversationHolder(), getEntity()));
|
31 |
74b9f670
|
n.hoffmann
|
}
|
32 |
|
|
|
33 |
|
|
/* (non-Javadoc)
|
34 |
|
|
* @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
|
35 |
|
|
*/
|
36 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
37 |
74b9f670
|
n.hoffmann
|
@Override
|
38 |
|
|
protected void saveEntity() {
|
39 |
f211dd28
|
n.hoffmann
|
CdmStore.getService(ICollectionService.class).saveOrUpdate(getEntity());
|
40 |
74b9f670
|
n.hoffmann
|
}
|
41 |
|
|
|
42 |
|
|
/* (non-Javadoc)
|
43 |
|
|
* @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#createNewEntity()
|
44 |
|
|
*/
|
45 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
46 |
74b9f670
|
n.hoffmann
|
@Override
|
47 |
|
|
protected Collection createNewEntity() {
|
48 |
9a0f58cd
|
n.hoffmann
|
return Collection.NewInstance();
|
49 |
74b9f670
|
n.hoffmann
|
}
|
50 |
38f1558f
|
n.hoffmann
|
|
51 |
|
|
@Override
|
52 |
|
|
protected String getEntityName() {
|
53 |
|
|
return "Collection";
|
54 |
|
|
}
|
55 |
74b9f670
|
n.hoffmann
|
|
56 |
|
|
}
|