Skip to content

Commit 5a2fb82

Browse files
committed
Succefully Removed omod-1.8
1 parent 4a54c44 commit 5a2fb82

File tree

276 files changed

+4360
-5462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+4360
-5462
lines changed

omod-1.10/pom.xml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,6 @@
2828
<classifier>tests</classifier>
2929
<scope>test</scope>
3030
</dependency>
31-
32-
<dependency>
33-
<groupId>${project.parent.groupId}</groupId>
34-
<artifactId>${project.parent.artifactId}-omod-1.8</artifactId>
35-
<version>${project.parent.version}</version>
36-
</dependency>
37-
38-
<dependency>
39-
<groupId>${project.parent.groupId}</groupId>
40-
<artifactId>${project.parent.artifactId}-omod-1.8</artifactId>
41-
<version>${project.parent.version}</version>
42-
<classifier>tests</classifier>
43-
<scope>test</scope>
44-
</dependency>
4531

4632
<dependency>
4733
<groupId>${project.parent.groupId}</groupId>

omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/DrugOrderSubclassHandler1_10.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
3232
import org.openmrs.module.webservices.rest.web.resource.impl.NeedsPaging;
3333
import org.openmrs.module.webservices.rest.web.response.ResourceDoesNotSupportOperationException;
34-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.DrugOrderSubclassHandler1_8;
34+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.DrugOrderSubclassHandler1_9;
3535

