AEM 6.0 Developer Flashcards

Help prepare developers for the AEM 6.0 Developer certification test.

1
Q

Which Maven plugin should you use for installing and configuring bundles?

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

How would you specify a dependency that has a version greater than or equal to 3.8?

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

Which Adobe-provided Maven archetype should you use for an AEM application that has an OSGi bundle and some cq:Components?

A

multimodule-content-package-archetype: Creates a maven project that includes the folder structure for developing a CQ application and installing resources to the server.

Using Archetypes To Generate CQ Projects

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

How do you include a client library in a Sightly template?

A

data-sly-call: Calls a template defined with data-sly-template. The content of the called template (optionally parameterized) replaces the content of the host element of the call.

Sightly Block Statements

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

How would you remove a property from a node?

A

node.setProperty(“myProperty”, null)

Node.setProperty(java.lang.String, javax.jcr.Value)

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

Which property, with respect to templates, is now deprecated?

A

allowedPaths - Path of a page that is allowed to be based on this template.

Properties and Child Nodes of a Template

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

What value should “allowedPaths” have if you wanted to allow pages to be created under /content/mysite/page1/page2?

A

/content/mysite/[^/]+(/.*)? means that this template is allowed in any path under /content/mysite.

Example: Making an Existing Template Available

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

How would you disable the target action for a component?

A

Set cq:disableTargeting={Boolean}true on the cq:editConfig node for the component.

Disabling the Target Command for Components

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

How would you start AEM with remote JVM debugging enabled?

A

Add the following parameters to the start up script:

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=30303,suspend=n

Note:

This configuration allows forking and the debug options specified on the parent JVM are not passed to the forked processes by default.

Source

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

Which of the following quickstart JARs won’t work?

  1. cq5-author-4502.jar
  2. cq5-author-4505.jar
  3. aem-publish.jar
  4. cq5-author_4502.jar
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following quickstart JARs will start in publish mode (select all that apply)?

  1. cq5-author-4503.jar
  2. cq5-quickstart-4503.jar
  3. aem-publish.jar
  4. cq5-publish-p5502.jar
A
  1. aem-publish.jar
  2. cq5-publish-p5502.jar

Filename Detection - Renaming the JAR

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

Assume you have a CQ instance configured in Felix to run in publish mode. If you then started the instance on the command line by passing –r author, in what mode would the instance start?

  1. Neither. The instance would fail to start due to a run mode conflict.
  2. Author because the JVM argument takes precedence.
  3. Publish because the configuration takes precedence.
  4. Publish because publish wins in the case of a conflict.
A
  1. Publish because the configuration takes precedence.

Installation (or fixed) run modes are used at installation time and then fixed for the entire lifetime of the instance, they cannot be changed.

Installation Run Modes

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

How could you configure a bundle if you wanted to have it only run on publish?

A

Using config.publish and a corresponding OSGi Config node.

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

What bundle would you use to minify css and/or Javascript on a production environment?

A

Day CQ HTML Library Manager

OSGi Configuration Settings

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

What bundle would you uninstall on a publish environment so the logs were not publicly accessible?

A

Disable “Adobe CRXDE Support” (com.day.crx.crxde-support) bundle in OSGi.

Security Checklist

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

If you update a property for a particular bundle in Felix, what has to take place before the property change will take effect?

  1. Nothing. Any new invocations of applicable services will use the updated property.
  2. A bundle restart.
  3. An instance restart.
  4. A service restart.
A
  1. Nothing. Any new invocations of applicable services will use the updated property.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

When adding an OSGI configuration in the repository, what do you need to do for it to take effect?

A

Changes are applied as soon as the node is updated and saved by restarting the service (as with changes made in the Web console).

Adding a New Configuration to the Repository

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

If a bundle property is configured with a default value in the declaration, via an OSGiConfig node, and via the Felix console. Which will your bundle use?

  1. The declaration-time default.
  2. The Felix console configuration.
  3. The OSGiConfig node configuration.
  4. The bundle will fail to start due to a conflict.
A
  1. The Felix console configuration.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What two places can you go to view the log in the browser?

A
  • /system/console/slinglog
  • /bin/crxde/logs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

True/False: You should set the logging level on a production publish instance to DEBUG.

A

False.

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

How would you set up a custom log file?

A

