Site Developer Flashcards

1
Q

A developer needs to create a banner component. This component shows an image across the full width of the page. A title is shown on top of the image. This text can be aligned to the left, middle, or right. The core components feature a teaser component which matches almost all requirements, but not all.
What is the most maintainable way for the developer to implement these requirements?

A.Use and configure the teaser core component.

B.Create a new custom component from scratch.

C.Inherit from the teaser core component

D.Overlay the teaser core component.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A developer is creating a custom component that shows a list of pages. For each page, the following items must be shown:
✑ Title of the page
✑ Description of the page
✑ A button with fixed text “Read more” that must be translatable
All of the above fields must be wrapped in a <div> tag.
The logic for obtaining the list of pages must be reusable for future components.
Which snippet should the developer use to meet these requirements?

A. sly data-sly-use model=”com.example.component”/>
div data-sly-list=”${model.pages}”/>
p>${item.title} p/>
a href=”${item.link}”/>${“Read more” @ il8n}” a/>

B. sly data-sly-use.model=”com.example.component”/>
div data-sly-list=”${model.pages}”/>
p>${item.title} p/>
a href=”${item.link}”/>${“Read more” @ .translate}” a/>

C. sly data-sly-load.model=”com.example.component”/>
div data-sly-list=”${model.pages}”/>
p>${item.title} p/>
a href=”${item.link}”/>${“Read more” @ il8n}” a/>

D. sly data-sly-use.model=”com.example.component”/>
div data-sly-list=”${model.pages}”/>
p>${item.title} p/>
a href=”${item.link}”/>${“Read more” @ .translate}” a/></div>

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.The bundle providing the service needs to export the java package of the service interface

B.The service needs to correctly declare metatype information.

C.The bundle providing the service needs to contain a whitelist of allowed consumer bundles.

D.The bundles consuming the service need to import the fully qualified name of the service interface

E.The bundle providing the service needs to contain an adequate SCR descriptor file.

A

A, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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.The content stays in the same place but it ignored on pages using the template.

B.The content is deleted after confirmation from the template author.

C.The content is moved to the initial section of the editable template.

D.The content is copied to the initial section of the editable template

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which log file contains AEM application request and response entries?

A.response.log

B.request.log

C.history.log

D.audit.log

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A developer identifies that some requests for the page /content/sampleproject/page.html take longer that other requests for the same page.
How should the developer make sure that the page is always cached?

Modify the dispatcher.any file to contain the following lines:

