Project

General

Profile

« Previous | Next » 

Revision c8dd76ae

Added by Andreas Kohlbecker over 5 years ago

removing commented code

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
722 722
                if(rootContext.getParentView().equals(getView())){
723 723
                    Registration blockingRegistration = getRepo().getRegistrationService().createRegistrationForName(event.getEntityUuid());
724 724
                    TypedEntityReference<Registration> regReference = (TypedEntityReference<Registration>)rootContext.getParentEntity();
725
//                    Registration registration = getRepo().getRegistrationService().load(regReference.getUuid(), REGISTRATION_INIT_STRATEGY);
726
//                    if(registration == null){
727 725
                    Registration registration = null;
728
                        for(int i = context.size()-1; i>0; i--){
729
                            if(NameTypeDesignationEditorView.class.isAssignableFrom(context.elementAt(i).getParentView().getClass())){
730
                                UUID registrationUUID = nameTypeDesignationPopupEditorRegistrationUUIDMap.get(context.elementAt(i).getParentView());
731
                                RegistrationDTO registrationDTO = workingset.getRegistrationDTO(registrationUUID).get();
732
                                registration = registrationDTO.registration();
733
                            }
726
                    for(int i = context.size()-1; i>0; i--){
727
                        if(NameTypeDesignationEditorView.class.isAssignableFrom(context.elementAt(i).getParentView().getClass())){
728
                            UUID registrationUUID = nameTypeDesignationPopupEditorRegistrationUUIDMap.get(context.elementAt(i).getParentView());
729
                            RegistrationDTO registrationDTO = workingset.getRegistrationDTO(registrationUUID).get();
730
                            registration = registrationDTO.registration();
734 731
                        }
735
                        if(registration == null){
736
                            throw new NullPointerException("Registration not found for the NameTypeDesignation");
737
                        }
738
//                    }
732
                    }
733
                    if(registration == null){
734
                        throw new NullPointerException("Registration not found for the NameTypeDesignation");
735
                    }
739 736
                    registration.getBlockedBy().add(blockingRegistration);
740 737
                    getRepo().getRegistrationService().saveOrUpdate(registration);
741 738
                    logger.debug("Blocking registration created");

Also available in: Unified diff