public class DesignImporterContext
extends java.lang.Object
A context object is created for an import request and passed along to various classes participating in the import process. The participant classes (e.g. TagHandlers) can use the contextual information as per their needs.
Modifier and Type | Field and Description |
---|---|
BundleContext |
bundleContext
The OSGi BundleContext that may be used by the TagHandlers to interact with the OSGi framework
|
CanvasBuilder |
canvasBuilder
The CanvasBuilder object associated with the current import request
|
static java.lang.String |
CHAR_ENCODING_KEY |
ComponentSuffixGenerator |
componentSuffixGenerator
The suffix generator that generates suffixes per component names to uniquely identify
them in the node hierarchy.
|
Page |
currentPage
The page being worked upon.
|
Node |
designNode
Represents the design node that gets created during the design import process.
|
java.lang.String |
htmlName
The name of the HTML file for which the CQ page is getting constructed.
|
java.util.List<java.lang.String> |
importWarnings
Placeholder for import warnings.
|
Page |
page
Represents the CQ Page that initiates the import request
|
SlingHttpServletRequest |
slingHttpServletRequest
Deprecated.
Usage of this field has been removed (keeping this field for backward compatibility)
|
Constructor and Description |
---|
DesignImporterContext(Page page,
Node designNode) |
DesignImporterContext(Page page,
Node designNode,
java.lang.String htmlName)
Constructor
|
DesignImporterContext(Page page,
Node designNode,
java.lang.String htmlName,
CanvasBuilder canvasBuilder) |
DesignImporterContext(Page page,
Node designNode,
java.lang.String htmlName,
CanvasBuilder canvasBuilder,
BundleContext bundleContext) |
DesignImporterContext(Page page,
Node designNode,
java.lang.String htmlName,
CanvasBuilder canvasBuilder,
BundleContext bundleContext,
java.util.ArrayList<java.lang.String> extractedResources) |
Modifier and Type | Method and Description |
---|---|
void |
addResourcesToRemove(java.util.Set<java.lang.String> resources)
Registers resources that can be removed after the import has finished.
|
java.lang.Object |
getAttribute(java.lang.Object key) |
java.util.Map<java.lang.Object,java.lang.Object> |
getAttributes() |
java.util.ArrayList<java.lang.String> |
getExtractedResources() |
Resource |
getImporter() |
java.util.Set<java.lang.String> |
getResourcesToRemove()
Returns the resources that can be removed after the import has finished.
|
java.lang.Object |
setAttribute(java.lang.Object key,
java.lang.Object value) |
void |
setImporter(Resource importer) |
public Node designNode
While importing a design package, the design importer unloads all the referenced assets(images, icons, styles, scripts etc.) into a design node that is uniquely associated with the page under construction. This node acts as the design path for the page that gets constructed after the import process.
public Page page
The current import workflow involves dropping of the design package on an existing page with a drop zone. The existing page itself gets transformed into the resultant page.
public Page currentPage
page
for secondary canvasespublic ComponentSuffixGenerator componentSuffixGenerator
public CanvasBuilder canvasBuilder
public java.lang.String htmlName
The design package should typically contain an index.html file at archive root level. However, it is possible to create multiple CQ pages from one design package itself. The mobile page creation exemplifies this fact. The htmlName identifies the html document the CQ page for which is getting constructed.
public BundleContext bundleContext
@Deprecated public SlingHttpServletRequest slingHttpServletRequest
public static final java.lang.String CHAR_ENCODING_KEY
public java.util.List<java.lang.String> importWarnings
public DesignImporterContext(Page page, Node designNode)
page
- designNode
- public DesignImporterContext(Page page, Node designNode, java.lang.String htmlName)
page
- designNode
- htmlName
- public DesignImporterContext(Page page, Node designNode, java.lang.String htmlName, CanvasBuilder canvasBuilder)
public DesignImporterContext(Page page, Node designNode, java.lang.String htmlName, CanvasBuilder canvasBuilder, BundleContext bundleContext)
public DesignImporterContext(Page page, Node designNode, java.lang.String htmlName, CanvasBuilder canvasBuilder, BundleContext bundleContext, java.util.ArrayList<java.lang.String> extractedResources)
public java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
public java.lang.Object getAttribute(java.lang.Object key)
public java.lang.Object setAttribute(java.lang.Object key, java.lang.Object value)
public void setImporter(Resource importer)
public Resource getImporter()
public java.util.ArrayList<java.lang.String> getExtractedResources()
public void addResourcesToRemove(java.util.Set<java.lang.String> resources)
resources
- A set of paths relative to the design nodepublic java.util.Set<java.lang.String> getResourcesToRemove()
Copyright © 2010 - 2020 Adobe. All Rights Reserved