/** * Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientEmptyObjectsRemover() { super("empty-objects-remover", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientDeathdateUpdater() { super("patient-deathdate-updater", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientOntologyVersionRecorder() { super("ontology-version-recorder", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public NonStandardFeatureCategoryUpdater() { super("phenotype-category-updater", new PatientChangingEvent()); }
/** * Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientEmptyObjectsRemover() { super("empty-objects-remover", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientDeathdateUpdater() { super("patient-deathdate-updater", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public MeasurementAgeUpdater() { super("measurement-age-updater", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public RightsUpdateEventListener() { super("phenotips-patient-rights-updater", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientExtendedPhenotypeUpdater() { super("patient-extended-phenotype-updater", new PatientChangingEvent()); }
/** * Default constructor, sets up the listener name and the list of events to subscribe to. */ public EmptyGenotypeObjectsRemover() { super("empty-genotype-objects-remover", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientVocabularyVersionRecorder() { super("vocabulary-version-recorder", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public NonStandardFeatureCategoryUpdater() { super("phenotype-category-updater", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public MeasurementAgeUpdater() { super("measurement-age-updater", new PatientChangingEvent()); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public PatientExtendedPhenotypeUpdater() { super("patient-extended-phenotype-updater", new PatientChangingEvent()); }
/** * Default constructor, sets up the listener name and the list of events to subscribe to. */ public EmptyGenotypeObjectsRemover() { super("empty-genotype-objects-remover", new PatientChangingEvent()); refs.put(GENE_KEY, GENE_CLASS_REFERENCE); refs.put(VARIANT_KEY, VARIANT_CLASS_REFERENCE); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public DeprecatedPhenotypeUpdaterEventListener() { super("deprecated-phenotype-updater", new PatientChangingEvent()); this.fieldsToFix = new HashSet<>(); this.fieldsToFix.add("phenotype"); this.fieldsToFix.add("extended_phenotype"); this.fieldsToFix.add("negative_phenotype"); this.fieldsToFix.add("extended_negative_phenotype"); this.fieldsToFix.add("prenatal_phenotype"); this.fieldsToFix.add("extended_prenatal_phenotype"); this.fieldsToFix.add("negative_prenatal_phenotype"); this.fieldsToFix.add("extended_negative_prenatal_phenotype"); }
/** Default constructor, sets up the listener name and the list of events to subscribe to. */ public DeprecatedPhenotypeUpdaterEventListener() { super("deprecated-phenotype-updater", new PatientChangingEvent()); this.fieldsToFix = new HashSet<>(); this.fieldsToFix.add("phenotype"); this.fieldsToFix.add("extended_phenotype"); this.fieldsToFix.add("negative_phenotype"); this.fieldsToFix.add("extended_negative_phenotype"); this.fieldsToFix.add("prenatal_phenotype"); this.fieldsToFix.add("extended_prenatal_phenotype"); this.fieldsToFix.add("negative_prenatal_phenotype"); this.fieldsToFix.add("extended_negative_prenatal_phenotype"); }
@Override public void onEvent(Event event, Object source, Object data) { XWikiDocument doc = (XWikiDocument) source; BaseObject patientRecordObj = doc.getXObject(Patient.CLASS_REFERENCE); if (patientRecordObj == null || "PatientTemplate".equals(doc.getDocumentReference().getName())) { return; } Patient patient = this.repo.load(doc); User user = this.userManager.getCurrentUser(); CancelableEvent patientEvent = new PatientChangingEvent(patient, user); this.observationManager.notify(patientEvent, doc); if (patientEvent.isCanceled()) { // FIXME DocumentUpdatingEvent is not cancelable yet! // ((CancelableEvent) event).cancel(); } } }
@Override public void onEvent(Event event, Object source, Object data) { XWikiDocument doc = (XWikiDocument) source; BaseObject patientRecordObj = doc.getXObject(Patient.CLASS_REFERENCE); if (patientRecordObj == null || "PatientTemplate".equals(doc.getDocumentReference().getName())) { return; } Patient patient = this.repo.load(doc); User user = this.userManager.getCurrentUser(); CancelableEvent patientEvent = new PatientChangingEvent(patient, user); this.observationManager.notify(patientEvent, doc); if (patientEvent.isCanceled()) { // FIXME DocumentUpdatingEvent is not cancelable yet! // ((CancelableEvent) event).cancel(); } } }
@Override public void onEvent(Event event, Object source, Object data) { XWikiDocument doc = (XWikiDocument) source; BaseObject patientRecordObj = doc.getXObject(Patient.CLASS_REFERENCE); if (patientRecordObj == null || "PatientTemplate".equals(doc.getDocumentReference().getName())) { return; } Patient patient = this.repo.load(doc); User user = this.userManager.getCurrentUser(); CancelableEvent patientEvent = new PatientCreatingEvent(patient, user); this.observationManager.notify(patientEvent, doc); if (patientEvent.isCanceled()) { // FIXME DocumentCancelingEvent is not cancelable yet! // ((CancelableEvent) event).cancel(); // return; } patientEvent = new PatientChangingEvent(patient, user); this.observationManager.notify(patientEvent, doc); if (patientEvent.isCanceled()) { // FIXME DocumentCancelingEvent is not cancelable yet! // ((CancelableEvent) event).cancel(); } } }