Question 1

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

    A developer creates two custom classes. ClassA has the following code:
    package com.aem.abc;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    public class ClassA {
    private static final Logger logger = LoggerFactory.getLogger(this.getClass()); public void classAMethod() { logger.debug("Message from Class A method");
    }
    }
    The developer creates a custom log custom.log with debug level in OSGi sling log support for the Java package com.aem.abc. The developer adds another class ClassB with the following code:
    package com.aem.xyz;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    public class ClassB {
    private static final Logger logger = LoggerFactory.getLogger(this.getClass()); public void classBMethod() { logger.debug("Message from Class B method");
    }
    }
    Which action must the developer take to see the log messages in the same file from both classes?
  • Question 3

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

    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?
  • Question 5

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