Project

General

Profile

« Previous | Next » 

Revision 0caafa75

Added by Andreas Müller over 1 year ago

ref #10186 further remove ConversationHolder and cleanup

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/agent/PersonWizardPage.java
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
9

  
10 9
package eu.etaxonomy.taxeditor.ui.section.agent;
11 10

  
12 11
import org.apache.commons.lang3.StringUtils;
13 12
import org.eclipse.swt.SWT;
14 13

  
15
import eu.etaxonomy.cdm.model.agent.AgentBase;
16 14
import eu.etaxonomy.cdm.model.agent.Person;
17 15
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
18 16
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
20 18
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
21 19

  
22 20
/**
23
 * <p>PersonWizardPage class.</p>
24
 *
25 21
 * @author n.hoffmann
26 22
 * @created Jun 1, 2010
27
 * @version 1.0
28 23
 */
29 24
public class PersonWizardPage extends AbstractCdmEntityWizardPage<Person> {
30 25

  
31
    PersonDetailElement personElement;
32

  
26
    private PersonDetailElement personElement;
33 27

  
34
	/**
35
	 * <p>Constructor for PersonWizardPage.</p>
36
	 *
37
	 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
38
	 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
39
	 * @param entity a {@link eu.etaxonomy.cdm.model.agent.Person} object.
40
	 */
41
	public PersonWizardPage(CdmFormFactory formFactory, Person entity) {
28
    public PersonWizardPage(CdmFormFactory formFactory, Person entity) {
42 29
		super(formFactory, entity);
43 30
		setTitle("Person");
44 31
	}
45 32

  
46

  
47
	/* (non-Javadoc)
48
	 * @see eu.etaxonomy.taxeditor.forms.CdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
49
	 */
50
	/** {@inheritDoc} */
51 33
	@Override
52 34
	public AbstractCdmDetailElement<Person> createElement(ICdmFormElement rootElement) {
53 35
		personElement = formFactory.createPersonDetailElement(rootElement, SWT.NULL);
......
57 39

  
58 40
	@Override
59 41
    protected boolean titleCacheIsNotEmpty() {
60
        if (getEntity() instanceof AgentBase) {
61
            return !StringUtils.isEmpty(entity.getTitleCache());
62
        }
63
        return true;
42
        return !StringUtils.isEmpty(entity.getTitleCache());
64 43
    }
65
}
44
}

Also available in: Unified diff