Revision 9361ce64
Added by Andreas Kohlbecker almost 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java | ||
---|---|---|
18 | 18 |
import java.util.Stack; |
19 | 19 |
import java.util.UUID; |
20 | 20 |
|
21 |
import org.apache.log4j.Logger; |
|
21 | 22 |
import org.hibernate.Session; |
22 | 23 |
import org.hibernate.Transaction; |
23 | 24 |
import org.springframework.beans.factory.annotation.Autowired; |
... | ... | |
105 | 106 |
@ViewScope |
106 | 107 |
public class RegistrationWorkingsetPresenter extends AbstractPresenter<RegistrationWorkingsetView> { |
107 | 108 |
|
108 |
/** |
|
109 |
* |
|
110 |
*/ |
|
109 |
private static final Logger logger = Logger.getLogger(RegistrationWorkingsetPresenter.class); |
|
110 |
|
|
111 | 111 |
private static final List<String> REGISTRATION_INIT_STRATEGY = Arrays.asList( |
112 | 112 |
"$", |
113 | 113 |
"blockedBy", |
... | ... | |
341 | 341 |
|
342 | 342 |
private void saveRegistrationStatusChange(UUID uuid, Object value) { |
343 | 343 |
Registration reg = getRepo().getRegistrationService().load(uuid); |
344 |
if(value != null && value instanceof RegistrationStatus && !Objects.equals(value, reg.getStatus())){ |
|
345 |
reg.setStatus((RegistrationStatus)value); |
|
346 |
getRegistrationStore().saveBean(reg, (AbstractView)getView()); |
|
347 |
refreshView(true); |
|
344 |
if(value != null && value instanceof RegistrationStatus){ |
|
345 |
if(!Objects.equals(value, reg.getStatus())){ |
|
346 |
reg.setStatus((RegistrationStatus)value); |
|
347 |
getRegistrationStore().saveBean(reg, (AbstractView)getView()); |
|
348 |
refreshView(true); |
|
349 |
} |
|
348 | 350 |
} else { |
349 |
// only log an error here!
|
|
351 |
// only log here as error
|
|
350 | 352 |
logger.error("Ivalid attempt to set RegistrationStatus to " + Objects.toString(value.toString(), "NULL")); |
351 | 353 |
} |
352 | 354 |
} |
Also available in: Unified diff
fix #7524 replacing uninomial field on rank change