May 29, 2020
Estimated Post Reading Time ~

Sample AEM Developer Certification Exam FAQ's - Part3

Question 171
An author and publish instance has a shared data store with a very large number of assets. Which type of replication is recommended to avoid duplication of data?
A. Asynchronous replication.
B. Binaryless replication.
C. ClusterDataStore with no replication agents.
D. Replication with no versioning.

Question 172
In a typical Maven project, you will have a content module that contains a file src/main/content/META-INF/vault/filter.xml which defines the filters for the AEM package built by Maven. Your project has this structure:
Select the correct filter entry that would be included in the src/main/content/META-INF/vault/filter.xml file:
A. <filter root=7apps/myproject/templates7>
B. <filterroot=7libs/foundation7> -
C. <filterroot=7apps7>
D. <filter root=7etc/designs/myproject7>

Question 173
Which two URLs will show the server logs? (Choose two.)
A. http://{server}/system/console/status-slinglogs
B. http://{server}/system/console/slinglog
C. http://{server}/bin/crxde/logs
D. http://{server}/system/console/logs

Question 174
The default installation location for AEM 6.0 in an Application Server is ${user.dfr}/crx-quickstart. Which method is used to change this location?
A. Configure the sling.home parameter in the WEB-INF/web.xml file of the AEM WAR file after deployment.
B. Configure the sling.home parameter in the WEB-INF/web.xml file of the AEM WAR file before deployment.
C. Configure the sling.run.modes parameter in the WEB-INF/web.xml file of the AEM WAR file after deployment,
D. Configure the sling.run.modes parameter in the WEB-INF/web.xml file of the AEM WAR file before deployment.

Question 175
Which three statements are true when an AEM author instance is started in debug mode? (Choose three.)
A. When AEM starts in debug mode, it does not force JVM to fork a separate process.
B. AEM starts with -Xdebug option (e.g; java -Xdebug -Xnoagent -Djava.compiler=NONE - Xmnjdwp:transport=dt_socket,server=y,suspend=n/address=30303 jaraem6~autbor-p4502).
C. AEM starts with an option -debug (e.g; Java -jaraem6-author-p4502 -debug 30303) from command line.
D. When AEM starts in debug mode, it forces JVM to fork a process.

Question 176
How can a JSP be included in a sightly template?
A. <cq:include script=" Include.jsp7>
B. <div data-sly-include="include.jsp"></div>
C. <div data-sly-use="include.jsp"></div>
D. <%@ include file="1nclude.jsp" %>

Question 177
You want to restrict the size of a custom log file and enable log file rotation. Which Apache Sling configuration has to be changed in the AEM Web Console?
A. Apache Sling Composite Health Check
B. Apache Sling Job Manager
C. Apache Sling Logging Writer Configuration
D. Apache Sling Logging Logger Configuration

Question 178
You are creating a new OSGi configuration in the repositoryWhen are the configuration changes applied?
A. By stopping and starting the bundle that refer to the service,
B. Changes are applied as soon as the node is updated by restarting the service.
C. Immediately.
D. After restarting the CQ instance.

Question 179
Which log file in <cq-installation-dir>/crx-quickstrat/logs should you look at to see logging messages indicating events during startup?
A. Audit.log
B. Error.log
C. Stdout.log
D. Stderr.log

Question 180
Where are ACL node permissions for a node stored in the JCR?
A. They are stored as ACL permission in the groups under /home/groups
B. They are stored as ACL permissions in the user node under/home/users
C. They are stored as a rep:policy node under the same node
D. They are stored inside the template node under/etc/designs
Note:
Users are stored in /home, while ACLs configured are set in C. They are stored as a rep:policy node under the same node


Question 181
You create an nt:unstructured node inside the apps in CRXDE Lite and then you create a folder inside the apps and click save. What is the expected behavior?
A. The folder and nt:unstructured node, none of them will get saved.
B. The folder will get saved after refreshing the apps.
C. The folder and nt:unstructured node, both will get saved.
D. The folder will get saved.

