DOC-20240528-WA0000_240528_010121.pdf
Document Details
Uploaded by ConsistentNephrite5291
Tags
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 Question 2 A developer has to create a Logger and Writer pair for the company's application logging. Which OSGi configurations should...
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 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 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 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 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 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 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 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 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 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 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 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 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 @Model(adaptables = Resource.class.defaultInjectionStragegy = DefaultInjectionStrategy.OPTIONAL) public class HelloWorldModelImpl { @ScriptVariable private String authoredVal; private String messageText; @PostConstruct public void init() { if (StringUtils.isNotBlank(authoredVal)) { setMessageText(StringUtils.join("Welcome", StringUtils.SPACE, authoredVal)); } } public void setMessageText(String messageText) { this.messageText = messageText; } public String getMessageText() { return messageText; } } B. OPTION B @Model(adaptables = Resource.class.defaultInjectionStragegy = DefaultInjectionStrategy.OPTIONAL) public class HelloWorldModelImpl { @Inject private String title; private String messageText; @PostConstruct public void init() { if (StringUtils.isNotBlank(title)) { setMessageText(StringUtils.join("Welcome", StringUtils.SPACE, title)); } } public void setMessageText(String messageText) { this.messageText = messageText; } public String getMessageText() { return messageText; } } C. OPTION C @Model(adaptables = Resource.class.defaultInjectionStragegy = DefaultInjectionStrategy.OPTIONAL) public class HelloWorldModelImpl { @inject @Via(‘resource’) private String title; private String messageText; @PostConstruct public void init() { if (StringUtils.isNotBlank(title)) { setMessageText(StringUtils.join("Welcome", StringUtils.SPACE, title)); } } public void setMessageText(String messageText) { this.messageText = messageText; } public String getMessageText() { return messageText; } } D. OPTION D @Model(adaptables = Resource.class.defaultInjectionStragegy = DefaultInjectionStrategy.OPTIONAL) public class HelloWorldModelImpl { @ValueMapValue @Named(“title”) private String authoredVal; private String messageText; @PostConstruct public void init() { if (StringUtils.isNotBlank(authoredVal)) { setMessageText(StringUtils.join("Welcome", StringUtils.SPACE, authoredVal)); } } public void setMessageText(String messageText) { this.messageText = messageText; } public String getMessageText() { return messageText; } } 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 a. Create a custom component from scratch b. Create a Custom Sling Model for the component that follows the requirement c. Create a Model Exporter C. Option C a. Create a Proxy Component from Title core component b. Create a Custom Sling Model that overrides the default behavior 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 ${byline.name} ${byline.occupations @ join=', '} B. Option B ${byline.name} ${byline.occupations @ join=', '} C. Option C ${byline.name} ${byline.occupations} D. Option D ${byline.name @ join=', '} ${byline.occupations & join=', '} 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 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 This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet B. Option 2 This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet C. Option 3 This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet D. Option 4 This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet This is a sample HTL snippet 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 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 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 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 o Extend the Teaser Component from Core Components o Create style variations to be used in the Style System B. Option B oCreate a new component by extending the Text Component from Core Components o Add dialog properties and modify HTL to support images C. Option C o Extend the Text Component from Core Components o Enable image manipulations for the Text Component via policy D. Option D o Create a new Image with Text component that exposes the Core Components authoring dialogs for those components o Add a policy to define which designs are used 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 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 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 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 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: 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 1. Create OSGI models to export as yaml 2. Configure mime type in Apache Sling Servlet/Script Resolver and Error Handler C. Option C 1. Create Sling models to export as yaml 2. Configure mime type in Apache Sling MIME Type Service D. Option D 1. Create Sling models to export as yaml 2. Configure mime type in Apache Sling Referrer Filter 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 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 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 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 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 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. Operations > Diagnosis > Query Performance > Slow Queries. Select a Query and Click on Explain. Explanation: Query Performance and Slow Queries: In AEM, the Query Performance tool provides insights into the performance of queries being executed. Specifically, the Slow Queries section lists queries that are taking longer than usual to execute. By selecting a query and using the "Explain" feature, the developer can gain detailed insights into how the query is being processed, including which indexes are being used. This is crucial for understanding whether the new Lucene index definitions are being applied effectively. Why Not the Other Options? A. Download Thread Dumps: While thread dumps are useful for identifying general performance issues and long-running threads, they are less specific for diagnosing query performance issues related to Lucene indexes. B. Log Message with DEBUG on com.day.cq.search: Configuring DEBUG logging for the search component can provide information on the execution of search queries, but it won't necessarily pinpoint the efficiency of index usage or the reasons for slow query execution. C. Index Manager Consistency Check: Running a consistency check on the new indexes is useful to ensure they are not corrupted and are functioning correctly. However, it does not directly help in analyzing the performance of specific queries or in confirming if the new indexes are being utilized effectively for query execution. In summary, to investigate the issue of longer query execution times and to confirm the effective application of new Lucene index definitions, the developer should utilize the Query Performance tool's Slow Queries feature and the "Explain" option in AEM's Operations console. This approach provides targeted insights into query execution and index utilization. Reference: https://experienceleague.adobe.com/docs/experience-manager- 65/content/sites/administering/operations/operations-dashboard.html?lang=en Answer 68 The answer to the question is D. n Adobe Experience Manager (AEM), when developing a custom component that needs to list all titles of blog pages under a specific path (like /content/blogs in this scenario), the most efficient and AEM-recommended way is to utilize the PageManager API to access and iterate through the pages. Among the options provided, the correct approach would be: 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. Here's why this option is the best approach: PageManager API: This API is specifically designed for high-level operations related to AEM pages. It provides a more abstract and convenient way to work with pages compared to directly dealing with nodes. ResourceResolver to PageManager: In AEM, a ResourceResolver is used to resolve a resource (like a page or asset). The ResourceResolver can be adapted to get a PageManager instance. This is a common pattern in AEM development for accessing higher-level APIs. Iterating Through Pages: Once you have a Page object (obtained from PageManager.getPage("/content/blogs")), you can iterate through its child pages. This is more efficient and readable compared to manually iterating through nodes. Page Metadata Access: When you have a Page object, accessing page-specific properties (like the title) is straightforward. This makes the code cleaner and more maintainable. In contrast, the other options: A: Directly working with nodes (session.getNode("/content/blogs")) is more low- level and does not leverage AEM's higher-level page abstractions. B: The PageManager class is not static and should be accessed via ResourceResolver. C: Using the QueryDebugger is more of a tool for debugging and constructing queries, not a programmatic approach for component development. Answer 69 The correct answer to the question is D. Explanation. Title doesn’t have to be mandatory since is not in the requirements. So there should be defined the default value “”. Answer 70 The correct answer to the question is D. To ensure that the dispatcher caches the page and refreshes it after it gets updated, the developer should take the following action: D. Add the entry /0001 { /glob “-.html” /type “allow” } in the /invalidate section. Explanation: /invalidate Section: The /invalidate section in the dispatcher.any file specifies which files should be invalidated (removed from the cache) when certain events occur, such as a page activation. Glob Pattern for HTML: By adding a rule with /glob “*.html” (it should be an asterisk * rather than a dash -, which might be a typo), you indicate that all HTML files should be invalidated. This will ensure that when a page like /content/sampleproject/sample.html is updated, the cached HTML file is invalidated and will be refreshed upon the next request. The other options: A. Remove /statfile or /statfileslevel: The /statfile is used to mark the time of the last invalidation, and the /statfileslevel indicates the depth in the hierarchy at which the stat file is checked. Neither should be removed if the objective is to properly invalidate cached pages. B. Delete the contents of the DOCROOT directory: Manually deleting the contents of the DOCROOT directory could temporarily solve the problem by clearing the cache, but it does not provide a sustainable, automated solution for future updates. C. Change the value of the entry /statfileslevel to “3”: The /statfileslevel value of "0" means that the stat file is checked at the root of the cache, which is a common configuration. Changing it to "3" would not solve the problem if the invalidation rules are not correctly configured to match the updated files. In summary, to automate the cache invalidation process, the developer should ensure that the invalidation rules in the dispatcher.any file match the pattern of the updated files. The correct glob pattern in the /invalidate section will allow the dispatcher to invalidate the cached HTML pages when they are updated. Answer 71 The correct answer to the question is B. Answer 72 The correct answer to the question is B. In AEM (Adobe Experience Manager), when dealing with a slow-running query specifically aimed at reading a custom property (like a custom title property in your case), the appropriate type of index to improve performance is crucial. Based on the options provided, the best choice would be: B. Lucene Property index Here's why this option is most suitable: 1. Lucene Property Index: This type of index is optimized for queries targeting specific properties. If your query is designed to read a 'custom title property', a Lucene Property index would efficiently index this property, leading to faster query execution. 2. Targeted Indexing: Lucene Property indexes are ideal for scenarios where you know the exact property or properties being queried. This allows for more efficient data retrieval compared to full-text searches or other types of indexing. 3. Performance Improvement: For specific property queries in AEM, using a Lucene Property index can significantly improve performance, especially in cases where the property is frequently accessed or the repository contains a large amount of content. Now, let's discuss why the other options are less ideal: A. Ordered Index: An Ordered Index is more suitable for queries that require ordering (like sorting by date, title, etc.). If the query in question does not require sorting results, this type of index may not be the most efficient. C. Lucene Full-Text Index: While a Lucene Full-Text index is powerful for broad text searches across multiple properties and nodes, it might be overkill for a query targeting a specific property. It might also be less efficient in this context. D. Property Index: While a Property Index could be relevant, the Lucene Property Index is typically more efficient and performant in AEM, especially for queries on specific properties. Thus, a Lucene Property index (Option B) is recommended for optimizing a query that reads a specific property like a custom title in AEM. Answer 73 The correct answer to the question is C. To configure the replication agent for flushing the dispatcher cache when a new page is activated in Adobe Experience Manager (AEM), the appropriate approach is: C. Create a dispatcher flush agent in the publish instance. Here's the rationale for this choice: Dispatcher Flush Agent: A dispatcher flush agent is specifically designed to clear the dispatcher cache. Whenever content is activated (or published), this agent ensures that the cache is updated to reflect the latest content. Configure in Publish Instance: The dispatcher flush agent needs to be configured in the publish instance of AEM. This is because the publish instance is responsible for serving the live content, and hence, it's where the cache needs to be cleared to reflect new or updated content. Now, let's examine why the other options are less appropriate: A. Set the serialization type property of the default agent to dispatcher flush: The default replication agent is typically used for content replication (publishing content from author to publish instance), not for cache flushing. Changing its serialization type would not be the standard approach for this requirement. B. Create a new replication agent and set transport URI to point to the dispatcher: While creating a new replication agent is part of the process, simply pointing its transport URI to the dispatcher is not sufficient. The agent needs to be specifically configured as a dispatcher flush agent. D. Create a reverse replication agent on the author instance: Reverse replication is used for a different purpose — to bring content from the publish instance back to the author instance. It's not relevant for flushing the dispatcher cache. Therefore, the correct answer is C, where you create a dispatcher flush agent on the publish instance. This ensures that when pages are activated or updated, the dispatcher cache is appropriately cleared, allowing the changes to be reflected immediately on the live site. Answer 74 The correct answer to the question is C. To ensure that a third-party OSGi bundle, which is not included in the out-of-the-box Adobe Experience Manager (AEM) and is required by a custom AEM application, is installed and available in all environments, and can be upgraded independently, the best approach would be: C. Embed the bundle in a content package to have it automatically deployed. Here's the rationale for this choice: Content Package for Deployment: AEM uses content packages for deploying and managing content and code across different environments. By embedding the third- party OSGi bundle in a content package, you ensure that it gets installed in the AEM instance when the package is deployed. This approach is convenient for ensuring the bundle is present in all environments (development, staging, production, etc.). Independent Management: Embedding the third-party bundle in a content package allows for independent management and upgrade of this bundle, separate from the custom AEM application. When updates to the bundle are needed, you can update the content package and redeploy it, without the need to modify your custom AEM application. Now, let's consider why the other options are less suitable: A. Add the dependency to the third-party bundle in the pom.xml of the project bundle: This approach is generally used for compile-time dependencies and doesn't ensure that the third-party bundle is deployed in the runtime environment. B. Embed the third-party bundle in the bundle that depends on it: This method would tightly couple the third-party bundle with your custom AEM application, making it difficult to upgrade the third-party bundle independently. It's not suitable when the requirement is to have the bundle available for multiple applications and manageable separately. D. Declare the dependency correctly using a link to the OSGi Bundle Repository (OBR): While this approach can ensure that the bundle is available, it relies on external repository management and might not be the most straightforward or reliable method for ensuring the bundle is installed across all AEM environments. Therefore, embedding the third-party OSGi bundle in a content package (Option C) is the most suitable method to ensure it is consistently deployed across all AEM environments and can be managed independently of the custom AEM application. Answer 75 The correct answer to the question is D. For searching exception stack traces in an Adobe Experience Manager (AEM) environment, the appropriate log file to check is: D. /crx-quickstart/logs/error.log Explanation for this choice: error.log: This log file in AEM is specifically used for logging errors and exceptions. It records runtime issues, including stack traces of exceptions. When an error or exception occurs, it gets logged here with detailed information, which is crucial for debugging purposes. Let's briefly look at what the other log files typically contain: A. access.log: This log file usually records all HTTP access requests to the AEM instance. It's more about tracking the incoming requests and doesn't typically include information about exceptions or stack traces. B. info.log: The info.log file records informational messages about the system's operation. While it might contain some warnings, it is not primarily used for logging errors or exceptions. C. request.log: This file logs details about HTTP requests processed by the AEM instance. Like access.log, it focuses on HTTP request data rather than error or exception information. For detailed exception analysis, including stack traces, error.log is the most relevant and informative log file. Answer 76 The correct answer to the question is A. To analyze requests with long response times on an AEM site, the most effective approach among the given options is: A. Use rlog.jar with the following command: $ java -jar../opt/helpers/rlogs.jar -n 10 requests.log to identify long-running requests. Explanation: rlog.jar: This is a log analysis tool specifically designed for parsing and analyzing AEM log files. It can be used to analyze various aspects of logs, including identifying slow-running requests. Command Usage: The provided command ($ java -jar../opt/helpers/rlogs.jar -n 10 requests.log) suggests using rlog.jar to analyze the top 10 long-running requests from the requests.log file. This is directly relevant to identifying requests with long response times. Now, let's look at why the other options are less suitable: B. Use proxy.jar: The command mentioned for proxy.jar is generally used for debugging communication between the webserver and AEM server. While it can be helpful in some scenarios, it's more oriented towards analyzing network issues rather than identifying slow-running AEM requests directly. C. Download Heapdumps: Analyzing heap dumps using tools like the Memory Analyzer Tool is more about understanding memory usage and identifying memory leaks or other memory-related issues. While valuable, it's not specifically tailored to identifying slow requests. D. Embed /libs/foundation/components/timing: Embedding a timing component in the Page Component can help in measuring page load times in a browser. However, this method is more suited for front-end performance analysis and doesn’t specifically target the identification of slow server-side requests. Therefore, option A, utilizing rlog.jar to analyze the requests.log for long-running requests, is the most direct and effective method for the situation described. Reference https://www.cqtutorial.com/courses/cq-admin/cq-admin-lessons/cq-performance-tuning/cq- response-time-analysis Answer 77 The correct answers to the questions are A and E. In the context of a complex project with multiple bundles in an OSGi framework, where one bundle provides an OSGi service for other bundles, the two necessary options to ensure that the other bundles can reference that OSGi service are: A. The bundles consuming the service need to import the fully qualified name of the service interface. E. The bundle providing the service needs to export the Java package of the service interface. Explanation: A. Importing the Service Interface: For a bundle to use an OSGi service, it must import the package that contains the service interface. This is done in the bundle's manifest file. Importing the fully qualified name of the service interface ensures that the consuming bundle knows which service it is accessing. E. Exporting the Service Interface Package: The bundle that provides the service must export the Java package containing the service interface. This is also specified in the bundle's manifest file. By exporting the package, the service becomes available to other bundles in the OSGi container. Now, let's consider why the other options are not necessary in this context: B. Declaring Metatype Information: While metatype information is useful for providing metadata about OSGi services (like configuration details), it is not strictly necessary for a bundle to reference an OSGi service. C. Whitelist of Allowed Consumer Bundles: OSGi does not require a bundle providing a service to maintain a whitelist of allowed consumer bundles. Service availability in OSGi is generally controlled through package exports and imports, not explicit whitelists. D. Adequate SCR Descriptor File: SCR (Service Component Runtime) descriptor files are important for declaring service components in OSGi, especially when using Declarative Services. However, the existence of an SCR descriptor in the providing bundle is not a requirement for other bundles to reference the service. It's more about how the service is registered and declared in the provider bundle. Therefore, options A and E are the correct answers, focusing on the import and export of the service interface package, which is crucial for service discovery and usage in an OSGi environment. Answer 78 The correct answer to the question is A. (the question is confusing. Maybe is better B) To safely install a new content package on an Adobe Experience Manager (AEM) environment where a content package with the same name is already installed, ensuring that only the changes from the new package get applied, the most suitable approach is: A. Use the “Force Upload” option when uploading the new content package. Explanation: Force Upload: When you use the "Force Upload" option in AEM's package manager, the new package is uploaded even if a package with the same name already exists. This option ensures that the new package overrides the existing one. Crucially, it merges the content of the new package with the existing content, applying only the changes included in the new package. This is typically the desired behavior when updating or modifying existing content. Let's discuss why the other options are less suitable: B. Uninstall the Existing Content Package: Uninstalling the existing package before installing the new one can lead to unnecessary loss of data or configurations that are not part of the new package. This approach might not be safe if the new package does not contain a full set of the previously installed data. C. Upload the Content Package to the CRX Package Share: Uploading the package to the CRX Package Share is more about sharing packages across different AEM instances or with other users. It does not directly address the issue of safely installing a package where a version already exists. D. Install the Content Package Using the OSGi Web Console: The OSGi web console is typically used for managing OSGi components and configurations, not for installing content packages. AEM content packages are usually managed through the package manager, not the OSGi console. Therefore, option A, using the "Force Upload" option, is the safest and most effective way to ensure that only the changes in the new content package are applied without losing any existing data or configurations that are not part of the new package. Answer 79 The correct answer to the question is A. Reference: https://sling.apache.org/documentation/the-sling-engine/servlets.html#caveats-when-binding- servlets-by-path Answer 80 The correct answer to the question is A. To ensure that the user service mapping for a service component in a custom Adobe Experience Manager (AEM) application is available, especially when accessing the JCR repository within the activate method using ResourceResolverFactory.getServiceResourceResolver(...) without specifying a sub-service name, the developer should: A. Create a field of type ServiceUserMapped and annotate it with @Reference. Explanation: ServiceUserMapped: This is an AEM-provided interface that represents a mapping between a service and a user. It is used for authentication and accessing the JCR repository in a way that respects the principle of least privilege. @Reference Annotation: By using the @Reference annotation, OSGi will inject an instance of the mapped service user into the service component. This ensures that the service component has the necessary permissions to access the JCR repository. No Need for Dynamic Policy: For this use case, a dynamic reference policy (which allows for the reference to be changed dynamically at runtime) is not necessary. The service user mapping is typically a static configuration that does not change often. ServiceUserMapper vs. ServiceUserMapped: ServiceUserMapper is a different interface used for creating mappings, not for utilizing them in a service component. ServiceUserMapped is the correct interface for this purpose. Let's consider why the other options are less appropriate: B. Wait for the service ServiceUserMapper via BundleContext.getServiceReference(...): This approach is more low-level and manual. Using OSGi annotations like @Reference is a more streamlined and idiomatic way of handling service dependencies in AEM. C. Create a field of type ServiceUserMapped and annotate it with @Reference using ReferencePolicy.DYNAMIC: As mentioned earlier, a dynamic reference policy is not necessary for service user mappings in most cases. D. Create a field of type ServiceUserMapper and annotate it with @Reference using ReferencePolicy.STATIC: The ServiceUserMapper interface is not the correct choice for injecting a user-service mapping into a service component. ServiceUserMapped is the appropriate interface for this scenario. In summary, creating a field of type ServiceUserMapped and annotating it with @Reference (Option A) is the correct approach to ensure that a service component has access to the necessary user service mapping for accessing the JCR repository in AEM. Answer 81 Answer 82 The correct answer to the question is A. To reference only the CSS files of a Client-Side Library with the category "library.example" in HTL (HTML Template Language) for Adobe Experience Manager (AEM), the correct HTL statement is: A. Explanation: data-sly-use.clientlib: This HTL statement imports the clientlib.html template, which is used for managing client-side libraries in AEM. data-sly-call with clientlib.css: The clientlib.css function is used to include CSS files from the specified client libraries. categories='library.example': The categories parameter is used to specify which client library category's CSS files should be included. In this case, the category is 'library.example'. The clientlib.css function uses the categories parameter (not category) to specify the client library category. The other options: B: Incorrect because the parameter should be categories, not category. C: Incorrect because it uses an incorrect category name ('library.example.css') and the clientlib.all function, which includes all resources (CSS and JS) rather than only CSS. D: Incorrect because clientlib.all does not accept a type parameter and would include all resources (CSS and JS), not just CSS. Thus, option A is the correct and most appropriate way to include only the CSS files from a client-side library categorized as "library.example" in an AEM project. Answer 83 The correct answer to the question is D. Reference: https://experienceleague.adobe.com/docs/experience-manager- 65/content/implementing/developing/platform/templates/page-templates- editable.html?lang=en Answer 84 The correct answer to the question are C and D. To ensure high testability of the application code in the described AEM banking application, the developer should adopt the following two strategies: 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. Explanation of Choices: C. Mock Framework: Using a mock framework (like Mockito) is essential for unit testing in OSGi/AEM environments. It allows the creation of mock objects for testing, enabling the simulation of complex interactions and conditions without relying on actual service implementations. This approach is crucial for achieving high JUnit coverage, especially when testing various combinations of input parameters and edge cases. D. @Reference Annotation: The @Reference annotation is used in OSGi service components to manage service dependencies. This declarative approach ensures that the OSGi runtime handles service injection, making the code cleaner, less error-prone, and easier to test. It allows for better separation of concerns and makes unit testing more straightforward, as service dependencies can be easily mocked. Why Other Options Are Less Suitable: A. BundleContext.getServiceReference(...): Using BundleContext to manually look up services adds unnecessary complexity and tightly couples the code to the service lookup mechanism. This approach can make unit testing more challenging and lead to boilerplate code. B. Static Methods: While static methods might reduce boilerplate in some cases, they can significantly hinder testability. Static methods are hard to mock in tests, leading to less flexible and more complicated test setups. E. Third Party Dependency Injection Container: Introducing a third-party dependency injection container might not be necessary or efficient in an OSGi environment, where dependency injection is already effectively handled through the OSGi service layer. It could add complexity without providing substantial benefits over the native @Reference annotation. In summary, using a mock framework for creating and injecting mocks (Option C) and leveraging the OSGi @Reference annotation for dependency wiring (Option D) are the most effective strategies for ensuring high testability of the application code in this scenario. Answer 85 The correct answer for the question are B and D. To resolve an OSGi bundle dependency error as shown in the stack trace, the developer could consider the following two options: 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. This option is viable because the Dependency Finder tool can help determine if the required package is already being exported by another bundle at a different version, which might be causing a conflict. Adjusting the version in the project's pom.xml to match the exported version can resolve version conflicts. 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. This method involves including the dependency in the build process so that it becomes part of the OSGi bundle's classpath at runtime. This can resolve issues where the bundle is missing a dependency that it requires to function. Why the other options are less suitable: A. Install the jar via the curl command: While this command uploads and installs a package via AEM's package manager, it's not always suitable for resolving bundle dependencies. OSGi dependencies are best managed within the context of OSGi's dependency resolution mechanism, not just by uploading a jar. C. Create a "deploy" folder: This is a valid method to manually install a jar as an OSGi bundle in AEM. However, it is more of an ad-hoc solution and not a best practice for dependency management within a development cycle. E. Upload the jar into /apps/project/libs folder in CRXDE: Simply placing a jar in the /apps directory does not install it into the OSGi framework. Bundles need to be properly installed and started within the OSGi container to be active and resolve dependencies. In summary, options B and D are practical approaches to resolving the OSGi bundle dependency issue, as they work within the proper mechanisms provided by the OSGi framework and the Maven build process. Answer 86 The correct answer is A. Answer 87 The correct answer to the question is C. For an author to be able to instantiate a workflow on a content page in Adobe Experience Manager (AEM), the user must have the necessary write permissions on specific nodes that the workflow process interacts with. When starting a workflow, AEM creates a workflow instance under a specific node in the repository. The node that must have WRITE permission for the author to successfully start a workflow is: /var/workflow/instances node Explanation: /var/workflow/instances: This is the node where AEM stores the runtime instances of workflows. When a workflow is started, AEM attempts to create a new instance under this node. Therefore, if the author does not have write permissions to this node, they will encounter a workflow exception due to insufficient access rights. The other nodes have different purposes: /conf/global/settings/workflow/models: This node stores the workflow models' definitions. Write permission here would be necessary for creating or modifying workflow models, not for starting an instance of a workflow. /var/workflow/models: Like the /conf/global/settings/workflow/models node, this is also related to the definitions of workflow models. In older versions of AEM, workflow models were stored here. Authors typically need read access to this node to view the models, but write access is not required for starting workflows. /content//en/content-page node: While authors need write permission on the content nodes to edit the content, this permission is not related to the instantiation of workflows. The workflow instance itself is stored under /var/workflow/instances. Therefore, to resolve the workflow instantiation issue, the AEM developer should ensure that the author has the necessary write permissions on the /var/workflow/instances node. Answer 88 The correct answer to the question is C. Answer 89 The correct answer to the question is D. The recommended approach to support custom languages in an AEM application that are not provided out of the box (OOB) is: D. Overlay /libs/wcm/core/resources/languages and add custom languages. Explanation: Overlaying: In AEM, overlaying is the process of creating a node in the /apps directory that corresponds to a node in the /libs directory. By doing this, you can extend or customize the out-of-the-box functionality provided by AEM without directly modifying the /libs content, which is not recommended because it can be overwritten by AEM updates and upgrades. /libs/wcm/core/resources/languages: This is the default node where AEM stores its language definitions. By overlaying this node, you can add custom languages to the list that AEM uses to determine available languages for sites. The other options are not recommended: A. Adding to the website’s content pages: Adding languages directly to content pages does not provide a scalable solution and does not integrate with AEM's language management capabilities. B. Adding in AEM Projects: Languages are a part of the content structure and are not typically managed through AEM Projects. Projects are used for managing a set of related resources for a team, such as pages, assets, and workflow models for a specific campaign or work package. C. Overriding: Direct modifications to the /libs directory are not recommended because it can lead to issues during AEM upgrades or when applying service packs. Therefore, overlaying the languages node is the best practice for adding custom languages, as it allows for customization while maintaining the integrity and upgradeability of the AEM instance. Answer 90 If old workflows are no longer being instantiated after an upgrade from AEM v6.5, the root cause could be: D. Workflow models are defined in /etc/workflow/models. Explanation: /etc/workflow/models: In AEM, the location /etc/workflow/models was used in earlier versions to store workflow models. With the newer versions of AEM, especially starting with AEM 6.4, Adobe has been moving configuration and design- related content out of the /etc directory into other areas, such as /conf and /var. If the workflow models were not migrated to the newer recommended location during the upgrade, they would not be recognized or used by the updated AEM instance. /var/workflow/models: This option is incorrect because /var/workflow/models is not typically used for defining workflow models; it is used for running instances of workflows. /conf/global/settings/workflow/launcher/config: Workflow launchers are correctly located in /conf/global/settings/workflow/launcher/config in newer versions of AEM. This should not cause workflows to stop working unless the launchers themselves are misconfigured or disabled. /conf/global/settings/workflow/models: This is the correct location for workflow models in newer versions of AEM. If the models are defined here, it would indicate they have been migrated correctly and should not be the root cause of the issue. In conclusion, the workflows defined in the deprecated /etc/workflow/models location are likely not being instantiated because they have not been migrated to the new location that is recognized by the updated version of AEM. The migration process should have included moving these workflows to the /conf or another appropriate location, and updating any references to them accordingly. Answer 91 The current answer to the question is B Reference: https://experienceleague.adobe.com/docs/experience-manager-htl/content/global- objects.html?lang=en Answer 92 The correct answer to the question is B. To resolve the issue of enabling the Style System within Editable Templates to allow authors to switch between Dark and Light themes, the developer should: Define Style Definitions using PagePolicy dialog on Editable Template. Explanation: Style Definitions in PagePolicy: The Style System in Adobe Experience Manager (AEM) allows developers to define various styles that can be applied to components and templates. These styles are configured in the template's policy. By defining the Dark and Light themes within the PagePolicy dialog, authors can choose between these styles when editing pages based on the template. The other options are not as directly related to enabling the Style System: Creating Two New Client Libraries: While this is a valid approach to create different themes, it doesn't leverage the Style System directly. Authors would not be able to switch themes using the Style System dialog, and this setup might require additional development effort to switch styles dynamically. Setting sling:resourceSuperType: Changing the sling:resourceSuperType to core/wcm/components/page/v2/page does not directly affect the availability of the Style System. This property is used to inherit functionality from another component (in this case, a core component provided by AEM), but it does not enable the Style System on its own. Creating a New Dialog for the Custom Page Components: Creating a new dialog is a way to provide additional configuration options for a component. However, it is not the standard method for enabling the Style System in Editable Templates. Therefore, defining the Dark and Light theme styles in the PagePolicy dialog of the Editable Template is the recommended approach to enable authors to switch between these themes using the Style System. Answer 93 The correct answer to the question is D. Answer 94 The correct answer to the question is C. In the context of the dispatcher configuration for Adobe Experience Manager (AEM), a page will be cached using the ignoreUrlParams configuration under the following condition: C. When a request URL contains parameters that are all ignored, the page is cached. Explanation: Ignore URL Parameters: The ignoreUrlParams configuration in the dispatcher allows you to specify which query parameters in the URL should be ignored when deciding whether to cache a page. The dispatcher typically does not cache pages with query parameters to avoid caching multiple versions of the same page for different parameter values. All Parameters Ignored: For a page to be cached despite having URL parameters, all the parameters present in the request URL must match those configured to be ignored in the dispatcher settings. If any parameter in the URL is not in the list of ignored parameters, the page won't be cached. The other options are incorrect in this context: A: This option suggests that if even one parameter is ignored, the page will be cached. However, if other parameters in the URL are not on the ignore list, the page still won’t be cached. B: The presence of a suffix is not directly related to the ignoreUrlParams configuration. The suffix is part of the URL path, not a query parameter. D: This example with /glob “q” /type “deny” suggests a configuration that denies caching for URLs with the q parameter. It's the opposite of ignoring a parameter for caching purposes. Therefore, option C is correct — a page is cached when all the parameters in the request URL are included in the dispatcher's ignoreUrlParams configuration. Answer 95 The correct answer to the question is D. If you are encountering a "Deployment Pending" status when trying to deploy code or content in Adobe Experience Manager (AEM), the appropriate action to take is: Log into Cloud Manager Explanation: Cloud Manager: In AEM as a Cloud Service, Cloud Manager is the primary tool for managing and orchestrating code deployments to AEM environments. If your deployment is pending, logging into Cloud Manager will allow you to check the status of your deployment pipeline, identify any issues, and take necessary actions. Check Deployment Status: Within Cloud Manager, you can view the details of your deployment pipeline, including each stage of the process – from code commit, through testing, to deployment. This visibility can help you understand why the deployment is pending. Diagnose and Resolve Issues: If there are issues causing the deployment to be pending, such as failed tests or configuration problems, Cloud Manager will provide information on these issues. You can then address these problems to resume or restart the deployment process. The other options are less direct in resolving a "Deployment Pending" status: Contact System Administrator: While this could be a step if you're unable to resolve the issue through Cloud Manager or if you suspect system-level problems, it’s generally more efficient to first check Cloud Manager for details. Create a New Program: Creating a new program in Cloud Manager is not relevant to resolving a deployment issue. It’s more related to initializing new projects or streams of work. Go to Developer Console: The Developer Console is useful for development and debugging but does not directly manage deployment pipelines in AEM as a Cloud Service. Therefore, the most effective first step is to log into Cloud Manager, where you can view and manage the deployment pipeline and address any issues that are causing the deployment to be pending. Reference: https://experienceleague.adobe.com/docs/experience-manager-learn/cloud- service/debugging/debugging-aem-as-a-cloud-service/build-and-deployment.html?lang=en Answer 96 The correct answer to the question is D. To resolve the issue of JavaScript files not being present in the client library when it is loaded, based on the given client library node structure, the developer should: D. Add #base=js as the first line in the js.txt file Explanation: #base Directive: The #base directive in the js.txt (or css.txt) file of an AEM client library is used to specify the base path for the relative paths of the files listed in it. By adding #base=js, you're telling AEM to look for the JavaScript files in the js subfolder relative to the js.txt file. Correct Structure for js.txt: The js.txt file should start with #base=js, followed by the list of JavaScript files. This way, AEM knows to look in the clientlibs/js directory for javascript1.js and javascript2.js. The corrected js.txt would look like this: #base=js javascript1.js javascript2.js Answer 97 The correct answer to the question is C. To check what packages a bundle is exporting in Adobe Experience Manager (AEM), you should use: B. Apache Felix Web Console Explanation: Apache Felix Web Console: This is a web-based console for managing and inspecting OSGi frameworks, specifically Apache Felix, which is the OSGi framework used by AEM. In the Felix Web Console, you can view detailed information about each OSGi bundle, including the packages it exports. This is crucial for understanding bundle dependencies, resolving issues, and managing the OSGi components. How to Use: To access the Apache Felix Web Console, you typically navigate to a URL like http://[your-aem-instance]:4502/system/console. From there, you can browse to the "Bundles" section to see a list of all OSGi bundles. By clicking on a specific bundle, you can view its details, including exported and imported packages. Answer 98 The correct answer to the question is A. If you encounter a situation where a checklist indicates 0% code coverage and marks it as a failure, the appropriate action would be: A. Write a unit test that provides at least 50% coverage Explanation: Unit Tests for Code Coverage: Code coverage is a metric used to measure the percentage of your code that is covered by automated tests, typically unit tests. Writing unit tests to cover a significant portion of your code is essential in ensuring that your application is functioning as expected and to catch any potential bugs or issues. Minimum Coverage Requirement: Often, projects or organizations set a minimum code coverage threshold (like 50%) to ensure a basic level of testing is maintained. Achieving at least this level of coverage can help prevent common issues and improve code quality. The other options are not directly related to addressing the issue of code coverage: B. Performance Test: While performance testing is important, it does not contribute to code coverage. Code coverage specifically relates to how much of the codebase is exercised by unit tests. C. Turn Code Coverage Off: Turning off code coverage measurement is not a solution to low code coverage. It ignores the problem rather than addressing it and can lead to poor code quality and potential bugs in production. D. Use SonarQube: SonarQube is a tool for continuous inspection of code quality, which can measure code coverage among other metrics. However, simply using SonarQube won't increase code coverage; you still need to write the unit tests. SonarQube can help identify areas where code coverage is lacking and enforce quality gates, but the fundamental solution is to write more comprehensive unit tests. In summary, to address a 0% code coverage issue, focus on writing and improving unit tests to cover a substantial portion of the code, aiming to meet or exceed any set thresholds for code coverage. Answer 99 The correct answer to the question is D. If webhooks are disallowed by security in your environment and you need an alternative method for receiving event notifications, you should use: Journaling API Explanation: Journaling API: This API is often used in scenarios where webhooks are not suitable or allowed due to security or other constraints. The Journaling API allows applications to periodically poll for and retrieve events, rather than having events pushed to them as in the case of webhooks. This can be a more secure and controlled way to handle event-driven data, especially in environments with strict security policies. GDPR Event: This is more specific to handling events related to GDPR (General Data Protection Regulation) compliance and wouldn’t typically replace general- purpose webhooks. Cloud Manager API: While the Cloud Manager API is crucial for automation and management of AEM Cloud environments, it's not a replacement for webhooks in terms of receiving general event notifications. Adobe Management API: This API provides capabilities around managing Adobe Experience Cloud solutions, but it's not specifically a replacement for webhook functionality. In summary, the Journaling API is the most appropriate choice when webhook usage is restricted. It provides a way to receive event data in a manner that complies with stringent security requirements. Answer 100 The correct answer to the question is D. You would want to integrate with Adobe I/O for: D. Obtaining Asset metadata Explanation: Adobe I/O: Adobe I/O is the primary platform for developers to integrate with Adobe's Cloud services. It offers APIs and SDKs to work with various Adobe technologies and services, including the Adobe Experience Manager (AEM), Adobe Creative Cloud, Adobe Analytics, and more. Asset Metadata: Adobe I/O provides APIs that can be used to interact with assets stored in Adobe solutions like Adobe Experience Cloud, including AEM. These APIs can be used to retrieve metadata of assets, automate asset management tasks, and integrate asset data with other systems or custom applications. The other options are not typical use cases for Adobe I/O integration: A. Clearing Dispatcher Cache: Clearing the dispatcher cache is usually handled internally within the AEM infrastructure or via specific dispatcher control mechanisms, not typically through Adobe I/O. B. Indexing: While Adobe I/O offers APIs for various purposes, indexing of content is generally handled by AEM's built-in search and indexing features, such as Oak indexes, rather than external APIs. C. Creating a Report about an Issues: While Adobe I/O might provide some level of integration with analytics and reporting tools, creating reports about issues is usually more directly handled by internal AEM tools or Adobe Analytics, rather than a general integration with Adobe I/O. In summary, Adobe I/O is a versatile platform for integrating various Adobe services and is particularly useful for scenarios like obtaining asset metadata from Adobe Experience Cloud applications. Answer 101 The correct answer to the question is C. To start a pipeline, typically a REST API call is made to trigger the pipeline execution. Among the options provided, the correct command to start a pipeline is: A. PUT http://something/program/{programID}/pipeline/{pipelineID}/executions Answer 102 Da capire Answer 103 The correct answer to the question is C. To automatically truncate request log files once they exceed 10 MB, the developer should modify the: C. Apache Sling Logging Writer Configuration Explanation: Apache Sling Logging Writer Configuration: This OSGi configuration is responsible for managing the behavior of log writers in Apache Sling, which underpins Adobe Experience Manager (AEM). It allows you to specify parameters such as the maximum file size of log files. By setting the appropriate size limit (in this case, 10 MB), you can ensure that log files are truncated or rolled over when they reach the specified size. Apache Sling Customizable Request Data Logger: This is used for logging request data, but it does not directly control the file size or truncation of log files. Adobe Granite Log Analysis Service: This service is more about analyzing log data rather than managing the size or rotation of log files. Apache Sling Logging Configuration: While this configuration is related to logging, it's more about general logging settings and not specifically about managing the file size or rotation of individual log files. In summary, modifying the "Apache Sling Logging Writer Configuration" is the correct approach to set a size limit on log files, including request log files, in an AEM environment. This configuration allows you to control how log files are managed when they reach a certain size. Answer 104 The correct answers to the question are A and E. When implementing a full Single Page Application (SPA) in Adobe Experience Manager (AEM) with frontend routing, there are certain limitations to consider. Two of these limitations are: E. Cannot generate a true 404 response for dynamically generated pages. In a full SPA implementation where routing is handled by the frontend (e.g., React or Angular), the server might not be aware of the client-side routes. Therefore, it can be challenging to generate a true 404 HTTP response status for non-existent SPA routes, as the server initially responds with the main SPA page, and the routing logic then takes over in the browser. A. Cannot mix SPA components with AEM components. In a full SPA implementation, the entire page is typically rendered by the SPA framework. This approach can limit the ability to mix traditional AEM components with SPA components on the same page. The entire page is often rendered as a single component, and the granular control offered by AEM's component model is less applicable. The other options are not inherent limitations of a full SPA implementation in AEM: B. Metadata must be stored in two locations: app and page: This is not a strict limitation. While managing metadata in a SPA can be different than in traditional AEM implementations, it doesn't necessarily require duplication across the app and page. C. Cannot extend WCM Core components: Extending WCM Core components is still possible in an AEM SPA implementation, although the approach might differ from traditional AEM development. SPA components can be created that extend or interact with the functionality of WCM Core components. D. Cannot generate sitemaps: Generating sitemaps is possible in an AEM SPA setup. While SPA implementations can make this more complex (due to client-side routing), it's not an inherent limitation and can be addressed through various strategies, such as server-side rendering or using tools and scripts to generate sitemaps. In summary, the main challenges in a full SPA implementation in AEM with frontend routing include the inability to generate a true 404 response for non-existent SPA routes and the difficulty in mixing SPA components with traditional AEM components. Answer 105 Tue correct answer to the question is B. To ensure that an existing workflow runs only when pages are created under a specific folder in Adobe Experience Manager (AEM), the developer should create: B. A Launcher with the field path pointing to the folder and nodetype field have the value cq:Page. Explanation: Launcher Configuration: A Launcher in AEM is used to trigger workflows based on specific conditions or events. The configuration of a Launcher defines when and for which resources the workflow should be executed. Path Field: The path field in the Launcher configuration specifies the JCR (Java Content Repository) path under which the workflow should be triggered. By setting this to the desired folder path, you can restrict the workflow execution to only those resources located within that folder. Nodetype Field: Setting the nodetype field to cq:Page ensures that the workflow is triggered only for nodes of type cq:Page, which corresponds to AEM pages. The other options have issues: A: A Launcher with an exclude condition like !jcr:nodetype==cq:Page would actually exclude pages, which is contrary to the requirement. C: Specifying a condition like jcr:content/jcr:primaryType==cq:Page is not the standard approach for a Launcher. The condition field is typically used for more complex conditions. In most cases, just setting the path and nodetype is sufficient. D: A condition like jcr:content/page is not clear or standard for a Launcher configuration. It doesn't appropriately specify the nodetype or the required conditions for triggering the workflow. Therefore, option B is the most appropriate for ensuring that the workflow runs only for pages created under a specified folder. Answer 106 The correct answer to the question are B and A. When a build fails on its first run of mvn install in an AEM project set up using the AEM Archetype, particularly due to dependencies not being found, the two most likely causes are: B. There is no adobe-public profile configured in settings.xml The settings.xml file in Maven (~/.m2/settings.xml) needs to have the Adobe public repository configured for AEM projects. This repository contains many of the dependencies required for AEM development. If it's not configured, Maven won't be able to find these dependencies. A. The adobe-public profile dependencies are not present in the.m2 repository. If the Adobe public repository hasn't been used before, or if it's not properly configured, the required dependencies won't be present in the local Maven repository (.m2), leading to a build failure. The other options are less likely to be the direct cause of the issue: C. The build command requires at least one profile. While Maven profiles can be used to customize the build process, a basic mvn install does not necessarily require a specific profile to be specified, especially for a standard project setup using the AEM Archetype. D. The developer did not add the adobe-public profile to the build command. While it's possible to activate specific profiles from the build command, the standard setup of an AEM project usually doesn't require manually specifying the adobe-public profile each time. Proper configuration in settings.xml is typically sufficient. E. The.m2 repository has outdated dependencies. While outdated dependencies can sometimes cause issues, the problem described is more about missing dependencies, which indicates a configuration issue rather than outdated artifacts in the.m2 repository. In summary, ensuring that the settings.xml file is correctly configured with the Adobe public repository and that this repository is accessible to fetch dependencies are the most likely solutions to the problem. Answer 107 The correct answer to the question is D. Answer 108 The correct Answer to the question is A. Answer 109 The correct answer to the question is C. To obtain a ResourceResolver that can read and update the DAM assets within the context of a service component using Apache Sling Scheduler Service in AEM, the developer should use: 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(…) Explanation: Service User: AEM recommends using "service users" for backend processes that require access to the JCR repository. A service user is a JCR user with specific permissions, intended for use by services rather than human users. Service User Mapping: The PID org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended is used to map a service (identified by its service name) to a service user. This mapping is necessary for the service to obtain a ResourceResolver with the permissions of that service user. getServiceResourceResolver Method: This method is used to obtain a ResourceResolver instance that has the permissions of the mapped service user. This is the appropriate method to use within OSGi services to perform repository operations. Permissions: The service user should have the necessary read/write permissions on the DAM assets. These permissions should be configured in the repository through user management and ACL settings. The other options are not recommended: A: Modifying the com.day.cq.Security.ACLSetup is not a typical approach for obtaining a ResourceResolver in a service component. B: Using curl calls with the admin user for scheduled jobs is not a secure or scalable approach and goes against AEM best practices for service authentication and authorization. D: Configuring the 'admin' user in the ServiceUserMapperImpl is not a recommended practice due to security concerns. The 'admin' user has full access to the repository, which poses a significant security risk if misused or compromised. Therefore, option C is the best practice for obtaining a ResourceResolver with the appropriate permissions for reading and updating DAM assets in a service component context. Answer 110 The correct answer to the question is D. For sharing information between SPA (Single Page Application) components in a project, the least complex approach is generally to: D. Centralize the logic and broadcast to the necessary components. Explanation: Centralized Logic: By centralizing the state management or shared logic in a common location, such as a parent component or a dedicated state management entity, you make it easier to manage and update shared information. Components can then subscribe or listen to this centralized state and update accordingly, simplifying the flow of data. Broadcasting to Components: Once the logic is centralized, changes to the shared information can be "broadcasted" or made available to all necessary components. This can be done through standard React or Vue.js patterns like props, context, or events, depending on the complexity of the application and the depth of the component tree. The other options are more complex or less direct: A. Utilize model props to drill down and access or set the state on desired components: Drilling props can become cumbersome and difficult to maintain as the application grows and the component hierarchy deepens. It involves passing data through intermediate components, which might not need the data themselves, leading to "prop drilling." B. Implement a state library in order to share component states: Using a state management library (like Redux for React, or Vuex for Vue.js) is a common approach for managing shared state in larger applications. However, it introduces additional complexity and is usually adopted for more complex state management needs, rather than being the least complex option. C. Customize and extend the container component to leverage the object hierarchy: While extending container components can provide a mechanism for sharing state, it can also introduce tight coupling between components and the container, making the system more rigid and harder to maintain. Therefore, centralizing the logic and broadcasting the necessary information to components (Option D) is typically the least complex and most straightforward approach for sharing information between SPA components, especially in smaller to medium-sized applications. Answer 111 The correct answer to the question is A. Answer 112 The correct answer to the question is D. To enable JSON export on any component using a Sling Model in Adobe Experience Manager (AEM), the required step is: D. Annotate the Sling Model interface. Explanation: Sling Model Annotations for JSON Export: To enable JSON export for a Sling Model, you can use annotations provided by the Sling Models API. Specifically, the @Model annotation is used to declare a Sling Model, and the @Exporter annotation can be used to define an exporter (for example, a Jackson exporter for JSON). The @Exporter annotation specifies the name of the exporter (often "jackson") and the extension (usually "json"). Example: @Model(adaptables = Resource.class) @Exporter(name = "jackson", extensions = "json") public class MyModel { // Model properties and methods } Jackson Library: AEM comes with the Jackson library out of the box, which is used for JSON processing. There's no need to install it separately. OSGi Configuration: While OSGi configurations are essential for various aspects of AEM, enabling JSON export for a Sling Model specifically requires the use of annotations in the model's code, rather than an OSGi configuration. Sling Resource Merger: The Sling Resource Merger is used for overlaying and overriding resources in AEM but is not directly related to enabling JSON export for Sling Models. In summary, annotating the Sling Model interface with the appropriate exporter annotation is the key step to enable JSON export on any component using that model in AEM. Answer 113 The correct answer to the question is C. When updating a content fragment variation using the Assets HTTP API in Adobe Experience Manager (AEM) and it doesn't work as expected with POST/{cfParentPath}/{cfName}, a potential root cause could be: C. The developer needs must use PUT method instead of POST. Explanation: HTTP Methods: In RESTful APIs, the PUT method is typically used for update operations, where the entirety of the specified resource is updated. On the other hand, POST is often used for creating new resources. Therefore, to update an existing content fragment or its variation, the PUT method is more appropriate than POST. Assets HTTP API for Content Fragments: AEM's Assets HTTP API provides capabilities for working with assets, including content fragments. While the API supports various operations, the choice between PUT and POST is crucial for the intended action. Using PUT for updates ensures that the server interprets the request as an update to an existing resource rather than the creation of a new one. The other options: A. The service user doesn’t have appropriate WRITE permissions.: While it's essential for the user (or service account) making the API call to have the necessary permissions, the question scenario implies that the issue is with the method of the API call rather than permissions. B. Assets API doesn’t support WRITE operations for content fragment variations.: The AEM Assets HTTP API does support write operations for content fragments, including creating, updating, and deleting content fragments and their variations. D. Assets API doesn’t support UPDATE operation.: This is not accurate; the AEM Assets HTTP API does support update operations, but it's crucial to use the correct HTTP method (PUT for updates) to achieve the desired outcome. In summary, when updating a content fragment variation using the Assets HTTP API, it's important to use the PUT method for the request to ensure the server processes it as an update to an existing resource. Answer 114 The correct answer to the question is B. To meet the requirements of varying configurations for different staging environments, content paths, and differences between author and publish instances, the developer should use: B. A context aware configuration with buckets using an OSGi configuration Explanation: Context-Aware Configuration: This approach allows for flexible and hierarchical configurations that can vary based on the context, such as content paths. It is particularly suitable for AEM projects where configurations need to be adaptable based on the location within the content repository. Buckets with OSGi Configuration: By using "buckets" (context-specific configurations) in combination with OSGi configurations, the developer can define default configurations at the OSGi level and then override these settings for specific content paths or other contexts as needed. Staging Environments and Run Modes: The setup can further leverage AEM's run modes to differentiate configurations between different environments (e.g., development, staging, production) and between author and publish instances. The other options have limitations: A. A Custom Cloud Configuration: While cloud configurations can be used for environment-specific settings, they might not offer the same level of granularity required for varying content paths and might not differentiate between author and publish instances as seamlessly. C. One OSGi Configuration for the Set of Values with Runmodes: While OSGi configurations can indeed vary with run modes, this approach alone might not provide the needed flexibility to vary configurations based on content paths. D. A JCR Property at the Content Root Node of the Site with InheritedPageProperties: This approach could provide variability based on content paths by leveraging property inheritance, but it doesn't naturally accommodate variations between different staging environments or author/publish instances without additional mechanisms. In summary, a context-aware configuration approach, supplemented by the use of OSGi configurations and buckets, offers the most flexibility and precision to meet the specified requirements, allowing configurations to vary by staging environment, content path, and instance type. Reference: https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware- configuration.html Answer 115 The correct answer to the question is D. To extend AEM Core Components and create a custom Carousel Component, the developer should: D. Use the sling:resourceSuperType property to point to the core component. Explanation: sling:resourceSuperType: This property is used to indicate inheritance in AEM components. By setting sling:resourceSuperType to the path of the Core Carousel component, the custom component inherits all the functionality of the Core Carousel component. The developer can then override or extend this functionality as needed in their custom component. Best Practices: This approach is recommended as it adheres to AEM best practices for component development. It allows for reusability and maintainability of the code, as the original Core Component remains untouched, and only the necessary overrides or extensions are implemented in the custom component. The other options are not recommended: A. Copy the Core Carousel component to /apps/ folder: While copying the entire component could work, it's not considered a best practice. It leads to code duplication, making future upgrades and maintenance more difficult. B. Make changes to the original component and assign a component group: Modifying the original Core Components is highly discouraged as it can lead to issues during upgrades and does not follow best practices for maintainability and reusability. C. Use the sling:resourceType property to point to the core component: While sling:resourceType is crucial for defining the type of a resource, it's not used for indicating inheritance or extension of components. This property typically points to the component itself, not to a parent or super component. In summary, using the sling:resourceSuperType property to extend a Core Component is the correct and best practice approach for creating custom components in AEM. Answer 116 The correct answer to the question is A. To resolve the issue of the Client Library missing on the page when loaded through the dispatcher, while ensuring security, the developer should: A. Add the property allowProxy with a boolean value true. Explanation: allowProxy Property: This property is used within the definition of a Client Library to indicate that the library can be proxied through the /etc.clientlibs path. This approach is recommended for security and performance reasons, as it allows the Client Library to be cached by the dispatcher while keeping the /apps path protected. Proxying Client Libraries: By setting allowProxy to true and using the proxy servlet available in recent AEM versions, the Client Library can be accessed through a common /etc.clientlibs path that can be safely exposed and cached by the dispatcher. This maintains the security of the /apps directory by not exposing it directly. The other options have limitations or potential security implications: B. Allow the path to the clientlibs on the dispatcher: Directly allowing access to /apps paths in the dispatcher could lead to security risks, as it might expose sensitive parts of the repository. C. Move the Client Library under /apps//library: Moving the Client Library might not resolve the issue if the /apps path is still not accessible due to dispatcher security configurations. Additionally, the standard practice is to keep Client Libraries under /apps and use the allowProxy mechanism for access. D. Change the ACLs for the Client Library: Modifying ACLs (Access Control Lists) might not affect how the dispatcher caches and serves the Client Library. The issue is more related to dispatcher configuration and the proxy mechanism rather than JCR permissions. In summary, setting the allowProxy property to true for the Client Library is the recommended approach to resolve the issue in a secure manner, leveraging AEM's proxy capabilities for Client Libraries. Answer 117 The correct answer to the question is C. In the most recent versions of the AEM Project Archetype, several modules are optional and can be included or excluded based on the specific needs of the project. Among the options provided: C. Ui.frontend Explanation: Ui.frontend: This module is used for projects that require a separate frontend build process, typically involving modern JavaScript frameworks and tools like React, Angular, or general frontend assets that need to be compiled (e.g., SASS to CSS). If the project does not have a sophisticated frontend component or if frontend development is handled differently, this module can be considered optional. The other modules typically serve essential functions in an AEM project: Ui.content: Contains the content packages for the project, including templates, components, and any predefined content. This module is usually essential for most AEM projects. It.launcher: Used for integration tests, specifically to launch AEM as a cloud service SDK for testing purposes. While integration tests are crucial for ensuring the quality of the project, the necessity of this module might vary based on the project's testing strategy. Ui.tests: Contains Selenium-based UI tests. Like the it.launcher module, the requirement for UI tests depends on the project's testing strategy, but they are generally important for ensuring the quality of user interactions. Given the nature of AEM projects and the move towards more headless implementations and external frontend applications, the ui.frontend module stands out as the most optional, as not all AEM projects will have a need for a dedicated frontend build process managed within the AEM project structure. However, the decision to include or exclude any module should be based on the specific requirements and architecture of the project. Answer 118 The correct answer to the question is C. Answer 119 The correct answer to the question is A. For integrating a third-party JAR file that frequently updates with new features and fixes into an Adobe Experience Manager (AEM) application, the recommended method is: A. Create a bundle with the jar embedded as a dependency. Explanation: OSGi Bundle: AEM is built on the OSGi framework, which uses bundles as its primary deployment package. Creating an OSGi bundle allows for better management of dependencies and services within AEM. Embedding Dependencies: By embedding the third-party JAR as a dependency within your custom OSGi bundle, you can ensure that the classes and resources from the third-party JAR are available to your AEM application. This method also allows you to easily update the JAR by updating the bundle, providing a clear path for managing updates. Maven Build: Typically, this involves using a build tool like Maven to handle the bundle creation and dependency management. You can specify the third-party JAR as a dependency in your project's pom.xml file and use the Maven Bundle Plugin to create the OSGi bundle. The other options are less suitable: B. Convert the jar file into zip and install using a package manager: While AEM's package manager is used to install packages, simply converting a JAR to a ZIP file and installing it does not integrate it as an OSGi bundle, which is necessary for it to be properly utilized within AEM. C. Upload the jar file into DAM assets: Storing the JAR in the Digital Asset Manager (DAM) makes it accessible as an asset but does not integrate it into the AEM application's runtime. D. Install the jar file using a package manager: Installing a JAR directly using the package manager does not make it an active part of the OSGi environment, which is necessary for its classes and services to be utilized by the AEM application. In summary, embedding the third-party JAR as a dependency within a custom OSGi bundle is the most effective and manageable method to integrate it into an AEM application, especially for third-party libraries that are frequently updated. Answer 120 The correct answer to the question is B. o meet the requirement of extending the WCM Core component to include an Image, Title, Description, a Link, and also display the Titles of a few pages by links, the developer should consider: B. Option B 1. Extend Image from Core Components. 2. Add an HTL Template for Title extended Core Components. 3. Add an HTL Template for List extended Core Components. 4. Add a reference to Title and List Components Dialog box. Explanation: Extend Image Component: Starting with the Image component from the Core Components makes sense because the primary content element mentioned is an image. Add HTL Templates: Adding HTL (HTML Template Language) templates for additional features like Title and List allows for modular development. This way, you can customize and extend the functionality of the base Image component to include the required Title, Description, and Links. Dialog Boxes: Adding references to the dialog boxes of Title and List components in the extended Image compon