Class TagProcessorServiceImpl
- java.lang.Object
-
- co.mastermindcms.framework.services.TagProcessorServiceImpl
-
- All Implemented Interfaces:
TagProcessorService
,java.io.Serializable
@Service public class TagProcessorServiceImpl extends java.lang.Object implements TagProcessorService
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private BeanHandlerService
beanHandlerService
private CommonProperties
commonProperties
private FrameworkOperationService
frameworkOperationService
private MongoStorageService
storageService
private TemplateLocatorService
templateLocatorService
-
Constructor Summary
Constructors Constructor Description TagProcessorServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
blockElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
blockElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.List<java.lang.Object>
buildBlockElements(org.jsoup.select.Elements blockElements)
This method build elements.java.util.List<java.lang.Object>
buildForeachElements(org.jsoup.select.Elements foreachElements)
This method builds elements.java.util.List<java.lang.Object>
buildFragmentElements(org.jsoup.select.Elements fragmentElements)
This method build elements.java.util.List<java.lang.Object>
buildIfElements(org.jsoup.select.Elements ifElements)
This method build elements.java.util.List<java.lang.Object>
buildResourceElements(org.jsoup.select.Elements resourceElements)
This method builds elements.java.util.List<java.lang.Object>
buildRestElements(org.jsoup.select.Elements restElements)
This method build elements.java.util.List<java.lang.Object>
buildSelectElements(org.jsoup.select.Elements selectElements)
This method build elements.java.util.List<java.lang.Object>
buildTextElements(org.jsoup.select.Elements textElements)
This method build elements.java.util.List<java.lang.Object>
buildTreeElements(org.jsoup.select.Elements treeElements)
This method build elements.java.lang.String
compileBlockElement(org.jsoup.nodes.Element element)
This method compile element.java.util.Map<java.lang.String,java.lang.Object>
compileElement(java.lang.String html, RequestElement requestElement)
This method compiles element.java.lang.String
compileForeachElement(org.jsoup.nodes.Element element)
This method compile element.java.lang.String
compileFragmentElement(org.jsoup.nodes.Element element)
This method compile element.java.lang.String
compileIfElement(org.jsoup.nodes.Element element)
This method compile elements.java.lang.String
compileResourceElement(org.jsoup.nodes.Element element)
This method compile elements.java.lang.String
compileRestElement(org.jsoup.nodes.Element element)
This method compile elements.java.lang.String
compileSelectElement(org.jsoup.nodes.Element element)
This method compile elements.java.util.List<java.lang.Object>
compileTemplate(java.lang.String html)
This method compiles template.java.lang.String
compileTemplateAsHtml(java.lang.String html)
This method compiles template.java.lang.String
compileTextElement(org.jsoup.nodes.Element element)
This method compile element.java.lang.String
compileTreeElement(org.jsoup.nodes.Element element)
This method compile elements.java.lang.String
completeCompile(java.lang.String html)
This method does update links on the page for language awareness, it works if language detection is disabled.java.util.Map<java.lang.String,java.lang.Object>
foreachElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
foreachElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
fragmentElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
fragmentElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
ifElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
ifElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.lang.String
recursiveCompile(java.lang.String html, java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String itemPrefix)
This method compiles template recursive.java.util.Map<java.lang.String,java.lang.Object>
resourceElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
resourceElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
restElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
restElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
selectElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
selectElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
textElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
textElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
treeElement(org.jsoup.nodes.Element item)
This method return elements as map-structure.java.util.Map<java.lang.String,java.lang.Object>
treeElement(org.jsoup.nodes.Element msmElement, RequestElement request)
This method return elements as map-structure.
-
-
-
Field Detail
-
beanHandlerService
@Autowired private BeanHandlerService beanHandlerService
-
storageService
@Autowired private MongoStorageService storageService
-
templateLocatorService
@Autowired private TemplateLocatorService templateLocatorService
-
frameworkOperationService
@Autowired private FrameworkOperationService frameworkOperationService
-
commonProperties
@Autowired private CommonProperties commonProperties
-
-
Method Detail
-
compileTemplate
public java.util.List<java.lang.Object> compileTemplate(java.lang.String html)
Description copied from interface:TagProcessorService
This method compiles template.- Specified by:
compileTemplate
in interfaceTagProcessorService
- Parameters:
html
- html which will be compiled- Returns:
- objects as list
-
compileElement
public java.util.Map<java.lang.String,java.lang.Object> compileElement(java.lang.String html, RequestElement requestElement)
Description copied from interface:TagProcessorService
This method compiles element.- Specified by:
compileElement
in interfaceTagProcessorService
- Parameters:
html
- html which will be compiledrequestElement
- request with the help of which get the element for compilation- Returns:
- map-structure
-
compileTemplateAsHtml
public java.lang.String compileTemplateAsHtml(java.lang.String html)
Description copied from interface:TagProcessorService
This method compiles template.- Specified by:
compileTemplateAsHtml
in interfaceTagProcessorService
- Parameters:
html
- html which will be compiled- Returns:
- value as text
-
completeCompile
public java.lang.String completeCompile(java.lang.String html)
Description copied from interface:TagProcessorService
This method does update links on the page for language awareness, it works if language detection is disabled. It does also postprocessing for script tags and style tags.- Specified by:
completeCompile
in interfaceTagProcessorService
- Parameters:
html
- html which will be processed- Returns:
- value as text
-
recursiveCompile
public java.lang.String recursiveCompile(java.lang.String html, java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String itemPrefix)
Description copied from interface:TagProcessorService
This method compiles template recursive.- Specified by:
recursiveCompile
in interfaceTagProcessorService
- Parameters:
html
- html which will be compiledmap
- map which will be compileditemPrefix
- itemPrefix which will be compiled- Returns:
- value as text
-
buildForeachElements
public java.util.List<java.lang.Object> buildForeachElements(org.jsoup.select.Elements foreachElements)
Description copied from interface:TagProcessorService
This method builds elements.- Specified by:
buildForeachElements
in interfaceTagProcessorService
- Parameters:
foreachElements
- elements which will be built- Returns:
- objects as list
-
foreachElement
public java.util.Map<java.lang.String,java.lang.Object> foreachElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
foreachElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
foreachElement
public java.util.Map<java.lang.String,java.lang.Object> foreachElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
foreachElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileForeachElement
public java.lang.String compileForeachElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile element.- Specified by:
compileForeachElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildRestElements
public java.util.List<java.lang.Object> buildRestElements(org.jsoup.select.Elements restElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildRestElements
in interfaceTagProcessorService
- Parameters:
restElements
- which will be built- Returns:
- data as list
-
restElement
public java.util.Map<java.lang.String,java.lang.Object> restElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
restElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
restElement
public java.util.Map<java.lang.String,java.lang.Object> restElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
restElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileRestElement
public java.lang.String compileRestElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile elements.- Specified by:
compileRestElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildFragmentElements
public java.util.List<java.lang.Object> buildFragmentElements(org.jsoup.select.Elements fragmentElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildFragmentElements
in interfaceTagProcessorService
- Parameters:
fragmentElements
- which will be built- Returns:
- data as list
-
fragmentElement
public java.util.Map<java.lang.String,java.lang.Object> fragmentElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
fragmentElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
fragmentElement
public java.util.Map<java.lang.String,java.lang.Object> fragmentElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
fragmentElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileFragmentElement
public java.lang.String compileFragmentElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile element.- Specified by:
compileFragmentElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildBlockElements
public java.util.List<java.lang.Object> buildBlockElements(org.jsoup.select.Elements blockElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildBlockElements
in interfaceTagProcessorService
- Parameters:
blockElements
- which will be built- Returns:
- data as list
-
blockElement
public java.util.Map<java.lang.String,java.lang.Object> blockElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
blockElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
blockElement
public java.util.Map<java.lang.String,java.lang.Object> blockElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
blockElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileBlockElement
public java.lang.String compileBlockElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile element.- Specified by:
compileBlockElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildTextElements
public java.util.List<java.lang.Object> buildTextElements(org.jsoup.select.Elements textElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildTextElements
in interfaceTagProcessorService
- Parameters:
textElements
- which will be built- Returns:
- data as list
-
textElement
public java.util.Map<java.lang.String,java.lang.Object> textElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
textElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
textElement
public java.util.Map<java.lang.String,java.lang.Object> textElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
textElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileTextElement
public java.lang.String compileTextElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile element.- Specified by:
compileTextElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildTreeElements
public java.util.List<java.lang.Object> buildTreeElements(org.jsoup.select.Elements treeElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildTreeElements
in interfaceTagProcessorService
- Parameters:
treeElements
- which will be built- Returns:
- data as list
-
treeElement
public java.util.Map<java.lang.String,java.lang.Object> treeElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
treeElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
treeElement
public java.util.Map<java.lang.String,java.lang.Object> treeElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
treeElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileTreeElement
public java.lang.String compileTreeElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile elements.- Specified by:
compileTreeElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildIfElements
public java.util.List<java.lang.Object> buildIfElements(org.jsoup.select.Elements ifElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildIfElements
in interfaceTagProcessorService
- Parameters:
ifElements
- which will be built- Returns:
- data as list
-
ifElement
public java.util.Map<java.lang.String,java.lang.Object> ifElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
ifElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
ifElement
public java.util.Map<java.lang.String,java.lang.Object> ifElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
ifElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileIfElement
public java.lang.String compileIfElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile elements.- Specified by:
compileIfElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildSelectElements
public java.util.List<java.lang.Object> buildSelectElements(org.jsoup.select.Elements selectElements)
Description copied from interface:TagProcessorService
This method build elements.- Specified by:
buildSelectElements
in interfaceTagProcessorService
- Parameters:
selectElements
- which will be built- Returns:
- data as list
-
selectElement
public java.util.Map<java.lang.String,java.lang.Object> selectElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
selectElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
selectElement
public java.util.Map<java.lang.String,java.lang.Object> selectElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
selectElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileSelectElement
public java.lang.String compileSelectElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile elements.- Specified by:
compileSelectElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
buildResourceElements
public java.util.List<java.lang.Object> buildResourceElements(org.jsoup.select.Elements resourceElements)
Description copied from interface:TagProcessorService
This method builds elements.- Specified by:
buildResourceElements
in interfaceTagProcessorService
- Parameters:
resourceElements
- elements which will be built- Returns:
- objects as list
-
resourceElement
public java.util.Map<java.lang.String,java.lang.Object> resourceElement(org.jsoup.nodes.Element item)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
resourceElement
in interfaceTagProcessorService
- Parameters:
item
- which will be retrieved- Returns:
- data as map
-
resourceElement
public java.util.Map<java.lang.String,java.lang.Object> resourceElement(org.jsoup.nodes.Element msmElement, RequestElement request)
Description copied from interface:TagProcessorService
This method return elements as map-structure.- Specified by:
resourceElement
in interfaceTagProcessorService
- Parameters:
msmElement
- which will be retrievedrequest
- request with the help of which get the element- Returns:
- data as map
-
compileResourceElement
public java.lang.String compileResourceElement(org.jsoup.nodes.Element element)
Description copied from interface:TagProcessorService
This method compile elements.- Specified by:
compileResourceElement
in interfaceTagProcessorService
- Parameters:
element
- which will be compiled- Returns:
- data as text
-
-