test_class.declarator: instance  = null
test_class.modifier: private
test_class.original_string: private MyDMZSyncServiceImpl instance  = null;
test_class.type: MyDMZSyncServiceImpl
test_class.var_name: instance
test_class.declarator: currentSP  = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient currentSP  = null;
test_class.type: StandardizedPatient
test_class.var_name: currentSP
test_class.declarator: dataFromDMZ  = null
test_class.modifier: private
test_class.original_string: private String dataFromDMZ  = null;
test_class.type: String
test_class.var_name: dataFromDMZ
test_class.declarator: expectedURL = null
test_class.modifier: private
test_class.original_string: private String expectedURL = null;
test_class.type: String
test_class.var_name: expectedURL
test_class.declarator: locale = null
test_class.modifier: private
test_class.original_string: private String locale = null;
test_class.type: String
test_class.var_name: locale
test_class.declarator: testData = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient testData = null;
test_class.type: StandardizedPatient
test_class.var_name: testData
test_class.declarator: patient1 = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient patient1 = null;
test_class.type: StandardizedPatient
test_class.var_name: patient1
test_class.declarator: patient2 = null
test_class.modifier: private
test_class.original_string: private StandardizedPatient patient2 = null;
test_class.type: StandardizedPatient
test_class.var_name: patient2
test_class.declarator: returnData = null
test_class.modifier: private
test_class.original_string: private String returnData = null;
test_class.type: String
test_class.var_name: returnData
test_class.file: OsceManager/src/test/java/ch/unibas/medizin/osce/server/DMZSyncServiceImplTest.java
test_class.identifier: DMZSyncServiceImplTest
test_class.superclass: extends AbstractJUnit4SpringContextTests
test_case.body: @Test
      public void testSyncErroneousTrainingJsonName(){
      
  			   
  		//Test sync error json data which name is the trainings became a training 
  	    patient1 = new StandardizedPatient();
  		patient1.setPreName("perName1");
  		patient1.setName("name1");
  		patient1.persist();
  		patient1.merge();
  		patient2 = new StandardizedPatient();
  		patient2.setPreName("perName2");
  		patient2.setName("name2");
  		patient2.persist();
  		patient2.merge();
  		
  		PatientInSemester pSemester = PatientInSemester.findPatientInSemesterByStandardizedPatient(patient1);
  		assertEquals(null,pSemester);
  		
  		returnData = "{\"message\" : [{\"key\":\"osce for date 2012-6-18 12:00 already in DMZ doing nothing\"},{\"key\":\"osce for date 12-6-20 12:00 already in DMZ doing nothing\"},{\"key\":\"osce for date 12-6-20 12:00 already in DMZ doing nothing\"},{\"key\":\"warning patient Daniel Kohler was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Marianne Lamarie was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Ferdinand Preussler was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Karl Meyer was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Bettina Buser was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Carla Joanna Velazquez was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Max Peter was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Ruth Musyl was not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Ljiljana Ivanovicwas not found in the DMZ. Please manually push\"},{\"key\":\"warning patient Delphine Landwerlin was not found in the DMZ. Please manually push\"}],\"osceDay\" :[{\"osceDate\":\"2012-06-10T00:00:00Z\"},{\"osceDate\":\"2012-06-20T00:00:00Z\"},{\"osceDate\":\"2012-06-18T00:00:00Z\"},{\"osceDate\":\"2012-06-21T00:00:00Z\"}],\"training\" : [{\"name\":\"training1\",\"trainingDate\":\"2012-16-\",\"timeStart\":\"2012-07-17T11:00:02Z\",\"timeEnd\":\"2012-07-17T17:15:55Z\"},{\"name\":\"training2\",\"trainingDate\":\"2012-07-25T00:00:00Z\",\"timeStart\":\"2012-07-25T08:30:00Z\",\"timeEnd\":\"2012-07-25T15:30:00Z\"},{\"name\":\"training1\",\"trainingDate\":\"2012-07-17T00:00:00Z\",\"timeStart\":\"2012-07-17T07:00:02Z\",\"timeEnd\":\"2012-07-17T14:15:55Z\"},{\"name\":\"training1\",\"trainingDate\":\"2012-07-17T00:00:00Z\",\"timeStart\":\"2012-07-17T10:00:02Z\",\"timeEnd\":\"2012-07-17T14:15:55Z\"},{\"name\":\"tttttt\",\"trainingDate\":\"2012-07-17T00:00:00Z\",\"timeStart\":\"2012-07-17T09:00:02Z\",\"timeEnd\":\"2012-07-17T19:00:00Z\"}],\"patientInSemester\" : [{\"standarizedPatientId\":"+patient2.getId()+",\"acceptedTrainings\":[{\"name\":\"training2\",\"trainingDate\":\"2012-07-25T00:00:00Z\",\"timeStart\":\"2012-07-25T08:30:00Z\",\"timeEnd\":\"2012-07-25T15:30:00Z\"}],\"acceptedOsce\":[{\"osceDate\":\"2012-06-21T00:00:00Z\"}],\"accepted\":false},{\"standarizedPatientId\":"+patient1.getId()+",\"acceptedTrainings\":[{\"name\":\"training1\",\"trainingDate\":\"2012-07-17T00:00:00Z\",\"timeStart\":\"2012-07-17T07:00:02Z\",\"timeEnd\":\"2012-07-17T14:15:55Z\"},{\"name\":\"training2\",\"trainingDate\":\"2012-07-25T00:00:00Z\",\"timeStart\":\"2012-07-25T08:30:00Z\",\"timeEnd\":\"2012-25-07\"},{\"name\":\"training1\",\"trainingDate\":\"2012-07-17T00:00:00Z\",\"timeStart\":\"2012-07-17T11:00:02Z\",\"timeEnd\":\"2012-07-17T17:15:55Z\"}],\"acceptedOsce\":[{\"osceDate\":\"2012-06-10T00:00:00Z\"},{\"osceDate\":\"2012-06-20T00:00:00Z\"}],\"accepted\":true}]}";
  		
  		try {
  			locale = "en";
      
  			instance.sendSync(locale);
  			
  			Assert.fail("Expected Error never occured " );
  		} catch (Exception e) {
  			//e.printStackTrace();
  
  			
  		}
  		
  		List<Training> trainings = Training.findAllTrainings();
  		assertEquals(0,trainings.size());
  		
  		
  		List<OsceDay> osceDays = OsceDay.findAllOsceDays();
  		assertEquals(4,osceDays.size());		
  		
      }
