AEM Technical Questions Flashcards
How does sling resolve a resource?
Using ResourceResolver.resolve(). A request contains a URI which maps to a resource.
How do you get an aem admin resource resolver?
Create a system user going to crx/explorer
Create a mapping for the bundle to sub service and user in the Apache Sling service user Mapper service
In code:
Create a map object with key sub service and string value service name.
Create a ResourceResolverFactory
Call ResourceResolverFactory.getResourceResolver(map)
What is an xtype?
Xtype is a widget inside a component dialog that can be used to capture author data: text field, selection, number field
What are renditions of DAM assets?
Different versions of an asset. For example, smaller/larger image size
Can you create a page without a template?
No, you must select a template when creating a page.
What is a template?
A template is used to create a page. An iParsys allows components to be added to a template.
What is sling:resourceType?
The sling resource type is the path which locates a script that will be used to render the content.
What are scr annotations?
SCR annotayions are used to declare OSGi components and services. @Component marks a class an OSGi component that will be handled by the OSGi container @Service marks the component as a service, making it available to other classes via @Reference annotation.
What are declarative services
Declarative Services allow you to define and consume services via metadata.
Annotations in source code can generate this metadata.
The metadata is added to the OSGi bundle manifest file by the OSGi service component.