LRP-614 practice question 3 of 25
A hook plugin can be used to: (Please select all correct answers.)
Full set: 144 questionsLiferay hook plugins are a hot-deployable and minimally invasive way to customize Liferay Portal. A hook can be used to modify language keys by providing a custom Language.properties file, which overrides the default portal translations. One of the most common uses for hooks is to override core portal JSPs, allowing developers to change the portal's user interface. Hooks can also override core services, such as the User service, by implementing a service wrapper. This wrapper intercepts calls to the original service, allowing for the addition of custom logic before or after the original method execution.
B. A hook cannot modify a theme plugin. Themes are a separate plugin type and are customized by creating a new theme or directly modifying the existing one.
E. Overriding core utility classes like PortalLDAPUtil is not possible with a hook. This level of customization requires an Ext plugin, which can replace core portal classes.
1. Liferay Portal 6.1 Developer's Guide, Chapter 10: Hooks.
For A (Language Keys): Section "Customizing Language Keys", Page 221: "You can use a hook to customize the language keys defined in Liferay’s Language.properties files."
For C (JSP Override): Section "Customizing JSPs", Page 222: "One of the most powerful features of hooks is the ability to override and customize Liferay’s JSPs."
For D (Service Override): Section "Overriding a Portal Service", Page 218: "You can use a hook to override one of Liferay’s core services... This is accomplished by creating a service wrapper."
For E (Incorrect - Utility Class): Section "When to Use an Ext Plugin", Page 238: "If you need to override a Liferay class that’s not a service, you should use an Ext plugin." This clarifies that utility classes are outside the scope of hooks.
Keep practicing
Take the free LRP-614 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LRP-614 practice questions
- Question 1The best way to add a new language key to the portal is through:
- Question 2In a JSP that includes the tag, the method to check permissions is:
- Question 4An administrator would like to add a new travel preferences section in the Miscellaneous …
- Question 5The following statements about plugins are true: (Please select all correct answers.)
- Question 6All Service Builder entities contain a local reference to: (Please select all correct ans…
- Question 7A class that extends MVCPortlet must implement:
