Project

General

Profile

Revision c6b02b73

IDc6b02b73bf43ef58ae109d89adb17fc4058d46b4
Parent 82f2be03
Child 3da39777

Added by Andreas Kohlbecker about 2 years ago

fix #7742 moving inner class SearchFilter into own class file RegistrationSearchFilter

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/ListPresenter.java
153 153
    private Pager<RegistrationDTO> pageRegistrations(TextField textFieldOverride, String alternativeText) {
154 154

  
155 155
        // prepare the filters
156
        SearchFilter filter = loadFilterFromView();
156
        RegistrationSearchFilter filter = loadFilterFromView();
157 157
        if(textFieldOverride != null && textFieldOverride == getView().getIdentifierFilter()){
158 158
            filter.identifierPattern = alternativeText;
159 159
        }
......
248 248
     */
249 249
    private void preserveSearchFilterInSession() {
250 250

  
251
        SearchFilter filter = loadFilterFromView();
251
        RegistrationSearchFilter filter = loadFilterFromView();
252 252
        UI.getCurrent().getSession().setAttribute(REGISTRATION_LIST_PRESENTER_SEARCH_FILTER, filter);
253 253
    }
254 254

  
......
256 256
    /**
257 257
     *
258 258
     */
259
    public SearchFilter loadFilterFromView() {
259
    public RegistrationSearchFilter loadFilterFromView() {
260 260

  
261 261

  
262
        SearchFilter filter = new SearchFilter();
262
        RegistrationSearchFilter filter = new RegistrationSearchFilter();
263 263
        filter.identifierPattern = getView().getIdentifierFilter().getValue();
264 264
        filter.namePattern = getView().getTaxonNameFilter().getValue();
265 265
        if(getView().getSubmitterFilter() != null){
......
289 289
    private void loadSearchFilterFromSession() {
290 290
        Object o = UI.getCurrent().getSession().getAttribute(REGISTRATION_LIST_PRESENTER_SEARCH_FILTER);
291 291
        if(o != null){
292
            SearchFilter filter = (SearchFilter)o;
292
            RegistrationSearchFilter filter = (RegistrationSearchFilter)o;
293 293
            getView().getIdentifierFilter().setValue(filter.identifierPattern);
294 294
            getView().getTaxonNameFilter().setValue(filter.namePattern);
295 295
            if(getView().getSubmitterFilter() != null){
......
319 319

  
320 320
    }
321 321

  
322
    class SearchFilter {
323
        String identifierPattern;
324
        String namePattern;
325
        User submitter;
326
        Set<TypeDesignationStatusBase> typeStatus;
327
        Set<RegistrationStatus> registrationStatus;
328
    }
329

  
330 322
}
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationSearchFilter.java
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.vaadin.view.registration;
10

  
11
import java.util.Set;
12

  
13
import eu.etaxonomy.cdm.model.common.User;
14
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
15
import eu.etaxonomy.cdm.model.name.TypeDesignationStatusBase;
16

  
17
class RegistrationSearchFilter {
18
    String identifierPattern;
19
    String namePattern;
20
    User submitter;
21
    Set<TypeDesignationStatusBase> typeStatus;
22
    Set<RegistrationStatus> registrationStatus;
23
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)