@Test public void testEmptyInitialization() throws Exception { this.setUpInitialization(new LinkedList<BaseObject>()); Assert.assertTrue(this.mocker.getComponentUnderTest().getSystemConsents().isEmpty()); }
@Override public Set<Consent> getSystemConsents() { try { DocumentReference configDocRef = this.referenceResolver.resolve(this.configurationPageReference); XWikiDocument configDoc = (XWikiDocument) this.bridge.getDocument(configDocRef); if (this.lastSystemConsentLoadTime == null || configDoc.getDate().after(this.lastSystemConsentLoadTime)) { updateSystemConsentCache(configDoc); } } catch (Exception ex) { this.logger.error("Could not load preferences document: {}", ex.getMessage()); } return this.cachedSystemConsents; }
PhenoTipsPatientConsentManager implements ConsentManager, Initializable { @Override public Set<Consent> getSystemConsents() { try { DocumentReference configDocRef = this.referenceResolver.resolve(this.configurationPageReference); XWikiDocument configDoc = (XWikiDocument) this.bridge.getDocument(configDocRef); if (this.lastSystemConsentLoadTime == null || configDoc.getDate().after(this.lastSystemConsentLoadTime)) { updateSystemConsentCache(configDoc); } } catch (Exception ex) { this.logger.error("Could not load preferences document: {}", ex.getMessage()); } return this.cachedSystemConsents; } }
PhenoTipsPatientConsentManager implements ConsentManager, Initializable { @Override public Set<Consent> getSystemConsents() { try { DocumentReference configDocRef = this.referenceResolver.resolve(this.configurationPageReference); XWikiDocument configDoc = (XWikiDocument) this.bridge.getDocument(configDocRef); if (this.lastSystemConsentLoadTime == null || configDoc.getDate().after(this.lastSystemConsentLoadTime)) { updateSystemConsentCache(configDoc); } } catch (Exception ex) { this.logger.error("Could not load preferences document: {}", ex.getMessage()); } return this.cachedSystemConsents; }  }
PhenoTipsPatientConsentManager implements ConsentManager, Initializable { @Override public Set<Consent> getSystemConsents() { try { DocumentReference configDocRef = this.referenceResolver.resolve(this.configurationPageReference); XWikiDocument configDoc = (XWikiDocument) this.bridge.getDocument(configDocRef); if (this.lastSystemConsentLoadTime == null || configDoc.getDate().after(this.lastSystemConsentLoadTime)) { updateSystemConsentCache(configDoc); } } catch (Exception ex) { this.logger.error("Could not load preferences document: {}", ex.getMessage()); } return this.cachedSystemConsents; }  @Override void initialize(); @Override Set<Consent> getSystemConsents(); @Override boolean isValidConsentId(String consentId); @Override Set<Consent> getMissingConsentsForPatient(String patientId); @Override Set<Consent> getMissingConsentsForPatient(Patient patient); @Override Set<Consent> getAllConsentsForPatient(String patientId); @Override Set<Consent> getAllConsentsForPatient(Patient patient); @Override boolean setPatientConsents(Patient patient, Iterable<String> consents); @Override boolean hasConsent(String patientId, String consentId); @Override boolean hasConsent(Patient patient, String consentId); @Override boolean grantConsent(Patient patient, String consentId); @Override boolean revokeConsent(Patient patient, String consentId); @Override JSONArray toJSON(Collection<Consent> consents); @Override Set<Consent> fromJSON(JSONArray consentsJSON); }
PhenoTipsPatientConsentManager implements ConsentManager, Initializable { @Override public Set<Consent> getSystemConsents() { try { DocumentReference configDocRef = this.referenceResolver.resolve(this.configurationPageReference); XWikiDocument configDoc = (XWikiDocument) this.bridge.getDocument(configDocRef); if (this.lastSystemConsentLoadTime == null || configDoc.getDate().after(this.lastSystemConsentLoadTime)) { updateSystemConsentCache(configDoc); } } catch (Exception ex) { this.logger.error("Could not load preferences document: {}", ex.getMessage()); } return this.cachedSystemConsents; }  @Override void initialize(); @Override Set<Consent> getSystemConsents(); @Override boolean isValidConsentId(String consentId); @Override Set<Consent> getMissingConsentsForPatient(String patientId); @Override Set<Consent> getMissingConsentsForPatient(Patient patient); @Override Set<Consent> getAllConsentsForPatient(String patientId); @Override Set<Consent> getAllConsentsForPatient(Patient patient); @Override boolean setPatientConsents(Patient patient, Iterable<String> consents); @Override boolean hasConsent(String patientId, String consentId); @Override boolean hasConsent(Patient patient, String consentId); @Override boolean grantConsent(Patient patient, String consentId); @Override boolean revokeConsent(Patient patient, String consentId); @Override JSONArray toJSON(Collection<Consent> consents); @Override Set<Consent> fromJSON(JSONArray consentsJSON);  }