Skip to content

Commit

Permalink
Update to studentservice host
Browse files Browse the repository at this point in the history
  • Loading branch information
scottslewis committed Feb 20, 2019
1 parent 06e3ad7 commit e4bf523
Show file tree
Hide file tree
Showing 19 changed files with 9 additions and 9 deletions.
Binary file modified build/artifacts.jar
Binary file not shown.
Binary file modified build/content.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions build/karaf-features.xml
Expand Up @@ -31,14 +31,14 @@
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/javax.servlet_3.1.0.v201410161800.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/javax.validation.api_2.0.1.Final.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.apache.httpcomponents.httpclient_4.5.5.v20180409-1525.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.apache.httpcomponents.httpclient_4.5.5.v20180409-1525.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.apache.httpcomponents.httpcore_4.4.9.v20180409-1525.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.apache.commons.codec_1.10.0.v20180409-1845.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.api_2.5.0.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.external.aopalliance-repackaged_2.5.0.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.external.jakarta.inject_2.5.0.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.locator_2.5.0.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.osgi-resource-locator_2.5.0.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.osgi-resource-locator_1.0.1.jar</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.hk2.utils_2.5.0.jar</bundle>

<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.jersey.core.jersey-client_2.28.0.jar</bundle>
Expand Down
Binary file modified build/logs.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/plugins/com.mycorp.examples.student_1.1.0.201902181716.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Expand Up @@ -34,7 +34,7 @@
import com.mycorp.examples.student.Students;

// The jax-rs path annotation for this service
@Path("/studentservice")
@Path("/studentservice2")
// The OSGi DS (declarative services) component annotation.
//@Component(immediate = true, property = { "service.exported.interfaces=*", "service.exported.intents=osgi.async",
// "service.exported.intents=jaxrs","osgi.basic.timeout=50000" })
Expand All @@ -59,7 +59,7 @@ public class StudentServiceImpl2 implements StudentService {
// Implementation of StudentService based upon the students map
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/students")
@Path("/students2")
public Students getStudents() {
Students result = new Students();
result.setStudents(new ArrayList<Student>(students.values()));
Expand All @@ -68,7 +68,7 @@ public Students getStudents() {

@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/studentscf")
@Path("/studentscf2")
public CompletableFuture<Students> getStudentsCF() {
CompletableFuture<Students> cf = new CompletableFuture<Students>();
cf.complete(getStudents());
Expand All @@ -77,14 +77,14 @@ public CompletableFuture<Students> getStudentsCF() {

@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/students/{studentId}")
@Path("/students2/{studentId}")
public Student getStudent(@PathParam("studentId") String id) {
return students.get(id);
}

@POST
@Produces(MediaType.APPLICATION_JSON)
@Path("/students/{studentName}")
@Path("/students2/{studentName}")
public Student createStudent(@PathParam("studentName") String studentName) {
if (studentName == null)
return null;
Expand All @@ -99,7 +99,7 @@ public Student createStudent(@PathParam("studentName") String studentName) {
@PUT
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("/students")
@Path("/students2")
public Student updateStudent(Student student) {
Student result = null;
if (student != null) {
Expand All @@ -121,7 +121,7 @@ public Student updateStudent(Student student) {
}

@DELETE
@Path("/students/{studentId}")
@Path("/students2/{studentId}")
@Produces(MediaType.APPLICATION_JSON)
public Student deleteStudent(@PathParam("studentId") String studentId) {
return students.remove(studentId);
Expand Down

0 comments on commit e4bf523

Please sign in to comment.