Question 182
Which three statements about configuring a development environment for a new AEM project called "customer bank", that contains both custom OSGi services and AEM components is true? (Choose three).
A. http://<aemhost>:<aemport>/system/console/depfinder ls used to find the dependencies
B. The repository for AEM dependency jar files can be either http://repo.adobe.com/nexus/content/groups/public/ or the local Apache Archive with all required dependencies
C. Create a Maven project with archetype multimodule-content-package-archetype from the repository http://repo.adobe.com/nexus/content/groups/public/
D. Create a Maven project with archetype simple-content-package-archetype from repository http://repo.adobe.com/nexu5/content/gmups/public/

Question 183
What is the difference between extending a component and component overlay?
A. There is NO difference.
B. The overlay is to override default component functionality. Extending is to extend the component functionality through the use of Resource Hierarchy and supertypes.
C. The overlay is to extend the component functionality through the use of Resource Hierarchy and supertypesOverride / Extending is to override default component functionality.
D. Extending component means extending the behavior of the foundation component, Overlay component is overriding the behavior of the custom component.

Question 184
Which has the highest preference during Sling Servlet registration?
A. sling.servlet.paths
B. sling.servlet.resourceTypes
C. sllng.servlet.extension
D. sling.servlet.selectors

Question 185
Which three AEM jar names will start AEM in author mode? (Choose three.)
A. quickstart-4502.jar
B. cq5-author-p4502.jar
C. aem-publish.jar
D. cq5-author-4502.jar

Question 186
While modifying an OSGi bundle configuration from the Felix Web Console, when are configuration changes applied?
A. After restarting the CQ instance,
B. After restarting the bundle.
C. After restarting the service.
D. Immediately as it takes precedence at runtime.

Question 187
Which statement about client libraries is true?
A. A client library node type has the jcr:primaryType value nt:folder
B. The client library for a project called myappshould be defined under /etc/clientlibs/myapp
C. To include only CSS files In the header.jsp from the client lib called "myproject.all" use <cqincludeClientLib categories="myproject all" />
D. Use the Day CQ HTML Library Manager service in the Felix console to compress and minify the generated CSS for better performance on production systems.

Question 188
How do you specify the dependency of Junit with any version greater than or equal to 3.8?
A. Exhibit A
B. Exhibit B
C. Exhibit C
D. Exhibit D

Question 189
Which statement regarding an AEM instance started with author run-mode is correct?
A. Author run-mode CANNOT be used to preview a website,
B. The side-kick does NOT appear in the author mode,
C. The run-mode can be changed to publish after installation,
D. The run-mode CANNOT be changed to publish after installation.

Question 190
What is the correct way to use clientlibs with Sightly?
A. <meta data-sly-template="${clientLib.all @ categories=,your.cllentlib,}" data-sly-unwrap></meta>
B. <meta data-sly-call="${clientLib.all @ categories-,your.clientlib,}M data-sly-unwrap></meta>
C. <meta data-sly-use-"${clientLib.all @ categorfes^'your.clientlib'}" data-sly-unwrap></meta>
D. <meta data-sly-include=n${clientLib.all @ categories='your.cllentlib'}" data-sly-unwrap></meta>


Question 191
You are using IIS as the Web server with the dispatcher and your website's root folder path is /content/mycompany. The page /content/mycompany/about us is edited and activated to the AEM publish instance. Assuming the dispatcher flush agent is NOT available and IIS is installed on C:\inetpub of the Windows server, what needs to done for the new version of the page to be seen from the IIS Web server?
A. Delete the subfolders of the directory "C:\inetpub\wwwroot" to dear the content cache.
B. Nothing.
C. Delete the directory "C:\inetpub\tempn to clear the content cache.
D. Delete the following directory "C:\inetpub\wwwroot\content\mycompany" to clear the content cache.

Question 192
You have a component "A" that has a dialog and four JSP scripts: main.jsp, script1.jsp, script2.jsp and script3.jsp. The script main.jsp includes the other three scripts. Now you implement component "B", which is very similar to component "A", but with a different script2.jsp script. Component B declares A as its resourceSuperType. What is the best way to implement script2.jsp for Component "B"?
A. Copy all the dialog nodes from "A" to the component folder "B" and write script2.jsp
B. Write script2.jsp and copy main.jsp, which includes script2.jsp, from component "A" to "B".
C. Since the dialog will be inherited, copy only all the jsp files from component "A" to "B" and write a new script2.jsp.
D. Only write new script2.jsp.

