@Test(expected = WebApplicationException.class) public void updatePatientNoAccessReturnsForbiddenCode() throws ComponentLookupException { when(this.access.hasAccess(this.currentUser, Right.EDIT, this.patientReference)).thenReturn(false); Response response = this.component.updatePatient("json", EID, UPDATE); verify(this.logger).debug("Edit access denied to user [{}] on patient record [{}]", null, this.patient.getId()); assertEquals(Response.Status.FORBIDDEN.getStatusCode(), response.getStatus()); }
@Override public Response updatePatient(final String json, final String eid, final String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, eid, policyType); }
DefaultPatientByExternalIdResourceImpl extends XWikiResource implements PatientByExternalIdResource { @Override public Response updatePatient(final String json, final String eid, final String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, eid, policyType); } }
DefaultPatientByExternalIdResourceImpl extends XWikiResource implements PatientByExternalIdResource { @Override public Response updatePatient(final String json, final String eid, final String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, eid, policyType); }  }
DefaultPatientByExternalIdResourceImpl extends XWikiResource implements PatientByExternalIdResource { @Override public Response updatePatient(final String json, final String eid, final String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, eid, policyType); }  @Override Response getPatient(String eid); @Override Response updatePatient(final String json, final String eid, final String policy); @Override Response patchPatient(final String json, final String eid); @Override Response deletePatient(String eid); }
DefaultPatientByExternalIdResourceImpl extends XWikiResource implements PatientByExternalIdResource { @Override public Response updatePatient(final String json, final String eid, final String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, eid, policyType); }  @Override Response getPatient(String eid); @Override Response updatePatient(final String json, final String eid, final String policy); @Override Response patchPatient(final String json, final String eid); @Override Response deletePatient(String eid);  }