public class ConfigInitializer extends Object implements ContentItemInitializer
CartridgeHandler.initialize(ContentItem)
.RequestParamMarshaller
Constructor and Description |
---|
ConfigInitializer() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addDefaults(ContentItem contentItem,
ContentItem defaults)
Helper method for adding defaults "below" the values present in a given ContentItem.
|
ContentItem |
initialize(ContentItem instanceConfig)
Subclasses can extend this method to add layers or re-order layers.
|
void |
setDefaults(ContentItem defaults)
Set the default configuration for a given CartridgeHandler.
|
void |
setRequestParamMarshaller(RequestParamMarshaller marshaller)
Set the RequestParamMarshaller that can create request-based
configuration for a given CartridgeHandler.
|
public void setDefaults(ContentItem defaults)
defaults
- may be nullpublic void setRequestParamMarshaller(RequestParamMarshaller marshaller)
marshaller
- may be nullpublic ContentItem initialize(ContentItem instanceConfig)
initialize
in interface ContentItemInitializer
instanceConfig
- cartridge instance configuration, typically from Experience Manager.protected static void addDefaults(ContentItem contentItem, ContentItem defaults)
contentItem
- the ContentItem to mutate by the addition of defaultsdefaults
- the default ContentItem instanceCopyright © 2015, Oracle and/or its affiliates. All rights reserved.