Project

General

Profile

« Previous | Next » 

Revision f18466c9

Added by Andreas Müller almost 3 years ago

cleanup

View differences:

src/main/java/eu/etaxonomy/cdm/persistence/hibernate/GrantedAuthorityRevokingRegistrationUpdateLister.java
167 167
        }
168 168
    }
169 169

  
170
    /**
171
     * @param deleteCandidates
172
     * @param typeSpecimen
173
     */
174 170
    private void addDeleteCandidates(Set<CdmAuthority> deleteCandidates, DerivedUnit deriveUnit) {
175 171
        if(deriveUnit == null){
176 172
            return;
......
180 176
        if(deriveUnit.getCollection() != null){
181 177
            deleteCandidates.add(new CdmAuthority(deriveUnit.getCollection(), UPDATE_DELETE));
182 178
        }
183
        for(SpecimenOrObservationBase sob : deriveUnit.getOriginals()){
179
        for(SpecimenOrObservationBase<?> sob : deriveUnit.getOriginals()){
184 180
            if(sob == null){
185 181
                continue;
186 182
            }
......
203 199
        }
204 200
    }
205 201

  
206
    /**
207
     * @param deleteCandidates
208
     * @param nomenclaturalReference
209
     */
210 202
    private void addDeleteCandidates(Set<CdmAuthority> deleteCandidates, Reference reference) {
211 203
        if(reference == null){
212 204
            return;
......
235 227
                }
236 228
            }
237 229
        }
238

  
239 230
    }
240 231

  
241

  
242

  
243

  
244
    /**
245
     * @param deleteCandidates
246
     */
247 232
    private void deleteAuthorities(EventSource session, Set<CdmAuthority> deleteCandidates) {
248 233

  
249 234
        if(deleteCandidates.isEmpty()){
250 235
            return;
251 236
        }
252 237

  
253
        Collection<String> authorityStrings = new ArrayList<String>(deleteCandidates.size());
238
        Collection<String> authorityStrings = new ArrayList<>(deleteCandidates.size());
254 239
        deleteCandidates.forEach( dc -> authorityStrings.add(dc.toString()));
255 240

  
256 241
        // -----------------------------------------------------------------------------------------
......
262 247

  
263 248
            Query userQuery = newSession.createQuery("select u from User u join u.grantedAuthorities ga where ga.authority in (:authorities)");
264 249
            userQuery.setParameterList("authorities", authorityStrings);
250
            @SuppressWarnings("unchecked")
265 251
            List<User> users = userQuery.list();
266 252
            for(User user : users){
267 253
                List<GrantedAuthority> deleteFromUser = user.getGrantedAuthorities().stream().filter(
......
273 259

  
274 260
            Query groupQuery = newSession.createQuery("select g from Group g join g.grantedAuthorities ga where ga.authority in (:authorities)");
275 261
            groupQuery.setParameterList("authorities", authorityStrings);
262
            @SuppressWarnings("unchecked")
276 263
            List<Group> groups = groupQuery.list();
277 264
            for(Group group : groups){
278 265
                List<GrantedAuthority> deleteFromUser = group.getGrantedAuthorities().stream().filter(
src/main/java/eu/etaxonomy/cdm/vaadin/component/common/PersonField.java
351 351
        return ignoreFields;
352 352
    }
353 353

  
354
    /**
355
     * {@inheritDoc}
356
     */
357 354
    @Override
358 355
    public void commit() throws SourceException, InvalidValueException {
359 356

  
src/main/java/eu/etaxonomy/cdm/vaadin/util/TeamOrPersonBaseCaptionGenerator.java
15 15
/**
16 16
 * @author a.kohlbecker
17 17
 * @since Jun 7, 2017
18
 *
19 18
 */
20 19
public final class TeamOrPersonBaseCaptionGenerator<T extends TeamOrPersonBase> implements CaptionGenerator<T> {
21 20

  
......
25 24
        BIBLIOGRAPHIC_TITLE;
26 25
    }
27 26

  
28
    CacheType cacheType;
27
    private CacheType cacheType;
29 28

  
30 29
    private static final long serialVersionUID = 116448502301429773L;
31 30

  
......
42 41
        return caption;
43 42
    }
44 43

  
45
    /**
46
     * @param option
47
     * @return
48
     */
49 44
    protected String chooseTitle(T option) {
50 45
        switch(cacheType){
51 46
            case NOMENCLATURAL_TITLE:
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
623 623
                inferredExAuthor = validatedName.getNomenclaturalReference().getAuthorship();
624 624
            }
625 625
        }
626
        TeamOrPersonBase inferredCominationAuthors = inferCombinationAuthors();
626
        TeamOrPersonBase<?> inferredCominationAuthors = inferCombinationAuthors();
627 627
        if(inferredExAuthor != null && inferredCominationAuthors != null
628 628
                // comparing by nomTitle to detect duplicates:
629 629
                && inferredExAuthor.getNomenclaturalTitle().equals(inferredCominationAuthors.getNomenclaturalTitle())) {

Also available in: Unified diff