A. /filter
/0023 { /type “allow” /url “/content///html” /params “tracking_id”}

B. /igoneUrlParams
/0002 { /glob “tracking_id” /type “allow”}

C. /rules
/0000 { /glob “*” /type “allow” /params “tracking_id” }

D. /filter
/0023 { /type “allow” /url “/content///html?tracking_id=*”}

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A developer creates a Sling Servlet. The Sling Servlet is bound to a path (/service/sling/sample).
@Component (immediate=true, service = {servlet.class)
@SlingServletPaths(value ={“/service/sling/sample”})

What should the developer do to make the servlet access controlled using the default ACLs?

A.Modify @SlingServletPaths(value = {“/bin/sling/sample” }).

B.Add @SlingServletName(servletName = “AccessControlServlet”) annotation.

C.Use @SlingServletResourceTypes instead of @SlingServletPaths.

D.Add @SlingServletPrefix(value = “/apps”) annotation.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A developer wants to extend AEM Core Components to create a custom Carousel Component.
How should the developer extend the Core Components?

A.Make changes to the original component and assign a component group.

B.Use the sling:resourceType property to point to the core component.

C.Copy the Core Carousel component to /apps/ folder.

D.Use the sling:resourceSuperType property to point to the core component.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A developer wants to change the log level for a custom API.
Which OSGi configuration should the developer modify?

A.Apache Sling Log Tracker Service

B.Apache Sling Logging Writer Configuration

C.Adobe Granite Log Analysis Service

D.Apache Sling Logging Configuration

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Refer to the following four Client Library Folders.
Html
One
- categories=”[library.one]”
- dependencies=”[library.three, library.four]”
- embed=”[library.two]”

Two
- categories=”[library.two]”

Three

  • categories=”[library.three]”
  • dependencies=”[library.four]”

Four
- categories=”[library.four]”

A developer uses the following:
data-sly-call=”${clientlib.css @categories=’library.one’}”

What is the resulting HTML?

A. href=”library.one.css”
href=”library.three.css”
href=”library.four.css”

B. href=”library.two.css”
href=”library.one.css”
href=”library.three.css”

C. href=”library.four.css”
href=”library.three.css”
href=”library.one.css”

D. href=”library.three.css”
href=”library.four.css”
href=”library.one.css”

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A developer is installing a content package with the package manager. The developer needs to restrict the approximate number of nodes in a batch that is saved to persistent storage in one transaction.
How should the developer modify the number of transient nodes to be triggered until automatic saving?

A.Change the value of Save Threshold in the Install Package dialog-box

B.AEM instances automatically modify the number of transient nodes based on the load balancing.

C.Modify the export package manifest header and copy the content package to AEM installation folder.

D.Select the option MergePreserve for the Access Control Handling drop-down in the Install Package dialog-box.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A developer needs to implement a service component that should be manually configured by operations to react on operational circumstances. The service component should NOT be active by default. The service has the properties myservice.name (one string value) and myservice.stringValues (a list of the string values) to be configured.
The developer needs to use OSGi Metatype annotations to make those properties configurable in the Apache Felix Web Console.
Which set of steps should the developer take to meet these requirements?

A.1. For the class fields myserviceName and myserviceStringValues, add a @AttributeDefinition annotation each with names set to myservice.name and myservice.stringValues respectively. 2. Use the @Component annotation with configurationFactory = true on the service component class. 3. Use the @Service service component class. 4. Use the activate method of the service component class to get the configuration annotation interface class injected.

B.1. Create an annotation interface as inner class of the service component and annotate it with @ObjectClassDefinition. 2. Apply @AttributeDefinition for the methods myservice.name and myservice.stringValues. 3. Use the @Component annotation with configurationPolicy = ConfigurationPolicy.REQUIRE on the service component. 4. Use the @Designate annotation to link the service component to the created configuration annotation interface. 5. Use the activate method of the service component class to get the configuration annotation interface class injected.

C.1. For the class fields myserviceName and myserviceStringValues, add a @Property annotation each with names set to myservice.name and myservice.stringValues respectively. 2. Use the @Component annotation with configurationFactory = true on the service component class. 3. Use the @Service service component class. 4. The configuration is automatically injected into the field by the service component runtime.

D.1. Create an annotation interface as inner class of the service component and annotate it with @ObjectClassDefinition. 2. Apply @AttributeDefinition for the methods myservice_name and myservice_stringValues. 3. Use the @Component annotation with configurationPolicy = ConfigurationPolicy.REQUIRE on the service component. 4. Use the @Designate annotation to link the service component to the created configuration annotation interface. 5. Use the activate method of the service component class to get the configuration annotation interface class injected.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A developer creates Editable Templates based on a custom Page component. The developer wants to leverage the Style System within the Editable Templates to allow authors to switch between the Dark and Light Theme. The Style System dialog is NOT enabled for the site.
What should the developer do to resolve this issue?

A.Create two new client libraries with a dark and light theme and map them to the Page component.

B.Set the sling:resourceSuperType property to core/wcm/components/page/v2/page on the Page component.

C.Define Style Definitions using Page Policy dialog on Editable Template.

D.Create a new dialog for the custom Page components.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A developer creates a custom component. The component dialog includes the following fields:

charLimit

  • defaultValue=”0”
  • name=”./chatLimit”

The developer creates the following Sling Model to perform the trancation:

@ValueMapValue
private Integer charLimit;

@PostMapValue
Private void init(){
    If(0 < charLimit)
        //perform process
}

A Null Pointer Exception occurs if NO charLimit values is set in the component dialog.
What should the developer do to resolve this issue?

A.Replace the defaultValue=”0” attribute of the “˜charLimit’ field in the dialog with min=”0”.

B.Replace the defaultValue=”0” attribute of the charLimit field in the dialog with defaultValue=”{Long}0”.

C.Add the @Default annotation to the “˜chatLimit’ variable in the Sling Model.

D.Change the defaultInjectionStrategy of the Truncation Sling Model to DefaultInjectionStrategy.REQUIRED.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A custom AEM application contains Bundle A and Bundle B. Bundle A has a dependency to Bundle B via Import-Package.
How can both bundles be deployed most efficiently across all environments?

A.Use the Felix Web Console to upload the bundles in the correct order.

B.Create one content package per bundle and use a package dependency to ensure installation order.

C.Embed both bundles in one content package: the dependency via Import-Package is enough to ensure correct installation.

D.Embed both bundles in one content package and use property “˜installationOrder’ in package properties for correct bundle installation order.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

After adding new features, a developer’s environment is experiencing slowness before ultimately running out of memory. The initial log analysis points towards a large number of open sessions.
Which action should the developer take to further monitor the overall session count on this AEM instance?

A.Run the following command to generate thread dumps jstack -l pid>&raquo_space; threaddumps.log, analyze thread dumps to find long running sessions.

B.Go to Tools > Operations > Monitoring. Create a new report based on Number of Active Sessions as metric.

C.Go to Web Console > Status > Threads, verify the overall thread count.

D.Go to aem-install>/crx-qiuckstart/logs/strderr/log, use the following command grep -o “˜CRXSessionImpl’ strderr.log| wc -l.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

An OSGi bundle Activator.java is registered through a service DevelopInfo.java

DeveloperInfo java:
Package com.adobe.training.core
public interface DeveloperInfo{
}

Activator java:
@component(service=DeveloperInfo.class)
public class Activator{
     public void start(){
      }
}

Maven install generates an error during deployment.
Which action should the developer take to resolve the build error?

A.@Service annotation is missing in DeveloperInfo.java.

B.Interface DeveloperInfo does NOT have any method.

C.The required Maven repository for OSGi is missing.

D.Activator class is NOT implementing DeveloperInfo interface.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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.Configure the dispatcher flush agent in publish instance.

B.Configure the replication agent in the publish instances.

C.Disable static agent in the author instance

D.Configure reverse replication agents for the author.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A developer needs to analyze log messages for custom Java application. The developer writes the following Java class:
Private static final Logger logger = LoggerFactory.getLogger(this.class);
logger.debug(“asd”);

The developer creates a custom log named custom.log with a debug level in OSGi web console for Java package com.abc.xyz.
Where should the developer look in the OSGi web console to view the above message?

A.Sling-> Log Support and click logs/custom.log

B.OSGi -> Log Service and click logs/custom.log

C.Sling -> Metrics and click logs/custom.log

D.AEM -> Log Support and click logs/custom.log

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
A developer must create a workflow step that assigns a "˜WorkItem' to the appropriate person based on who has the least amount work to do.
The group that must perform the action is configured into the workflow.
Which non-deprecated interface should the Java implementation class use to perform the assignment?

A.com.day.cq.workflow.exec.ParticipantChooser

B.com.day.cq.workflow.exec.WorkItem

C.com.adobe.granite.workflow.exec.ParticipantStepChooser

D.com.adobe.granite.workflow.exec.WorkflowData

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

A developer needs to create an OSGi service to run on an Author instance and send out newsletters at periodic intervals. Intervals should be customized using the
Web Console Configuration. Concurrent execution must be prevented.
Which code snippet should a developer use to achieve?

A

A java with

scheduler_expression and scheduler_concurrent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

From which AEM Web Console should a developer access and download full AEM Log Files?

A.Status -> Log files

B.Web Console -> System Information

C.OSGI -> Sling Log Service

D.AEM -> Log files

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

A developer needs to create a new component called “Component A”. Component A must show a list of other components that all have a resource type of existing “Component B”. Component A must render this list of tiles for each Component B where the tile rendering is different from the default one. The list of rendered tiles must be reusable by future new components.
How should the developer implement this functionality?

A.Component A overlays Component B and overwrites the base renderer to facilitate the tiles.

B.Component A inherits from Component B and overwrites the base renderer to facilitate the tiles.

C.Create a script for tile rendering in Component B and use data-sly-resource attribute with a Sling selector in Component A to render the tile.

D.Component A calls the HTL of Component B directly using a data-sly-include attribute

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

For each CRX node in the hierarchy, which actions can be configured using the user admin interface?

A.Read, Write, Read ACL, Edit ACL, Replicate

B.Read, Modify, Create, Delete, Read ACL, Edit ACL, Replicate

C.Read, Write, Delete, Edit ACL, Replicate

D.Read, Modify, Create, Delete, Read ACL, Edit ACL

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

An application runs specific license checks against certain DAM assets every day. It should send an email to a configured list if it finds warnings, and mark the asset accordingly. A service component that uses the Apache Sling Scheduler Service is created. DAM assets that must NOT be used anymore are hidden using
ACLs and the license check must re-check them.
How should a developer obtain a resource resolver that can read and update the DAM assets?

A.Set up a cron job with curl calls with the admin user and use request.getResourse().getResourceResolver().

B.Create a configuration for PID org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-damaccess that references a pre-created service user with r/w permissions and use ResourceResolverFactory.getServiceResourceResolver(…).

C.Create a configuration line in PID com.day.cq.security.ACLSetup for the user that you obtain a session for via ResourceResolverFactory.getResourceResolver(…).

D.Configure the user admin in PID org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl as user.default and make sure the service user exists and has jcr:read and jcr:write permissions.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

A developer determines that the dispatcher is NOT refreshing the cached page /content/sampleproject/sample.html after it is updated.
The dispatcher.any contains the following entries:

/rules
{
/0000 {/glob “*” type “allow”}
}

/invalidate
{
/0000 {/glob “*” type “deny”}
}

The dispatcher needs to cache the page and refresh it after it gets updated.
What action should the developer take to meet these requirements?

A.Remove /statfile or /statfileslevel.

B.Delete the contents of the DOCROOT directory.

C.Change the value of the entry /statfileslevel to “3”.

D.Add the entry /0001 { /glob “-.html” /type “allow” } in the /invalidate section.

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

A developer is creating a custom method. This method must return a String property y from child x. the method must use only Sling APIs.
How should the developer retrieve property y of node x, and node x may or may NOT exist?

A.
String y = ((ValueMap) resource.getChild(“x”).getValuemap())

B. String y=null;
Node x = node.getNode("x");
If(null!=x){
    Properties properties = x.getProperties();
    If(null!=properties){
        y=properties.get("y","");
    }
}
C. String y=null;
Resource x = resource.getChild("x");
If(null!=x){
    ValueMap map = x.getValuemap();
    If(null!=map){
        y=map.get("y","");
    }
}
D. String y=null;
Node x = node.getNode("x");
If(null!=x){
    ValueMap map = x.getValuemap();
    If(null!=map){
        y=map.get("y","");
    }
}
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

The custom AEM application needs to keep a flat list of all page paths underneath /content/thesite in memory for a real-time integration with high performance requirements.
What action should the developer take to meet these requirements?

A.
Make the class implement ResourceChangeListener and add
property = {
ResourceChangeListener.CHANGES + “=ADDED”
ResourceChangeListener.CHANGES + “=REMOVED”
ResourceChangeListener.Primary_TYPES + “=cq:Page”
ResourceChangeListener.PATHS + “=/content/thesite”
}
To the @Component annotations. In method onChange update field pagePaths accorsing to receivedlist of ResourceChange

B.
Make the class implement ResourceChangeListener and add
property = {
ResourceChangeListener.CHANGES + “=ADDED”
ResourceChangeListener.CHANGES + “=CHANGED”
ResourceChangeListener.CHANGES + “=REMOVED”
ResourceChangeListener.PATHS + “=/content/thesite”
}
To the @Component annotations. In method onChange filter receive list of resource change for pages only and adjust field pagePath accordingly

C.
Make the class implement ResourceChangeListener and add
property = {
ResourceChangeListener.CHANGES + “=ADDED”
ResourceChangeListener.CHANGES + “=REMOVED”
ResourceChangeListener.Primary_TYPES + “=cq:Page”
ResourceChangeListener.PATHS + “=/content/thesite”
}
To the @Component annotations. In method onChange update field pagePaths accorsing to receivedlist of ResourceChange

D.
Make the class implement ResourceChangeListener and add
property = {
ResourceChangeListener.CHANGES + “=ADDED”
ResourceChangeListener.CHANGES + “=REMOVED”
ResourceChangeListener.PATHS + “=/content/thesite”
}
To the @Component annotations. In method onChange filter receive list of resource change for pages only and update field pagePath accordingly

A

D.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

A developer needs to create a component with the following requirements:
✑ The component must be configurable
✑ The component should be editable, NOT removable
✑ An author should be unable to add the component to a page through design mode
Which mode structure should the developer use to meet these requirements?

A.
\+ component
   - jcr:primaryType="cq:Component"
   - jcr.title="Component"
   - cq:actions="[edit]"
   \+ cq:dialog
    ...
B.
\+ component
   - jcr:primaryType="cq:Component"
   - jcr.title="Component"
   - componentGroup=".hidden"
   - cq:actions="[edit]"
   \+ cq:dialog
    ...
C.
\+ component
   - jcr:primaryType="cq:Component"
   - jcr.title="Component"
   - componentGroup=".hidden"
   \+ cq:dialog
    ...
   \+ cq:editConfig
      - cq:actions="[edit]"
D.
\+ component
   - jcr:primaryType="cq:Component"
   - jcr.title="Component"
   - hidden="true"
   \+ cq:dialog
    ...
   \+ cq:editConfig
      - cq:actions="[edit]"
A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

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.Content Explorer

B.http://localhost:4502/crx/checkout

C.mvn command

D.vlt command

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

A developer is creating a new OSGi bundle com.custom.package.b to expose new services. com.custom.package.a is already installed and active in the system and has the following package definition:
Export Package: com.custom.package.a;version=”2.0”
Import Package: com.custom.package.a;version=”[1,2)”

The system console shows the following package availability:
Com.sample.package.a;version=”1.5”
Com.sample.package.c;version=”3.0”

Bundle com.custom.package.b to be installed has the following package definition:
Export Package: com.custom.package.b;version=”1.0”
Import Package: com.custom.package.a;version=”[1,2)”, com.sample.package.b;version=”[3.0,3.0]”, com.sample.package.c;version=”[2,3)”

What will happen when the developer uploads the bundle com.custom.package.b into the system?

A.The bundle will install but fail the activation due to unsatisfied dependency com.sample.package.c.

B.The bundle will install and activate successfully.

C.The bundle will install but fail the activation due to unsatisfied dependency com.sample.package.b.

D.The bundle will install but fail the activation due to unsatisfied dependencies com.sample.package.b and com.sample.package.c.

A

D

32
Q

A custom AEM application is using the PageManager API.
What should a developer add to make the application compile and run correctly in AEM?

A.a maven dependency to AEM uber-jar to the content package

B.a maven dependency to AEM uber-jar to the application bundle

C.a maven dependency to bundle cq-wcm-core to the application bundle

D.a maven dependency to bundle cq-wcm-api to the content package

A

B

33
Q

How should a developer enable remote debugging of an AEM server without modifying the AEM start script?

A.Include an additional JVM parameter when starting AEM with java -jar.

B.Enable the remote debugging service through the AEM Cloud Services menu.

C.Rename the quickstart jar file to include the additional debug settings.

D.Enable the remote debugging service through the AEM Web Console.

A

A

34
Q

A developer developed a workflow that makes a copy of every node created or modified under a certain path to a different one. The workflow launches but the nodes are not copied over.
Which two methods should the developer use to resolve this issue? (Choose two.)

A.Go to Package Manager screen and reinstall the bundle that contains the workflow so it restarts.

B.Go to Workflow Models screen, then delete and recreate the workflow.

C.Go to Workflow instances screen and verify that the instance of the workflow is present and check its status.

D.Go to Workflow Launchers and create a new launcher for the workflow even if one already exists.

E.Go to Workflow Failures screen and check if any instances of the workflow are present.

A

C, E

35
Q

A developer creates an AEM editable template that includes a Layout Container. When the developer creates a page using this template, the Layout Container placeholder does NOT appear.
What is causing this issue?

A.The Layout Container has NOT been unlocked.

B.The Layout Container does NOT have a policy.

C.The page template has NOT been enabled.

D.The page template has NOT been published.

A

A

36
Q

Too many pages are invalidated in the dispatcher cache when a page is published.
What is most likely causing this issue in the dispatcher configuration?

A.Sticky session are NOT configured properly, resulting in requests being delivered to the wrong server.

B.File globbing in the dispatcher configuration is NOT correct.

C.The OS file system permissions are NOT properly configured

D.The level of cache invalidation is NOT appropriate for the published content model.

A

D

37
Q

A service component periodically retrieves content from an external REST interface and saves the information in JCR. The REST endpoint is configured via an
OSGi service property. There is one URL for production (runmode prod) and another URL for all other environments.
How should a developer configure the OSGi service?

A.Underneath /apps/, create the sub folders config and config.prod and a file with the name .config each and list the properties as key value pairs in there.

B.Underneath /apps//settings, create the sub folders global and prod and node with name .conf each and configure the properties via node properties.

C.Underneath /config//settings, create the sub folders config.default and config.prod and a file with the name .config each and list the properties as key value pairs in there.

D.Underneath /config//settings, create the sub folders config and config.prod and a file with the name .config each and list the properties as key value pairs in there.

A

A

38
Q

What is the artifact ID of the maven dependency that contains all core AEM APIs?

A.core-jar

B.api-jar

C.uber-jar

D.aem-jar

A

C

39
Q

There are performance, stability, and security issues with an installed AEM instance.
What should a developer do to fix these issues?

A.Delete and reinstall the AEM instance.

B.Install service pack updates from package share.

C.Install Adobe-provided Apache configuration file.

D.Stop, clear cache files, and restart the AEM instance.

A

B

40
Q

A developer needs to ensure that the path /content//segments exists on all environments with the correct initial content that the developer provides in a package. Content that exists in that path should NOT be affected.
Which import mode should the developer use in the filter definition?

A.merge

B.update

C.replace

D.optional

A

A

41
Q

A developer has a component located under the path /apps. This component has a Client Library which is directly loaded onto a page. The publish instance loads the page correctly. The dispatcher also loads the page but the Client Library is missing.
How should the developer resolve this issue, while taking security into consideration?

A.Change the ACLs for the Client Library.

B.Add the property allowProxy with a boolean value true.

C.Move the Client Library under /apps/library.

D.Allow the path to the clientlibs on the dispatcher.

A

B

42
Q

A developer creates a custom Client Library named foobar.
This Client Library embeds 5 other Client Libraries and contains 10 JavaScript source files. One of these files, called foo.js, has a bug on line 8 which causes an exception. The Client Library is throwing this exception on line 1350 when it is included on a webpage.
How should a developer find the exact line in foo.js where the exception has been thrown?

A.1. Add the selector debugClientLibs to the page request. 2. Check the JavaScript exception log in the OSGi web console.

B.1. Add the query parameter debugClientLibs=true to the request. 2. Use the browser JavaScript debugging tools.

C.1. Enable JS/CSS minification in OSGi configuration console for HTML Library Manager. 2. Check the JavaScript exception log in the OSGi web console.

D.1. Temporarily remove the embedded Client Libraries of the foobar Client Library. 2. Use the browser JavaScript debugging tools.

A

B

43
Q

Which maven plugin is required to install a content package on a local AEM environment using maven?

A.Content Package Maven Plugin

B.Maven Install Plugin

C.FileVault Package Maven Plugin

D.Maven Bundle Plugin

A

A

44
Q

A developer needs to implement a functionality that requires creating a Custom Workflow Step.
Which two steps should the developer take to start developing the custom behavior? (Choose two.)

A.Implement a Java class implementing the interface com.adobe.granite.workflow.exec.WorkflowProcess.

B.Implement a Java class with this method “public void process(WorkItem item, WorkflowSession wfsession) throws WorkflowException”.

C.Implement a Java class extending from class com.adobe.granite.workflow.exec.WorkflowProcess.

D.Create a Workflow component node of the Super Resource Type “cq/workflow/components/model/process” under the folder /apps//components.

E.Create a Workflow component node of the Super Resource Type “cq/workflow/components/step” under the folder /etc/workflow/models.

A

A, D

45
Q

In which two ways can a developer keep simple and maintainable CRX Access Control Lists? (Choose two.)

A.Delete the “˜everyone’ group.

B.Use Deny statements sparingly.

C.Assign access rights user by user.

D.Assign access rights to user groups rather than users.

E.Use Deny statements extensively.

A

B, D

46
Q

A developer wants to create a Client Library that will only be included on touch enabled devices.
What action should the developer take to achieve this?

A.Add the line “#base=touch” to the js.txt and css.txt files in the Client Library Folder.

B.Set the channels property on the Client Library Folder to “touch”.

C.Create a resource folder called “touch” under the Client Library Folder.

D.Pass the parameter user-agent=’touch’ when referencing the Client Library.

A

B

47
Q

A developer is working on a project locally and needs to install packages manually. The deployments to the localhost must be automated to speed up development. This functionality must be toggled on and off, depending on the needs of the developer.
Which step should the developer take to achieve this?

A.Configure the maven install plugin by defining the target URL, username, and password as maven properties.

B.Run maven with the deploy phase. Maven will install the package on all local AEM instances running without further configuration.

C.Write a script that does a PUT call to AEM each time maven builds a new package.

D.Add a maven profile and configure the content package maven plugin within this profile.

A

D

48
Q

Which xml tag is used within the vault package definition to add a new path to a content package?

A.content>

B. filter>

C.path>

D.rule>

A

B

49
Q
Refer to the following Client Library node structure.
\+clientLibs
   - jcr:primaryTypes="cq:clientLibraryFolder"
   - categories="[clientLibs.example]"
  \+ js.txt
      - jcr.primaryType="nt:file"
  \+ css.txt
      - jcr.primaryType="nt:file"
  \+ js
      - jcr.primaryType="nt:folder"
     \+ javascript1.js
     \+ javascript2.js

The js.txt looks like -
+ javascript1.js
+ javascript2.js

The JavaScript is NOT present in the Client Library when it is loaded.
What should a developer do to resolve this issue?

A.Change the js folder to a Client Library node and add the property categories=”[clientlibs.example]”.

B.Split the js and css into 2 Client Libraries since they can’t be in the same Client Library.

C.Add #base=js as the first line in the js.txt file.

D.Change the js folder to a Client Library node and embed it on the clientlibs node.

A

C

50
Q

A developer wants to automatically truncate request log files once they exceed 10 MB.
Which OSGi configuration should the developer modify?

A.Apache Sling Logging Configuration

B.Apache Sling Customizable Request Data Logger

C.Adobe Granite Log Analysis Service

D.Apache Sling Logging Writer Configuration

A

D

51
Q

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. sly data-sly-use.clientlib=”/libs/granite/sightly/templates/clientlib.html” data-sly-call=”${clientlib.css @ category=’library.example’}”/>

B. sly data-sly-use.clientlib=”/libs/granite/sightly/templates/clientlib.html” data-sly-call=”${clientlib.css @ categories=’library.example’}”/>

C. sly data-sly-use.clientlib=”/libs/granite/sightly/templates/clientlib.html” data-sly-call=”${clientlib.all @ categories=’library.example.css’}”/>

D. sly data-sly-use.clientlib=”/libs/granite/sightly/templates/clientlib.html” data-sly-call=”${clientlib.all @ type=’css’, categories=’library.example’}”/>

A

B

52
Q

A developer needs to install a content package on AEM environment. However, a content package with the same name is already installed.
What would you be the safest way for the developer to install the content package to make sure only the changes of the new content package get applied?

A.Uninstall the existing content package before installing the new content package.

B.Use the “Force Upload option when uploading the new content package.

C.Upload the content package to the CRX Package Share before installing it.

D.Install the content package using the OSGi web console.

A

B

53
Q

A developer is creating a custom component on the page /latestBlogs.html that needs to list all the titles of the blogs pages under /content/blogs.
How does this component get the list of child pages?

A.Use PageManager.getPage(“/content/blogs”) of the static PageManager class to instantiate a Page object and then iterate through the child pages and print the title for each.

B.Instantiate a node object with session.getNode(/content/blogs) and then iterate through the child nodes and print the title for each.

C.Adapt the resourceResolver to the PageManager service, then use the getPage(/content/blogs) to instantiate a Page object and then iterate through the child pages and print the title for each

D.Use the QueryDebugger to look for all children of /content/blogs and then iterate through the result set and print the title for each.

A

D

54
Q

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.)

A.Use BundleContext.getServiceReference(“¦) and BundleContext.getService(“¦) in application code to look up the required services just before usage.

B.Use a mock framework to be able to create and inject mocks in the test code.

C.Use static methods to avoid boilerplate in application code.

D.Deploy a third party dependency injection container to wire dependencies more efficiently in application code.

E.Use the standard OSGi @Reference annotation to wire the dependencies in application code.

A

B, E

55
Q

A developer creates an editable template with a Layout Container. The developer needs to restrict the Layout Container to just one column layout.
What should the developer do to the editable template to enforce this restriction?

A.Add responsive column control component to the template and set column type to 1.

B.Using Template Editor, set the responsive settings to 1 column for Layout Container Policy.

C.Overlay wcm.foundation.components.page.responsive Client Library and set @max_col to 1.

D.Using Template Editor, lock the Structure Component for the template.

A

B

56
Q

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.Add the dependency to the third party bundle in the pom.xml of the project bundle.

B.Embed the bundle in a content package to have it automatically deployed.

C.Embed the third party bundle in the bundle that depends on it.

D.Declare the dependency correctly using a link to the OSGi Bundle Repository (OBR).

A

B

57
Q

A developer is working with the following HTL expression in a component rendering script:
${‘path/page.infinity.json’ @extension = ‘html’,
removeSelector = [‘foo’],
selectors = [‘foo’, ‘bar’],
prependSuffix = ‘hello’,
suffix = ‘world’}

What is the expected output of this expression?

A.path/page.bar.html/world

B.path/page.foo.bar.html/hello/world

C.path/page.bar.html/hello/world

D.path/page.infinity.json.bar.html/world

A

C

58
Q

A developer running a local AEM instance and working on an AEM project needs to change a large number of files locally in the filesystem. The developer needs to get the changes uploaded to the local AEM instance to verify changes almost immediately in the browser?
What action should the developer take to most efficiency meet these requirements?

A.Install FileVault bundle in the AEM instance and register the local working directory for synchronization.

B.Access CRXDE and upload the files through the interface.

C.Make the changes in CRXDE create a content package, download it, and expand it into the working directory after each change.

D.Build a Content Package using maven and deploy it after each change.

A

A

59
Q

A developer wants to consume AEM Page Data in a Single Page Application. The Single Page Application is coded to understand JSON format. Only page content should be exposed through JSON. All the existing components are based on foundation components.
Which change should the developer make in the existing components to support this requirement?

A.Add JSON as the default extension in Apache Sling Servlet/Split Resolver and Error Handler Configuration.

B.Implement a Sling Model Exporter for the components.

C.Invoke the page URL with the extension .json to get the values to construct the required output.

D.Create a custom sling event handler to handler JSON requests.

A

B

60
Q

A custom AEM application contains a service component that needs to access the JCR repository within the activate method. The activate method uses
ResourceResolverFactory.getServiceResourceResolver(…) without specifying a sub service name.
What should a developer do to make sure the user service mapping for the service component is available?

A.Wait for the service ServiceUserMapper via BundleContext.getServiceReference(…).

B.Create a field of type ServiceUserMapped and annotate it with @Reference using ReferencePolicy.DYNAMIC.

C.Create a field of type ServiceUserMapped and annotate it with @Reference.

D.Create a field of type ServiceUserMapper and annotate it with @Reference using ReferencePolicy.STATIC.

A

C

61
Q

After a recent code deployment, an AEM site is experiencing longer than usual query execution time. The deployment package contained some new Lucene index definitions. A developer needs to identify the long running queries and confirm that the new index definitions are getting applied correctly.
Which action should the developer take to investigate this problem?

A.Go to Tools > Operations >Diagnosis > Download Thread Dumps. Analyze the Thread Dumps to identify long running requests.

B.Go to Tools > Operations >Diagnosis > Query Performance > Slow Queries. Select a Query and Click on Explain.

C.Go to Tools > Operations >Diagnosis > Log Message. Configure DEBUG log level on com.day.cq.search to monitor search queries.

D.Go to Tools > Operations > Diagnosis > Index Manager. Select the new Indexes and run a consistency check.

A

B

62
Q

A developer installs the latest Service pack to a local AEM author instance.
How should the developer install this package on the publish instance?

A.Use upload/install from OSGI console of publish instance.

B.Replicate from package manager of publish instance.

C.Use upload/install from OSGI console of author instance.

D.Replicate from package manager of author instance.

A

D

63
Q

Two AEM publish feed a single Dispatcher.
Which part of the Dispatcher configuration should a developer review to ensure both AEM publish instance are used?

A.virtualhosts

B.farms

C.cache

D.filter

A

B

64
Q

A developer has a component named foobar with the following file: foobar.html

div data-one=”${‘foo’}” data-two=”${2}” data-three=”${true}”>
div data-one=”${‘’}” data-two=”${0}” data-three=”${false}”>

What is the output when the component is rendered?
A.
div data-one=”foo” data-two=2 data-three=””>
div data-two=”0” data-three=””>

B.
div data-one=”foo” data-two=”2” data-three=”true”>
div data-one=”” data-two=”0” data-three=”false”>

C.
div data-one=”foo” data-two=”2” data-three>
div data-two=”0”>

D.
div data-one=”foo” data-two=2 data-three=””>
div data-one=”” data-two=”0” data-three=””>

A

C

65
Q

A developer needs an existing workflow to run only when pages are created under a certain folder?
What should the developer create to achieve this?

A.A Launcher with the field exclude that has the value !jcr:nodetype==cq:Page.

B.A Launcher with the field condition that has the value jcr:content/page.

C.A Launcher with the field path pointing to the folder and nodetype field have the value cq:Page.

D.A Launcher with the field path pointing to the folder and condition field and have the value jcr:content/jcr:primaryType==cq:Page.

A

C

66
Q

A developer creates a template-type for building editable templates.
The resulting editable templates and pages must always contain a specific layout container that can NOT be deleted by the author.
How should the developer meet this requirement?

A.Add the layout container component to the structure section of the template-type.

B.Add the layout container component by including it on the actual page component.

C.Add a content policy to the template-type to disable the removal of the layout container.

D.Add the layout container component to the initial section of the template-type.

A

A

67
Q

An application contains an OSGi configuration that contains a password.
How should a developer prevent this sensitive information from being stored in plain text in JCR?

A.1. Use console at /system/console/configMgr and tick the checkbox “encrypt” before saving a configuration. 2. Use encrypted values work across all instances. 3. When loading the value in the code, call CryptoSupport.unprotect(“¦) before using the value.

B.1. Use console at /system/console/ configMgr and tick the checkbox “encrypt” before saving a configuration. 2. Either create an encrypted value for each AEM instance and use runmodes to apply the different values or make sure relevant instances share the same master key. 3. Sensitive information is automatically decrypted using the CryptoSupport OSGi service before the value is returned.

C.1. Use console at /system/console/crypto to encrypt the value. 2. Either create an encrypted value for each AEM instance and use runmodes to apply the different values or make sure relevant instances share the same master key. 3. When loading the value in the code, call CryptoSupport.unprotect(“¦) before using the value.

D.1. Use console at /system/console/crypto to encrypt the value. 2. Either create an encrypted value for each AEM instance and use runmodes to apply the different values or make sure relevant instances share the same master key. 3. Sensitive information is automatically decrypted using the CryptoSupport OSGi service before the value is returned.

A

C

68
Q

Which environment variable in the AEM start script should a developer modify to enable remote debugging?

A.CQ_JVM_OPTS

B.CQ_HOST

C.CQ_PORT

D.CQ_RUNMODE

A

A

69
Q

AEM is installed in $AEM_HOME.
In which subfolder are the command line startup and shutdown scripts located?

A.$AEM_HOME/crx-quickstart/scripts/

B.$AEM_HOME/

C.$AEM_HOME/crx-quickstart/opt/

D.$AEM_HOME/crx-quickstart/bin/

A

D

70
Q

A customer bundle of an application is in state “Installed” after deploying it with Maven.
What should a developer do to change it to state “Active”?

A.Use the “Update” action for the bundle in the Apache Felix Web Console.

B.Use the “Start” action for the bundle in the Apache Felix Web Console.

C.Reinstall the content package using the package manager.

D.Ensure all OSGi requirements are met and re-deploy using Maven.

A

D

71
Q

How should a developer configure the replication agent to flush the dispatcher cache for a newly activated page?

A.Set the serialization type property of the default agent to dispatcher flush.

B.Create a new replication agent and set transport URI to point to the dispatcher.

C.Create a reserve replication agent on the author instance.

D.Create a dispatcher flush agent in publish instance.

A

D

72
Q

Which log file should a developer use to search for exception stack traces?

A./crx-quickstart/logs/request.log

B./crx-quickstart/logs/error.log

C./crx-quickstart/logs/access.log

D./crx-quickstart/logs/info.log

A

B

73
Q

A developer needs to configure sets of values according to the following parameters:
✑ Varies for different staging environments
✑ Varies for different content paths
✑ Differs between author and publish
Which implementation strategy should the developer use to meet these requirements?

A.A custom cloud configuration

B.One OSGi configuration for the set of values with runmodes

C.A JCR property at the content root node of the site with inheritedPageProperties

D.A context aware configuration with buckets using an OSGi configuration

A

D

74
Q

A developer needs to upgrade existing components (Proxy Components) based on Core Components Version 1(v1) to Core Components Version 2(v2).
How should the developer upgrade to V2 Core Components?

A.Proxy Components will be automatically upgraded to the V2 Core Component on AEM Restart

B.Modify the sling:resourceType property on the proxy component to point to V2 Component.

C.Create a new Proxy Component and set sling:resourceType property to V2 Core Component.

D.Modify the sling:resourceSuperType property on the proxy component to point to V2 Component.

A

D

75
Q

In which maven build phase is the content package assembled?

A.compile

B.package

C.deploy

D.install

A

B

76
Q

A developer needs to change the label “Sites” in the navigation of AEM author to “Websites”.
Which action should the developer take to achieve this?

A.Modify the node /libs/cq/core/content/nav/sites by updating the icr:title property value.

B.Change the code of /libs/granite/ui/components/shell/clientlibs/shell/js/globalnav.js to display the new value.

C.Modify the code of /libs/granite/ui/components/shell/globalnav/overlay/overlay.jsp to display the new value.

D.Create a new node /apps/cq/core/content/nav/sites and update the property icr:title.

A

D

77
Q

An AEM site experiences slower page loads. A developer needs to identify the slow running requests.
How should a developer analyze the requests with long response times?

A.Use proxy.jar with the following command java -jar proxy.jar to debug the webserver and AEM server communication.

B.Download Heapdumps from Tools > Operations > Diagnosis and analyze the Heapdumps using the Memory Analyzer Tool.

C.Use rlog.jar with the following command $ java -jar ../opt/helpers/rlogs.jar -n 10 requests.log to identify long running requests.

D.Embed /libs/foundation/components/timing component in the Page Component and verify the page load time.

A

C