3636
/**
3737
* Exposes the {@link org.openmrs.DrugOrder} subclass as a type in
3838
* {@link org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10.DrugOrderSubclassHandler1_10}
3939
*/
4040
@SubClassHandler(supportedClass = DrugOrder.class, supportedOpenmrsVersions = { "1.10.* - 1.11.*" })
41-
public class DrugOrderSubclassHandler1_10 extends DrugOrderSubclassHandler1_8 {
41+
public class DrugOrderSubclassHandler1_10 extends DrugOrderSubclassHandler1_9 {
4242

4343
/**
4444
* @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceHandler#newDelegate()

omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/DrugResource1_10.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.openmrs.module.webservices.rest.web.representation.FullRepresentation;
1717
import org.openmrs.module.webservices.rest.web.representation.Representation;
1818
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
19-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.DrugResource1_8;
19+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.DrugResource1_9;
2020

2121
import io.swagger.models.Model;
2222
import io.swagger.models.ModelImpl;
@@ -27,7 +27,7 @@
2727
* supporting standard CRUD operations
2828
*/
2929
@Resource(name = RestConstants.VERSION_1 + "/drug", order = 3, supportedClass = Drug.class, supportedOpenmrsVersions = { "1.10.*" })
30-
public class DrugResource1_10 extends DrugResource1_8 {
30+
public class DrugResource1_10 extends DrugResource1_9 {
3131

3232
/**
3333
* @see org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource#getResourceVersion()

omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
import org.openmrs.module.webservices.rest.web.response.ObjectNotFoundException;
3838
import org.openmrs.module.webservices.rest.web.response.ResourceDoesNotSupportOperationException;
3939
import org.openmrs.module.webservices.rest.web.response.ResponseException;
40-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.OrderResource1_8;
41-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.PatientResource1_8;
40+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.OrderResource1_9;
41+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.PatientResource1_9;
4242

4343
import java.util.ArrayList;
4444
import java.util.Collections;
@@ -51,7 +51,7 @@
5151
* , supporting standard CRUD operations
5252
*/
5353
@Resource(name = RestConstants.VERSION_1 + "/order", supportedClass = Order.class, supportedOpenmrsVersions = { "1.10.* - 2.1.*" })
54-
public class OrderResource1_10 extends OrderResource1_8 {
54+
public class OrderResource1_10 extends OrderResource1_9 {
5555

5656
/**
5757
* @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation)
@@ -218,7 +218,7 @@ public DelegatingResourceDescription getUpdatableProperties() throws ResourceDoe
218218
protected PageableResult doSearch(RequestContext context) throws ResponseException {
219219
String patientUuid = context.getRequest().getParameter("patient");
220220
if (patientUuid != null) {
221-
Patient patient = ((PatientResource1_8) Context.getService(RestService.class).getResourceBySupportedClass(
221+
Patient patient = ((PatientResource1_9) Context.getService(RestService.class).getResourceBySupportedClass(
222222
Patient.class)).getByUniqueId(patientUuid);
223223
if (patient == null) {
224224
throw new ObjectNotFoundException();

omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/PersonResource1_10.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource;
1818
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
1919
import org.openmrs.module.webservices.rest.web.response.ResourceDoesNotSupportOperationException;
20-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.PersonResource1_8;
20+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.PersonResource1_9;
2121

2222
/**
2323
* {@link Resource} for Person, supporting standard CRUD operations
2424
*/
2525
@Resource(name = RestConstants.VERSION_1 + "/person", order = 3, supportedClass = Person.class, supportedOpenmrsVersions = {
2626
"1.10.4 - 1.10.*" })
27-
public class PersonResource1_10 extends PersonResource1_8 {
27+
public class PersonResource1_10 extends PersonResource1_9 {
2828

2929
/**
3030
* @see DelegatingCrudResource#getRepresentationDescription(Representation)

omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/ProgramEnrollmentResource1_10.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.openmrs.module.webservices.rest.web.representation.RefRepresentation;
2727
import org.openmrs.module.webservices.rest.web.representation.Representation;
2828
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
29-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.ProgramEnrollmentResource1_8;
29+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.ProgramEnrollmentResource1_9;
3030
import org.openmrs.util.OpenmrsUtil;
3131

3232
import java.util.Collections;
@@ -37,7 +37,7 @@
3737

3838
@Resource(name = RestConstants.VERSION_1 + "/programenrollment", supportedClass = PatientProgram.class, supportedOpenmrsVersions = {
3939
"1.10.* - 9.*" })
40-
public class ProgramEnrollmentResource1_10 extends ProgramEnrollmentResource1_8 {
40+
public class ProgramEnrollmentResource1_10 extends ProgramEnrollmentResource1_9 {
4141

4242
@Override
4343
public DelegatingResourceDescription getRepresentationDescription(Representation rep) {

omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/ProgramResource1_10.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
import org.openmrs.module.webservices.rest.web.representation.RefRepresentation;
2222
import org.openmrs.module.webservices.rest.web.representation.Representation;
2323
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
24-
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.ProgramResource1_8;
24+
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.ProgramResource1_9;
2525

2626
@Resource(name = RestConstants.VERSION_1 + "/program", supportedClass = Program.class, supportedOpenmrsVersions = {
2727
"1.10.* - 9.*" })
28-
public class ProgramResource1_10 extends ProgramResource1_8 {
28+
public class ProgramResource1_10 extends ProgramResource1_9 {
2929

3030
@Override
3131
public DelegatingResourceDescription getRepresentationDescription(Representation rep) {

omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/ProgramEnrollmentController1_10Test.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.openmrs.api.context.Context;
2121
import org.openmrs.module.webservices.rest.SimpleObject;
2222
import org.openmrs.module.webservices.rest.test.Util;
23-
import org.openmrs.module.webservices.rest.web.RestTestConstants1_8;
23+
import org.openmrs.module.webservices.rest.web.RestTestConstants1_9;
2424
import org.openmrs.module.webservices.rest.web.v1_0.controller.MainResourceControllerTest;
2525
import org.openmrs.util.OpenmrsUtil;
2626
import org.springframework.mock.web.MockHttpServletRequest;
@@ -67,28 +67,28 @@ public long getAllCount() {
6767
*/
6868
@Override
6969
public String getUuid() {
70-
return RestTestConstants1_8.PATIENT_PROGRAM_UUID;
70+
return RestTestConstants1_9.PATIENT_PROGRAM_UUID;
7171
}
7272

7373
@Test
7474
@Override
7575
public void shouldGetAll() throws Exception {
7676
MockHttpServletRequest req = request(RequestMethod.GET, getURI());
77-
req.setParameter("patient", RestTestConstants1_8.PATIENT_IN_A_PROGRAM_UUID);
77+
req.setParameter("patient", RestTestConstants1_9.PATIENT_IN_A_PROGRAM_UUID);
7878
SimpleObject result = deserialize(handle(req));
7979

80-
Patient patient = patientService.getPatientByUuid(RestTestConstants1_8.PATIENT_IN_A_PROGRAM_UUID);
80+
Patient patient = patientService.getPatientByUuid(RestTestConstants1_9.PATIENT_IN_A_PROGRAM_UUID);
8181
List<PatientProgram> patientPrograms = service.getPatientPrograms(patient, null, null, null, null, null, false);
8282
Assert.assertEquals(patientPrograms.size(), Util.getResultsSize(result));
8383
}
8484

8585
@Test
8686
public void shouldExcludeVoided() throws Exception {
8787
MockHttpServletRequest req = request(RequestMethod.GET, getURI());
88-
req.setParameter("patient", RestTestConstants1_8.PATIENT_WITH_VOIDED_PROGRAM_UUID);
88+
req.setParameter("patient", RestTestConstants1_9.PATIENT_WITH_VOIDED_PROGRAM_UUID);
8989
SimpleObject result = deserialize(handle(req));
9090

91-
Patient patient = patientService.getPatientByUuid(RestTestConstants1_8.PATIENT_WITH_VOIDED_PROGRAM_UUID);
91+
Patient patient = patientService.getPatientByUuid(RestTestConstants1_9.PATIENT_WITH_VOIDED_PROGRAM_UUID);
9292
List<PatientProgram> patientPrograms = service.getPatientPrograms(patient, null, null, null, null, null, false);
9393
Assert.assertEquals(patientPrograms.size(), Util.getResultsSize(result));
9494
}
@@ -97,7 +97,7 @@ public void shouldExcludeVoided() throws Exception {
9797
public void shouldTransitPatientState() throws Exception {
9898
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
9999
String stateStartDate = "2015-08-04";
100-
String json = "{ \"states\": [{ \"state\": {\"uuid\" : \"" + RestTestConstants1_8.STATE_UUID
100+
String json = "{ \"states\": [{ \"state\": {\"uuid\" : \"" + RestTestConstants1_9.STATE_UUID
101101
+ "\"}, \"startDate\": \"" + stateStartDate + "\"}]}";
102102

103103
PatientProgram patientProgram = service.getPatientProgramByUuid(getUuid());
@@ -111,7 +111,7 @@ public void shouldTransitPatientState() throws Exception {
111111
List<PatientState> states = new ArrayList<PatientState>(patientProgram.getStates());
112112
Assert.assertEquals(2, states.size());
113113
sortPatientStatesBasedOnStartDate(states);
114-
Assert.assertEquals(RestTestConstants1_8.STATE_UUID, states.get(1).getState().getUuid());
114+
Assert.assertEquals(RestTestConstants1_9.STATE_UUID, states.get(1).getState().getUuid());
115115
String existingStateEndDate = dateFormat.format(states.get(0).getEndDate());
116116
Assert.assertEquals(stateStartDate, existingStateEndDate);
117117
}
@@ -149,7 +149,7 @@ public void shouldVoidPatientState() throws Exception {
149149

150150
//Transit the existing patient state to new state
151151
String stateStartDate = "2015-08-04";
152-
String json = "{ \"states\": [{ \"state\": {\"uuid\" : \"" + RestTestConstants1_8.STATE_UUID
152+
String json = "{ \"states\": [{ \"state\": {\"uuid\" : \"" + RestTestConstants1_9.STATE_UUID
153153
+ "\"}, \"startDate\": \"" + stateStartDate + "\"}]}";
154154

155155
MockHttpServletRequest req = newPostRequest(getURI() + "/" + getUuid(), SimpleObject.parseJson(json));

omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/PersonResource1_10Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import org.openmrs.Person;
1313
import org.openmrs.api.context.Context;
14-
import org.openmrs.module.webservices.rest.web.RestTestConstants1_8;
14+
import org.openmrs.module.webservices.rest.web.RestTestConstants1_9;
1515
import org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResourceTest;
1616

1717
public class PersonResource1_10Test extends BaseDelegatingResourceTest<PersonResource1_10, Person> {
@@ -40,6 +40,6 @@ public String getDisplayProperty() {
4040

4141
@Override
4242
public String getUuidProperty() {
43-
return RestTestConstants1_8.PERSON_UUID;
43+
return RestTestConstants1_9.PERSON_UUID;
4444
}
4545
}

omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/ProgramResource1_10Test.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.openmrs.api.ProgramWorkflowService;
1919
import org.openmrs.api.context.Context;
2020
import org.openmrs.module.webservices.rest.SimpleObject;
21-
import org.openmrs.module.webservices.rest.web.RestTestConstants1_8;
21+
import org.openmrs.module.webservices.rest.web.RestTestConstants1_9;
2222
import org.openmrs.module.webservices.rest.web.v1_0.controller.MainResourceControllerTest;
2323
import org.springframework.mock.web.MockHttpServletRequest;
2424
import org.springframework.web.bind.annotation.RequestMethod;
@@ -41,7 +41,7 @@ public String getURI() {
4141

4242
@Override
4343
public String getUuid() {
44-
return RestTestConstants1_8.PROGRAM_UUID;
44+
return RestTestConstants1_9.PROGRAM_UUID;
4545
}
4646

4747
@Override
@@ -56,8 +56,8 @@ public void shouldCreateAProgram() throws Exception {
5656
SimpleObject program = new SimpleObject();
5757
program.add("name", "Program name");
5858
program.add("description", "Program description");
59-
program.add("concept", RestTestConstants1_8.CONCEPT_UUID);
60-
program.add("outcomesConcept", RestTestConstants1_8.CONCEPT2_UUID);
59+
program.add("concept", RestTestConstants1_9.CONCEPT3_UUID);
60+
program.add("outcomesConcept", RestTestConstants1_9.CONCEPT2_UUID);
6161

6262
String json = new ObjectMapper().writeValueAsString(program);
6363

@@ -67,7 +67,7 @@ public void shouldCreateAProgram() throws Exception {
6767
SimpleObject newProgram = deserialize(handle(req));
6868

6969
Assert.assertNotNull(PropertyUtils.getProperty(newProgram, "uuid"));
70-
Assert.assertEquals(RestTestConstants1_8.CONCEPT2_UUID,
70+
Assert.assertEquals(RestTestConstants1_9.CONCEPT2_UUID,
7171
((Map) PropertyUtils.getProperty(newProgram, "outcomesConcept")).get("uuid"));
7272
Assert.assertEquals(originalCount + 1, getAllCount());
7373
}

0 commit comments

Comments
 (0)