ref #7502 Add abbrev (nomencl.) cache for references
authorPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 5 Oct 2018 08:04:15 +0000 (10:04 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 5 Oct 2018 10:27:33 +0000 (12:27 +0200)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java

index a39eb86859aebbfdb2b0ac0736b9f7b3a47cf8d8..e12c1a9d6d0de36e633daaf8bfb35880b4f7d289 100644 (file)
@@ -38,6 +38,8 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
 
        public static final String ID = "bulkeditor.input.reference";
 
+       private static final String PROPERTY_NOMENCLATURAL_CACHE = "Nomencl. Cache";
+
        private static ReferenceEditorInput instance;
 
        public static String getID() {
@@ -47,9 +49,18 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
     @Override
     protected List<String> getPropertyKeys_internal() {
         List<String> propertyKeysInternal = new ArrayList<>();
+        propertyKeysInternal.add(PROPERTY_NOMENCLATURAL_CACHE);
         return propertyKeysInternal;
     }
 
+    @Override
+    public Object getPropertyValue(Reference cdmBase, String property) {
+        if(property.equals(PROPERTY_NOMENCLATURAL_CACHE)){
+            return cdmBase.getAbbrevTitleCache();
+        }
+        return super.getPropertyValue(cdmBase, property);
+    }
+
     @Override
     public String getName() {
                return BulkEditorInputType.REFERENCE.label;