Full Transcript

Questions ========= Question 1 ---------- Which attribute must be present in all filter rules in AEM dispatcher configuration? A. /type B. /selectors C.  /url D.  /glob [[Answer1]](#answer-1) Question 2 ---------- A developer has to create a Logger and Writer pair for the company\'s app...

Questions ========= Question 1 ---------- Which attribute must be present in all filter rules in AEM dispatcher configuration? A. /type B. /selectors C.  /url D.  /glob [[Answer1]](#answer-1) Question 2 ---------- A developer has to create a Logger and Writer pair for the company\'s application logging. Which OSGi configurations should the developer use? A. Apache Sling Logging Logger Configuration and Apache Sling Logging Configuration B. Apache Sling Request Logger and Apache Sling Logging Writer Configuration C. Apache Sling Logging Logger Configuration and Apache Sling Logging Writer Configuration [[Answer 2]](#answer-2) Question 3 ---------- Which property under /cache on dispatcher.any file identifies the directory where cached files are stored? A. /invalidate B. /statfile C. /docroot D. /cacheroot [[Answer 3]](#answer-3) Question 4 ---------- Which environment-specific configuration is used in AEM as a Cloud Service to store private API keys? A. \$\[env:ENV\_VAR\_NAME\] B. \$\[env:SECRET\_VAR\_NAME\] C. \$\[secret:SECRET\_VAR\_NAME\] D. \$\[secret:ENV\_VAR\_NAME\] [[Answer 4]](#answer-4) Question 5 ---------- If multiple configurations for the same PID (persistent identity of the OSGi component) are applicable, which configuration is applied? A. The last modified configuration is applied. B. The configuration with the highest number of matching run modes is applied. C. The one that occurs first in the repository is applied. D. A configuration factory is created and all configurations are applied. [[Answer 5]](#answer-5) Question 6 ---------- Which configuration/section should be used to resolve the domain name by dispatcher? A. Configuration in vhosts file B. Configuration in filters.any C. Configuration in httpd.conf D. Configuration in DNS [[Answer 6]](#answer-6) Question 7 ---------- Which configuration must be applied to enable re-fetching of cached items based on Cache Headers sent by AEM? A.. /autoInvalidate true B.. /autoInvalidate \"1\" C.. /enableTTL true D.. /enableTTL \"1\" [[Answer 7]](#answer-7) Question 8 ---------- A developer needs to create a runmode-specific OSGi configuration for an AEM as a Cloud Service implementation. In which location should the OSGi configuration be created? A. core project, (/core/..,/config.\) folder B. ui.config project, (/config/\.../config.\) folder C. all project, (/all/\.../config.\) folder D. ui.apps project, (/apps/\.../config.\) folder [[Answer 8]](#answer-8) Question 9 ---------- An AEM application wants to set up multi-tenancy using Adobe-recommended best practices and bind multiple configurations to it.\ Which of the following options is recommended? A. import org.apache.felix.scr.annotations.Component;\ \@Component(label = "My configuration", metatype = true, factory= true) B. import org.osgi.service.component.annotations.Component;\ \@Component(service = ConfigurationFactory.class) C. import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition;\ \@ObjectClassDefinition(name = "My configuration") D. import org.osgi.service.component.annotations.Component;\ import org.osgi.service.metatype.annotations.Designate;\ \@Component(service = ConfigurationFactory.class)\ \@Designate(ocd = ConfigurationFactorylmpl.Config.class, factory=true) [[Answer 9]](#answer-9) Question 10 ----------- An AEM application requires LDAP Service integration to synchronize users/groups.\ Which two OSGi configuration are required for LDAP integration in AEM? (Choose two.) A. Apache Jackrabbit Oak AuthorizableActionProvider B. Apache Jackrabbit Oak Solr server provider C. Apache Jackrabbit Oak CUG Configuration D. Apache Jackrabbit Oak External Login Module E. Apache Jackrabbit Oak Default Sync Handler [[Answer 10]](#answer-10) Question 11 ----------- A client is having issues with some query results:\ Many of the client\'s industry terms have the same meaning, and users do not always search the exact wording\ Many users search by typing in short phrases instead of exact keywords, ex:// "cats and dogs"\ What index analyzers should the AEM developer recommend? A. Option 1 1. Add a mapping filter to the current indexes 2. Add a stop filter to the current indexes B. Option 2 1. Add a synonyms filter to the current indexes 2. Add a lowercase filter to the current indexes C. Option 3 1. Tokenize the current indexes with a keyword tokenizer 2. Add a mapping filter to the current indexes D. Option 4 1. Add a synonyms filter to the current indexes 2. Add a stop filter to the current indexes [[Answer 11]](#answer-11) Question 12 ----------- An AEM server is overloaded with too many concurrently running workflows. The developer decides to reduce the number of concurrent workflows.\ What should be configured to reduce the number of concurrent workflows? A. The number of threads in Scheduler B. The number of threads in Apache Felix Jetty Http Service C. Launchers for each workflow D. Maximum Parallel Jobs in OSGI console [[Answer 12]](#answer-12) Question 13 ----------- A custom component has one dialog field: \ The developer needs to implement a Sling Model to perform a business logic on the authored value. The developer writes the following HTL snippet. \\ \\${display.messageText}\\ \ Which two implementations will support this HTL snippet? (Choose two.) A. OPTION A B. OPTION B C. OPTION C D. OPTION D [[Answer 13]](#answer-13) Question 14 ----------- A developer needs to create a new Title component. The requirements are: 1. The layout must be the same as the Title core component 2. The text property must have the page title as prefix (e.g., Page Title - \) 3. The component must be reusable Which approach is recommended? A. Option A a. Create a Proxy Component of Title core component b. Create a Custom Sling Model that overrides the default behavior c. Customize the component template B. Option B d. Create a custom component from scratch e. Create a Custom Sling Model for the component that follows the requirement f. Create a Model Exporter C. Option C g. Create a Proxy Component from Title core component h. Create a Custom Sling Model that overrides the default behavior [[Answer 14]](#answer-14) Question 15 ----------- A developer needs to create sling models for two fields name and occupations. The dialog has two fields: - name - a single value field - occupations - a multi value field. The following code is included in sling models inherited from interface ***com.adobe.aem.guides.wknd.core.models.Byline*** Which method should be used to represent this model in HTL? A. Option A B. Option B C. Option C D. Option D [[Answer 15]](#answer-15) Question 16 ----------- SPA components are connected to AEM components via the MapTo() method.\ Which code should be used to correctly connect an SPA component called ItemList to its AEM equivalent? A. ('project/components/content/itemList').MapTo(ItemList,ItemListEditConfig); B. MapTo('project/components/content/itemList')(ItemList,ItemListEditConfig); C. ItemList.MapTo('project/components/content/itemList'); D. MapTo(ItemList)('project/components/content/itemList',ItemListEditConfig); [[Answer 16]](#answer-16) Question 17 ----------- Refer to the exhibit. \\ \\ \This is a sample HTL snippet\\ \\ \\ \\ \\ \This is a sample HTL snippet\\ \\ \ The current page has three children. What is the final rendered html output for the code snippet? A. Option 1 B. Option 2 C. Option 3 D. Option 4 [[Answer 17]](#answer-17) Question 18 ----------- A developer needs to create a dynamic participant step where the participant is selected automatically at run time.\ The developer decides to develop an OSGi service, which needs to implement the **com.day.cq.workflow.exec.ParticipantStepChooser interface.**\ Which method should the developer implement from the com.day.cq.workflow.exec.ParticipantStepChooser interface? A. String getParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) B. void getParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) C. String getDynamicParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) D. void getDynamicParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) [[Answer 18]](#answer-18) Question 19 ----------- An AEM application has a Header and Footer authored on every page.\ The customer asks for the following: 1. A centralized Header and Footer 2. The ability to create a variation for both the Header and Footer 3. Change the Header and Footer for specific time periods 4. The ability to restore a previous version for both the Header and Footer What should the developer use to meet the requirements? A. Custom component B. Content fragment C. Static template D. Experience fragment [[Answer 19]](#answer-19) Question 20 ----------- AEM SPA integration provides various design models. In an application the developer chooses to use AEM as a headless CMS without using the SPA Editor SDK framework.\ What would be an advantage for this design model? A. The content author can edit the app using AEM\'s content authoring experience. B. The front end developer has full control over the app. C. The SPA is compatible with the template editor. D. The developer keeps control over the app by only enabling authoring in restricted areas of the app. [[Answer 20]](#answer-20) Question 21 ----------- An AEM Developer needs to create a new component to help support a new product launch.\ The client is on AEM 6.5 on-premise with the latest version of WCM Core Components\ The component must include text, image, and a link\ The component must support multiple designs\ Which process should the AEM Developer use to support the launch? A. Option A - Extend the Teaser Component from Core Components - Create style variations to be used in the Style System B. Option B - Create a new component by extending the Text Component from Core Components - Add dialog properties and modify HTL to support images C. Option C - Extend the Text Component from Core Components - Enable image manipulations for the Text Component via policy D. Option D - Create a new Image with Text component that exposes the Core Components authoring dialogs for those components - Add a policy to define which designs are used [[Answer 21]](#answer-21) Question 22 ----------- An AEM application is expected to export a content fragment in JSON format without any customization for a headless implementation.\ What is the recommended approach? A. Use AEM Assets HTTP API B. Use Core components to export JSON C. Use Sling Exporter framework [[Answer 22]](#answer-22) Question 23 ----------- In a non-optimized website, the final HTML generated for a typical page by publish instance includes a relatively large number of \ elements that refer to other script files loaded from AEM environment. The developer wants to minimize these network calls by combining all required client library code into a single file to reduce the number of back-and-forth requests on page load.\ Which step should a developer take to solve this issue? A. Embed the required libraries into an app-specific client library using the allowProxy property of the cq:ClientLibraryFolder node B. Add the categories property of the cq:ClientLibraryFoider node into an app-specific client library folder C. Embed the required libraries into an app-specific client library using the dependencies property of the cq:ClientLibraryFolder node D. Embed the required libraries into an app-specific client library using the embed property of the cq:ClientLibraryFolder node [[Answer 23]](#answer-23) Question 24 ----------- An AEM application development team is assigned a task to create an Event-Driven Data Layer implementation for an Analytics solution. Which Adobe recommended best practice should the developer choose? A. Use Adobe Experience Platform\'s data layer to integrate with AEM. B. Create a custom data layer and add each component, template, and its properties to the data layer. C. Use Adobe Client Data Layer and integrate with Core components. D. Create an Adobe Cloud Service configuration to use third-party tool\'s data layer. [[Answer 24]](#answer-24) Question 25 ----------- A developer is on an AEM application that is being used to calculate an employee\'s salary. The calculation is done in an OSGi service called CalculationService. This service class has a dependency on one other service, called the EmployeeService.\ How should the developer make sure that the critical code in the CalculationService has a high unit test coverage? A. Use a mock framework in the unit test to inject the CalculationService B. Instantiate the EmployeeService in the unit test and pass it to the constructor of the CalculationService C. Use a mock framework in the unit test to inject the EmployeeService D. Use the feature flag in the unit test to disable the calls to the EmployeeService [[Answer 25]](#answer-25) Question 26 ----------- An AEM Developer receives requirements for Sling Models in a human-readable yaml format. A custom application needs to be built. The dependency is as shown: ![](media/image2.png) After implementing ModelExporter, which method should be used to meet this requirement? A. Option A  1. Create OSGI models to export as yaml 2. Configure mime type in Apache Sling MIME Type Service B. Option B  3. Create OSGI models to export as yaml 4. Configure mime type in Apache Sling Servlet/Script Resolver and Error Handler C. Option C  5. Create Sling models to export as yaml 6. Configure mime type in Apache Sling MIME Type Service D. Option D 7. Create Sling models to export as yaml 8. Configure mime type in Apache Sling Referrer Filter [[Answer 26]](#answer-26) Question 27 ----------- A developer needs to create a workflow custom process step in AEM. In a custom process step, an OSGi component needs to implement the WorkflowProcess interface.\ Which method should the developer implement? A. call B. apply C. execute D. submit [[Answer 27]](#answer-27) Question 28 ----------- A customer adds third-party client libraries to add some features in an existing AEM application, which will significantly reduce performance.\ How should the developer optimize the site? A. Embed client libraries to consolidate them into fewer files. B. Debug third-party client lib and fix the code. C. Rebuild Client libraries. [[Answer 28]](#answer-28) Question 29 ----------- A snippet throws an exception at runtime:\ What should the developer add to fix it? A. defaultInjectionStrategy = DefaultInjectionStrategy property to \@Model Class annotation B. \@Optional annotation to page field C. throws Exception at the end of the init method declaration D. SlingHttpServletRequest.class to adaptables property of \@Model Class annotation [[Answer 29]](#answer-29) Question 30 ----------- Which two unit testing dependencies are generated by AEM archetype? (Choose two.) A. JUnit B. Selenium C. PowerMock D. Mockito E. Hobbes [[Answer 30]](#answer-30) Question 31 ----------- An application development team needs to create a multi-channel application that uses AEM as a headless CMS.\ Which feature should be used to maintain structured data for this application? A. Static template B. Content fragment C. Experience fragment D. Custom component [[Answer 31]](#answer-31) Question 32 ----------- The following anchor tag is not resolving:\ \{item.name}\\ Upon further inspection the developer notices that the link has no.html appended to the end of the URL.\ What could be a potential fix for the issue? A. \{item.name}\ B. \{item.name}\ C. \{item.name}\ D. \{item.name}\ [[Answer 32]](#answer-32) Question 33 ----------- A developer needs to create a project based on AEM Project Archetype with a specific AEM as a Cloud Service SDK version on the local environment.\ Which two properties must be defined when creating this project? (Choose two.) A.  aemVersion=cloud B.  sdkVersion=2022.5.7575.20220530T152407Z-220401 C.  sdkVersion=latest D.  aemVersion=latest [[Answer 33]](#answer-33) Question 34 ----------- In an AEM as a Cloud Service environment, which repository areas are considered as immutable? A.  /content and /libs B.  /content and /etc C.  /apps and /libs D.  /apps and /content [[Answer 34]](#answer-34) Question 35 ----------- On package install content that is already present in the repos must not be overwritten and if not present in the repos it must not be removed.\ Which import mode should the developer use? A. update B. replace C. merge [[Answer 35]](#answer-35) Question 36 ----------- Which AEM dependency provides APIs for all AEM environments? A. Option A ![](media/image4.png) B. Option B C. Option C ![](media/image6.png) D. Option D [[Answer 36]](#answer-36) Question 37 ----------- A development team is starting a new AEM project that is going to integrate with the Adobe Commerce platform. The developer needs to create a new AEM project using the Maven command line interface.\ How can the \'mvn -B archetype:generate\' command help the developer with the integration between AEM and Adobe Commerce? A. Using the property \'commerceModule=AdobeCommerce\' can provide a path to an external jar that integrates between the platforms. B. Using the property \'aemVersion=cloud\' automatically provides a report with integration guidelines. C. Using the property \'includeCommerce=y\', the command will generate specific Commerce Core Components. [[Answer 37]](#answer-37) Question 38 ----------- What is the recommended path to override /libs standard functionality? A.  /conf B.  /apps C.  /content D.  /libs [[Answer 38]](#answer-38) Question 39 ----------- Which Maven plugin checks if all the requirements declarations made in OSGi bundles are satisfied by the capabilities declarations of other bundles included in the Maven project? A. maven-enforcer-plugin B. maven-assembly-plugin C. content-package-maven-plugin D. aemanalyser-maven-plugin [[Answer 39]](#answer-39) Question 40 ----------- An AEM development team is working on a new multi-country application using AEM as a Cloud Service. A developer has been assigned the task for building the integration with a third-party web service. A secret key is needed to connect with this web service. The website creators will provide this key. The key is different for each type of environment (dev, stage and production).\ What is the recommended way to make the secret key available in the AEM application? A. Use a context aware configuration B. Read the key value from a property file stored in the code base C. Use an environment variable which is then consumed by an OSGi configuration D. Read the key value from OSGi configuration stored in run modes [[Answer 40]](#answer-40) Question 41 ----------- Which option should be used to synchronize user data across publish servers in a publish farm? A. Sling Content Distribution B. Vault plugin C. CURL D. Replication Agents [[Answer 41]](#answer-41) Question 42 ----------- Which type of Cloud Manager tests are enabled for all Cloud Manager production pipelines and cannot be skipped? A. Code Quality Testing B. Experience Audit Testing C. UI Testing D. Functional Testing [[Answer 42]](#answer-42) Question 43 ----------- Which tool should a developer use to look up Adobe Identity Management System (IMS) users by email and return their IMS IDs? A. Developer Console B. User Mapping Tool C. IMS Lookup Tool D. Cloud Acceleration [[Answer 43]](#answer-43) Question 44 ----------- What two types of testing are available OOTB in AEM Cloud Manager Pipeline? (Choose two.) A. Code Quality testing B. Performance testing C. UI testing D. Penetration testing E. Integration testing [[Answer 44]](#answer-44) Question 45 ----------- What is Out of Scope for the Pattern Detector tool, while doing an AEM upgrade? A. OSGi bundles exports and imports mismatch B. Backward Compatibility with the previous AEM Version C. Definitions of Oak indices for compatibility D. rep:User nodes compatibility (in context of OAuth configuration) [[Answer 45]](#answer-45) Question 46 ----------- An AEM as a Cloud Service implementation customer wants content to be replicated as soon as the On Time and Off Times are reached.\ What must the developer configure? A. Enable Auto Replicate via On Off Trigger Configuration B. Enable On Time or Off Time via Page Properties C. Configure the Publish content tree via Workflow Models [[Answer 46]](#answer-46) Question 47 ----------- The OSGi configuration is added to a runmode specific configuration \"config.author.staging\" in AEM as a Cloud Service. The application fails to read the configuration.\ What is a possible cause of this issue? A. The custom OSGi configuration runmode used (i.e., \"config.author.staging\") is not supported in AEM as a Cloud service. B. OSGi configuration runmodes cannot be installed automatically on AEM as a Cloud Service. We need to install them as a package using the Package manager. C. AEM as a Cloud service does not support OSGi configuration runmodes. D. Only \ specific OSGi configuration runmodes like \"config.author\" or \"config.publish\" are supported in AEM as a Cloud service. [[Answer 47]](#answer-47) Question 48 ----------- Which AEM as a Cloud Service role can configure or run pipelines? A. Deployment Manager B. DevOps C. Developer D. Program Manager [[Answer 48]](#answer-48) Question 49 ----------- A customer who is running an AEM application on premise reports that the application is slowing down over time and even crashes. The issues seem to start occurring after a new production deployment. The AEM developer knows that the described symptoms could be caused by a memory leak.\ Which two steps should be taken after confirming the problem is related to a memory issue? (Choose two.) A. Open the error log and look for messages with \'OutOfMemoryError\' B. Create a heap dump for analysis C. Analyze the request log and make sure the number of requests are below the expected threshold D. Increase the cache ratio of the application E. Create a thread dump for analysis [[Answer 49]](#answer-49) Question 50 ----------- An AEM Developer needs to migrate to AEM as a Cloud Service from AEM version 6.4. The AEM Developer is not able to run the Best Practice Analyzer.\ What is preventing the Best Practice Analyzer from running? A. The AEM Developer is not an admin or does not have administrator rights. B. Best Practice Analyzer is not supported on AEM version 6.4. C. Best Practice Analyzer should run on Publisher instead of Author instance. [[Answer 50]](#answer-50) Question 51 ----------- What is the default value for AC Handling when creating packages? A. Overwrite B. MergePreserve C. Ignore D. Merge [[Answer 51]](#answer-51) Question 52 ----------- A user report that requests are slow on AEM instance. The infrastructure team verified that everything is normal using third-party monitoring solutions. Which internal AEM metrics should be checked to find out the issue? A. Query Performance B. Queue Performance C. Request Performance D. Thread Performance [[Answer 52]](#answer-52) Question 53 ----------- A developer has a component named foobar with the following file: foobar.html: ![](media/image8.jpg) What is the output when the component is rendered? A. 1. \"\\ 2. \\\" B. 3. \"\\ 4. \\\" C. 5. \"\\ 6. \\\" D. 7. \"\\ 8. \\\" [[Answer 53]](#answer-53) Question 54 ----------- Which practice should be used to push a code fix to make it into the current release candidate? A. Make the fix in CRX where the current release candidate is currently deployed. B. Cherry-pick the fix commit into the release candidate. C. Make the fix locally and upload the package to where the release candidate is deployed. D. Cut a new release candidate from the master branch. [[Answer 54]](#answer-54) Question 55 ----------- A custom bundle of an application is in state \"Installed\" after deploying it with Maven. What should a developer do to change it to state \"Active\"? A. Use the \"Update\" action for the bundle in the Apache Felix Web Console B. Reinstall the content package using the package manager C. Use the \"Start\" action for the bundle in the Apache Felix Web Console D. Ensure all OSGi requirements are met and re-deploy using Maven [[Answer 55]](#answer-55) Question 56 ----------- Two AEM publish instances feed a single Dispatcher. Which part of the Dispatcher configuration should a developer review to ensure both AEM publish instances are used? A. **cache** B. **filter** C. **farms** D. **virtualhosts** [[Answer 56]](#answer-56) Question 57 ----------- In which maven build phase is the content package assembled? A. **install** B. **deploy** C. **package** D. **compile** [[Answer 57]](#answer-57) Question 58 ----------- AEM is installed in \$AEM\_HOME. In which subfolder are the command line startup and shutdown scripts located? A. **\$AEM\_HOME/crx-quickstart/binsystem/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. B. Option B 4. Use console at */system/console/configMgr* and tick the checkbox "encrypt" before saving a configuration. 5. Use encrypted values work across all instances. 6. When loading the value in the code, call *CryptoSupport.unprotect(\...)* before using the value. C. Option C 7. Use console at */system/console/configMgr* and tick the checkbox "encrypt" before saving a configuration. 8. 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. 9. Sensitive information is automatically decrypted using the *CryptoSupport* OSGi service before the value is returned. D. Option D 10. Use console at */system/console/crypto* to encrypt the value. 11. 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. 12. Sensitive information is automatically decrypted using the *CryptoSupport* OSGi service before the value is returned. [[Answer 65]](#answer-65) Question 66 ----------- An AEM environment is cloned, and the domain and IPs are changed. What must be reconfigured for content activation to work? A. Transport URI in dispatcher configuration B. Transport URI of the flush and replication agents. C. User of flush agents D. User of replication agents [[Answer 66]](#answer-66) Question 67 ----------- 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 \> Log Message. Configure DEBUG log level on com.day.cq.search to monitor search queries. C. Go to Tools \> Operations \> Diagnosis \> Index Manager. Select the new Indexes and run a consistency check. D. Go to Tools \> Operations \> Diagnosis \> Query Performance \> Slow Queries. Select a Query and Click on Explain. [[Answer 67]](#answer-67) Question 68 ----------- 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. Instantiate a node object with session.getNode(/content/blogs) and then iterate through the child nodes and print the title for each. B. Use PageManager.getPage("/content/blogs") of the static PageManager class to instantiate a Pageobject and then iterate through the child pages and print the title for each. C. Use the QueryDebugger to look for all children of /content/blogs and then iterate through the result set and print the title for each. D. 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. [[Answer 68]](#answer-68) Question 69 ----------- A developer is working on the following Sling Model that is being used in a component.\ ![](media/image20.png) The model must check if the configured value of the *jcr:title* property for the component matches the name of the current page. If the *jcr:title* property of the component has NOT been configured, then *isMatchingTitle()* must return false. How should the developer inject the title property in this model? A. B. ![](media/image21.png) C.A screenshot of a cell phone Description automatically generated D. ![A screenshot of a cell phone Description automatically generated](media/image23.png) [[Answer 69]](#answer-69) Question 70 ----------- 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:\ Refer to the \$DOCROOT directory below:\ \ 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. [[Answer 70]](#answer-70) Question 71 ----------- A developer is working with the following HTL expression in a component rendering script:\ What is the expected output of this expression? A. path/page.bar.html/world B. path/page.bar.html/hello/world C. path/page.foo.bar.html/hello/world D. path/page.infinity.json.bar.html/world [[Answer 71]](#answer-71) Question 72 ----------- An aem application log shows a specific query to read custom title property is running slowly. During the debugging... be created. An asynchronous index for the query is recommended, which type of index should be used for this query. A. **Ordered Index** B. **Lucene Property index** C. **Lucene full text index** D. **Property index** E. Fine modulo [[Answer 72]](#answer-72) Question 73 \[AD0-E103\] ------------------------ 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 dispatcher flush agent in publish instance. D. Create a reserve replication agent on the author instance. [[Answer 73]](#answer-73) Question 74 \[AD0-E103\] ------------------------ 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 third party bundle in the bundle that depends on it. C. Embed the bundle in a content package to have it automatically deployed. D. Declare the dependency correctly using a link to the OSGi Bundle Repository (OBR) [[Answer 74]](#answer-74) Question 75 \[ADO-E103\] ------------------------ Which log file should a developer use to search for exception stacktraces? A. **/crx-quickstart/logs/access.log** B. **/crx-quickstart/logs/info.log** C. **/crx-quickstart/logs/request.log** D. **/crx-quickstart/logs/error.log** [**[Answer 75]**](#answer-75) Question 76 \[ADO-E103\] ------------------------ 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 rlog.jar with the following command *\$ java -jar../opt/helpers/rlogs.jar -n 10 requests.log* to identify long running requests. B. Use proxy.jar with the following command java -jar proxy.jar \ \ \ to debug the webserver and AEM server communication. C. Download Heapdumps from Tools \> Operations \> Diagnosis and analyze the Heapdumps using the Memory Analyzer Tool. D. Embed /libs/foundation/components/timing component in the Page Component and verify the page load time. [[Answer 76]](#answer-76) Question 77 \[ADO-E103\] ------------------------ 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 bundles consuming the service need to import the fully qualified name 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 bundle providing the service needs to contain an adequate SCR descriptor file. E. The bundle providing the service needs to export the java package of the service interface. [[Answer 77]](#answer-77) Question 78 \[ADO-E103\] ------------------------ 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. Use the "Force Upload" option when uploading the new content package. B. Uninstall the existing content package before installing 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. [[Answer 78]](#answer-78) Question 79 \[ADO-E103\] ------------------------ A developer creates a Sling Servlet. The Sling Servlet is bound to a path (/service/sling/sample).\ Refer to the resulting code below. *\@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. Use *\@SlingServletResourceTypes* instead of *\@SlingServletPaths*. B. Modify *\@SlingServletPaths(value = {"/bin/sling/sample" })*. C. Add *\@SlingServletName(servletName = "AccessControlServlet")* annotation. D. Add *\@SlingServletPrefix(value = "/apps")* annotation. [[Answer 79]](#answer-79) Question 80 \[ADO-E103\] ------------------------ 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. Create a field of type *ServiceUserMapped* and annotate it with *\@Reference*. B. Wait for the service *ServiceUserMapper* via *BundleContext.getServiceReference(\...)*. C. Create a field of type *ServiceUserMapped* and annotate it with *\@Reference* using *ReferencePolicy.DYNAMIC*. D. Create a field of type S*erviceUserMapper* and annotate it with *\@Reference* using *ReferencePolicy.STATIC*. [[Answer 80]](#answer-80) Question 81 ----------- Question 82 \[ADO-E103\] ------------------------ 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. *\* B. *\* C. *\* D. *\* [[Answer 82]](#answer-82) Question 83 \[ADO-E103\] ------------------------ 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 by including it on the actual page component. B. Add a content policy to the template-type to disable the removal of the layout container. C. Add the layout container component to the *initial* section of the template-type. D. Add the layout container component to the *structure* section of the template-type. [[Answer 83]](#answer-83) Question 84 ----------- 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 static methods to avoid boilerplate in application code. C. Use a mock framework to be able to create and inject mocks in the test code. D. Use the standard OSGi *\@Reference* annotation to wire the dependencies in application code. E. Deploy a third-party dependency injection container to wire dependencies more efficiently in application code. [[Answer 84]](#answer-84) Question 85 ----------- The following stack trace is written in the error.log file after installing a custom application package. ![](media/image27.png) What are two different ways that the developer could resolve the OSGi bundle dependency error? (Choose two.) A. Intall the jar in AEM via the curl command '*curl -u username:password -F file=@"./com.example.customlib-3.8.jar" -F name="Dependency" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp \--progress -bar- oupload.txt'*. B. Go to the Dependency Finder in the System Console to find if another bundle is exporting a similar version of the classes and change the project pom.xml to match the same version. C. Create a folder named "deploy" under \@AEM\_HOME/crx-quickstart/ and copy com.example.customlib-3.8.jar in there so AEM uploads it automatically. D. Go to the project parent pom.xml file and add the dependency with scope "compile" and instruct the bundle plugin to include the dependency in runtime. E. Upload the file com.example.customlib-3.8.jar into /apps/\/libsfolder in CRXDE to make it available for the OSGi bundle. [[Answer 85]](#answer-85) Question 86 ----------- A custom application contains a service component *com.proj.ServiceComponent*. A developer needs to configure the string value *name* and integer value *intVal*. The actual configuration must be deployed using a content package. What should the developer do to meet these requirements? A. Use a file *com.proj.ServiceComponent.config* with content\ A close up of a device Description automatically generated B. Use a file *com.proj.ServiceComponent.cfg* with content\ ![A picture containing knife Description automatically generated](media/image29.png) C. Use a file *com.proj.ServiceComponent.xml* with content\ A picture containing knife Description automatically generated D. Use a file *com.proj.ServiceComponent.xml* with content\ ![A screenshot of a cell phone Description automatically generated](media/image31.png) [**[Answer 86]**](#answer-86) Question 87 ----------- An author got a workflow exception while trying to instantiate a workflow on a content page. The AEM developer figured out that necessary write permissions are missing for that user in CRX. Which node/folder must have the WRITE permission for that user? A. **/var/workflow/instances node** B. **/conf/global/settings/workflow/models node** C. **/var/workflow/models node** D. **/content/\/en/content-page node** [**[Answer 87]**](#answer-87) Question 88 \[ADO-E116\] ------------------------ 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. **File globbing in the dispatcher configuration is NOT correct.** B. **Sticky sessions are NOT configured properly, resulting in requests being delivered to the wrong server.** C. **The level of cache invalidation is NOT appropriate for the published content model.** D. **The OS file system permissions are NOT properly configured.** [[Answer 88]](#answer-88) Question 89 ----------- An application requires custom languages to be supported that are not present in AEM OOB. Which approach is recommended? A. **Add the custom languages in the website's content pages.** B. **Add the custom languages in AEM Projects.** C. **Override /libs/wcm/core/resources/languages and add custom languages.** D. **Overlay /libs/wcm/core/resources/languages and add custom languages.** [[Answer 89]](#answer-89) Question 90 ----------- An AEM application was recently upgraded from AEM v6.5. The developers found that old workflows were no longer getting instantiated. What could be the root cause for the workflows to stop working? A. **Workflow Models are defined in /var/workflow/models** B. **Workflow Launchers are in /conf/global/settings/workflow/launcher/config.** C. **Workflow models are defined in /conf/global/settings/workflow/models** D. **Workflow models are defined in /etc/workflow/models.** [[Answer 90]](#answer-90) Question 91 ----------- What is not available in globel.jsp? A. **currentDesign** B. **currentResource** C. **currentNode** D. **currentPage** [**[Answer 91]**](#answer-91) Question 92 \[AD0-E103\] ------------------------ 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. **Define Style Definitions using PagePolicy dialog on Editable Template.** C. **Set the sling:resourceSuperType property to core/wcm/components/page/v2/page on the Pagecomponent.** D. **Create a new dialog for the custom Page components** [[Answer 92]](#answer-92) Question 93 ----------- An AEM Developer wants to display localized page name to users of translated content. Rather than having a Spanish-speaking user navigate to: www.mydomain.com/es/home.html. The Developer wants the URL to be: www.mydomain.com/es/casa.html. What is the recommended way to achieving this? A. **Write a Bin Servlet to handle the request \@SingServlet(path = "/bin/myApp/myServelet"...** B. **Use Vanity URL to redirect.../es/casa to.../es/home** C. **Modify /etc/map to resolve the URL.../es/casa** D. **Add a property sling:alias = casa to.../es/home** [[Answer 93]](#answer-93) Question 94 ----------- When will a page be cached using ignoreUrlParams configuration in dispatcher? A. **When a request URL contains one of the parameters is ignored, the page is cached.** B. **When a request URL contains a suffix to be cached, the page is cached.** C. **When a request URL contains parameters that are all ignored, the page is cached.** D. **/0001 { /glob "q" /type "deny" } allows the URL with parameter 'q' to be cached.** [[Answer 94]](#answer-94) Question 95 ----------- You are getting a \"Deployment Pending\" when trying to deploy something (code?) What do you do? A. **Contact System Administrator** B. **Log into (Cloud Manager) & create a new program** C. **Go to Developer Console** D. **Log into Cloud Manager** [[Answer 95]](#answer-95) Question 96 ----------- Refer to the following Client Library node structure. 1. +clientlibs 2. \- jcr:primaryType=\"cq:ClientLibraryFolder\" 3. \- categories=\"\[clientlibs.example\]\" 4. \+ js.txt 5. \- jcr:primaryType=\"nt:file\" 6. \+ css.txt 7. \- jcr:primaryType=\"nt:file\" 8. \+ js 9. \- jcr:primaryType=\"nt:folder\" 10. \- javascript1.js 11. \- 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 embed it on the clientlibs node** B. **Change the js folder to a Client Library node and add the property categories = \"\[clientlibs.example\]\"** C. **Split the js and css into 2 Client Libraries since they can\'t be in the same Client Library** D. **Add \#base=js as the first line in the js.txt file** [[Answer 96]](#answer-96) Question 97 ----------- Where do you check what packages a bundle is exporting? A. **OSGI Utils** B. **Apache Felix Web Console** C. **Adobe Developer Console** D. **CRXDE Lite** [[Answer 97]](#answer-97) Question 98 ----------- Image that appears to go down a checklist. Part of that checklist shows 0% code coverage and says it fails, what do you do? A. **Write a unit test that provides at least 50% coverage** B. **Write a performance test that provides at least 50% coverage** C. **Turn code coverage off in Developer Console** D. **Use SonarQube** [[Answer 98]](#answer-98) Question 99 ----------- Which API do you use if webhooks are disallowed by security? A. **GDPR Event** B. **Cloud Manager API** C. **Adobe Management API** D. **Journaling API** [[Answer 99]](#answer-99) Question 100 ------------ When would you want to integrate with Adobe I/O A. **Clearing dispatcher cache** B. **Indexing** C. **Creating a report about an issues** D. **Obtaining Asset metadata** [**[Answer 100]**](#answer-100) Question 101 ------------ Which command do you use to start a pipeline A. PUT http://something/program/{programID\]/pipeline/{pipelineID}/executions B. GET http://something/program/{programID\]/pipeline/{pipelineID}/execution C. PUT http://something/program/{programID\]/pipeline/{pipelineID}/execution D. GET http://something/program/{programID\]/pipeline/{pipelineID}/execution/{executionID} Fine modulo [[\_Answer\_101]](#answer-101) Question 102 ------------ You have an existing config \ on AMS, how would you convert this config to Cloud Service Dispatcher? A. \ B. \ C. \ D. \ [[Answer 102]](#answer-102) Question 103 ------------ A developer wants to automatically truncate request log files once they exceed 10 MB. Which OSGi configuration should the developer modify? A. Apache Sling Customizable Request Data Logger B. Adobe Granite Log Analysis Service C. Apache Sling Logging Writer Configuration D. Apache Sling Logging Configuration [[Answer 103]](#answer-103) Question 104 ------------ What are two limitations of an AEM full SPA implementation with frontend routing? (Select two) A. **Cannot mix SPA components with AEM components.** B. **Metadata must be stored in two locations: app and page** C. **Cannot extend WCM Core components.** D. **Cannot generate sitemaps.** E. **Cannot generate a true 404 response for dynamically generated pages.** [[Answer 104]](#answer-104) Question 105 \[AD0-E103\] ------------------------- 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 *path* pointing to the folder and *nodetype* field have the value *cq:Page*. C. A Launcher with the field *path* pointing to the folder and *condition* field and have the value *jcr:content/jcr:primaryType==cq:Page*. D. A Launcher with the field *condition* that has the value *jcr:content/page*. [[Answer 105]](#answer-105) Question 106 ------------ An AEM Developer sets up an AEM project using the AEM Archetype. The build fails on its first run of mvn install due to dependencies not found. What are the two most likely causes? (Select two). A. **The adobe-public profile dependencies are not present in the.m2 repository.** B. **There is no adobe-public profile configured in settings.xml** C. **The build command requires at least one profile.** D. **The developer did not add the adobe-public profile to the build command.** E. **The.m2 repository has outdated dependencies.** [[Answer 106]](#answer-106) Question 107 \[AD0-E103\] ------------------------- 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 page template has NOT been enabled.** B. **The Layout Container does NOT have a policy.** C. **The page template has NOT been published.** D. **The Layout Container has NOT been unlocked.** [[Answer 107]](#answer-107) Question 108 \[AD0-E103\] ------------------------- 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 node structure should the developer use to meet these requirements? A. 1. \+ component 2. \- Jcr: primaryType="cq:Component" 3. \- Jcr:title="Component" 4. \- componentGroup=".hidden" 5. \+ cq:dialog 6.... 7. \+ cq:editConfig 8. -cq:actions = "\[edit\]" B. 9. +component 10. \- Jcr: primaryType="cq:Component" 11. \- Jcr:title="Component" 12. \- Hidden="true" 13. \+ cq:dialog 14.... 15. \+ cq:editConfig 16. -cq:actions = "\[edit\]" C. 17. \+ component 18. \- Jcr: primaryType="cq:Component" 19. \- Jcr:title="Component" 20. \- componentGroup=".hidden" 21. \- cq:actions="\[edit\]" 22. \+ cq:dialog 23.... D. 24. \+ component 25. \- Jcr: primaryType="cq:Component" 26. \- Jcr:title="Component" 27. \- cq:actions="\[edit\]" 28. \+ cq:dialog 29.... [[Answer 108]](#answer-108) Quesiton 109 ------------ An application runs specific license checks against certain DAM assets every day. It should sen and 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. **Create a configuration line in PID com.day.cq.Security.ACLSetup for the user that you obtain a session for via ResourceResolverFactory.getResourceResolver(...)** B. **Set up a cron job with curl calls with the admin user and use request.getResource().getResourceResolver()** C. **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(...)** D. **Configure the user 'admin' in PID org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl as user.default and make sure the service user exisits and has jcr:read and jcr:write permissions.** [[Answer 109]](#answer-109) Question 110 ------------ A project requires sharing information between SPA components. What is the least complex approach to achieve that objective? A. **Utilize model props to frill down and access or set the state on desired components.** B. **Implement a state library in order to share component states.** C. **Customize and extend the container component to leverage the object hierarchy.** D. **Centralize the logic and broadcast to the necessary components.** [[Answer 110]](#answer-110) Question 111 ------------ For each CRX node in the hierarchy, which actions can be configured using the user admin interface? A. **Read, Modify, Create, Delete, Read ACL, Edit ACL, Replicate** B. **Read, Write, Delete, Edit ACL, Replicate** C. **Read, Write, Read ACL, Edit ACL, Replicate** D. **Read, Modify, Create, Delete, Read ACL, Edit ACL** [[Answer 111]](#answer-111) Question 112 ------------ After defining a Sling Model, what step is required to enable JSON export on any component? A. **Use Sling Resource merge.** B. **Install Jackson library in AEM.** C. **Created an OSGI configuration.** D. **Annotate the Sling Model interface.** Fine modulo [[Answer 112]](#answer-112) Question 113 ------------ A developer tried to update a content fragment variation using Assets HTTP API but it didn't work as expected POST/{cfParentPath}/{cfName}. What could be the potential rootcause? A. **The service user doesn't have appropriate WRITE permissions.** B. **Assets API doesn't support WRITE operations for content fragment variations.** C. **The developer needs must use PUT method instead of POST.** D. **Assets API doesn't support UPDATE operation** [[Answer 113]](#answer-113) Question 114 \[AD0-013\] ------------------------ 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. A context aware configuration with buckets using an OSGi configuration C. One OSGi configuration for the set of values with runmodes D. A JCR property at the content root node of the site with inheritedPageProperties [[Answer 114]](#answer-114) Question 115 ------------ A developer wants to extend AEM Core Components to create a custom Carousel Component. How should the developer extend the Core Components? A. **Copy the Core Carousel component to/apps/\ folder.** B. **Make changes to the original component and assign a component group.** C. **Use the sling:resourceType property to point to the core component.** D. **Use the sling:resourceSuperType property to point to the core component.** [[Answer 115]](#answer-115) Question 116 ------------ 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 developerresolve this issue, while taking security into consideration? A. **Add the property allowProxy with a boolean value true.** B. **Allow the path to the clientlibson the dispatcher.** C. **Move the Client Library under /apps/\library.** D. **Change the ACLs for the Client Library.** [[Answer 116]](#answer-116) Question 117 ------------ An AEM Developer needs to build out a project that contains only the required modules. Which most recent AEM Archetype module is optional? A. **Ui.content** B. **It.launcher** C. **Ui.frontend** D. **Ui.tests** [[Answer 117]](#answer-117) Quesiton 118 ------------ An AEM developer is tasked to make an existing AEM website content to be consumable by other channels. What methods would allow for this to occur? A. **Create additional Sling Models for each component to support the preferred JSON structure for each channel.** B. **Create an additional replication agent to push the content in an external system that the other channels can query.** C. **Update the existing Sling Models to expose the fields in the default JSON format.** D. **Migrate the site structure and components to use content fragments and experience fragments.** [[Answer 118]](#answer-118) Question 119 ------------ A company is building an AEM application with a third party jar file. The third party APIs connect to an external app and pulls the data. The third party keeps updating with features and fixes. Which method should be used to integrate this jar file? A. **Create a bundle with the jar embedded as a dependency.** B. **Convert the jar file into zip and install using a package manager.** C. **Upload the jar file into DAM assets.** D. **Install the jar file using a package manager.** [[Answer 119]](#answer-119) Question 120 ------------ A project has a requirement to extend to WCM Core component consisting of Image. The requirement is also to add Title, Description, a Link, and also display the Titles of a few pages by links. How should a Developer proceed? A. Option A 1. **Extend Teaser from Core Components** 2. **Add an HTL Template for List extended Core Components** 3. **Add a reference to List Components Dialog box** B. **Option B** 4. **Extend Image from Core Components** 5. **Add an HTL Template for Title extended Core Components** 6. **Add an HTL Template for List extended Core Components** 7. **Add a reference to Title and List Components Dialog box.** C. **Option C** 8. **Create a custom component as per the requirements.** D. **Option D** 9. **Extend Teaser from Core Components** 10. **Customize it to add the Titles by tags.** [[Answer 120]](#answer-120) Question 121 ------------ 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 bundle cq-wcm-api to the content package.** C. **A maven dependency to bundle cq-wcm-core to the application bundle.** D. **A maven dependency to AEM uber-jar to the application bundle.** [**[Answer 121]**](#answer-121) Answers ======= Answer 1 -------- The correct answer to the [[question]](#question-1) is: A **Explanation:** In the AEM Dispatcher configuration, the **/type** attribute is essential in all filter rules. It defines the type of the rule, such as \"Allow\" or \"Deny\", indicating whether to permit or block certain requests. The **/type** attribute is fundamental because it directly specifies the action that the Dispatcher should take when a rule is matched. Other attributes like **/glob**, **/selectors**, and **/url** are used to detail the criteria of the filtering, but the **/type** attribute is crucial for the rule to be valid and functional. **Additional Notes:** **Attribute** **Short Description** **Example** --------------- ---------------------------------------------------------------------- ------------------------------------------------------- /type Determines if the rule allows or denies requests. **/type \"deny\"** /selectors Filters requests based on AEM selectors in the URL. **/selectors \"(print\|export)\"** /url Matches requests based on the full URL. **/url \"http://www.example.com/content/page.html\"** /glob Specifies patterns for matching URLs or paths using wildcards. **/glob \"\*.html\"** /path Filters requests based on the path of the requested resource. **/path \"/content/mysite/\*\"** /extension Matches requests based on the file extension. **/extension \"html\"** /method Filters requests based on the HTTP method used (GET, POST, etc.). **/method \"GET\"** /query Matches requests based on the presence of specific query parameters. **/query \"id=123\"** /clientheader Filters requests based on specific HTTP request headers. **/clientheader \"User-Agent\"** Answer 2 -------- **The correct answer to the [[question]](#question-2) is: C** This option provides a comprehensive approach to setting up application logging by configuring both the aspects of logging: what to log (through the Logger Configuration) and how to write those logs (through the Writer Configuration). **[Additional notes:]** **Apache Sling Logging Logger Configuration:** This configuration is used to define individual loggers in Apache Sling. It allows you to specify the log level, the logger name, and the log file to which the logger should write. This is essential for controlling what messages (like DEBUG, INFO, ERROR) are logged and where they are stored. **Apache Sling Logging Configuration:** This is a more general configuration for the overall logging mechanism in Apache Sling. It typically includes settings for the root logger, default log levels, and overall logging behavior. It does not deal with specific loggers or output destinations but sets the baseline for the logging framework. **Apache Sling Request Logger:** This configuration is specifically used for logging HTTP requests in Sling. It can be configured to log details about incoming requests and responses. This is particularly useful for debugging and monitoring the traffic handled by the Sling application. **Apache Sling Logging Writer Configuration:** This configuration is used to define how and where log messages are written. It includes settings for log writers, such as file writers or console writers, specifying the format, location, and rotation policy for log files. This is key for managing the output of log messages and ensuring they are stored or displayed in an appropriate manner Answer 3 -------- The correct answer to the [[question]](#question-3) is C: Explanation: - The **/docroot** property in the **/cache** section of the **dispatcher.any** file specifies the root directory for the Dispatcher\'s cache. This is where the Dispatcher stores its cached files, mirroring the structure of the content as it is on the publish instance. - The other options provided have different purposes: - **/invalidate:** This property is used to define rules for cache invalidation, not for specifying the cache directory. - **/statfile:** This property defines the name of the file used by the Dispatcher to track when the cache content was last invalidated. It\'s not a directory path. - **/cacheroot:** While this sounds like it could be the correct answer, it is not a standard property in the Dispatcher\'s configuration. The correct property for the cache directory is **/docroot**. Answer 4 -------- The correct answer to the [[question]](#question-4) is C: Explanation - AEM as a Cloud Service introduces the concept of \"secrets\" for handling sensitive data, such as private API keys. - These secrets are stored securely and can be accessed in the application via a specific syntax. - The syntax **\$\[secret:SECRET\_VAR\_NAME\]** is used to reference these stored secrets. **SECRET\_VAR\_NAME** would be the name of the specific secret (environment variable) that you have configured. - This method ensures that sensitive data like API keys are not exposed in the codebase and are managed securely according to best practices in cloud environments. Answer 5 -------- The correct answer to the [[question]](#question-5) is B. **Explanation:** - AEM uses the concept of run modes to determine which configurations should be active in a given instance. Run modes allow for the differentiation between environments like development, staging, and production. - When there are multiple configurations for the same OSGi component (same PID), AEM determines which configuration to apply based on the run modes. - The system selects the configuration that has the highest number of run modes matching the run modes of the current AEM instance. - This approach ensures that the most specific configuration applicable to the current environment is the one that gets used. In summary, the choice of configuration is based on the relevance to the current operational context of the AEM instance, as indicated by its run modes. Answer 6 -------- The correct answer to the [[question]](#question-6) is C. To resolve the domain name by the dispatcher, the appropriate configuration is: C. **Configuration in httpd.conf** Explanation: - **httpd.conf**: This is the main configuration file for the Apache HTTP Server, which is often used as the web server in front of the AEM dispatcher. Domain names and virtual hosts are typically configured here, allowing the Apache server (and thereby the dispatcher) to resolve domain names to specific AEM instances or environments. Within this file, you can specify **VirtualHost** directives to handle different domain names and route traffic appropriately. - **vhosts file**: While virtual host configurations can be included in the **httpd.conf** file directly, AEM\'s dispatcher often uses separate **vhost** files for organization. However, the inclusion of these **vhost** files and the resolution of domain names to specific configurations still originates from directives within the **httpd.conf** file. - **filters.any**: This file is used for configuring Dispatcher filters, which control what content can be cached or blocked by the Dispatcher. It is not used for resolving domain names. - **DNS (Domain Name System)**: While DNS is responsible for resolving domain names to IP addresses at the network level, the specific handling of domain names to AEM instances or configurations is managed by the web server (Apache) and dispatcher configurations, not DNS settings directly. In summary, domain name resolution in the context of directing traffic to the appropriate AEM instance via the dispatcher is configured in the **httpd.conf** file of the Apache HTTP Server, where **VirtualHost** directives are defined to handle different domains. Answer 7 -------- the correct answer to the [[question]](#question-7) is **D. /enableTTL \"1\"**. Explanation: This configuration allows the Dispatcher to evaluate the TTL information in the HTTP response headers from AEM and automatically refresh its cache when the TTL expires, ensuring the content served is up-to-date. Answer 8 -------- The correct answer to the [[question]](#question-8) is B. **Explanation:** - In AEM as a Cloud Service, the configuration management follows a slightly different approach compared to traditional AEM setups. The configurations are more cloud-centric and follow the principles of immutable infrastructure. - **ui.config Project:** The **ui.config** project or module in the AEM project structure is specifically designated for holding OSGi configurations. Placing configurations in this module aligns with AEM as a Cloud Service\'s deployment practices. - **Runmode-Specific Folder:** Within the **ui.config** module, the configurations are typically organized into runmode-specific folders. For example, if you have a configuration for the **author** runmode, it would go into a folder named **config.author**. - This approach ensures that the configurations are applied based on the runmode of the AEM instance, whether it's an **author** or **publish** instance, or any other custom runmode that might be in use. - **Other Options:** - **A. Core Project:** Typically used for Java code (OSGi services, servlets, models). - **C. All Project:** Generally used for assembling all parts of the project into a complete package. - **D. ui.apps Project:** Mainly used for application content such as components, templates, client libraries, etc. By following this structure, you ensure that your OSGi configurations are managed in a way that's consistent with AEM as a Cloud Service's best practices, leveraging its cloud-native features for configuration management. Answer 9 -------- The correct answer to the [[question]](#question-9) is D. **Explanation:** - **Use of OSGi R6 Annotations:** This option uses OSGi Declarative Services (R6) annotations, which is the modern and recommended way of defining OSGi components and services in AEM. The **\@Component** annotation is used to declare an OSGi service. - **Factory Configuration:** The **factory=true** attribute in the **\@Designate** annotation indicates that this is a factory configuration, meaning it can be instantiated multiple times. This is essential for multi-tenancy, where you might need different configurations for different tenants. - **Object Class Definition (OCD):** The **ocd** attribute in the **\@Designate** annotation points to the Object Class Definition that defines the structure of the configuration. This aligns with best practices for clear and maintainable configuration structures. **Other Options:** - **A:** Uses the older Felix SCR annotations, which are not recommended in newer versions of AEM that support OSGi R6 annotations. - **B:** Lacks the **\@Designate** annotation and does not specify the OCD, which is essential for defining the structure of the configuration. - **C:** Only includes meta-type annotations for defining the configuration structure but does not define an OSGi service component or indicate that it\'s a factory configuration. Option D is the most comprehensive and aligns with the best practices for AEM as a Cloud Service and modern AEM development, supporting multi-tenancy and allowing for multiple configurations. Answer 10 --------- The correct answers to the [[question]](#question-10) are D and E Explanation: For integrating LDAP services with an AEM application to synchronize users and groups, the required OSGi configurations are related to external authentication and user synchronization. Among the provided options, the two configurations required for LDAP integration in AEM are: 1. **D. Apache Jackrabbit Oak External Login Module** - This module is responsible for handling external authentication, such as connecting to an LDAP service. It allows AEM to authenticate users against an LDAP directory, facilitating the integration of AEM with LDAP for user authentication. 2. **E. Apache Jackrabbit Oak Default Sync Handler** - The Default Sync Handler is used for synchronizing user and group information from the external authentication system (like LDAP) into the AEM repository. It ensures that user and group data in AEM are kept in sync with the LDAP directory. **Explanation of Other Options:** - **A. Apache Jackrabbit Oak AuthorizableActionProvider:** - This is related to actions performed upon creation, modification, or deletion of authorizables (users and groups) but is not specifically for LDAP integration. - **B. Apache Jackrabbit Oak Solr server provider:** - This configuration is related to integrating Apache Solr for search capabilities in AEM and is not relevant to LDAP integration. - **C. Apache Jackrabbit Oak CUG Configuration:** - CUG (Closed User Group) configuration is for restricting access to specific content areas within AEM and is not directly related to LDAP integration. In summary, for LDAP Service integration in AEM, focusing on the Apache Jackrabbit Oak External Login Module and the Apache Jackrabbit Oak Default Sync Handler is essential, as these handle the core aspects of authentication and synchronization with the LDAP directory. Answer 11 --------- The correct answer to the [[question]](#question-11) is B To address the client\'s issues with query results, especially considering that users are not always searching with exact wording and are using short phrases, the focus should be on enhancing the search functionality to accommodate synonyms and potentially disregard common, less meaningful words (stop words). Based on this, the AEM developer should recommend: - **Option 2:** 1. **Add a synonyms filter to the current indexes:** This allows the indexing process to consider synonyms of terms. For example, if the client has industry-specific jargon or terms that have similar meanings, the synonyms filter can help index these terms more effectively, enabling users to find relevant results even if they don\'t use the exact term. 2. **Add a lowercase filter to the current indexes:** This ensures that the search is case-insensitive, which is important because users may not always use the correct case when searching. It helps standardize the indexed terms for more consistent search results. **Explanation of Other Options:** - **Option 1:** - A mapping filter can be useful, but it\'s more about correcting for variations in spelling rather than addressing synonyms. - A stop filter removes common words (like "and", "the", etc.) from the index. This might not be as effective in this scenario if the issue is more about synonym matching and phrase searches. - **Option 3:** - A keyword tokenizer treats the entire input as a single token, which isn\'t ideal for phrase searches where individual word relevance is important. - While a mapping filter can correct variations in spelling, it doesn\'t address the synonym issue. - **Option 4:** - While adding a synonyms filter is beneficial, adding a stop filter might not be the best choice if users are searching with phrases where common words could be significant to the context of the search. In summary, **Option 2** is the most suitable recommendation. It enhances the search functionality in AEM to better handle variations in user search behavior, such as using synonyms or different phrasings, while ensuring case insensitivity in searches. Answer 12 --------- The answer to the [[question]](#question-12) is D. **Explanation:** - **Maximum Parallel Jobs:** This setting, found in the OSGi console, specifically controls the number of workflows that can be executed in parallel. By reducing this number, you can limit the concurrent execution of workflows, thereby reducing the load on the server caused by workflows. **Why Not the Other Options?** - **A. The number of threads in Scheduler:** The Scheduler\'s thread pool is used for scheduled tasks, not specifically for workflow execution. Adjusting this would not directly impact the workflow concurrency. - **B. The number of threads in Apache Felix Jetty Http Service:** This configuration relates to the HTTP service\'s thread pool, which handles incoming HTTP requests. It is not directly related to the execution of workflows. - **C. Launchers for each workflow:** While you could technically disable or adjust workflow launchers (which trigger workflows based on certain events or conditions), this approach isn\'t about limiting concurrency but rather controlling when and if certain workflows are triggered. It\'s not as direct or effective for managing concurrent workflow execution as adjusting the \"Maximum Parallel Jobs.\" **Implementing the Change:** To adjust the \"Maximum Parallel Jobs\" setting: 1. Go to the AEM OSGi console (usually at **http://\[your-aem-instance\]/system/console/configMgr**). 2. Find the configuration for the Workflow Engine (often titled something like \"Apache Sling Workflow Engine\" or \"AEM Workflow Engine\"). 3. Locate the \"Maximum Parallel Jobs\" setting and adjust it to the desired number to control the parallel execution of workflows. 4. Save the configuration. This change should help manage the server load by limiting how many workflows can run concurrently. This change is a direct and effective way to manage the load caused by workflows on an AEM server. Answer 13 --------- The correct answers to the [[question]](#question-13) are B and C Explanation: Option B is correct because it uses the **\@Inject** annotation to inject the value of the **title** property from the dialog. The **init()** method then checks if **title** is not blank and sets **messageText** accordingly. Option D is also correct because it uses the **\@ValueMapValue** annotation with the **name** parameter to explicitly map the **title** property from the dialog to the **authoredVal** field in the Sling Model. Answer 14 --------- The correct answer to the [[question]](#question-14) is C. **Explanation:** - **Proxy Component:** Creating a Proxy Component from the core Title component allows you to leverage the existing layout and functionality of the core Title component, which satisfies the first requirement. A proxy component inherits everything from the core component but allows you to override certain aspects. - **Custom Sling Model:** By creating a Custom Sling Model that overrides the default behavior, you can prepend the page title to the component text, satisfying the second requirement. This Sling Model would fetch the page title and concatenate it with the component text. - **Reusability:** Using a proxy component ensures that you are extending a core component, making the new component reusable across projects and environments, which meets the third requirement. **Why Not the Other Options?** - **Option A:** Option A is similar to Option C, but it also mentions customizing the component template. This might not be necessary if the layout of the Title core component already meets the layout requirement. Overriding the Sling Model should be enough to prepend the page title without needing to change the template. - **Option B:** Creating a custom component from scratch isn\'t recommended when you can reuse the existing core Title component. It would involve unnecessary duplication of effort and code, and it wouldn\'t be as maintainable as extending the core component. In conclusion, Option C is the most efficient and maintainable approach that leverages existing functionality and follows best practices for AEM development. Answer 15 --------- The correct answer to the [[question]](#question-15) is A. Considering the requirements and the code provided, **Option A** is the most appropriate method to represent the model in HTL. - This option has the correct **data-sly-use.byline** statement to use the **Byline** interface. - The **\@join** option is correctly used with the **occupations** field. - This option assumes that the **empty** property is available to determine if the model has content. If not, this property must be defined in the **Byline** interface or class. Answer 16 --------- The correct answer to the [[question]](#question-16) is B The correct answer, Option B, uses the **MapTo()** function in the syntax that aligns with the AEM SPA Editor SDK\'s requirements for connecting SPA components to AEM components. Here\'s a brief explanation: - **MapTo() Syntax:** In AEM\'s SPA Editor SDK, **MapTo()** is a higher-order function used for mapping SPA components to AEM components. The function takes the **sling:resourceType** of the AEM component as its first argument and returns another function. - **SPA Component Mapping:** The returned function is then called with the SPA component and an optional configuration object. This step effectively connects the SPA component with the specified AEM component. - **Option B Structure:** Option B correctly implements this pattern: This structure ensures that the **ItemList** SPA component is correctly linked to its AEM counterpart, allowing content authored in AEM to be rendered and managed through the **ItemList** component in the SPA. Answer 17 --------- The correct answer to the [[question]](#question-17) is D. Explanation: The **data-sly-list** directive iterates over a collection and repeats the element it is declared on (and its children) for each item in the collection. Given that the current page has three children, the **li** element inside the **ul** with **data-sly-list** will be repeated three times within the same **ul**. The **data-sly-repeat** directive behaves similarly, but it repeats the entire element it\'s declared on for each item in the collection. This means that the **ul** element with **data-sly-repeat** will be repeated three times, each with a single **li**. Additional info:\ \ The **MapTo()** function in Adobe Experience Manager (AEM) is a crucial part of the SPA Editor SDK, facilitating the integration of Single Page Application (SPA) frameworks like React or Angular with AEM\'s content management capabilities. Here\'s a brief explanation of its role and functionality: **Purpose of MapTo():** - **Connects SPA Components to AEM Components:** **MapTo()** is used to map SPA components (like a React or Angular component) to corresponding AEM components defined by their **sling:resourceType**. - **Enables Dynamic Rendering:** This mapping allows dynamic rendering of content managed in AEM through the SPA components, making the SPA compatible with AEM\'s content authoring and management features. **How MapTo() Works:** - **Higher-Order Function:** **MapTo()** is a higher-order function. It first takes the **sling:resourceType** of the AEM component as an argument and returns a new function. - **Component Binding:** The returned function is then called with the SPA component and an optional edit configuration object. This step binds the SPA component to the AEM component, allowing the SPA to render content based on AEM\'s content structure and data. **Usage Pattern:** - **Syntax:** The typical usage pattern is as follows: **Role in AEM SPAs:** - **Integrating Front-end and Back-end:** **MapTo()** serves as a bridge between the front-end SPA components and the AEM back-end, ensuring that the SPA can effectively display and interact with content managed in AEM. - **Supporting AEM Authoring:** It supports AEM\'s authoring capabilities, allowing content authors to use AEM\'s tools to manage and edit content that will be rendered by the SPA. In summary, the **MapTo()** function is key to developing SPAs in AEM, ensuring seamless integration between AEM\'s powerful content management system and modern SPA frameworks. Answer 18 --------- The correct answer to the [[question]](#question-18) is A. The developer should implement the following method from the **com.day.cq.workflow.exec.ParticipantStepChooser** interface: **\ [getParticipant]**(**[WorkItem]** workItem,  **[WorkflowSession]** workflowSession, **[MetaDataMap]** args) This method is used to dynamically determine the participant of a workflow step at runtime. It returns a **String** representing the user or group ID that should be assigned to the participant step. The **WorkItem**, **WorkflowSession**, and **MetaDataMap** parameters provide the necessary context and data to make this determination. Answer 19 --------- The correct answer to the [[question]](#question-19) is D. **Explanation of Choice:** - **Centralized Management:** Experience Fragments in AEM allow for the creation of reusable content pieces (like headers and footers) that can be authored once and used across multiple pages. - **Variations:** Experience Fragments support the creation of multiple variations, enabling different versions of the Header and Footer to be created and used as needed. - **Scheduled Changes:** AEM\'s Experience Fragments can be integrated with Launches, allowing for the scheduling of content changes. This feature enables the Header and Footer to be changed for specific time periods. - **Versioning:** Experience Fragments benefit from AEM\'s versioning capabilities, allowing previous versions to be restored if necessary. **Why Not the Other Options?** - **A. Custom Component:** While custom components are flexible, they don\'t inherently provide the centralized management, scheduling, and versioning capabilities required for this use case. - **B. Content Fragment:** Content Fragments are primarily used for headless content delivery and lack the layout/design capabilities that might be needed for headers and footers. They also don't directly support scheduled variations. - **C. Static Template:** Static templates offer less flexibility for creating variations and scheduling content changes compared to Experience Fragments. - In summary, Experience Fragments offer the combination of reusability, variation management, scheduling capabilities, and versioning, making them the most suitable choice for this requirement. Answer 20 --------- The correct answer for the [[question]](#question-20) is B Explanation When using AEM as a headless CMS without the SPA Editor SDK framework, the front-end developers have full control over the application. They are responsible for the entire front-end architecture, including the SPA\'s structure, layout, and interactivity, independent of AEM\'s authoring capabilities. Answer 21 --------- The correct answer to the [[question]](#question-21) is A. **Explanation** The Teaser component in AEM\'s Core Components can handle text, images, and links, aligning well with the requirement. Extending this component and using the Style System allows for creating multiple design variations without needing to modify the component\'s code. Answer 22 --------- The correct answer to the [[question]](#section) is A. **Detailed Explanation:** - **AEM Assets HTTP API Overview:** - Adobe Experience Manager (AEM) offers a comprehensive HTTP API that allows for programmatic access to AEM assets, including content fragments. - This API is designed for headless content delivery, where AEM serves as a content repository that can be accessed by external applications and services. - **Content Fragments and JSON Export:** - Content fragments in AEM are pieces of reusable content that can be authored independently of their use on pages or in applications. - The AEM Assets HTTP API enables the retrieval of these content fragments in JSON format. This feature is particularly useful for headless CMS implementations, where content managed in AEM needs to be delivered to various channels in a structured format like JSON. - **Headless Implementation:** - In a headless CMS approach, the content management and content delivery layers are decoupled. AEM acts as a backend content repository, and the content is consumed via APIs by various front-end applications (like SPAs or mobile apps). - Using the AEM Assets HTTP API for content fragment export fits well into this architecture, as it allows external applications to fetch content from AEM in a format that\'s easy to consume (JSON). - **No Customization Needed:** - The question specifies that the export of content fragments should happen without any customization. The AEM Assets HTTP API supports this requirement out of the box, allowing for the straightforward retrieval of content in JSON format without the need for additional development or customization. - **Why It\'s Recommended:** - The use of AEM Assets HTTP API is a recommended approach in this scenario due to its simplicity, effectiveness, and alignment with headless CMS principles. It provides a ready-to-use, standard way of accessing AEM content fragments, ensuring compatibility and ease of integration with various front-end technologies. In summary, for exporting AEM content fragments in JSON format, especially in a headless CMS context, the AEM Assets HTTP API is the most straightforward and effective solution, aligning well with the requirements of modern digital experiences that rely on decoupled content management and delivery architectures. Reference [[https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/assets-api-content-fragments.html?lang=en]](https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/assets-api-content-fragments.html?lang=en) Answer 23 --------- The correct answer to the [[question]](#question-23) is D. **Detailed Explanation:** - **Optimizing Client Library Loads:** - The issue described is a common performance bottleneck in web development, where multiple **\** tags lead to numerous HTTP requests, slowing down page load times. - One of the best practices in web performance optimization is to reduce the number of HTTP requests by combining multiple files into fewer aggregated files. - **Client Library in AEM:** - In AEM, a client library (or clientlib) is a way to manage and organize JavaScript and CSS assets. It can include properties that control how these assets are loaded and combined. - **Embed Property:** - The **embed** property within a client library folder (**cq:ClientLibraryFolder** node) is used to include the assets of another client library within the current one. - By using the **embed** property, you can combine multiple JavaScript files from various client libraries into a single aggregated file. This effectively reduces the number of HTTP requests made to load these scripts. - **Why This Approach?** - This approach is particularly useful in AEM for managing client-side resources efficiently. - It enhances page performance by reducing the number of individual file requests and therefore the load time of a page. - It maintains the modularity of client libraries while optimizing their delivery to the client. **Why Not the Other Options?** - **A. Using allowProxy:** While **allowProxy** is used to enable client libraries to be proxied through the dispatcher, it does not inherently combine multiple libraries into a single file. - **B. Using categories:** Simply adding the categories property to a client library folder does not combine the files into one; it just categorizes the libraries for easier inclusion. - **C. Using dependencies:** The **dependencies** property ensures that one library is loaded after its dependencies, but like the **categories** property, it doesn\'t combine the files into one. **Conclusion:** For reducing the number of **\** tag requests on an AEM website, embedding required libraries into a single app-specific client library using the **embed** property is the most effective approach. This method optimizes the loading of JavaScript files, improving the overall performance of the website. Reference [[https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.html?lang=en]](https://experienceleague.adobe.com/docs/experience-manager-65/developing/introduction/clientlibs.html?lang=en) Answer 24 --------- The correct answer to the [[question]](#question-24) is C. **Explanation:** The use of the Adobe Client Data Layer (CDL) integrated with Core components in AEM is recommended for managing an event-driven data layer, particularly for analytics solutions. CDL provides a structured, standardized way to represent the content and state of AEM components and pages, making it efficient for data management and ensuring consistency across the application. This approach simplifies the implementation and management of analytics tracking and other event-based functionalities, aligning with Adobe\'s best practices. Answer 25 --------- The correct answer to the [[question]](#question-25) is C. - **Use a Mock Framework to Inject the EmployeeService:** - **Isolation of the Service Under Test:** By using a mock framework (like Mockito) in unit tests, you can create mock instances of dependencies, in this case, the **EmployeeService**. This allows you to isolate the **CalculationService** and test it independently of its dependencies. - **Control Over Test Scenarios:** Mocking **EmployeeService** enables you to specify the behavior of this dependency during tests. You can define how the mocked **EmployeeService** should respond to certain method calls, which is crucial for testing different scenarios and edge cases in **CalculationService**. - **Increased Test Coverage and Reliability:** Because you\'re isolating the service and controlling the behavior of its dependencies, you can cover more code paths and scenarios in **CalculationService**. This leads to more thorough testing and higher code coverage. - **No Real Service Interaction:** Mocking eliminates the need for actual service interaction, which can be time-consuming and error-prone, especially if the real service has its own dependencies, external calls, or side effects. **Why Not the Other Options?** - **A. Inject the CalculationService:** This doesn\'t address the dependency on **EmployeeService**, which is crucial for testing **CalculationService**. - **B. Instantiate EmployeeService in the Test:** Direct instantiation might not be feasible or desirable, especially if **EmployeeService** has its complexities or external dependencies. - **D. Use Feature Flag to Disable Calls:** This approach might not be viable or effective for unit testing, as it doesn\'t provide the necessary control over the behavior of **EmployeeService**. **Conclusion:** For unit testing **CalculationService** effectively, mocking its dependency (**EmployeeService**) provides the control, isolation, and flexibility needed to achieve high test coverage and ensure the reliability of the tests. Top of Form Bottom of Form Answer 26 --------- The correct answer to the [[question]](#question-26) is C. To meet the requirement for Sling Models to export data in a human-readable YAML format, the appropriate method would be: C. **Option C** 1. Create Sling models to export as yaml 2. Configure mime type in Apache Sling MIME Type Service Explanation: - **Create Sling Models**: Sling Models are Java POJOs that are annotated with **\@Model** annotations, making them adaptable from Sling HTTP requests and resources. They are used to map resource properties to Java objects. - **Export as YAML**: The Jackson dataformat YAML dependency that you have in your Maven project allows you to serialize and deserialize objects to and from YAML. It\'s necessary to implement the **ModelExporter** interface in your Sling Model in such a way that it can produce YAML output. - **Configure MIME Type**: Apache Sling MIME Type Service is responsible for determining the correct MIME type for a given request. Since YAML is not a commonly used format in web applications out of the box, you would need to add **text/yaml** or **application/x-yaml** (depending on the specific MIME type you want to use for YAML) to the MIME Type Service configuration to properly serve the YAML formatted data. The other options are less suitable: - **A & B**: While these options correctly suggest creating models to export as YAML, they mention configuring the MIME type in services that are not directly responsible for determining the MIME type based on file extensions or content types. - **D**: The Apache Sling Referrer Filter is not related to MIME types or Model Exporters; it is used for CSRF protection by filtering HTTP requests based on the HTTP Referrer header. In summary, Option C is the correct approach, which involves creating Sling Models capable of exporting data in YAML format and configuring the MIME Type Service to serve the correct content type for YAML. Answer 27 --------- The correct answer to the [[question]](#question-27) is C. **Explanation** For creating a custom workflow process step in Adobe Experience Manager (AEM), the developer needs to implement the WorkflowProcess interface. The method that should be implemented in an OSGi component for this purpose is: 'execute' - **WorkflowProcess Interface:** In AEM, the **WorkflowProcess** interface is used to define custom process steps in workflows. This interface requires the implementation of a specific method to handle the workflow execution logic. - **execute Method:** The **execute** method is the key method in the **WorkflowProcess** interface. It contains the business logic that is executed when the workflow step runs. The method signature is as follows: - **workItem**: Represents the current work item in the workflow. - **workflowSession**: Provides access to the workfl

Use Quizgecko on...
Browser
Browser