test_case.class_method_signature: DMZSyncServiceImplTest.testSyncErroneousTrainingJsonName()
test_case.full_signature: @Test public void testSyncErroneousTrainingJsonName()
test_case.identifier: testSyncErroneousTrainingJsonName
test_case.invocations: setPreName setName persist merge setPreName setName persist merge findPatientInSemesterByStandardizedPatient assertEquals getId getId sendSync fail findAllTrainings assertEquals size findAllOsceDays assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSyncErroneousTrainingJsonName()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: Log = Logger.getLogger(DMZSyncServiceImpl.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger Log = Logger.getLogger(DMZSyncServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: Log
focal_class.declarator: dmzSyncExceptionType = ""
focal_class.modifier: private static
focal_class.original_string: private static String dmzSyncExceptionType = "";
focal_class.type: String
focal_class.var_name: dmzSyncExceptionType
focal_class.declarator: errorMsg = ""
focal_class.modifier: private static
focal_class.original_string: private static String errorMsg = "";
focal_class.type: String
focal_class.var_name: errorMsg
focal_class.file: OsceManager/src/main/java/ch/unibas/medizin/osce/server/DMZSyncServiceImpl.java
focal_class.identifier: DMZSyncServiceImpl
focal_class.interfaces: implements
  		DMZSyncService
focal_class.class_method_signature: DMZSyncServiceImpl.pushToDMZ(Long standardizedPatientId,String locale)
focal_class.full_signature: @Override public List<String> pushToDMZ(Long standardizedPatientId,String locale)
focal_class.identifier: pushToDMZ
focal_class.modifiers: @Override public
focal_class.parameters: (Long standardizedPatientId,String locale)
focal_class.return: List<String>
focal_class.signature: List<String> pushToDMZ(Long standardizedPatientId,String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.processSendJson(String json,String locale)
focal_class.full_signature: private String processSendJson(String json,String locale)
focal_class.identifier: processSendJson
focal_class.modifiers: private
focal_class.parameters: (String json,String locale)
focal_class.return: String
focal_class.signature: String processSendJson(String json,String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getSendReturnErrorMessage(String json)
focal_class.full_signature: protected List<String> getSendReturnErrorMessage(String json)
focal_class.identifier: getSendReturnErrorMessage
focal_class.modifiers: protected
focal_class.parameters: (String json)
focal_class.return: List<String>
focal_class.signature: List<String> getSendReturnErrorMessage(String json)
focal_class.class_method_signature: DMZSyncServiceImpl.pullFromDMZ(Long standardizedPatientId)
focal_class.full_signature: @Override public void pullFromDMZ(Long standardizedPatientId)
focal_class.identifier: pullFromDMZ
focal_class.modifiers: @Override public
focal_class.parameters: (Long standardizedPatientId)
focal_class.return: void
focal_class.signature: void pullFromDMZ(Long standardizedPatientId)
focal_class.class_method_signature: DMZSyncServiceImpl.sendSync(String locale)
focal_class.full_signature: @Override public String sendSync(String locale)
focal_class.identifier: sendSync
focal_class.modifiers: @Override public
focal_class.parameters: (String locale)
focal_class.return: String
focal_class.signature: String sendSync(String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getSync(String locale)
focal_class.full_signature: @Override public void getSync(String locale)
focal_class.identifier: getSync
focal_class.modifiers: @Override public
focal_class.parameters: (String locale)
focal_class.return: void
focal_class.signature: void getSync(String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getReturnMessage(JSONObject myjson)
focal_class.full_signature: private String getReturnMessage(JSONObject myjson)
focal_class.identifier: getReturnMessage
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: String
focal_class.signature: String getReturnMessage(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.syncOsceDayAndTraining(JSONObject myjson)
focal_class.full_signature: private void syncOsceDayAndTraining(JSONObject myjson)
focal_class.identifier: syncOsceDayAndTraining
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: void
focal_class.signature: void syncOsceDayAndTraining(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.syncOsceDay(JSONObject myjson)
focal_class.full_signature: private void syncOsceDay(JSONObject myjson)
focal_class.identifier: syncOsceDay
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: void
focal_class.signature: void syncOsceDay(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.syncPatientInSemester(JSONObject myjson)
focal_class.full_signature: private void syncPatientInSemester(JSONObject myjson)
focal_class.identifier: syncPatientInSemester
focal_class.modifiers: private
focal_class.parameters: (JSONObject myjson)
focal_class.return: void
focal_class.signature: void syncPatientInSemester(JSONObject myjson)
focal_class.class_method_signature: DMZSyncServiceImpl.setOsceDays(JSONObject jsonObject,PatientInSemester semester)
focal_class.full_signature: private void setOsceDays(JSONObject jsonObject,PatientInSemester semester)
focal_class.identifier: setOsceDays
focal_class.modifiers: private
focal_class.parameters: (JSONObject jsonObject,PatientInSemester semester)
focal_class.return: void
focal_class.signature: void setOsceDays(JSONObject jsonObject,PatientInSemester semester)
focal_class.class_method_signature: DMZSyncServiceImpl.getSyncJsonData(String locale)
focal_class.full_signature: protected String getSyncJsonData(String locale)
focal_class.identifier: getSyncJsonData
focal_class.modifiers: protected
focal_class.parameters: (String locale)
focal_class.return: String
focal_class.signature: String getSyncJsonData(String locale)
focal_class.class_method_signature: DMZSyncServiceImpl.getOsceDayJsonStr(OsceDay osceDay)
focal_class.full_signature: private String getOsceDayJsonStr(OsceDay osceDay)
focal_class.identifier: getOsceDayJsonStr
focal_class.modifiers: private
focal_class.parameters: (OsceDay osceDay)
focal_class.return: String
focal_class.signature: String getOsceDayJsonStr(OsceDay osceDay)
focal_class.class_method_signature: DMZSyncServiceImpl.getSemesterJsonStr(Semester semester)
focal_class.full_signature: private String getSemesterJsonStr(Semester semester)
focal_class.identifier: getSemesterJsonStr
focal_class.modifiers: private
focal_class.parameters: (Semester semester)
focal_class.return: String
focal_class.signature: String getSemesterJsonStr(Semester semester)
focal_class.class_method_signature: DMZSyncServiceImpl.getPatientInSemester(PatientInSemester pis)
focal_class.full_signature: private String getPatientInSemester(PatientInSemester pis)
focal_class.identifier: getPatientInSemester
focal_class.modifiers: private
focal_class.parameters: (PatientInSemester pis)
focal_class.return: String
focal_class.signature: String getPatientInSemester(PatientInSemester pis)
focal_class.class_method_signature: DMZSyncServiceImpl.getOscesJsonStr(Osce osce)
focal_class.full_signature: private String getOscesJsonStr(Osce osce)
focal_class.identifier: getOscesJsonStr
focal_class.modifiers: private
focal_class.parameters: (Osce osce)
focal_class.return: String
focal_class.signature: String getOscesJsonStr(Osce osce)
focal_class.class_method_signature: DMZSyncServiceImpl.getStandardizedPatientJsonStr(PatientInSemester patient)
focal_class.full_signature: private String getStandardizedPatientJsonStr(PatientInSemester patient)
focal_class.identifier: getStandardizedPatientJsonStr
focal_class.modifiers: private
focal_class.parameters: (PatientInSemester patient)
focal_class.return: String
focal_class.signature: String getStandardizedPatientJsonStr(PatientInSemester patient)
focal_class.class_method_signature: DMZSyncServiceImpl.convertToString(Date date)
focal_class.full_signature: private String convertToString(Date date)
focal_class.identifier: convertToString
focal_class.modifiers: private
focal_class.parameters: (Date date)
focal_class.return: String
focal_class.signature: String convertToString(Date date)
focal_class.class_method_signature: DMZSyncServiceImpl.convertToDate(String dateStr)
focal_class.full_signature: private Date convertToDate(String dateStr)
focal_class.identifier: convertToDate
focal_class.modifiers: private
focal_class.parameters: (String dateStr)
focal_class.return: Date
focal_class.signature: Date convertToDate(String dateStr)
focal_class.class_method_signature: DMZSyncServiceImpl.setDMZSyncExceptionTypeAndErrorMsg(String type,String msg)
focal_class.full_signature: private void setDMZSyncExceptionTypeAndErrorMsg(String type,String msg)
focal_class.identifier: setDMZSyncExceptionTypeAndErrorMsg
focal_class.modifiers: private
focal_class.parameters: (String type,String msg)
focal_class.return: void
focal_class.signature: void setDMZSyncExceptionTypeAndErrorMsg(String type,String msg)
focal_class.class_method_signature: DMZSyncServiceImpl.updatePatient(StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.full_signature: private void updatePatient(StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.identifier: updatePatient
focal_class.modifiers: private
focal_class.parameters: (StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.return: void
focal_class.signature: void updatePatient(StandardizedPatient patient,StandardizedPatient newPatient)
focal_class.class_method_signature: DMZSyncServiceImpl.updateChecksValue(AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.full_signature: private void updateChecksValue(AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.identifier: updateChecksValue
focal_class.modifiers: private
focal_class.parameters: (AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.return: void
focal_class.signature: void updateChecksValue(AnamnesisChecksValue checksValue,AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.class_method_signature: DMZSyncServiceImpl.saveChecksValue(AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.full_signature: private void saveChecksValue(AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.identifier: saveChecksValue
focal_class.modifiers: private
focal_class.parameters: (AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.return: void
focal_class.signature: void saveChecksValue(AnamnesisChecksValue newChecksValue,AnamnesisForm anamnesisForm)
focal_class.class_method_signature: DMZSyncServiceImpl.preProcessData(String data)
focal_class.full_signature: public String preProcessData(String data)
focal_class.identifier: preProcessData
focal_class.modifiers: public
focal_class.parameters: (String data)
focal_class.return: String
focal_class.signature: String preProcessData(String data)
focal_class.class_method_signature: DMZSyncServiceImpl.findPatient(Long objectId)
focal_class.full_signature: protected StandardizedPatient findPatient(Long objectId)
focal_class.identifier: findPatient
focal_class.modifiers: protected
focal_class.parameters: (Long objectId)
focal_class.return: StandardizedPatient
focal_class.signature: StandardizedPatient findPatient(Long objectId)
focal_class.class_method_signature: DMZSyncServiceImpl.sendData(String json,String url)
focal_class.full_signature: protected String sendData(String json,String url)
focal_class.identifier: sendData
focal_class.modifiers: protected
focal_class.parameters: (String json,String url)
focal_class.return: String
focal_class.signature: String sendData(String json,String url)
focal_class.class_method_signature: DMZSyncServiceImpl.getDMZData(String url)
focal_class.full_signature: protected String getDMZData(String url)
focal_class.identifier: getDMZData
focal_class.modifiers: protected
focal_class.parameters: (String url)
focal_class.return: String
focal_class.signature: String getDMZData(String url)
focal_class.class_method_signature: DMZSyncServiceImpl.getHostAddress()
focal_class.full_signature: protected String getHostAddress()
focal_class.identifier: getHostAddress
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHostAddress()
focal_class.class_method_signature: DMZSyncServiceImpl.authenticate(HttpClient client, HttpMethodBase method)
focal_class.full_signature: private void authenticate(HttpClient client, HttpMethodBase method)
focal_class.identifier: authenticate
focal_class.modifiers: private
focal_class.parameters: (HttpClient client, HttpMethodBase method)
focal_class.return: void
focal_class.signature: void authenticate(HttpClient client, HttpMethodBase method)
focal_class.class_method_signature: DMZSyncServiceImpl.savePatient(StandardizedPatient patient)
focal_class.full_signature: protected void savePatient(StandardizedPatient patient)
focal_class.identifier: savePatient
focal_class.modifiers: protected
focal_class.parameters: (StandardizedPatient patient)
focal_class.return: void
focal_class.signature: void savePatient(StandardizedPatient patient)
focal_class.class_method_signature: DMZSyncServiceImpl.getRequest()
focal_class.full_signature:  HttpServletRequest getRequest()
focal_class.identifier: getRequest
focal_class.parameters: ()
focal_class.return: HttpServletRequest
focal_class.signature: HttpServletRequest getRequest()
focal_class.superclass: extends RemoteServiceServlet
focal_method.body: @Override
  	public String sendSync(String locale) throws DMZSyncException{
  	//send json
  		String json = getSyncJsonData(locale);
  		System.out.println("getSyncJsonData################################# "+json);
  		String url = getHostAddress() + "/OsceSync/syncJson";
  		//Send OSCE data to DMZ and return DMZ data
  		//dmz json
  		
  		//System.out.println(">>>>>>>> return json: "+returnJson);
  		String message = "";
  		if(!json.equals("")){	
  			String returnJson = sendData(json,url);
  			try{
  				JSONObject myjson = new JSONObject(returnJson);
  				message = getReturnMessage(myjson);
  			}catch(JSONException e){
  				
  				Log.error(e.getMessage());
  				e.printStackTrace();
  				
  				throw new DMZSyncException(DMZSyncExceptionType.HTTP_EXCEPTION,e.getMessage());
  				
  			}catch(Exception e){
  				
  				Log.error(e.getMessage());
  				e.printStackTrace();
  				
  				throw new DMZSyncException(DMZSyncExceptionType.HTTP_EXCEPTION,e.getMessage());
  				
  			}
  			
  		}
  		return message;
  	}
focal_method.class_method_signature: DMZSyncServiceImpl.sendSync(String locale)
focal_method.full_signature: @Override public String sendSync(String locale)
focal_method.identifier: sendSync
focal_method.invocations: getSyncJsonData println getHostAddress equals sendData getReturnMessage error getMessage printStackTrace getMessage error getMessage printStackTrace getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (String locale)
focal_method.return: String
focal_method.signature: String sendSync(String locale)