public CurationInProgressStatus() { setStatusType( CvPublicationStatusType.CURATION_IN_PROGRESS ); }
/** * The curator decides the publication can now be checked. Needs to know the outcome of the sanity check * in order to do the transition to the right status. * * @param publication the publication * @param message mechanism of creation of the publication */ @LifecycleTransition(fromStatus = CvPublicationStatusType.CURATION_IN_PROGRESS, toStatus = CvPublicationStatusType.READY_FOR_CHECKING) public void readyForChecking(Publication publication, String message, boolean successfulSanityCheck) { // TODO instead of a boolean, it could be a SanityCheckReport kind of object if (successfulSanityCheck) { // TODO assign a reviewer changeStatus(publication, CvPublicationStatusType.READY_FOR_CHECKING, CvLifecycleEventType.READY_FOR_CHECKING, message); if (publication.getCurrentReviewer() == null) { correctionAssigner.assignReviewer(publication); } // notify listeners for ( LifecycleEventListener listener : getListeners() ) { listener.fireReadyForChecking( publication ); } } else { addLifecycleEvent(publication, CvLifecycleEventType.SANITY_CHECK_FAILED, message); // TODO the message should be the ID of the sanity check } } }
/** * The curator decides the publication can now be checked. Needs to know the outcome of the sanity check * in order to do the transition to the right status. * * @param publication the publication * @param message mechanism of creation of the publication */ @LifecycleTransition(fromStatus = CvPublicationStatusType.CURATION_IN_PROGRESS, toStatus = CvPublicationStatusType.READY_FOR_CHECKING) public void readyForChecking(Publication publication, String message, boolean successfulSanityCheck) { // TODO instead of a boolean, it could be a SanityCheckReport kind of object if (successfulSanityCheck) { // TODO assign a reviewer changeStatus(publication, CvPublicationStatusType.READY_FOR_CHECKING, CvLifecycleEventType.READY_FOR_CHECKING, message); if (publication.getCurrentReviewer() == null) { correctionAssigner.assignReviewer(publication); } // notify listeners for ( LifecycleEventListener listener : getListeners() ) { listener.fireReadyForChecking( publication ); } } else { addLifecycleEvent(publication, CvLifecycleEventType.SANITY_CHECK_FAILED, message); // TODO the message should be the ID of the sanity check } } }
public CurationInProgressStatus() { setStatusType( CvPublicationStatusType.CURATION_IN_PROGRESS ); }