Once the business logic is in place, you can RESTify the EJB methods using the Junos Space SDK plug-in.
HelloWorld.javaand select Create/Edit REST Resources as shown below:
getCountryById(int id). A country object can contain several states and hence the "country" object is expected to have reference to object(s) in another collection, for example,
/api/space/hello-world/states. After the method is selected to RESTify, Click Add.