Project

General

Profile

Revision fe289550

IDfe2895502734f4335828404e0de5e88571197d59
Parent de3db973
Child 68befb95

Added by Patrick Plitzner about 2 years ago

ref #7502 Add name cache and authorship cache for names

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java
34 34
public class NameEditorInput extends AbstractBulkEditorInput<TaxonName> {
35 35

  
36 36
	private static final long serialVersionUID = -3085029575759626823L;
37

  
37 38
	private static NameEditorInput instance;
38 39

  
39 40
	public static final String ID = "bulkeditor.input.name";
40 41

  
42
	private static final String PROPERTY_NAME_CACHE = "Name Cache";
43
	private static final String PROPERTY_AUTHORSHIP_CACHE = "Authorship Cache";
44

  
41 45
	public static AbstractBulkEditorInput getInstance() {
42 46
		if (instance == null) {
43 47
			instance = new NameEditorInput();
......
48 52
	@Override
49 53
    protected List<String> getPropertyKeys_internal() {
50 54
        List<String> propertyKeysInternal = new ArrayList<>();
55
        propertyKeysInternal.add(PROPERTY_NAME_CACHE);
56
        propertyKeysInternal.add(PROPERTY_AUTHORSHIP_CACHE);
51 57
        return propertyKeysInternal;
52 58
    }
53 59

  
60
	@Override
61
	public Object getPropertyValue(TaxonName cdmBase, String property) {
62
	    if(property.equals(PROPERTY_NAME_CACHE)){
63
	        return cdmBase.getNameCache();
64
	    }
65
	    else if(property.equals(PROPERTY_AUTHORSHIP_CACHE)){
66
	        return cdmBase.getAuthorshipCache();
67
	    }
68
	    return super.getPropertyValue(cdmBase, property);
69
	}
70

  
54 71
    @Override
55 72
    public String getName() {
56 73
		return BulkEditorInputType.NAME.label;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)