Fiscalia Provincial

Provincia de Extremadura detalle

FECHA DE PUBLICACIÓN
Fecha de inicio
Fecha final
359 Emaitza
Sort
Errorea gertatu da txantiloia prozesatzerakoan.
Java method "com.sun.proxy.$Proxy1053.getFriendlyURLEntryLocalization(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy1053 object "com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl@4166d7d"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign friendlyURLEntryLocalization ...  [in template "13333257#13333299#13752006" at line 24, column 41]
----
1<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")/> 
2<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")/> 
3<#assign dlFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")/> 
4<#assign dlFileEntryMetadataLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryMetadataLocalService")/> 
5<#assign friendlyURLLocalService = serviceLocator.findService("com.liferay.friendly.url.service.FriendlyURLEntryLocalService")/> 
6<#assign storageEngineManagerUtil = objectUtil("com.liferay.dynamic.data.mapping.kernel.StorageEngineManagerUtil")/> 
7 
8<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")/> 
9 
10		 
11<#assign documentUrlPrincipal = ""/> 
12 
13<#if entries?has_content>	 
14	<ul class="mj-results-list"> 
15		<#list entries as curEntry> 
16			<li class="mj-box__information w-100"> 
17				<#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntry(curEntry.classPK) /> 
18				<#assign fiscalRepositoryGroup = groupLocalService.getGroup(dlFileEntry.getGroupId())/>				 
19				<#assign repositoryFriendlyUrl = fiscalRepositoryGroup.getFriendlyURL()/>     
20        <#assign imgUrlBase = "/documents/d"+repositoryFriendlyUrl+"/"/> 
21				<#assign classNameId = classNameLocalService.getClassNameId("com.liferay.portal.kernel.repository.model.FileEntry") /> 
22				<#assign friendlyURLEntry = friendlyURLLocalService.fetchMainFriendlyURLEntry(classNameId, curEntry.classPK)!"" /> 
23				<#if friendlyURLEntry?? && friendlyURLEntry!="" > 
24				   	<#assign friendlyURLEntryLocalization = friendlyURLLocalService.getFriendlyURLEntryLocalization(friendlyURLEntry.getFriendlyURLEntryId(), themeDisplay.getLanguageId()) /> 
25				</#if>			 
26				<#if dlFileEntry.getSize() gt 0 && friendlyURLEntryLocalization?? > 
27					<#assign documentUrlPrincipal = getDocumentUrl(repositoryFriendlyUrl, friendlyURLEntryLocalization.getUrlTitle(), false)/> 
28				<#else> 
29					<#assign documentUrlPrincipal = ""/> 
30				</#if> 
31 
32				<#assign descripcion = dlFileEntry.getDescription() /> 
33				<#assign fileEntryType = dlFileEntryTypeLocalService.getFileEntryType(dlFileEntry.getFileEntryTypeId()) /> 
34				<#assign fileEntryMetadata = dlFileEntryMetadataLocalService.getFileEntryMetadata(fileEntryType.getDataDefinitionId(), dlFileEntry.getLatestFileVersion(true).getFileVersionId()) /> 
35				<#assign ddmFormValues = storageEngineManagerUtil.getDDMFormValues(fileEntryMetadata.getDDMStorageId()) /> 
36				<#assign ddmFormFieldValues = ddmFormValues.getDDMFormFieldValues()/> 
37 
38				<#-- start  --> 
39				<#list ddmFormFieldValues as field> 
40					<#assign reference = field.getFieldReference() /> 
41					<#if reference=="titulo" > 
42						<#assign documentTitulo = (field.getValue().getString(locale)?has_content)?then(field.getValue().getString(locale),dlFileEntry.fileName) /> 
43					<#elseif reference=="tituloUrl" > 
44						<#assign documentTituloUrl = field.getValue().getString(locale)/> 
45					<#elseif reference=="url" > 
46						<#assign documentUrl = field.getValue().getString(locale)/> 
47					<#elseif reference=="fecha"> 
48						<#assign documentFecha = field.getValue().getString(locale)/> 
49					<#elseif reference=="ca_document" > 
50						<#assign documentJsonRaw = field.getValue().getString(locale)!"{}" /> 
51						<#if documentJsonRaw?? && documentJsonRaw!="{}">					 
52							<#assign documentJson = documentJsonRaw?eval/>								 
53							<#assign documentUrlCA = getDocumentUrl(repositoryFriendlyUrl, getUrlTitle(documentJson,themeDisplay.getLanguageId()), false)/> 
54						<#else> 
55							<#assign documentUrlCA = ""> 
56						</#if> 
57					<#elseif reference=="gl_document" > 
58						<#assign documentJsonRaw = field.getValue().getString(locale) /> 
59						<#if documentJsonRaw?? && documentJsonRaw!="{}"> 
60							<#assign documentJson = documentJsonRaw?eval/>							 
61							<#assign documentUrlGL = getDocumentUrl(repositoryFriendlyUrl, getUrlTitle(documentJson,themeDisplay.getLanguageId()), false)/> 
62						<#else> 
63							<#assign documentUrlGL = ""> 
64						</#if> 
65					<#elseif reference=="va_document" > 
66						<#assign documentJsonRaw = field.getValue().getString(locale) /> 
67						<#if documentJsonRaw?? && documentJsonRaw!="{}"> 
68							<#assign documentJson = documentJsonRaw?eval/>						 
69							<#assign documentUrlVA = getDocumentUrl(repositoryFriendlyUrl, getUrlTitle(documentJson,themeDisplay.getLanguageId()), false)/> 
70						<#else> 
71							<#assign documentUrlVA = ""> 
72						</#if> 
73					<#elseif reference=="eu_document" > 
74						<#assign documentJsonRaw = field.getValue().getString(locale) /> 
75						<#if documentJsonRaw?? && documentJsonRaw!="{}"> 
76							<#assign documentJson = documentJsonRaw?eval/>							 
77							<#assign documentUrlEU = getDocumentUrl(repositoryFriendlyUrl, getUrlTitle(documentJson,themeDisplay.getLanguageId()), false)/> 
78						<#else> 
79							<#assign documentUrlEU = ""> 
80						</#if> 
81					<#elseif reference=="en_document" > 
82						<#assign documentJsonRaw = field.getValue().getString(locale) /> 
83						<#if documentJsonRaw?? && documentJsonRaw!="{}"> 
84							<#assign documentJson = documentJsonRaw?eval/>						 
85							<#assign documentUrlEN = getDocumentUrl(repositoryFriendlyUrl, getUrlTitle(documentJson,themeDisplay.getLanguageId()), false)/> 
86						<#else> 
87							<#assign documentUrlEN = ""> 
88						</#if> 
89					</#if> 
90 
91				</#list> 
92 
93				<#-- html --> 
94				<div class="mj-box__information--top-wrapper"> 
95					<#if documentTitulo?? && documentTitulo!=""> 
96						<p class="mj-box__information--title bold"> 
97							<#if documentUrlPrincipal?? && documentUrlPrincipal!="">  
98								<a href="${documentUrlPrincipal}?download=false" target="_blank" title="<@liferay.language key='opens-new-window'/>">${htmlUtil.escape(documentTitulo)} 
99								</a> 
100							<#else> 
101								${htmlUtil.escape(documentTitulo)} 
102							</#if> 
103						</p> 
104					</#if> 
105					<#if documentTituloUrl?? && documentTituloUrl!=""> 
106						<a class="mj-link mb-10 d-inline-block" href="${htmlUtil.escape(documentUrl)}" target="_blank" aria-label="${languageUtil.format(locale, 'x-opens-new-window', htmlUtil.escape(documentTituloUrl), false)}"> 
107							${htmlUtil.escape(documentTituloUrl)} 
108						</a> 
109					</#if> 
110					<#if descripcion?? && descripcion!=""> 
111						<p class="mj-box__information--text"> 
112							${htmlUtil.escape(descripcion)} 
113						</p> 
114					</#if> 
115				</div> 
116				<div class="mj-box__information--bottom-wrapper"> 
117					<div> 
118						<#if documentUrlPrincipal?? && documentUrlPrincipal!=""> 
119							<a href="${documentUrlPrincipal}" class="mj-link-download mr-2" download aria-label="${languageUtil.format(locale, 'download-x', htmlUtil.escape(documentTitulo), false)}" title="<@liferay.language key='download' /> ${htmlUtil.escape(documentTitulo)}"><@liferay.language key="download" /></a> 
120						</#if> 
121						<#if documentUrlCA?? && documentUrlCA!=""> 
122							<@printDownloadFlag documentUrlCA "ca_es" /> 
123						</#if> 
124						<#if documentUrlGL?? && documentUrlGL!=""> 
125						<@printDownloadFlag documentUrlGL "gl_es" /> 
126						</#if> 
127						<#if documentUrlVA?? && documentUrlVA!=""> 
128							<@printDownloadFlag documentUrlVA "va_es" /> 
129						</#if> 
130						<#if documentUrlEU?? && documentUrlEU!=""> 
131							<@printDownloadFlag documentUrlEU "eu_es" /> 
132						</#if> 
133						<#if documentUrlEN?? && documentUrlEN!=""> 
134							<@printDownloadFlag documentUrlEN "en_gb" /> 
135						</#if> 
136					</div> 
137					<#if documentFecha?? && documentFecha!=""> 
138						<#assign documentFecha_DateObj = dateUtil.parseDate("yyyy-MM-dd", documentFecha, locale)>  
139						<#assign documentFechaFormat = dateUtil.getDate(documentFecha_DateObj, "dd/MM/yyyy", locale)/> 
140						<time class="mj-datetime" datetime="${documentFecha_DateObj?date?iso_utc}">${documentFechaFormat}</time> 
141					</#if> 
142				</div> 
143			</li> 
144		</#list> 
145	</ul> 
146</#if> 
147							 
148<#function getUrlTitle documentJson languageId>	 
149	<#assign urlTitle = "" /> 
150	<#assign classPK = documentJson.classPK!""/> 
151	<#if classPK?string==""> 
152		<#assign classPK = documentJson.fileEntryId!""/> 
153	</#if> 
154	<#if classPK?? &&  classPK?string!=""> 
155		<#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntry(classPK?number) /> 
156		<#assign classNameId = classNameLocalService.getClassNameId("com.liferay.portal.kernel.repository.model.FileEntry") /> 
157		<#assign friendlyURLEntry = friendlyURLLocalService.fetchMainFriendlyURLEntry(classNameId, classPK?number)!"" /> 
158		<#if friendlyURLEntry?? && friendlyURLEntry!="" > 
159			<#assign friendlyURLEntryLocalization = friendlyURLLocalService.getFriendlyURLEntryLocalization(friendlyURLEntry.getFriendlyURLEntryId(), languageId) /> 
160			<#if dlFileEntry.getSize() gt 0 && friendlyURLEntryLocalization?? >	 
161				<#assign urlTitle = friendlyURLEntryLocalization.getUrlTitle() /> 
162			</#if>			 
163		</#if>			 
164	</#if> 
165	<#return urlTitle> 
166</#function>	 
167 
168 
169<#function getDocumentUrl repositoryUrl urlTitle isDownload>	 
170	<#if repositoryUrl?? && repositoryUrl!="" && urlTitle?? && urlTitle!="" > 
171		<#if isDownload?? && isDownload==true > 
172			<#return "/documents/d"+repositoryUrl+"/"+urlTitle+"?download=true"> 
173		<#else> 
174			<#return "/documents/d"+repositoryUrl+"/"+urlTitle > 
175		</#if> 
176	<#else> 
177		<#return ""> 
178	</#if> 
179</#function> 
180 
181<#macro printDownloadFlag documentUrl localeFlag> 
182	<#if localeFlag == 'ca_es'> 
183		<#assign language = 'catalán' /> 
184	<#elseif localeFlag == 'gl_es'> 
185		<#assign language = 'gallego' /> 
186	<#elseif localeFlag == 'va_es'> 
187		<#assign language = 'valenciano' /> 
188	<#elseif localeFlag == 'eu_es'> 
189		<#assign language = 'euskera' /> 
190	<#elseif localeFlag == 'en_gb'> 
191		<#assign language = 'inglés' /> 
192	</#if> 
193 
194	<a href="${documentUrl}" class="mr-1" download target="_blank" title="<@liferay.language key='download' /> ${htmlUtil.escape(documentTitulo)} > ${language}"> 
195		<img src="${imgUrlBase}${localeFlag}" /> 
196	</a> 
197</#macro>