@Target(value=TYPE) @Retention(value=RUNTIME) public @interface AemComponent
Adobe Granite API
.
In a most basic case, the @Component
is the Java class that defines a Sling model or POJO
with the annotations to build an authoring dialog upon (particularly, the @Dialog
annotation).
Otherwise, a @Component
may comprise a set of classes, each responsible for an aspect of the component's
presentation or behavior: a Sling model, a class to build Dialog
view, a class to build Design dialog
view, etc. Each of these may belong to one particular component, or be reusable for a number of components sharing
similar parts of functionality
Dialog
,
DesignDialog
,
EditConfig
Modifier and Type | Required Element and Description |
---|---|
String |
path
The path to the folder of the current AEM component in a package, either relative to the path specified in
componentsPathBase configuration setting, or absolute (that is, starting with / ). |
String |
title
Maps to the
jcr:title attributes of the component root node |
Modifier and Type | Optional Element and Description |
---|---|
String |
cellName
When set to non-blank, maps to the
cq:cellName attribute of the component's root node |
String |
componentGroup
When set to a non-blank string, maps to the
componentGroup attribute of the component root node |
String |
description
When set to a non-blank string, maps to the
jcr:description attribute of the component's root node |
String |
dialogPath
When set to a non-blank string, maps to the
dialogPath attribute of the component root node. |
boolean |
disableTargeting
When set to true, renders as the
disableTargeting attribute of the component root node with `true` value |
boolean |
isContainer
Renders as the
isContainer attribute of the component root node |
boolean |
noDecoration
When set to true, renders as the
cq:noDecoration attribute of the component root node with `true` value |
String |
resourceSuperType
When set to a non-blank string, renders as the
sling:resourceSuperType attribute of the component root node |
String |
templatePath
Maps to the
cq:templatePath attribute of the component root node. |
Class<?>[] |
views
The set of views this
@Component comprises. |
WriteMode |
writeMode
Specifies whether the data for this component will be stored only to an existing package folder, or else a new
folder will be created if needed.
Default is WriteMode.OPEN which means that the existing component node (folder) will be searched for. |
public abstract String path
componentsPathBase
configuration setting, or absolute (that is, starting with /
).
jcr_root
(such as /apps/path/to/my/component
).
name
property of a Dialog
specified for the same
componentpublic abstract String title
jcr:title
attributes of the component root nodepublic abstract String cellName
cq:cellName
attribute of the component's root nodepublic abstract String componentGroup
componentGroup
attribute of the component root nodepublic abstract String description
jcr:description
attribute of the component's root nodepublic abstract String dialogPath
dialogPath
attribute of the component root node. Must represent
a valid JCR pathpublic abstract boolean disableTargeting
disableTargeting
attribute of the component root node with `true` valuepublic abstract boolean isContainer
isContainer
attribute of the component root nodepublic abstract boolean noDecoration
cq:noDecoration
attribute of the component root node with `true` valuepublic abstract String resourceSuperType
sling:resourceSuperType
attribute of the component root nodepublic abstract String templatePath
cq:templatePath
attribute of the component root node. Must represent a valid JCR pathpublic abstract Class<?>[] views
@Component
comprises. Each view represents a class that will be scanned for the
ToolKit annotations. The current class is assumed by default, whether added to the set or not.Class<?>
references, or an empty arraypublic abstract WriteMode writeMode
WriteMode.OPEN
which means that the existing component node (folder) will be searched for. If
missing, an exception will be issued. This helps to prevent bogus component folders due to typos or
misconfiguration. If set to WriteMode.CREATE
, a new node (folder) is created at the path specified. This
helps to automatically create structures with no pre-defined contentWriteMode
optionsCopyright © 2024 Exadel, Inc.. All rights reserved.