org.broadleafcommerce.cms.web.processor
Interface ContentProcessorExtensionHandler

All Superinterfaces:
ExtensionHandler

public interface ContentProcessorExtensionHandler
extends ExtensionHandler

Extension handler for the ContentProcessor

Author:
Elbert Bautista (elbertbautista)

Method Summary
 ExtensionResultStatusType addAdditionalFieldsToModel(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element)
          This method will add any additional attributes to the model that the extension needs
 ExtensionResultStatusType addExtensionFieldDeepLink(List<DeepLink> links, org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element)
          Provides a hook point for an extension of content processor to optionally add in deep links for a content item based on its extension fields
 ExtensionResultStatusType lookupContentByElementAttribute(List<StructuredContentDTO> contentItems, SandBox sandBox, Locale locale, Integer count, Map<String,Object> ruleDTOs, boolean secure, org.thymeleaf.dom.Element element)
          This method returns content given a specific element attribute
Returns active content items for the passed in sandbox that match the passed in type.
 ExtensionResultStatusType postProcessDeepLinks(List<DeepLink> links)
          Provides a hook point to allow extension handlers to modify the generated deep links.
 ExtensionResultStatusType shouldHandleContentLookup(org.thymeleaf.dom.Element element)
          This method returns whether or not this implementation should handle the content lookup This is determined by the element attribute values that are passed in.
 
Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
 

Method Detail

shouldHandleContentLookup

ExtensionResultStatusType shouldHandleContentLookup(org.thymeleaf.dom.Element element)
This method returns whether or not this implementation should handle the content lookup This is determined by the element attribute values that are passed in.

Parameters:
element - - the Thymeleaf Processor element
Returns:
ExtensionResultStatusType

lookupContentByElementAttribute

ExtensionResultStatusType lookupContentByElementAttribute(List<StructuredContentDTO> contentItems,
                                                          SandBox sandBox,
                                                          Locale locale,
                                                          Integer count,
                                                          Map<String,Object> ruleDTOs,
                                                          boolean secure,
                                                          org.thymeleaf.dom.Element element)
This method returns content given a specific element attribute
Returns active content items for the passed in sandbox that match the passed in type.
For example, the AdvancedCMS module allows lookup by "layoutArea", you would then pass in an extensionFieldName="layoutArea", extensionFieldValue="My Layout Area 1" This would return all the content items in that particular layout area. Other modules may pass in their specific lookup criteria. See the modules docs for more details.
The SandBox parameter impacts the results as follows. If a SandBoxType of production is passed in, only those items in that SandBox are returned.
If a non-production SandBox is passed in, then the method will return the items associatd with the related production SandBox and then merge in the results of the passed in SandBox.

Parameters:
contentItems - - the list of DTOs to add to
sandBox - - the sandbox to find structured content items (null indicates items that are in production for sites that are single tenant.
locale - - the locale
count - - the max number of content items to return
ruleDTOs - - a Map of objects that will be used in MVEL processing.
secure - - set to true if the request is being served over https
element - - the Thymeleaf Processor element
Returns:
- ExtensionResultStatusType
See Also:
ContentProcessor

addAdditionalFieldsToModel

ExtensionResultStatusType addAdditionalFieldsToModel(org.thymeleaf.Arguments arguments,
                                                     org.thymeleaf.dom.Element element)
This method will add any additional attributes to the model that the extension needs

Parameters:
arguments - - the Thymeleaf Processor arguments
element - - the Thymeleaf Processor element
Returns:
- ExtensionResultStatusType

addExtensionFieldDeepLink

ExtensionResultStatusType addExtensionFieldDeepLink(List<DeepLink> links,
                                                    org.thymeleaf.Arguments arguments,
                                                    org.thymeleaf.dom.Element element)
Provides a hook point for an extension of content processor to optionally add in deep links for a content item based on its extension fields

Parameters:
links -
arguments -
element -
Returns:
ExtensionResultStatusType

postProcessDeepLinks

ExtensionResultStatusType postProcessDeepLinks(List<DeepLink> links)
Provides a hook point to allow extension handlers to modify the generated deep links.

Parameters:
links -
Returns:
ExtensionResultStatusType


Copyright © 2013. All Rights Reserved.