Create a new instance of the Factory Configuration Apache Sling Logging Logger Configuration.

  • Specify the Log File.
  • Specify the Logger.
  • Configure the other parameters as required.
22
Q

What’s the exact name of the bundle where you configure a custom Sling log?

23
Q

If you want to create a custom log file with a file size limit and custom rotation, where/how would you configure this?

A

Create a new instance of the Factory Configuration Apache Sling Logging Writer Configuration.

  • Specify the Log File - this must match that specified for the Logger.
  • Configure the other parameters as required.
24
Q

Which log file is used to monitor events on startup?

  1. stdout.log
  2. error.log
  3. access.log
  4. sterr.log
25
Q

If user A is impersonating user B in AEM, what will be shown in the main log for actions performed by user A?

  1. The log statement will simply refer to user A with no mention of user B.
  2. The log statement will simply refer to user B with no mention of user A.
  3. The log statement will mention “user B impersonated by user A”.
  4. The log statement will mention “user A on behalf of user B”.
A
  1. The log statement will simply refer to user B with no mention of user A.

Impersonating Another User

26
Q

If you have four publish instances and one author instance, what kind of replication would you use from author out to publish to ensure no duplication of content?

  • Asynchronous Replication
  • Binaryless Replication
  • Cluster writing with no replication
  • Reverse Replication
A

Binaryless Replication

“Binaryless Replication”, allows content activated (“published”) to the CQ “publish” instance(s) to point to the same Data Store as the one used by the “author” instance(s).

This allows us to avoid duplicating the Data Store among “author” and multiple “publish” instances, thus saving on storage costs and reducing the time taken to activate a digital asset in half.

Source

27
Q

Where are user permissions for a particular piece of content stored in the JCR?

A

As rep:policy nodes as direct children of content node. These are inherited through children unless specified.

Resource-based ACLs

28
Q

You want to override the OOTB parsys to change whether components dropped in are prepended or appended. Choose two ways you could go about this:

  1. Copy /libs/foundation/components/parsys and all of its contents and paste them into /apps/foundation/components/parsys and update what’s needed.
  2. Copy just the files you need to update from /libs/foundation/components/parsys to /apps/foundation/components/parsys and update what’s needed.
  3. Create a new component wherever you want under /apps and set the sling:resourceSuperType to libs/foundation/components/parsys. Add/update files as needed.
A
  1. Copy /libs/foundation/components/parsys and all of its contents and paste them into /apps/foundation/components/parsys and update what’s needed.
  2. Copy just the files you need to update from /libs/foundation/components/parsys to /apps/foundation/components/parsys and update what’s needed.
29
Q

What is the proper way to retrieve content from CRX to the filesystem?

  1. vlt export
  2. vlt import
  3. Create a package in CRX Package Manager, download it, and unzip it at the desired location.
A

a. vlt export

VLT Commands

30
Q

What does vlt resolved do?

A

Removes conflicted state on working copy files or directories.

This command does not semantically resolve conflicts or remove conflict markers; it merely removes the conflict-related artifact files and allows PATH to be committed again.

Source

31
Q

What is the correct way to declare an OSGI service?

A

@Component
@Service
class MyServiceImpl implements MyService { … }

Felix SCR Annotations

32
Q

What is the default servlet in the publish environment that receives the replication request (from author) and publishes the received content?

A

/bin/receive

33
Q

What is the sling:resourceType for a replication agent?

A

cq/replication/components/agent

It also utilizes the /libs/cq/replication/templates/agent template.

34
Q

What must you also change, if you change the location of the crx-quickstart folder after installation of AEM on an application server?

A

sling.home: configure the sling.home parameter in the WEB-INF/web.xml file of the AEM war file before deployment.

Application Server Install

35
Q

When registering a servlet as an OSGi service, which of the following service reference properties takes precedence?

  1. sling.servlet.paths
  2. sling.servlet.resourceTypes
  3. sling.servlet.selectors
  4. sling.servlet.extensions
  5. sling.servlet.methods
A
  1. sling.servlet.paths

Servlet Registration

36
Q

How would you retrieve the path of the template on your page component in a publish environment?

A

properties.get(“cq:template”, “”)

37
Q

In CRXDE under /apps you create a nt:folder and a nt:unstructured node and hit “save”. What happens?

A

