Videos

ESCOLAS MILITARES

Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService" )  [in template "20154#20194#5143920" at line 14, column 42]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign assetLinkLocalService = servi...  [in template "20154#20194#5143920" at line 14, column 9]
----
1<#--  
2    Nome: Modelo Vídeos (PM) 
3    Estrutura: Vídeos (PM) 
4    Descrição:  
5    Fazer cache: Sim 
6    Data alteração: 2022 10 28 
7    Tarefa: #51608 
8    Obs.: Modelos duplicados para migração 
9--> 
10	<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
11	<#assign ja = journalArticleLocalService.getArticle( groupId, .vars['reserved-article-id'].data ) /> 
12	<#assign resourceprimKey = ja.getResourcePrimKey() /> 
13	<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
14	<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService" ) /> 
15 
16 
17	<#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", resourceprimKey) /> 
18	<#assign categoryUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
19	<#assign categoryPorpertyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") /> 
20	<#assign assetCategories = categoryUtil.getAssetEntryAssetCategories(assetEntry.getEntryId()) /> 
21 
22 
23		<#assign category = assetCategories[0]! /> 
24 
25 
26	<#-- <#assign createDate = dateTool.format("EEEE, dd 'de' MMMM 'de' yyyy 'às' hh:mm", dateTool.toDate( "dd MMM yyyy hh:mm:ss Z" ,ja.displayDate)) /> --> 
27 
28 
29		<#assign cat = (category.name)! /> 
30 
31	<#assign index = url.getData()?index_of('/') + 1 /> 
32	<#assign url = url.getData()?substring(index) /> 
33	<#assign index = url?index_of('/') + 1 /> 
34	<#assign url = url?substring(index) /> 
35	<#assign index = url?index_of('/') + 1 /> 
36	<#assign url = url?substring(index) /> 
37 
38	<#assign ver_data = ja.displayDate?string["EEEE, dd 'de' MMMM 'de' yyyy 'às' hh:mm"] /> 
39	<style> 
40	<#if chapeu?has_content > 
41		.header-title:before{content:"${chapeu.getData()?trim}";font-size:13px;display: -webkit-box;line-height: 15px;text-transform: uppercase;font-family:Arial,Helvetica,sans-serif; display: block;} 
42		.taglib-header .header-back-to a {font-size: 1.8em;margin-top: 5px;} 
43	<#else> 
44		.taglib-header .header-back-to a {font-size: 1.8em;margin-top: -10px;} 
45	</#if> 
46	.taglib-header:after {content: "${ver_data}";font-size: 12px;float:right;margin-bottom: 30px;} 
47	.mt-search{display:none;} 
48	</style> 
49 
50	<div style="text-align:center;margin-bottom:20px;"> 
51	<object width="100%" height="340" class="hidden-phone"> 
52	  <param name="movie" 
53			 value="https://www.youtube.com/embed/${url}?version=3&theme=light"></param> 
54	  <param name="allowScriptAccess" value="always"></param> 
55	  <embed src="https://www.youtube.com/embed/${url}?version=3&theme=light" 
56			 allowscriptaccess="always" 
57			 width="100%" height="340"></embed> 
58	</object> 
59 
60	<object width="100%" height="240px" class="visible-phone" style="margin: 0 auto;"> 
61	  <param name="movie" value="https://www.youtube.com/embed/${url}?version=3&theme=light"></param> 
62	  <param name="allowScriptAccess" value="always"></param> 
63	  <embed src="https://www.youtube.com/embed/${url}?version=3&theme=light" allowscriptaccess="always" width="100%" height="240px"></embed> 
64	</object> 
65	<#if file.getData()?has_content > 
66	<a href="${file.getData()}" target="_blank"> 
67		${languageUtil.format(locale, "download-x", "Arquivo para Download")} 
68	</a> 
69	</#if> 
70	</div> 
71	<div style="text-align: justify;"> 
72	${descricao.getData()} 
73	</div> 
74	<div class="news-end"> 
75		<div class="social-share"> 
76			Compartilhe esta notícia <i class="icon-chevron-right"></i> <a style="float: right;" class="visible-phone" onclick="shareWA()" target="_blank" rel="external" data-action="share/whatsapp/share"><i class="icon-mt-whatsapp"></i></a><a onclick="shareFB()" target="_blank"><i class="icon-facebook-sign"></i></a><a onclick="shareTT()"><i class="icon-twitter-sign"></i></a><a onclick="shareGP()"><i class="icon-google-plus-sign"></i></a> 
77		</div> 
78	</div> 
79	<#-- <#assign themeDisplay = portal.getClass().forName("com.liferay.portal.theme.ThemeDisplay").newInstance() />  --> 
80	<#assign portalURL = (httpUtil.getProtocol(request.attributes.CURRENT_URL))!"" + "://" + getterUtil.getString(themeDisplay.portalUrl) />  
81 
82	<script>   
83		function shareFB(){ 
84			window.location.assign('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent('${portalURL}/-/${ja}.urlTitle')); 
85
86		 
87		function shareTT(){ 
88			window.location.assign('https://twitter.com/intent/tweet?url=' + encodeURIComponent('${portalURL}/-/${ja}.urlTitle') + '&text=' +encodeURIComponent('Confiram esta notícia do portal MT.GOV.BR')+'&via=govmatogrosso'); 
89
90		 
91		function shareGP(){ 
92			window.location.assign('https://plus.google.com/share?url=' + encodeURIComponent('{$portalURL}/-/${ja}.urlTitle')); 
93
94		 
95		function shareWA(){ 
96			window.location.assign('whatsapp://send?text=' + encodeURIComponent('Veja esta notícia no portal MT.GOV.BR: ${portalURL}/-/${ja}.urlTitle')); 
97
98		 
99		window.setTimeout( function(){ 
100			<#assign count = 0  /> 
101			<#list  assetCategories as categoriaTeste  > 
102				console.log('${categoriaTeste.name?trim}'); 
103				jQuery("div[cat-name='${categoriaTeste.name?trim}']" ).addClass( "cat-active" ); 
104				<#assign count = count + 1  /> 
105			</#list>  
106			 
107			//var catActive = jQuery("div[cat-name='$cat?trim']" ).addClass( "cat-active" ); 
108			//console.log(catActive + '$cat?trim'); 
109		}, 500 ); 
110	</script> 
111 
112	<br><br> 
113 
114	<style> 
115	.rel-content-title{font-family:Arial,Helvetica,sans-serif;text-transform:uppercase;color: #fff;font-size:16px;padding: 10px;background-color: #1255A6;} 
116	.rel-content{background:#dde2e6;margin-top: 9px;padding: 10px;} 
117	.rel-content ul{margin: 0 0;} 
118	.rel-links{margin-top:10px;} 
119	.rel-links li{list-style:none;line-height: 20px;padding: 5px;background-color: rgba(255,255,255,.5);margin-bottom: 10px;} 
120	.rel-links li:last-child{margin-bottom:0;} 
121	.rel-links li a{font-size:18px;} 
122	.related-thumbs{margin-top:10px;} 
123	.related-thumbs .sm{height: 130px;} 
124	.related-thumbs .foto-title{font-size:16px;} 
125	.related-thumbs .video-title{font-size:14px;color:#fff;position:absolute;bottom:0;left:0;background:#0071bb;line-height: 15px;padding: 3px 6px;} 
126	.rel-video-icon{text-align: center;display: block;font-size: 32px;} 
127	.rel-video-icon i{color: #e62117;background-color: #fff;line-height: 17px !important;text-indent: -1px;margin-left: 0px;width: 23px;height: 14px !important;margin-top: 42px !important;} 
128	</style> 
129 
130 
131	<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", resourceprimKey) /> 
132	<#assign currentArticleAssetEntryEntryId = currentArticleAssetEntry.getEntryId() /> 
133	<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryEntryId) /> 
134 
135	<#if currentArticleRelatedLinks?has_content >  
136		<span class="rel-content-title">Veja Também</span> 
137		<div class="rel-content"> 
138		<#assign relatedText = true /> 
139		<ul class="rel-links"> 
140		<#list currentArticleRelatedLinks as  link > 
141		   <#assign linkedAssetEntryId = link.getEntryId2() /> 
142		   <#assign linkedAssetEntry = assetEntryLocalService.getEntry(linkedAssetEntryId) /> 
143		   <#assign linkedAssetEntryPrimaryKey = linkedAssetEntry.getClassPK() /> 
144		   <#assign linkedArticle = journalArticleLocalService.getLatestArticle(linkedAssetEntryPrimaryKey) /> 
145		   <#assign linkedArticleTitle = linkedArticle.getTitle(locale) /> 
146		   <#assign document = saxReaderUtil.read(linkedArticle.getContent()) /> 
147		    
148		   <#if document.selectSingleNode("/root/dynamic-element[@name='full_text']/dynamic-content").data >  
149				<li><a href="${portalURL}/-/${linkedArticle}.urlTitle">${linkedArticleTitle} <i class="icon-external-link"></i></a></li> 
150		   </#if> 
151		    
152		   <#if (document.selectSingleNode("/root/dynamic-element[@name='radio_url']/dynamic-content").data) > 
153				<#assign radio_url = document.selectSingleNode("/root/dynamic-element[@name='radio_url']/dynamic-content").data /> 
154				<li> 
155					<a href="${portalURL}/-/${linkedArticle}.urlTitle">${linkedArticleTitle} <i class="icon-external-link"></i></a> 
156					<audio controls style="width:100%;opacity:.4;"> 
157					  <source src="${radio_url}" type="audio/mpeg"> 
158					  Seu navegador não possui suporte para reprodução de áudio. 
159					</audio> 
160				</li> 
161		   </#if> 
162		    
163		   <#if (document.selectSingleNode("/root/dynamic-element[@name='url']/dynamic-content").data || document.selectSingleNode("/root/dynamic-element[@name='image']/dynamic-content").data) >  
164			<#assign haveMedia = true /> 
165		   </#if> 
166		 
167		</#list> 
168		</ul> 
169	  </#if> 
170 
171	<#if currentArticleRelatedLinks?has_content && haveMedia?has_content >  
172		<#if !relatedText >  
173			<span class="rel-content-title">Veja Também</span> 
174			<div class="rel-content"> 
175		</#if> 
176		<div class="row-fluid related-thumbs"> 
177		<#list currentArticleRelatedLinks   as  link > 
178		   <#assign linkedAssetEntryId = link.getEntryId2() /> 
179		   <#assign linkedAssetEntry = assetEntryLocalService.getEntry(linkedAssetEntryId) /> 
180		   <#assign linkedAssetEntryPrimaryKey = linkedAssetEntry.getClassPK() /> 
181		   <#assign linkedArticle = journalArticleLocalService.getLatestArticle(linkedAssetEntryPrimaryKey) /> 
182		   <#assign linkedArticleTitle = linkedArticle.getTitle(locale) /> 
183		   <#assign document = saxReaderUtil.read(linkedArticle.getContent()) /> 
184		    
185		   <#if (document.selectSingleNode("/root/dynamic-element[@name='image']/dynamic-content").data) > 
186				<#assign img = document.selectSingleNode("/root/dynamic-element[@name='image']/dynamic-content") /> 
187				<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']")  /> 
188				<#assign imgNumb = xPathSelector.selectNodes(document.getRootElement())?size  /> 
189				<div class="span4"> 
190					<a href="${portalURL}/-/${linkedArticle}.urlTitle"> 
191						<div class="sm gal-item" style="background:url($img.data);background-size:cover;"> 
192							<span class="foto-overlay"> 
193								<span class="foto-title">${linkedArticle}.getTitle(${locale})</span> 
194								<span class="total-fotos">${imgNumb} <i class="icon-camera"></i></span> 
195							</span> 
196							 
197						</div> 
198					</a> 
199				</div> 
200			</#if>  
201		    
202		   <#if (document.selectSingleNode("/root/dynamic-element[@name='url']/dynamic-content").data) >  
203				<#assign url = document.selectSingleNode("/root/dynamic-element[@name='url']/dynamic-content").data /> 
204 
205				<#assign index = url.indexOf('/') + 1 /> 
206				<#assign url = url.substring(index) /> 
207 
208				<#assign index = url.indexOf('/') + 1 /> 
209				<#assign url = url.substring(index) /> 
210 
211				<#assign index = url.indexOf('/') + 1 /> 
212				<#assign url = url.substring(index) /> 
213				 
214				 
215				<div class="span4"> 
216					<a href="${portalURL}/-/${linkedArticle}.urlTitle"> 
217						<div class="sm gal-item" style="background:url(http://img.youtube.com/vi/${url}?trim/sddefault.jpg);background-size:cover;background-position-y: -18px;"> 
218							<span class="foto-overlay"> 
219								<span class="rel-video-icon"><i class="icon-youtube-play"></i></span> 
220								<span class="video-title">${linkedArticle}.getTitle(${locale})</span> 
221							</span> 
222							 
223						</div> 
224					</a> 
225				</div> 
226			</#if> 
227		 
228		  </#list> 
229		 
230		</div> 
231	   </#if> 
232 
233	<#if (!currentArticleRelatedLinks?has_content) >  
234		</div> 
235	</#if>