A developer is working on the following Sling Model that is being used in a component.
@Model(adaptables = SlingHttpServletRequest.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class SampleModel {
@Inject
private Page currentPage;
private boolead matchingTitle;
@PostConstruct
private void init(){
matchingTitle = title.equals(currentPage.getName());
}
public boolean isMatchingTitle(){
return matchingTitle;
}
}
The model must check if the configured value of the jct:title property for the component matches the same name of the current page. If the jcr:title property of the component has NOT been configured, then isMatchingTitle() must return false.
How should the developer inject the title property in this model?
A banking AEM application contains functionality to calculate a mortgage rate based on user input. A servlet in place calculates the result in the backend. A call to an internal third-party REST service is required to retrieve the average object value based on a given zip code.
The following three service interfaces are used:
MortgageCalculationServlet, MortgageCalculationService and ObjectValueLookupRestService where MortgageCalculationServlet has a dependency to MortgageCalculationService and MortgageCalculationService has a dependency to ObjectValueLookupRestService.
The calculation has many combinations of input parameters and edge cases, so the JUnit coverage must be as high as possible.
Which two strategies should the developer use to ensure testability of the application code? (Choose two)
The structure section of an editable template has a locked component.
What happens to the content of that component when a developer unlocks it?
A developer wants to extend AEM Core Components to create a custom Carousel Component.
How should the developer extend the Core Components?
A Client-Side Library has the category "library.example".
Which HTL statement should a developer use to reference only the CSS files of this Client-Side library
A custom AEM application has a run time dependency to a third party OSGi bundle that is NOT included in out-of-the-box AEM. The third party dependency needs to be available for multiple applications and be upgraded separately from the custom AEM application.
How should a developer make sure that the bundle is installed on all environments?
A developer identifies that some requests for the page /content/sampleproject/page.html take longer than other requests for the same page.
Refer to the $DOCROOT/content/sampleproject directory below.
[user@group /opt/dispatcher/cache/content/sampleproject ]$ ks -la
total 2
drwxr-xr-x. 5 apache apache 4096 Feb 11 11:41 .
drwxr-xr-x. 3 apache apache 4096 Nov 29 16:07 ..
drwxr-xr-x. 4 apache apache 4096 Feb 7 03:21 page.html
-rw-r--r--. 1 apache apache 0 Feb 7 03:19 .stat
The dispatcher.log file contains the following lines:
[Wed Feb 13 13:14:04 2012] [D] [1376(1572)] checking [/libs/cq/security/userinfo.json]
[Wed Feb 13 13:14:04 2012] [D] [1376(1572)] Caching disabled due to query string: tracking_id=1350373444666
[Wed Feb 13 13:14:04 2012] [D] [1376(1572)] cache-action for [/libs/cq/security/userinfo.json]: None
How should the developer make sure that the page is always cached?
An online insurance company website has user-generated content that must be replicated in all publish instances.
What action should the developer take to achieve this?
A developer is working on a complex project with multiple bundles. One bundle provides an OSGi service for other bundles.
Which two options are necessary to ensure that the other bundles can reference that OSGi service? (Choose two.)
A developer is creating templates and/or components using CRXDE Lite. The developer needs to check the files into source control.
Which tool should the developer use to achieve this goal?
A custom bundle of an application is in state "Installed" after deploying it with Maven.
What should a developer do to change it to state "Active"?