Nothing. The /apps folder (a nt:folder) cannot have as a child an nt:unstructured node, so the pending changes are rejected.

38
Q

Which Maven plugin would you use to integrate package management tasks into your Maven project?

A

content-package-maven-plugin

Content Package Maven Plugin

39
Q

Which is a valid OOTB AEM installation run mode?

  1. Production
  2. Activate
  3. LoadSampleContent
  4. NoSampleContent
A
  1. NoSampleContent

Run Modes

40
Q

Which property is used to find OSGi configurations in the repository?

  1. Persistent Identity (PID)
  2. Repository Resource
  3. Component.id
  4. Component.name
A
  1. Persistent Identity (PID)

Locating your changes to a Configuration

41
Q

How would you include a JSP via Sightly?

A

data-sly-include: Replaces the content of the host element with the markup generated by the indicated HTML template file (Sightly, JSP, ESP etc.) when it is processed by its corresponding template engine.

Sightly Include

42
Q

Name three ways to prevent a cached page from being returned from the dispatcher.

A

The Dispatcher always requests the document directly from the AEM instance in the following cases:

  • If the HTTP method is not GET. Other common methods are POST for form data and HEAD for the HTTP header.
  • If the request URI contains a question mark “?”. This usually indicates a dynamic page, such as a search result, which does not need to be cached.
  • The file extension is missing. The web server needs the extension to determine the document type (the MIME-type).
  • The authentication header is set (this can be configured).

Dispatcher

43
Q

If you wanted to clear the cache in IIS, what directory would you delete?

A

C:\inetpub\wwwroot

44
Q

Which SCR Annotations are required for a declarative service for an OSGi component?

A

The @Component annotation is the only required annotation. If this annotation is not declared for a Java class, the class is not declared as a component.

Felix SCR Annotations

45
Q

You have /content/mycompany, and your Dispatcher Flush agent is not configured to clear the cache (doh!) in your IIS environment (double-doh!).

Which folder would you delete if you wanted the new page at /content/mycompany/contact-us to show?

  1. Subfolders of C:\inet\wwwroot
  2. The folder C:\inet\wwwroot\content\mycompany
A
  1. c:\inet\wwwroot\content\mycompany
46
Q

In a typical AEM installation, where is the Dispatcher Flush agent configured?

A

The Dispatcher Flush agent is configured (OOTB) on the author instance.

Invalidating Cached Pages From AEM

47
Q

What is the correct editorType when editing HTML using the in-place editing functionality on the cq:inplaceEditing node?

A

The correct editorType value is text.

Components - cq:inplaceEditing

48
Q

When changing the location of the crx-quickstart folder on an application server, when do you change the sling.home parameter in the WEB-INF/web.xml file?

A

Configure the sling.home parameter in the WEB-INF/web.xml file of the AEM war file before deployment.

Application Server Install

49
Q

What is the difference between overlaying and extending, in regards to components?

A

Overlaying a component is a method of making modifications to a default component and affecting all instances which use the default.

Extending a component is a method of making modifications for a specific use without affecting all instances which use the default. The extended component is uniquely named in the /apps folder and references the default component in the /libs folder, thus a component’s default design and behavior is are not modified.

Client-side Customizations

50
Q

What is the resolution order for configuration changes made while the system is running (which trigger a reload with the modified configuration)?

A

Resolution Order at Runtime

  1. Modifying a configuration in the Web console (Felix) will take immediate effect as it takes precedence at runtime.
  2. Modifying a configuration in /apps will take immediate effect.
  3. Modifying a configuration in /libs will take immediate effect, unless it is masked by a configuration in /apps.
51
Q

An online shopping company has one author instance and three publish instances (pub 1, pub 2 and pub 3), as well as a dispatcher configured.

A customer leaves a comment for one of the products on pub 1.

Which of the following configurations are needed to ensure that the comment makes it out to all three publish environments?

  1. Set up static agent on author instance.
  2. Set up replication agent on author to pub 1, pub 2 and pub 3.
  3. Set up flush agent on author.
  4. Set up reverse replication agent on author and point to pub 1, pub 2 and pub 3.
A
  1. Set up replication agent on author to pub 1, pub 2 and pub 3.
  2. Set up flush agent on author.
  3. Set up reverse replication agent on author and point to pub 1, pub 2 and pub 3.