Expand my Community achievements bar.

Is it possible to achieve with one sling service

Avatar

Level 6

Just wonder if it is possible to achieve this.

I write a sling service called /wcmapi/myservice. I want to service to handle the URLs.

1. https://locahost:4502/wcmapi/myservice/myplan

2. https://locahost:4502/wcmapi/myservice/mycontact

3.https://locahost:4502/wcmapi/myservice/myhome

The service will take the last value (myplan or mycontact or myhome) in the url as input to generate different output. since the logic is very simple and output as well, instead creating an interface and implement three services, can I combine three services into one service and use the last value in the URL mimic as selector?

Let me know if it is feasible.

Thanks.

10 Replies