Navegação de Categorias

Publicador de Conteúdos e Mídias

Um erro ocorreu enquanto processava o modelo.
Java method "com.sun.proxy.$Proxy69.getFileEntry(long)" threw an exception when invoked on com.sun.proxy.$Proxy69 object "com.liferay.document.library.opener.google.drive.web.internal.service.DLOpenerGoogleDriveDLAppServiceWrapper@a05a05a"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: fileEntry = dlAppService.getFileEntry...  [in template "146783#147022#153637" at line 115, column 29]
----
1<style> 
2    .puma-news { 
3        font-family: 'Raleway', sans-serif; 
4
5    .puma-news .puma-news-item .puma-news-item-triangle { 
6        border-style: solid; 
7        border-width: 110px 110px 0 0; 
8        border-color: #ffffff transparent transparent transparent; 
9        top: 0; 
10        left: 0; 
11        z-index: 1; 
12
13    .puma-news .puma-news-item { 
14        height: 390px; 
15         
16        background-size: cover; 
17        background-repeat: no-repeat; 
18        box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.18) 
19
20    .puma-news .puma-news-item .puma-news-item-date { 
21        width: 50px; 
22        z-index: 2; 
23        color: #0C619A; 
24        font-weight: bold; 
25        font-size: 36px; 
26        line-height: 22px; 
27        padding-top: 12px; 
28
29    .puma-news .puma-news-item .puma-news-item-date span { 
30        font-weight: 500; 
31        font-size: 18px; 
32        line-height: 16px; 
33        text-transform: uppercase; 
34
35    .puma-news .puma-news-item .puma-news-item-title { 
36        background-color: #0C619A; 
37
38    .puma-news .puma-news-item .puma-news-item-title .puma-news-item-category { 
39        left: 0; 
40        top: -12px; 
41        background-color: #ffffff; 
42
43    .puma-news .puma-news-item .puma-news-item-title .puma-news-item-category a { 
44        font-weight: bold; 
45        font-size: 13px; 
46        line-height: 18px; 
47        color: #0C619A; 
48
49    .puma-news .puma-news-item .puma-news-item-title a { 
50        text-decoration: none; 
51
52    .puma-news .puma-news-item .puma-news-item-title h3 { 
53        color: #ffffff; 
54        font-weight: 600; 
55        font-size: 16px; 
56        line-height: 20px; 
57        height: 40px; 
58        overflow: hidden; 
59
60    @media (max-width: 767px) { 
61        .puma-home-news .row .col { 
62            max-width: 420px; 
63            flex-basis: 100%; 
64            flex-basis: calc(100% - 22px); 
65            flex-shrink: 0; 
66
67        .puma-news .puma-news-item .puma-news-item-triangle { 
68            border-width: 95px 80px 0 0; 
69
70        .puma-news .puma-news-item .puma-news-item-date { 
71            padding-left: 2px; 
72            font-size: 30px; 
73
74        .puma-news .puma-news-item .puma-news-item-date span { 
75            font-size: 14px; 
76
77
78    @media (max-width: 450px) { 
79        .puma-home-news .row .col { 
80            min-width: auto; 
81            flex-basis: 100%; 
82            flex-basis: calc(100% - 22px); 
83            flex-shrink: 0; 
84
85
86</style> 
87 
88<#assign dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")> 
89<#assign dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil")> 
90<#assign vocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") /> 
91 
92<#assign imgDefault = themeDisplay.getPathThemeImages() + '/klabin-puma/puma.png?t=v1' /> 
93 
94<#if entries?has_content> 
95    <div class="puma-news"> 
96        <div class="puma-side-container p-0"> 
97            <div class="row"> 
98                <#list entries as entry> 
99                    <#assign assetRenderer = entry.getAssetRenderer() /> 
100                    <#assign article = assetRenderer.getArticle() /> 
101         
102                    <#assign document = saxReaderUtil.read(article.getContent()) /> 
103                    <#assign rootElement = document.getRootElement() /> 
104         
105                    <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='kdw_news_image']")> 
106                    <#assign newsImageFile = xPathSelector.selectSingleNode(rootElement).getStringValue()?trim> 
107         
108                    <#assign urlImage = imgDefault> 
109                    <#if newsImageFile?? && newsImageFile!=""> 
110                        <#assign 
111                            fileJson = jsonFactoryUtil.createJSONObject(newsImageFile) 
112                            fileEntryId =  getterUtil.getInteger(fileJson.get('fileEntryId')) 
113                        /> 
114                        <#assign 
115                            fileEntry = dlAppService.getFileEntry(fileEntryId) 
116                            urlImage = dlUtil.getDownloadURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, null) 
117                        /> 
118                    </#if> 
119 
120                     
121                    <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) /> 
122                    <#if assetLinkBehavior != "showFullContent"> 
123                        <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
124                    </#if> 
125                    <div class="col-md-6 col-lg-4 col-12 py-3 was-adjusted"> 
126                        <div class="puma-news-item w-100 d-flex flex-column justify-content-between position-relative" style="background-image: url('${urlImage}');"> 
127                            <div class="puma-news-item-triangle position-absolute w-0 h-0"></div> 
128                            <div class="puma-news-item-date"> 
129                                <#assign month = dateUtil.getDate(article.getDisplayDate()?date, 'MMM', locale) /> 
130                                 
131                                ${article.getDisplayDate()?date?string('dd')} 
132                                <span>${month}</span> 
133                            </div> 
134                            <div class="puma-news-item-title px-3 py-4 position-relative"> 
135                                <#if entry.getCategories()??> 
136                                    <#list entry.getCategories() as category> 
137                                        <#assign bgColor = '' /> 
138                                        <#if category.getName() == "Press Release"> 
139                                            <#assign bgColor = "#D2E07C" />     
140                                        <#elseif category.getName() == "Saiu na Mídia"> 
141                                            <#assign bgColor = "#A0D9F2" /> 
142                                        </#if> 
143                                        <div class="puma-news-item-category position-absolute px-3" style="background-color: ${bgColor}"> 
144                                            <a href="#" class="text-uppercase"> 
145                                                ${category.getName()} 
146                                            </a> 
147                                        </div> 
148                                    </#list> 
149                                </#if> 
150                                <a href="${viewURL}"> 
151                                    <h3 class="m-0"> 
152                                        ${entry.getTitle(locale)} 
153                                    </h3> 
154                                </a> 
155                            </div> 
156                        </div> 
157                    </div> 
158                </#list> 
159            </div> 
160        </div> 
161    </div> 
162</#if>