Question 193
Which tab in the Apache Felix Web Console displays the list of all the users that are logged in to the repository?
A. Authenticator tab.
B. CRX Login Tokens tab.
C. Recent Request tab.
D. System Information tab.

Question 194
Which statement correctly describes the OSGi installer service?
A. It is a provider that searches for nodes of type sling:osgiConfig.
B. It is a service that scans the CRX repository for artifacts and provides them to the JCR Installer.
C. It is a central service for handling installs, updates, and uninstall of artifacts.
D. It is a service searching the CRX repository for folders named install.

Question 195
You want to request a JSON representation of the content. What do you have to do with the request?
A. Add the query parameter ?json=true.
B. Change the extension to .json.
C. Add a selector json.
D. Write custom code.

Question 196
How can you configure a CQ component to allow an Author to edit content without opening a dialog?
A. Create and configure the /cq:editConfig/cq:inplaceEditing node under the component node.
B. Create and configure the /cq:editConfig/cq:inplaceEditing node under the component's design dialog node.
C. Create and configure the /cq:editConfig/cq:dropTargets node under the component node.
D. Create and configure the /cq:editConfig/cq:inplaceEditing node under the component's default script node.

Question 197
Which is a difference between an OSGI bundle and a Java package?
A. None. You can install and activate any java package in an OSGI container
B. A jar file cannot be inside an OSGI Bundle
C. The bundle contains extra metadata defined in a MANIFEST.MF file
D. The bundle package structure is completely different than the one of a .jar file

Question 198
Which OSGi configuration settings take over precedence on start-up?
A. Any .config files from &lt;cq-installation-dir>/crx-quickstart/launchpad/config/* on the local file system.
B. Repository nodes with type sling:OsgiConfig under /libs/*/install.
C. Repository nodes with type sling:OsgiConfig under /apps/*/config.
D. Repository nodes with type sling:OsgiConfig under /libs/*/config.

Question 199
You want to prompt a workflow user for information during the processing of a workflow step. Where is the content that the workflow user-entered stored?
A. As part of the page.
B. As part of the workflow model.
C. As part of the workflow instance.
D. As part of the design.

Question 200
You have an active bundle that is configured via CRX repository. What do you have to do after you have saved changes to the configuration to apply them?
A. Go to the Felix Web OSGi Console, stop and then start the bundle.
B. Restart the CQ instance.
C. Go to the Felix Web OSGi Console and re-activate the bundle.
D. Nothing. Changes are automatically applied.


Question 201
You are creating a component to render a modified image. What is the proper way to build the URL of the image in order to enable caching of the response?
A. /&lt;pathToStoredComponent>.html?run=imageScript&value=parameter1 .
B. /&lt;pathToStoredComponent>.parameter1.imageScript.jpg .
C./&lt;pathToStoredComponent>.imageScript.html?render=jpg&value=parameter1.
D. /&lt;pathToStoredComponent>.imageScript.jpg?value=parameter1.

Question 202
How do you get the current rendering mode within a CQ component script?
A. slingRequest.getWCMMode();
B. WCMMode.fromRequest(request);
C. JCRUtil.fromRequest(request);
D. componentContext.getWCMMode();

Question 203
You have renamed the CQ quickstart file to cq5-author-4502.jar. What is the correct way to install CQ 5.4 as a Windows Service?
A. In Windows open Services > Administrative Tools and then upload cq5-author-4502.jar to the control panel.
B. Use the command line and start CQ with java -Xmx512M -jar cq5-author-4502.jar - service.
C. Unpack cq5-author-4502.jar, navigate to crx-quickstart/opt/helpers and start-service.bat.
D. Open the Apache Felix Web OSGi console, navigate to Services and upload cq5-author- 4502.jar.

Question 204
Given the configuration in the Apache Web server httpd.conf:
&lt;Directory / >
&lt;IfModule disp_apache2.c>
SetHandler dispatcher-handler
&lt;/IfModule>
Options FollowSymLinks AllowOverride None
&lt;/Directory>
What is the purpose of the SetHandler option?
A. Enable the CQ Dispatcher only for requests to the / page.
B. URL rewrite configuration directory for the CQ Dispatcher.
C. Enable the CQ Dispatcher for all requests to the server.
D. Define the name of the CQ Dispatcher configuration file.

