@Override
 public void notify(QCEvent event) {
   LOG.debug(
       "QC info[Notify] - Operation successfull," + " notification triggered with event {}",
       event.toString());
   internalNotification.select(new ServiceQualifier(ServiceType.QCPOSTPROCESSING)).fire(event);
 }
 @Override
 public QCEvent segment(
     Collection<String> toMove,
     Collection<String> toClone,
     IDWithIssuer pid,
     String targetStudyUID,
     Attributes targetStudyAttributes,
     Attributes targetSeriesAttributes,
     Code qcRejectionCode)
     throws QCOperationNotPermittedException {
   QCOperationContext qcContext =
       structuralChangeService.segment(
           STRUCTURAL_CHANGE.QC,
           toMove,
           toClone,
           pid,
           targetStudyUID,
           targetStudyAttributes,
           targetSeriesAttributes,
           qcRejectionCode);
   QCEvent qcEvent = QCContextImpl.toQCEvent(qcContext);
   internalNotification
       .select(new ServiceQualifier(ServiceType.QCDURINGTRANSACTION))
       .fire(qcEvent);
   return qcEvent;
 }
  public void fireEvents() {
    Document d = new Document("Test");
    docEvent.fire(d); // general fire of a Document related event

    // send a created event
    docEvent.select(new AnnotationLiteral<Created>() {}).fire(d);

    d.update();
    // send an updated event
    docEvent.select(new AnnotationLiteral<Updated>() {}).fire(d);

    // send an updated and approved event
    docEvent
        .select(new AnnotationLiteral<Updated>() {}, new AnnotationLiteral<Approved>() {})
        .fire(d);
  }
 @Override
 public QCEvent restore(String[] sopInstanceUIDs) throws QCOperationNotPermittedException {
   QCOperationContext qcContext =
       structuralChangeService.restore(ServiceType.QCDURINGTRANSACTION, sopInstanceUIDs);
   QCEvent qcEvent = QCContextImpl.toQCEvent(qcContext);
   internalNotification
       .select(new ServiceQualifier(ServiceType.QCDURINGTRANSACTION))
       .fire(qcEvent);
   return qcEvent;
 }
 @Override
 public QCEvent replaced(Map<String, String> oldToNewIUIDs, Code qcRejectionCode)
     throws QCOperationNotPermittedException {
   QCOperationContext qcContext =
       structuralChangeService.replaced(STRUCTURAL_CHANGE.QC, oldToNewIUIDs, qcRejectionCode);
   QCEvent qcEvent = QCContextImpl.toQCEvent(qcContext);
   internalNotification
       .select(new ServiceQualifier(ServiceType.QCDURINGTRANSACTION))
       .fire(qcEvent);
   return qcEvent;
 }
 @Override
 public QCEvent deletePatient(IDWithIssuer pid, Code qcRejectionCode)
     throws QCOperationNotPermittedException {
   QCOperationContext qcContext =
       structuralChangeService.deletePatient(STRUCTURAL_CHANGE.QC, pid, qcRejectionCode);
   QCEvent qcEvent = QCContextImpl.toQCEvent(qcContext);
   internalNotification
       .select(new ServiceQualifier(ServiceType.QCDURINGTRANSACTION))
       .fire(qcEvent);
   return qcEvent;
 }
 @Override
 public QCEvent updateDicomObject(
     ArchiveDeviceExtension arcDevExt, QCUpdateScope scope, Attributes attributes)
     throws QCOperationNotPermittedException, EntityNotFoundException {
   QCOperationContext qcContext =
       structuralChangeService.updateDicomObject(
           STRUCTURAL_CHANGE.QC, arcDevExt, scope, attributes);
   QCEvent qcEvent = QCContextImpl.toQCEvent(qcContext);
   internalNotification
       .select(new ServiceQualifier(ServiceType.QCDURINGTRANSACTION))
       .fire(qcEvent);
   return qcEvent;
 }
 @Override
 public QCEvent mergeStudies(
     String[] sourceStudyUids,
     String targetStudyUID,
     Attributes targetStudyattributes,
     Attributes targetSeriesattributes,
     Code qcRejectionCode)
     throws QCOperationNotPermittedException {
   QCOperationContext qcContext =
       structuralChangeService.mergeStudies(
           STRUCTURAL_CHANGE.QC,
           sourceStudyUids,
           targetStudyUID,
           targetStudyattributes,
           targetSeriesattributes,
           qcRejectionCode);
   QCEvent qcEvent = QCContextImpl.toQCEvent(qcContext);
   internalNotification
       .select(new ServiceQualifier(ServiceType.QCDURINGTRANSACTION))
       .fire(qcEvent);
   return qcEvent;
 }
예제 #9
0
파일: Bar.java 프로젝트: hasys/core
 public void fireWithUpdatedQualifierViaSelect() {
   event.select(new AnnotationLiteral<Updated>() {}).fire("");
 }
 @Override
 protected void fireEvent(Giraffe payload, Annotation... qualifiers) {
   event.select(qualifiers).fire(payload);
 }