Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF BC: integrating REST API

2827010Feb 22 2012 — edited Feb 23 2012
Using JDev 11g PS4

The model of my application has a mix of different sources. Some entities are stored in my database.
Other entities are coming from a call to an external REST API.

I am wondering what the best solution is to integrate those REST API objects into my model project because I don't want to expose them as rest api to my view. In my view project, I want to hide the complexity of those API's by exposing data controls.
Now, what is the best way?

1) Creating POJO's and creating data controls out of them. These pojo's will have a signature like this:
public class Foo {
   public List<FooObject> getFoos();
   public void addFoo(FooObject foo);
   public void removeFoo(FooObject foo);
   ....
}
This will be exposed to my view so I can easily use it in my view project.

2) Create view objects to map the entities from my rest API and implement the REST API calls in the custom implementation of the view objects.

3) ...

Any other suggestion is more then welcom.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2012
Added on Feb 22 2012
2 comments
251 views