Project

General

Profile

« Previous | Next » 

Revision cc9c04a4

Added by Andreas Kohlbecker over 3 years ago

ref #9290 cleaning up

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TypeDesignationWorkingsetEditorIdSet.java
17 17

  
18 18
    UUID registrationUuid;
19 19
    TypedEntityReference<IdentifiableEntity<?>> baseEntityRef;
20
    UUID publicationUuid;
21 20
    UUID typifiedNameUuid;
22 21

  
23 22
    /**
......
25 24
     *            must be present
26 25
     * @param baseEntityRef
27 26
     *
28
     * @param publicationUuid
29
     *            Can <code>null</code> if the <code>workingsetId</code> is given.
30 27
     * @param typifiedNameUuid
31 28
     *            Can <code>null</code> if the <code>workingsetId</code> is given
32 29
     */
33
    protected TypeDesignationWorkingsetEditorIdSet(UUID registrationUuid, TypedEntityReference<IdentifiableEntity<?>> baseEntityRef,
34
            UUID publicationUuid, UUID typifiedNameUuid) {
30
    protected TypeDesignationWorkingsetEditorIdSet(UUID registrationUuid, TypedEntityReference<IdentifiableEntity<?>> baseEntityRef, UUID typifiedNameUuid) {
35 31
        this.registrationUuid = registrationUuid;
36 32
        this.baseEntityRef = baseEntityRef;
37
        this.publicationUuid = publicationUuid;
38 33
        this.typifiedNameUuid = typifiedNameUuid;
39 34
        if(baseEntityRef == null && typifiedNameUuid == null){
40 35
            throw new NullPointerException("When workingsetId is null the typifiedNameId must be non null.");
......
42 37
    }
43 38

  
44 39
    public TypeDesignationWorkingsetEditorIdSet(UUID registrationUuid, TypedEntityReference<IdentifiableEntity<?>> baseEntityRef) {
45
        this(registrationUuid, baseEntityRef, null, null);
40
        this(registrationUuid, baseEntityRef, null);
46 41
    }
47 42

  
48
    public TypeDesignationWorkingsetEditorIdSet(UUID registrationUuid, UUID publicationUuid, UUID typifiedNameUuid) {
49
        this(registrationUuid, null, publicationUuid, typifiedNameUuid);
43
    public TypeDesignationWorkingsetEditorIdSet(UUID registrationUuid, UUID typifiedNameUuid) {
44
        this(registrationUuid, null, typifiedNameUuid);
50 45
    }
51 46
}
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
586 586
        if(event.getWorkingSetType() == TypeDesignationWorkingSetType.SPECIMEN_TYPE_DESIGNATION_WORKINGSET){
587 587
            SpecimenTypeDesignationWorkingsetPopupEditor popup = openPopupEditor(SpecimenTypeDesignationWorkingsetPopupEditor.class, event);
588 588
            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
589
            TypeDesignationWorkingsetEditorIdSet identifierSet;
590 589
            UUID typifiedNameUuid;
591 590

  
592 591
            RegistrationDTO registrationDTO = workingset.getRegistrationDTO(event.getRegistrationUuid()).get();
......
599 598
                typifiedNameUuid = registrationDTO.getNameRef().getUuid();
600 599
            }
601 600

  
602
            identifierSet = new TypeDesignationWorkingsetEditorIdSet(
601
            popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
602
            popup.withDeleteButton(false);
603
            popup.loadInEditor(new TypeDesignationWorkingsetEditorIdSet(
603 604
                    event.getRegistrationUuid(),
604
                    null,
605 605
                    typifiedNameUuid
606
                    )
606 607
                    );
607
            popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
608
            popup.withDeleteButton(false);
609
            popup.loadInEditor(identifierSet);
610 608
            if(event.hasSource()){
611 609
                // propagate readonly state from source component to popup
612 610
                popup.setReadOnly(event.getSource().isReadOnly());

Also available in: Unified diff