Sort
An error occurred while processing the template.
Java method "jdk.proxy3.$Proxy174.getFileEntry(long)" threw an exception when invoked on jdk.proxy3.$Proxy174 object "com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl@adf9746"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fileEntry = services.dlFileEn...  [in template "SEARCHES-RESULTS" in macro "infoAccessSearchResults" at line 1364, column 25]
	- Reached through: @search[macroName] searchContainer=se...  [in template "11501720881606#20120#40877" at line 85, column 21]
----
1<#-- TEMPLATE DE RESULTADOS DE BUSCA UNIFICADO --> 
2 
3<#-- Importando as macros de busca --> 
4<#assign templatePath> 
5    _TEMPLATE_CONTEXT_/${themeDisplay.getCompanyId()}/${themeDisplay.getScopeGroupId()}/${serviceLocator 
6        .findService("com.liferay.portal.kernel.service.ClassNameLocalService") 
7        .getClassNameId("com.liferay.portal.kernel.theme.NavItem")} 
8</#assign> 
9 
10<#attempt> 
11    <#import "${templatePath}/SEARCHES-RESULTS" as search /> 
12    <#import "${templatePath}/UTILS-TEMPLATE" as utils /> 
13<#recover> 
14</#attempt> 
15 
16<#assign  
17    assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") 
18    journalArticleClassName = "com.liferay.journal.model.JournalArticle" 
19    layoutClassName = "com.liferay.portal.kernel.model.Layout" 
20/> 
21 
22<#-- Mapeamento de estruturas para macros --> 
23<#assign macroMapping = { 
24    "NOTÍCIA": "newsSearchResults", 
25    "PROJETO": "projectSearchResults", 
26    "EVENTO": "eventSearchResults", 
27    "PUBLICAÇÃO": "publicationSearchResults", 
28    "LEGISLAÇÃO_E_NORMATIVAS": "legislationSearchResults", 
29    "CONTRATOS": "infoAccessSearchResults", 
30    "PASSAGENS_E_DIÁRIAS": "infoAccessSearchResults", 
31    "QUADRO_DE_PESSOAL": "infoAccessSearchResults", 
32    "BALANÇO_PATRIMONIAL": "accountabilitySearchResults", 
33	  "PRESTAÇÃO_DE_CONTAS": "accountabilitySearchResults", 
34    "RELATORIO_DE_GESTAO": "accountabilitySearchResults", 
35    "PROINFRA": "accountabilitySearchResults", 
36    "GOVERNANÇA": "governanceSearchResults", 
37    "COMPRAS_E_SERVIÇOS": "purchasesServicesSearchResults", 
38    "PRODUTO_PACTUADO" : "productPactuadoSearchResults", 
39    "OBSERVATÓRIOS" : "observatoriesAndSitesSearchResults", 
40    "OPORTUNIDADES" : "opportunitiesSearchResults" 
41} /> 
42 
43<div class="general-search-results-template"> 
44    <div class="d-flex justify-content-between flex-md-row flex-column align-items-start etiqueta-pequena-leve"> 
45        <div class="d-flex my-auto text-uppercase align-self-start align-self-md-start etiqueta-pequena-leve"> 
46            <#if themeDisplay??> 
47                <#assign paramQ = themeDisplay.getRequest().getParameter("q")?if_exists /> 
48                 
49                <#if paramQ?has_content> 
50                    <@liferay.language key="search-for" />:  
51                    <div class="ml-1 etiqueta-pequena"> 
52                        ${paramQ} 
53                    </div> 
54                <#else> 
55                </#if> 
56            </#if> 
57        </div> 
58        <div class="my-auto text-uppercase align-self-end align-self-md-end"> 
59            ${searchContainer.getTotal()} <@liferay.language key="results" /> 
60        </div> 
61    </div> 
62 
63    <div class="d-flex justify-content-between flex-md-row flex-column align-items-start etiqueta-pequena-leve"> 
64        <@utils.customSortSelect /> 
65        <@utils.customPagination searchContainer true /> 
66    </div> 
67 
68    <#if entries?has_content> 
69        <#list entries as entry> 
70            <#if entry.getClassName() == journalArticleClassName> 
71                <#assign  
72                    asset = assetEntryLocalService.getEntry(entry.getClassName(), entry.getClassPK()) 
73                    assetRenderer = asset.getAssetRenderer() 
74                    structureKey = "" 
75                /> 
76 
77                <#assign structureKey = assetRenderer.article.getDDMStructureKey() /> 
78                 
79                <#if structureKey?has_content && macroMapping[structureKey]??> 
80                    <#assign  
81                        macroName = macroMapping[structureKey] 
82                        singleEntryList = [entry] 
83                    /> 
84                     
85                    <@search[macroName]  
86                        searchContainer=searchContainer  
87                        entries=singleEntryList  
88                        locale=locale 
89                        showStructureName=true 
90                    /> 
91                </#if> 
92            </#if> 
93 
94            <#if entry.getClassName() == layoutClassName> 
95                <a  
96                    href="${entry.getViewURL()}" 
97                    class="layout-card p-4 btn-outline-primary text-decoration-none text-left d-flex flex-column m-0 bg-secondary-light" 
98
99                    <h2> 
100                        ${entry.getHighlightedTitle()} 
101                    </h2> 
102                    <p class="mb-0"> 
103                        ${languageUtil.get(locale, "page")}  
104                    </p> 
105                </a> 
106            </#if> 
107        </#list> 
108    <#else> 
109        <div class="no-results-container d-flex flex-column justify-content-center align-items-center"> 
110            <h3 class="no-results-big-text mb-4"><@liferay.language key = "no-results" />.</h3> 
111            <#assign query = request.getParameter("q")!"" />     
112            <#assign words = query?split(" ") /> 
113            <h4 class="no-results-small-text"><@liferay.language key = "no-results-complete" />: ${words?join(", ")}.</h4> 
114        </div> 
115    </#if> 
116 
117    <@utils.customPagination searchContainer false /> 
118</div> 
119 
120<style> 
121    .general-search-results-template .layout-card { 
122        border: 1px solid var(--body-bg); 
123
124 
125    .general-search-results-template .no-results-container { 
126        height: 25rem; 
127        background-color: var(--secondaryLightColor); 
128
129 
130    .general-search-results-template .no-results-big-text, 
131    .general-search-results-template .no-results-small-text { 
132        text-align: center; 
133
134</style>