Project

General

Profile

Revision 727a2e1a

ID727a2e1a4ee754953e05ab804a76498efca585ec
Parent 050137a3
Child bca2429d

Added by Andreas Kohlbecker over 3 years ago

ref #7348 typeDesignations as non bean property to supress it for RegistrationDTO serializations

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RegistrationDTO.java
9 9
package eu.etaxonomy.cdm.api.service.dto;
10 10

  
11 11
import java.util.ArrayList;
12
import java.util.Arrays;
12 13
import java.util.Collection;
13 14
import java.util.HashSet;
14 15
import java.util.LinkedHashMap;
......
33 34
import eu.etaxonomy.cdm.model.reference.Reference;
34 35
import eu.etaxonomy.cdm.ref.EntityReference;
35 36
import eu.etaxonomy.cdm.ref.TypedEntityReference;
37
import eu.etaxonomy.cdm.strategy.cache.TagEnum;
38
import eu.etaxonomy.cdm.strategy.cache.TaggedText;
36 39

  
37 40
public class RegistrationDTO{
38 41

  
......
58 61

  
59 62
    private Set<TypedEntityReference<Registration>> blockedBy;
60 63

  
64
    private List<TaggedText> summaryTaggedText;
65

  
61 66

  
62 67
    /**
63 68
     * @param reg
......
92 97
        switch(registrationType) {
93 98
        case EMPTY:
94 99
            summary = "BLANK REGISTRATION";
100
            summaryTaggedText = Arrays.asList(new TaggedText(TagEnum.label, summary));
95 101
            break;
96 102
        case NAME:
97 103
            summary = reg.getName().getTitleCache();
104
            summaryTaggedText = reg.getName().getTaggedName();
98 105
            break;
99 106
        case NAME_AND_TYPIFICATION:
100 107
        case TYPIFICATION:
......
102 109
            try {
103 110
                typeDesignationManager = new TypeDesignationSetManager(reg.getTypeDesignations());
104 111
                summary = typeDesignationManager.print();
112
                summaryTaggedText = typeDesignationManager.toTaggedText();
105 113
            } catch (RegistrationValidationException e) {
106 114
                validationProblems.add("Validation errors: " + e.getMessage());
107 115
            }
......
164 172
        return summary;
165 173
    }
166 174

  
175
    /**
176
     * @return the summary
177
     */
178
    public List<TaggedText> getSummaryTaggedText() {
179
        return summaryTaggedText;
180
    }
181

  
167 182
    public String getSubmitterUserName(){
168 183
        return submitterUserName;
169 184
    }
......
298 313
        return typeDesignationManager != null ? typeDesignationManager.findTypeDesignation(ref) : null;
299 314
    }
300 315

  
301
    public Collection<TypeDesignationBase> getTypeDesignations() {
316
    public Collection<TypeDesignationBase> typeDesignations() {
302 317
        return typeDesignationManager != null ? typeDesignationManager.getTypeDesignations() : null;
303 318
    }
304 319

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)