Question 205
You need to restore a version of a node. How do you get the version manager object?
A. com.day.cq.commons.jcr.JcrUtil.getVersionManager();
B. jcrSession.getWorkspace().getVersionManager();
C. currentPage.getVersionManager();
D. slingRequest.getParameter(“versionManager”);

Question 206
You have created a bundle with CRXDE. What does the .bnd file contain?
A. The Activator class to notify start and stop events
B. Extra metadata about the bundle used by the CRXDE build process.
C. The list of all classes inside the bundle
D. The compilation and deployment steps of the bundle


Question 207
What is not available in global.jsp?
A. currentPage
B. currentNode
C. currentDesign
D. currentResource

Question 208
Which OSGi configuration settings take over precedence on start-up?
Repository nodes with type sling:OsgiConfig under /apps/*/config configuration settings take over precedence on start-up.

Question 209

You want to view the request information sent to the server. Which browser-based tool should you use?
Apache Felix Web console


Question 210
What are the life cycle states of the bundle?

The bundle life cycle states are as follows.
  • INSTALLED: The bundle has been successfully installed. The framework knows enough about this bundle to attempt to load it.
  • RESOLVED: All resources needed for this bundle have been loaded successfully and the bundle is ready to be started. This is also the state the bundle would be in, once successfully stopped.
  • STARTING: The bundle is being started, but has not finished starting.
  • ACTIVE: The bundle has been successfully activated and is running, ready to be used.
  • STOPPING: The bundle is being stopped, but has not finished stopping.
  • UNINSTALLED: The bundle has been uninstalled. Once uninstalled, nothing can be done with the module. 

Question 211
factory configuration node have?
Sol: Append "-<"identifier"> to the name, where the identifier can be any unique name.

Question 212

What is the sling model?
A Sling Model is implemented as an OSGi bundle. A Java class located in the OSGi bundle is annotated with @Model and the adaptable class (for example, @Model(adaptables = Resource.class). The data members (Fields) use @Inject annotations. These data members map to node properties.

Example of sling model :

package org.abhi.poc.sling.models;
  import javax.inject.Inject;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.models.annotations.Model;
 @Model(adaptables = Resource.class)
   public class UserInfo {
   @Inject
   private String firstName;
  @Inject
    private String lastName;
  @Inject
  private String technology;
  public String getFirstName() {
    return firstName;
  }
public String getLastName() {
return lastName;
}
public String getTechnology() {
return technology;
}
}

Question 213

What are the sling APIs you have used?
These are the API’s and classes frequently used in AEM
ValueMap - The ValueMap is an easy way to access the properties of a resource.
ResourceResolver - The ResourceResolver defines the service API which may be used to resolve Resource objects.
ResourceProvider - API for providers of resources.
Resource - Resources are pieces of content on which Sling acts The Resource is also an Adaptable to get adapters to other types.
ResourceWrapper - The ResourceWrapper is a wrapper for any Resource delegating all method calls to the wrapped resource by default.
ResourceUtil - The ResourceUtil class provides helper methods dealing with resources.

Question 214

You have created a bundle with CRXDE. What does the .bnd file contain?
The .bnd file contains extra metadata about the bundle used by the CRXDE build process.

Question 215

You want to install bundles through CRX only in the author's instance. Which folder name can you use for that purpose?
All folders named install.author.

Question 216

You want to request a JSON representation of the content. What do you have to do with the request?
Change the extension to .json.

Question 217

What is Dialog, Design Dialog, and cq:dialog?
dialog
design-dialog
A dialog will change the content at the page level.
Design dialog will change the content at the template level.
authored in edit mode.
authored in design mode.
node name should be dialog.
node name should be design_dialog.
stored under pages jcr:content node.
stored under design page located under /etc/design/default.
we can get value from properties object.
we can get design dialog value from currentStyle object.
jcr:primaryType is cq:Dialog.
jcr:primaryType is cq:Dialog.

Question 218

Explain the overlaying concept in AEM.
Overlaying - The intention of overlaying a default component is to alter the appearance or behavior of a component globally, for all relative references to the component. It relies on the nature of sling to resolve to the /apps folder before searching in the /libs folder. Thus, the path to the component is identical to the path to the default component, except it is in the /apps folder and not the /libs folder.

Creating a custom component manually by creating all necessary nodes and setting the value of “sling:superResourceType” property as “/libs/foundation/components/image”. By doing this you inherit all the features of the image component, even after the upgrade you still inherit the features of the image component.


Question 219

What is the use of EditConfig node in creating a component?
The edit behavior of a component is configured by adding a cq:editConfig node of type cq:EditConfig below the component node (of type cq:Component) and by adding specific properties and child nodes.

Question 220

Difference between sling:resourceSuperType and sling:resourceType.?
sling:resourceSuperType: It is used to achieve inheritance in cq. When set, it inherits the specified component to this component.
sling:resourceType: It is a path, which locates the script to be used for rendering the content. Path used can be absolute or relative

Question 221

What is listeners node?
We can have listeners node under dialog/widget in the AEM component. Listeners are nt:unstructured type node. We can add event(like loadcontent, focus, etc) as property into listeners node. Example

Listeners will trigger loadcontent event and show "Hello World" in the popup.

Question 222

How to include the component into a page?
In Sightly
< div data-sly-resource="${@path='mycomponent', resourceType='foundation/components/mycomponent'}">
In JSP
< cq:include path="mycomponent" resourceType="foundation/components/mycomponent" />

Question 223

What will happen if I add another component path into sling:resourceType property of a component?
Suppose We have component A and component B. In component A, added sling:resourceType property and as value component B path. when you include the component A into the page, AEM will render component A.
But when you drag and drop component A into parsys of the page, AEM will render component B

Question 224

What is Scaffolding?
With scaffolding, we can create a form (a scaffold) with fields that reflect the structure we want for our pages and then use this form to easily create pages based on this structure.
Unwrap attribute - Remove the outer elements (i.e. HTML Tags) leaving just the output of the Expression)

Question 225

Difference between SlingSafeMethodsServlet and SlingAllMethodsServlet.?
SlingSafeMethodsServlet - Helper base class for read-only Servlets used in Sling. This base class is actually just a better implementation of the Servlet API HttpServlet class which accounts for extensibility. So, extensions of this class have great control over what methods to overwrite. It supports GET, HEAD, OPTIONS, etc methods.
SlingAllMethodsServlet - Helper base class for data modifying Servlets used in Sling. This class extends the SlingSafeMethodsServlet by support for the POST, PUT and DELETE methods.

Question 226

How to create a service class?
We can define a class as a service by adding the following scr annotations:
@Component – defines the class as a component
@Service - defines the service interface that is provided by the component

Example

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
//This is a component so it can provide or consume services
  @Component
 @Service
  public class MyserviceImpl implements MyService {
    }

Explain component, service, property, and reference annotations in OSGI.

@component - The @Component annotates an implementation class and is used to declare it as a component type. It is the only required annotation. If this annotation is not declared for a Java class, the class is not declared as a component.
@service - The @Service annotation defines whether and which service interfaces are provided by the component. This is a class annotation.
@reference - The @Reference annotation defines references to other services made available to the component by the Service Component Runtime.
@property - The @Property annotation defines properties that are made available to the component through the ComponentContext.getProperties() method. These tags are not strictly required but may be used by components to the defined initial configuration. Additionally, properties may be set here to identify the component if it is registered as a service, for example, the service.description and service.vendor properties.

Question 227

When you are saving or updating a configuration in the Configurations tab in the Apache Felix Web OSGi Console, where are these configuration settings saved?
It will be saved under /crx-quickstart/launchpad/config/.

Question 228

What is categories, dependencies, embed, and allowProxy properties in AEM?
categories – This is the identifier into which categories a clientlib belongs. A clientlib can have one or more categories.
dependencies - This defines the other categories that the current clientlib depends upon. The dependencies will be included on the page along with the dependent clientlib.
This property is transitive – if Clientlib A depends on Clientlib B which depends on Clientlib C, then all clientlibs will be included on the page.
embed - This defines the categories which will be combined to the current clientlib. AEM will merge all clientlibs into the current clientlib. This is usually used for minimizing requests and for accessing clientlibs that are not supposed to be exposed to the public.
Take note that the embed property is NOT transitive – If Clientlib A embeds Clientlib B which embeds Clientlib C, then only Clientlib A and B will be included on the page. Clientlib A and B will be combined into one CSS and JS files as well. In order to include Clientlib C, it must be added to the embed property of Clientlib A as well.
allowProxy - In order for the client libraries under /apps to be accessible, a proxy servlet is used. The ACLs are still enforced on the client library folder, but the servlet allows for the content to be read via /etc.clientlibs/ if the allowProxy property is set to true.

Question 229

How to include Client Libraries into the page?
In JSP
<cq:includeClientLib categories="yourcategoies"/>
In Sightly
The best example is from the new foundation page component, this is located at
/libs/wcm/foundation/components/page/head.html.
There, you see the following thing:
data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html"
This declares a “clientlib” object, which is implemented as a template.
After that, you see statements like following one: data-sly-call="${clientlib.all @ categories='cq.jquery'}"
This will output <script> and a <style> includes to all CSS and JS contained in the parameter “categories”.

You can also call “clientlib.css” and “clientlib.js” if you only want to output the CSS or JS:

data-sly-call="${clientlib.js @ categories='clientlib1,clientlib2'}"
data-sly-call="${clientlib.css @ categories='clientlib1,clientlib2'}"
Notice that the “categories” option can be a comma-separated string, or a list of category names.

Question 230

Where are the generated client library files stored/cached in CQ?
They are in /var/clientlibs

Question 231

Is there a console where I can see all client libraries and their dependencies?
Yes, look at this page http://server/libs/cq/ui/content/dumplibs.html

Question 232

How I can debug client library files in the browser?
Yes, ?debugClientLibs=true writes out single files
                   or
Yes, ?debugClientLibs=true and CTRL+SHIFT+U gives you timing info

Question 233

Is there a console available to invalidate and rebuild the ClientLibs?
Yes, via url: /libs/granite/ui/content/dumplibs.rebuild.html, we can invalidate or rebuild the clientlibs.

Question 234

How to Minify, debug, and restrict Client Libraries creation under libs?
Go to <host>:<port>/system/console/configMgr
Click on Adobe Granite HTML Library Manager below pop up will show up.
Mountain View
Minify - AEM handle minify automatically in non-development environments by checking the “Minify” checkbox.
debug - Developers, check the “debug” option on your local instance. This will prevent the CQ clientlib files from being combined into one file and makes troubleshooting javascript and css issues significantly easier.
Gzip - gzip is a file format and a software application used for file compression and decompression. To deliver a better performance you can enable the “Gzip” option for the “Adobe Granite HTML Library Manager”.
restrict - List of paths that you are allowed to create CQ client libraries under. (htmllibmanager.path.list). In this way we can restrict clientlib creation.

Question 235

You want to create a CQ HTML client library. What is the file js.txt used for?
It will contain the paths to all the JavaScript files that will be included in the client library.

Question 236

What is the best practice with regard to performance and caching?
Via mod_expires / mod_deflate and the use of cache-busting you can cache the css/js files on the browser to increase the overall performance of your pages. All of this will happen in combination with the dispatcher.

Question 237

What is the use of channels property in clientlib?
It is used to add some additional functionality for different channels. For example: if you want to perform some JS functionality only for ie6, not for other browsers, or you want to add some CSS or JS for only touch UI. here you can use channels property.

Question 238

What is the workflow?
The Workflow console is the centralized location for workflow management in AEM. It can be accessed via the Workflows link on the AEM Welcome page (Classic UI), and the Tools section of the touch-optimized UI.
Within the Workflow console, there are several tabs:
Models - Lists the workflow models currently available. Here you can create, edit, or delete workflow models.
Instances - Shows you details of workflow instances that are currently active. These instances are also version dependent.
Archive - Enables you to access details of workflow instances which have terminated, for whatever reason.
Launcher - Allows you to define a workflow to be launched if a specific node has been updated.
Failures - Enables you to monitor and manage failed workflow instances.
Where I can see the workflow model in crxde?
Under /etc/workflow/models.

Question 239

We have two built-in workflow groups.
workflow-editors - Group that is allowed to create and modify workflow models.
workflow-users - A user participating in a workflow must be a member of group workflow-users. This gives him or her full access to: /etc/workflow/instances so that he or she can update the workflow instance.

Question 240

Procedure to trigger a workflow programmatically.
Create a workflow session
WorkflowSession wfSession = workflowService.getWorkflowSession(session);
Get the workflow model
WorkflowModel wfModel = wfSession.getModel(model); # your workfllow model name
Get the workflow data.
WorkflowData wfData = wfSession.newWorkflowData("JCR_PATH", path);
Run the Workflow.
wfSession.startWorkflow(wfModel, wfData);

Question 241

You want to define a Java-based CQ workflow process step. Which interface must your class implement?
The com.day.cq.workflow.exec.WorkflowProcess interface
com.adobe.granite.workflow.exec.WorkflowProcess

Question 242

You create a custom workflow process using the CQ API. Which method or methods needs to be overridden when your class implements the WorkflowProcess Interface?
We need to override only execute method. It returns void

Question 243

You want to define a Java-based CQ workflow participant step. Which interface must your class implement?
The com.day.cq.workflow.exec.ParticipantStepChooser interface
com.adobe.granite.workflow.exec.ParticipantStepChooser

Question 244

You create a custom workflow participant using the CQ API. Which method or methods needs to be overridden when your class implements the ParticipantStepChooser Interface?
We need to override only the getParticipant method. It returns String.

Question 245

You want to prompt a workflow user for information during the processing of a workflow step. Where is the content that the workflow user-entered stored?
The content that the workflow user enters will be stored as part of the page.

Question 246

You want to define an Event Handler. Which interface must your class implement?
We need to implement org.osgi.service.event.EventHandler interface

Question 247

You create an event handler. Which method or methods needs to be implemented when your class implements the EventHandler Interface?
We need to override the handleEvent(Event) method. It returns void

Question 248

You want to define an EventListener. Which interface must your class implement?
javax.jcr.observation.EventListener interface

Question 249

You create an Event Listener. Which method or methods needs to be implemented when your class implements the EventListener Interface?
We need to override the onEvent(EventIterator ) method. It returns void.


Event handler
Event listener
It is at the Sling level with event handlers and jobs
It is at the JCR level with observation.
org.osgi.service.event.EventHandler interface
javax.jcr.observation.EventListener interface
override handleEvent(Event) method.
override onEvent(EventIterator ) method

Question 250

Which service property does an Event Subscriber need to subscribe to an Event Handler in the OSGi Event Admin service?
Event subscribers need to subscribe to event.topic property to an Event Handler in the OSGi Event Admin service.

Question 251

How to exclude node types and properties from synchronizations?
We can exclude node types and properties from synchronizations. These nodes and properties can be defined by node type and/or explicit name and are configured in the System Console (http:///system/console/configMgr) in the following sections:
CQ MSM Content Copy Action
CQ MSM Content Delete Action
CQ MSM Content Update Action

EXAMPLE: CQ MSM Content Copy Action


Excluded Nodetypes - The list of regex matching node types to be excluded.
Excluded Paragraph Items - The list of regex matching paragraph items to be excluded
Excluded Page Properties - The list of regex matching page properties to be excluded

Question 252

Multi-Site Manager (MSM) allows us to create a copy of the existing site and automatically update the copy when changes are done to the source site. Multi-Site Manager (MSM) enables us to easily manage multiple web sites that share common content. We should use MSM when our website is 
Multinational Site - Sites are in multiple countries
Multilingual Site - Sites are in multiple languages.
Multinational Multilingual Site - Sites are in multiple countries and in multiple languages

Question 253

How to change language names and default countries?
Procedure to modify the languages
1. Open CRXDE Lite (http://host:port/crx/de/index.jsp)
2. Select the /apps folder and click Create > Create Folder. Name the folder wcm.
3. Repeat the previous step to create the /apps/wcm/core folder tree. Create a node of type sling:Folder in core called resources.
4. Right-click the /libs/wcm/core/resources/languages node and click Copy. Right-click the /apps/wcm/core/resources folder and click Paste.




By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.