Conduct codes

An error occurred while processing the template.
Error on line 110, column 57 in 10155#10195#143390
dlFileEntryLocalService.getFileEntry(groupId, folder_id, doc_name) is undefined.
It cannot be assigned to mediaFile
1<div class="column col1 omega"> 
2    <a id="codigoconducta" name="codigoconducta"></a> 
3    <h2><@liferay.language key="cie.conduct-codes.title"/></h2> 
4    <#assign dlFolderLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFolderLocalService") > 
5    <#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
6    <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") > 
7     
8    <div class="destacado omega bggrisosc"> 
9        <div id="proveedores_tabs" class="nofoto doble"> 
10            <#--Cuerpo secciones --> 
11            <div class="tab-content toggler-paises"> 
12                <#-- Paises--> 
13                <#if country.getSiblings()?has_content> 
14                    <#list country.getSiblings() as cur_country> 
15                        <#if cur_country_index == 0> 
16                            <#--  
17                            <#assign headerCss = 'header toggler-header toggler-header-expanded' /> 
18                            <#assign contentCss = 'doc-cont content toggler-content-wrapper' />  
19                            --> 
20                            <#assign headerCss = 'header toggler-header toggler-header-collapsed' /> 
21                            <#assign contentCss = 'doc-cont content toggler-content-collapsed' /> 
22                	    <#else> 
23                	        <#assign headerCss = 'header toggler-header-collapsed' /> 
24                	        <#assign contentCss = 'doc-cont content toggler-content-collapsed' /> 
25                	    </#if> 
26                	         
27                        <h3 class="${headerCss}"> 
28                		    ${cur_country.getData()} 
29                        </h3> 
30                        <div class="${contentCss}"> 
31                            <#-- Obtenemos documentos de una carpeta o de los documentos lincados a la estructura--> 
32                            <#if cur_country.doc_option.getData() == '["directory"]'> 
33                                <#assign folder = "" > 
34                                <#assign parentFolderId = 0 > 
35                                <#if cur_country.directory.getData() != ""> 
36                            		<#assign directoryURL = cur_country.directory.getData() > 
37                            		<#list directoryURL?split("/") as directoryTree> 
38                            		    <#if directoryTree != ""> 
39                            		        <#if dlFolderLocalService.getFolder(groupId,parentFolderId,directoryTree)??> 
40                            		            <#assign folder = dlFolderLocalService.getFolder(groupId,parentFolderId,directoryTree) >  
41                            		            <#assign parentFolderId = folder.getFolderId() > 
42                            		        <#else> 
43                            		            <#assign folder = ""> 
44                            		            <#break> 
45                            		        </#if> 
46                            		    </#if> 
47                            		</#list> 
48                            		<#if folder != ""> 
49                            		    <#assign OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"]> 
50                                        <#assign orderBy = OrderByComparatorFactoryUtil.create("DLFileEntry", ["MODIFIEDDATE", false])> 
51                            		    <#assign mediaEntries = dlFileEntryLocalService.getFileEntries(groupId, folder.getFolderId(),0,-1,-1,orderBy)> 
52                            		    <#if mediaEntries?size gt 0> 
53                                		    <#list mediaEntries?chunk(2) as country_row> 
54                                                <div class="proveedores-doc-row"> 
55                                                    <ul class="docus clearfix"> 
56                                                        <#list country_row as cur_media> 
57                                                            <li class="column col2"> 
58                                                            <#assign fileSize = cur_media.getSize()/1024 > 
59                                                            <#assign className = "com.liferay.portlet.documentlibrary.model.DLFileEntry"> 
60                                                            <#assign fileEntryId = cur_media.getFileEntryId() > 
61                                                            <#assign fileAssetEntry = assetEntryLocalService.getEntry(className,fileEntryId) > 
62                                                            <#assign fileTags = fileAssetEntry.getTags() > 
63                                                            <#assign mediaTitleHtml = httpUtil.encodeURL(cur_media.getTitle()) > 
64                                                            <#assign mediaURL = "/documents/" + groupId + "/" + cur_media.getFolderId() + "/" + mediaTitleHtml + "/" + cur_media.getUuid() > 
65                                                            <#if cur_media.getExtension() == "pdf"> 
66                                                                <#assign extension = cur_media.getExtension() > 
67                                                            <#else> 
68                                                                <#assign extension = "doc" > 
69                                                            </#if> 
70                                                                <a class="float-right naranja ${extension}" href="${mediaURL}" target="_blank">${fileSize?string["0"]} KB</a> 
71                                                                <p class="small">${cur_media.getModifiedDate()?date?string.short}  
72                                                                <#list fileTags as tag> 
73                                                                    ${tag.getName()} 
74                                                                </#list> 
75                                                                </p> 
76                                                                <p><a href="${mediaURL}" target="_blank">${cur_media.getTitle()}</a></p> 
77                                                            </li> 
78                                                	    </#list> 
79                                                    </ul> 
80                                                    <div class="clearfix"></div> 
81                                                </div>                                            		     
82                                		    </#list> 
83                                		<#else> 
84                                            <div class="proveedores-doc-row"> 
85                                                <@liferay.language key="there-are-no-documents-in-this-folder" /> 
86                                            </div>                                           		 
87                                		</#if> 
88                            		<#else> 
89                            		    <#-- No folder exists --> 
90                                        <div class="proveedores-doc-row"> 
91                                            <@liferay.language key="there-are-no-documents-in-this-folder" /> 
92                                        </div> 
93                            		</#if> 
94                            	<#else> 
95                                    <div class="proveedores-doc-row"> 
96                                        <@liferay.language key="there-are-no-documents-in-this-folder" /> 
97                                    </div> 
98                                </#if> 
99                            <#else> 
100                                <#if cur_country.media.getSiblings()?has_content> 
101                                    <#list cur_country.media.getSiblings()?chunk(2) as country_row> 
102                                        <div class="proveedores-doc-row"> 
103                                            <ul class="docus clearfix"> 
104                                                <#list country_row as cur_media> 
105                                                    <li class="column col2"> 
106                                                        <#assign mediaURL   = httpUtil.decodeURL(cur_media.getData(), true) > 
107                                                        <#assign parts = stringUtil.split(mediaURL, "/") > 
108                                                        <#assign folder_id = getterUtil.getLong(parts[3]) > 
109                                                        <#assign doc_name = parts[4] >  
110                                                        <#assign mediaFile = dlFileEntryLocalService.getFileEntry(groupId, folder_id, doc_name) >  
111                                                        <#assign fileSize = mediaFile.getSize()/1024 > 
112                                                        <#assign className = "com.liferay.portlet.documentlibrary.model.DLFileEntry"> 
113                                                        <#assign fileEntryId = mediaFile.getFileEntryId() > 
114                                                        <#assign fileAssetEntry =  
115                                                                assetEntryLocalService.getEntry(className,fileEntryId) > 
116                                                        <#assign fileTags = fileAssetEntry.getTags() > 
117                                                        <#if mediaFile.getExtension() == "pdf"> 
118                                                            <#assign extension = mediaFile.getExtension() > 
119                                                        <#else> 
120                                                            <#assign extension = "doc" > 
121                                                        </#if> 
122                                                        <a class="float-right naranja ${extension}" href="${cur_media.getData()}" target="_blank">${fileSize?string["0"]} KB</a> 
123                                                        <p class="small">${mediaFile.getModifiedDate()?date?string.short}  
124                                                            <#list fileTags as tag> 
125                                                                ${tag.getName()} 
126                                                            </#list> 
127                                                            </p> 
128                                                        <p><a href="${cur_media.getData()}" target="_blank">${mediaFile.getTitle()}</a></p>  
129                                                    </li> 
130                                        	    </#list> 
131                                            </ul> 
132                                            <div class="clearfix"></div> 
133                                        </div> 
134                                    </#list> 
135                                <#else> 
136                                    <div class="proveedores-doc-row"> 
137                                        <@liferay.language key="there-are-no-documents-in-this-folder" /> 
138                                    </div> 
139                                </#if> 
140                            </#if> 
141                        </div> 
142                	</#list> 
143                </#if> 
144                <script> 
145                    YUI().use( 
146                      'aui-toggler', 
147                      function(Y) { 
148                        new Y.TogglerDelegate( 
149
150                            animated: true, 
151                            closeAllOnExpand: true, 
152                            container: '.tab-content', 
153                            content: '.content', 
154                            expanded: true, 
155                            header: '.header', 
156                            transition: { 
157                            duration: 0.2, 
158                            easing: 'cubic-bezier(0, 0.1, 0, 1)' 
159
160
161                        ); 
162
163                    ); 
164                </script> 
165            </div> 
166        </div> 
167    </div> 
168</div> 

Contact

Ibáñez de Bilbao, 28 8th floor A and B
48009 BILBAO
Tel. : (+34) 944 793 787

rsc@dominion-global.com