In an earlier section of this Learning Path, you created a Guestbook portlet prototype. Then you wrote a service.xml file to define your application’s data model, and used Service Builder to generate the back-end code (the model, service, and persistence layers). You also added service methods using the appropriate extension points: your entities’ *LocalServiceImpl classes. Now you need to integrate the original prototype with the new back-end to create a fully functional application.

There are many differences between the prototype and the application you’ll create. In the back-end, you’ve already accounted for one big difference: users can create multiple Guestbooks that each have their own entries. In the front-end, however, only site administrators should be able to create guestbooks. Therefore, you’ll create another portlet called Guestbook Admin and place it in the Content menu for sites.

To turn this application from a prototype into a full-fledged Liferay web application, you’ll make these changes:

  • Modify your view layer’s folder structure to account for the administrative portlet
  • Set the Display Category so users can find the application more easily
  • Create a file to store the application’s text keys
  • Change the controller to call your new Service Builder-based back-end
  • Update the view so it can display multiple Guestbooks in tabs

Ready to begin?

Let’s Go!

Organizing Folders for Larger Applications

Refactoring the Prototype Step 1 of 6 Currently, all your JSPs sit in your web module’s src/main/resources/META-INF/resources folder, which serves as the context root folder. To make a clear...

Read More

Defining the Component Metadata Properties

Refactoring the Prototype Step 2 of 6 When users add applications to a page, they pick them from a list of display categories. Figure 1: Users choose applications from a list of display categories....

Read More

Creating Portlet Keys

Refactoring the Prototype Step 3 of 6 PortletKeys let you manage important things like the portlet name or other repeatable, commonly used variables in one place. This way, if you need to change...

Read More

Integrating the New Back-end

Refactoring the Prototype Step 4 of 6 It’s a good practice to start with a working prototype as a proof of concept, but eventually that prototype must transform into a real application. Up to this...

Read More

Updating the View

Refactoring the Prototype Step 5 of 6 You updated more than just the basic mechanism behind creating the entry–you completely changed its method and structure. You must, therefore, update the UI as...

Read More

Fitting it All Together

Refactoring the Prototype Step 6 of 6 You’ve created a complete data-driven application from the back-end to the display. It’s a great time to review how everything connects together. The Entry...

Read More
0 (0 Votes)
Implementing Service Methods Previous