Project

General

Profile

« Previous | Next » 

Revision f5b66699

Added by Patrick Plitzner over 7 years ago

ref #6333 Add generic support for entity collection sections to allow
adding existing entities

  • this is done by two abstract methods allowAddExisting() and addExisting()

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionSourceSection.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
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
*/
......
29 29
 */
30 30
public class DescriptionSourceSection extends
31 31
		AbstractEntityCollectionSection<DescriptionBase, IdentifiableSource>{
32
	
32

  
33 33
	/**
34 34
	 * <p>Constructor for DescriptionSourceSection.</p>
35 35
	 *
......
43 43
		super(cdmFormFactory, conversation, parentElement, "Description Sources", style);
44 44
	}
45 45

  
46
	
46

  
47 47

  
48 48
	/** {@inheritDoc} */
49 49
	@Override
......
54 54
	/** {@inheritDoc} */
55 55
	@Override
56 56
	public IdentifiableSource createNewElement() {
57
		OriginalSourceType ost = OriginalSourceTypeSelectionDialog.select(getShell(), getConversationHolder());	
57
		OriginalSourceType ost = OriginalSourceTypeSelectionDialog.select(getShell(), getConversationHolder());
58 58
		if(ost != null) {
59 59
			return IdentifiableSource.NewInstance(ost);
60 60
		} else {
......
85 85
	public void removeElement(IdentifiableSource element) {
86 86
		getEntity().removeSource(element);
87 87
	}
88

  
89

  
90

  
91
    /**
92
     * {@inheritDoc}
93
     */
94
    @Override
95
    public IdentifiableSource addExisting() {
96
        return null;
97
    }
98

  
99

  
100

  
101
    /**
102
     * {@inheritDoc}
103
     */
104
    @Override
105
    public boolean allowAddExisting() {
106
        return false;
107
    }
88 108
}

Also available in: Unified diff