News Releases - Page Introduction

News Releases

Recent A.T. Kearney media releases

Wydawca treści

Wystąpił błąd podczas przetwarzania szablonu.
Java method "com.sun.proxy.$Proxy481.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy481 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@37e32f54"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign jArt = JournalArticleLocalSer...  [in template "20116#20152#510999" at line 83, column 13]
----
1<#-- 
2Application display templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#assign DLFileEntryLocalService = serviceLocator.findService( 
10"com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
11<#assign DLFolderLocalService = serviceLocator.findService( 
12"com.liferay.document.library.kernel.service.DLFolderLocalService")> 
13<#assign JournalArticleLocalService = serviceLocator.findService( 
14"com.liferay.journal.service.JournalArticleLocalService")> 
15<#assign GroupLocalService = serviceLocator.findService( 
16"com.liferay.portal.kernel.service.GroupLocalService")> 
17<#assign LayoutSetService = serviceLocator.findService( 
18"com.liferay.portal.kernel.service.LayoutSetLocalService")> 
19<#assign AssetCategoryLocalService = serviceLocator.findService( 
20"com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
21<#assign AssetVocabularyLocalService = serviceLocator.findService( 
22"com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
23<#assign AssetCategoryPropertyLocalService = serviceLocator.findService( 
24"com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService")/> 
25<#assign PropertyFactoryUtil = serviceLocator.findService( 
26"com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") /> 
27<#assign DynamicQueryFactoryUtil = serviceLocator.findService( 
28"com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil") /> 
29 
30<#assign portletId = themeDisplay.getPortletDisplay().getId()> 
31<#assign locale = themeDisplay.getLocale()> 
32<#assign PortletPreferencesLocalService = serviceLocator.findService( 
33"com.liferay.portal.kernel.service.PortletPreferencesLocalService")/> 
34<#assign portletPreferencesXML = saxReaderUtil.read((PortletPreferencesLocalService.getPortletPreferences(themeDisplay.getPlid(), portletId)?first).getPreferences())> 
35 
36 
37<#-- Macro used to get specific field text from an Asset Entry --> 
38<#macro entryNode assetEntry field> 
39    <#assign ja = JournalArticleLocalService.getLatestArticle(assetEntry.getClassPK())> 
40    <#assign document = saxReaderUtil.read(ja.getContentByLocale(themeDisplay.getLocale()))> 
41    <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??> 
42    "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}" 
43    <#else> 
44    "" 
45    </#if> 
46</#macro> 
47 
48<#-- Macro used to get specific portlet preference --> 
49<#macro preference prefKey prefIndex defaultValue> 
50    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??> 
51    "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return> 
52    <#else> 
53    "${defaultValue?js_string}"<#return> 
54    </#if> 
55</#macro> 
56 
57<div id="articleAdtDiv_${portletId}"></div> 
58<script> 
59    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerHeadings']/value")?? && 
60        portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerHeadings']/value").getText()?js_string == "true"> 
61        <#assign overrideHeadingSize = "heading3 mobile-heading2"> 
62    </#if> 
63 
64    <#assign articleNum = 0 > 
65	<#assign rownum = 0 > 
66 
67	<#assign multiArtBehavior = "Vertical Stack"> 
68	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='multiArticleBehavior']/value")??> 
69        <#assign multiArtBehavior = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='multiArticleBehavior']/value").getText()?js_string> 
70    </#if> 
71	<#if multiArtBehavior == "Carousel"> 
72    //Create the carousel navigation arrows and carousel root element 
73    $("#articleAdtDiv_${portletId}").append("<div id='carouselPrev_${portletId}' class='carousel-arrow arrow-prev noselect'></div>"); 
74    $("#carouselPrev_${portletId}").append("<img src='/o/atk-dot-com-theme/images/common/Rotator-Arrow-Left-Mobile.svg' />"); 
75    $("#articleAdtDiv_${portletId}").append("<div id='carouselNext_${portletId}' class='carousel-arrow arrow-next noselect'></div>"); 
76    $("#carouselNext_${portletId}").append("<img src='/o/atk-dot-com-theme/images/common/Rotator-Arrow-Right-Mobile.svg' />"); 
77    $("#articleAdtDiv_${portletId}").append("<div id='carousel_${portletId}' class='owl-carousel owl-theme'></div>"); 
78    </#if> 
79 
80	<#if entries?has_content> 
81        <#list entries as curEntry> 
82 
83            <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())> 
84 
85            <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerStackSpacing']/value")?? && 
86            portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerStackSpacing']/value").getText()?js_string == "true"> 
87                <#assign paddingClass = " after-45-px-desktop after-25-px-mobile"> 
88            <#else> 
89                <#assign paddingClass = " after-90-px-desktop after-50-px-mobile"> 
90            </#if> 
91 
92            <#if multiArtBehavior == "Carousel"> 
93            $("#carousel_${portletId}").append("<div id='article_${jArt.getArticleId()?js_string}' class='atk-container'></div>"); 
94            <#elseif multiArtBehavior == "Two Wide"> 
95 
96                <#assign mobileSpacing = "after-50-px-mobile"/> 
97 
98                <#if articleNum == entries?size - 1> 
99                    <#assign mobileSpacing = ""/> 
100                </#if> 
101 
102                <#if (articleNum % 2) == 0> 
103                    <#assign rownum = articleNum / 2 > 
104                    <#if rownum == ((entries?size - 1) / 2)?floor > 
105                        <#assign paddingClass = " after-0-px"> 
106                    </#if> 
107                $("#articleAdtDiv_${portletId}").append("<div id='row${rownum}_${portletId}' class='atk-container atk-row ${paddingClass}'></div>"); 
108                </#if> 
109 
110            $("#row${rownum}_${portletId}").append("<div id='article_${jArt.getArticleId()?js_string}' class='d-5-col t-8-col p-6-col normalize-partial-width ${mobileSpacing}'></div>"); 
111 
112                <#if (articleNum % 2) == 1> 
113                $("#row${rownum}_${portletId}").append("<div class='d-1-col d-nrp tp-hidden no-content-col'></div>"); 
114                <#else> 
115                $("#row${rownum}_${portletId}").append("<div class='d-1-col tp-hidden no-content-col'></div>"); 
116                </#if> 
117 
118            <#elseif multiArtBehavior == "Three Wide"> 
119                <#assign mobileSpacing = "after-50-px-mobile"/> 
120 
121                <#if articleNum == entries?size - 1> 
122                    <#assign mobileSpacing = ""/> 
123                </#if> 
124 
125                <#if (articleNum % 3) == 0> 
126                    <#assign rownum = articleNum / 3 > 
127                    <#if rownum == ((entries?size - 1) / 3)?floor > 
128                        <#assign paddingClass = " after-0-px"> 
129                    </#if> 
130                    $("#articleAdtDiv_${portletId}").append("<div id='row${rownum}_${portletId}' class='atk-container atk-row ${paddingClass}'></div>"); 
131                </#if> 
132 
133                <#if (articleNum % 3) == 2> 
134                $("#row${rownum}_${portletId}").append("<div id='article_${jArt.getArticleId()?js_string}' class='d-4-col d-nrp t-8-col p-6-col normalize-partial-width ${mobileSpacing}'></div>"); 
135                <#else> 
136                $("#row${rownum}_${portletId}").append("<div id='article_${jArt.getArticleId()?js_string}' class='d-4-col t-8-col p-6-col normalize-partial-width ${mobileSpacing}'></div>"); 
137                </#if> 
138            <#else> 
139                <#if articleNum == entries?size - 1 > 
140                    <#assign paddingClass = " after-0-px"> 
141                </#if> 
142            $("#articleAdtDiv_${portletId}").append("<div id='article_${jArt.getArticleId()?js_string}' class='atk-container ${paddingClass}'></div>"); 
143            </#if> 
144 
145        var componentType = "FEATURED_ARTICLE"; 
146 
147        var displayType = <@preference prefKey="displayType" prefIndex=articleNum defaultValue="Blank"/> 
148 
149                displayType = displayType.trim(); 
150 
151            <#if multiArtBehavior == "Two Wide"> 
152            displayType = "Two Wide"; 
153            <#elseif multiArtBehavior == "Three Wide"> 
154            displayType = "Three Wide"; 
155            </#if> 
156 
157        var svgMask = ""; 
158        if (displayType == "Shape Image" || displayType == "Shape Characters"){ 
159 
160			<#assign svgMask> 
161                <@preference prefKey="shapeCharacter" prefIndex=articleNum defaultValue="2x.svg"/> 
162            </#assign> 
163 
164 
165        } else if (displayType == "Image Left" || displayType == "Image Right" || displayType == "Shape") { 
166 
167			<#assign svgMask> 
168                <@preference prefKey="shapeCharacter" prefIndex=articleNum defaultValue="2x.svg"/> 
169            </#assign> 
170
171 
172        svgMask = ${svgMask}.trim(); 
173 
174            <#assign query = DLFolderLocalService.dynamicQuery().add(PropertyFactoryUtil.forName("name").eq("Svg Masks")).add(PropertyFactoryUtil.forName("groupId").eq(themeDisplay.getCompany().getGroupId())) > 
175 
176            <#assign svgMasksFolders = DLFolderLocalService.dynamicQuery(query)> 
177 
178            <#if svgMasksFolders?has_content> 
179 
180                <#list svgMasksFolders as svgMasksFolder> 
181                var svgMaskURL = "/documents/${svgMasksFolder.getGroupId()}/${svgMasksFolder.getFolderId()}/" + svgMask; 
182                </#list> 
183 
184            </#if> 
185 
186        var locationOffset = (<@preference prefKey="locationOffset" prefIndex=articleNum defaultValue="0"/>).trim(); 
187 
188        var titleWidth = (<@preference prefKey="titleWidth" prefIndex=articleNum defaultValue="8"/>).trim(); 
189        var titleSize = (<@preference prefKey="titleTextSize" prefIndex=articleNum defaultValue="Large"/>).trim(); 
190        var titleTextSize = undefined; 
191        <#if overrideHeadingSize??> 
192            var titleTextSize = ("${overrideHeadingSize}").trim(); 
193        </#if> 
194        var title = (<@preference prefKey="titleOverride" prefIndex=articleNum defaultValue=""/>).trim(); 
195 
196        if (title == ""){ 
197            title = <@entryNode assetEntry=curEntry field="ArticleTitle"/>; 
198
199 
200        var subtitleWidth = (<@preference prefKey="subtitleWidth" prefIndex=articleNum defaultValue="8"/>).trim(); 
201        var useLargeSubtitleText = (<@preference prefKey="useLargeSubtitleText" prefIndex=articleNum defaultValue="true"/>).trim(); 
202        var hideSubtitle = (<@preference prefKey="hideSubtitle" prefIndex=articleNum defaultValue="false"/>).trim(); 
203        var subtitle = (<@preference prefKey="subtitleOverride" prefIndex=articleNum defaultValue=""/>).trim(); 
204 
205        if (subtitle == ""){ 
206            subtitle = <@entryNode assetEntry=curEntry field="Subtitle"/>; 
207
208 
209        var useLargeDescriptionText = (<@preference prefKey="useLargeDescriptionText" prefIndex=articleNum defaultValue="true"/>).trim(); 
210 
211        var description = ""; 
212 
213        if ("true" != (<@preference prefKey="hideDescription" prefIndex=articleNum defaultValue="false"/>).trim()) { 
214 
215            description = (<@preference prefKey="descriptionOverride" prefIndex=articleNum defaultValue=""/>).trim(); 
216 
217            if (description == ""){ 
218                description = <@entryNode assetEntry=curEntry field="Description"/>; 
219
220 
221            if (description == ""){ 
222                description = <@entryNode assetEntry=curEntry field="Intro"/>; 
223
224
225 
226 
227        var slug = ""; 
228        var showSlug = (<@preference prefKey="showSlug" prefIndex=articleNum defaultValue="true"/>).trim(); 
229 
230        if (showSlug == "true"){ 
231            slug = (<@preference prefKey="slugOverride" prefIndex=articleNum defaultValue=""/>).trim(); 
232 
233            if (slug == ""){ 
234                slug = <@entryNode assetEntry=curEntry field="Slug"/>; 
235
236
237 
238        var linkType = (<@preference prefKey="articleLinkType" prefIndex=articleNum defaultValue="Button"/>).trim(); 
239        var linkText =  (<@preference prefKey="buttonTextOverride" prefIndex=articleNum defaultValue=""/>).trim(); 
240 
241            <#assign structureName = jArt.getDDMStructure().getName("en_US")> 
242            <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())> 
243 
244            <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)?? 
245            && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? > 
246                <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")> 
247            <#else> 
248                <#assign isMicroSite = false> 
249            </#if> 
250 
251        var image = <@entryNode assetEntry=curEntry field="ThumbnailSquare"/>; 
252 
253        if (null == image || "" == image) { 
254            image = <@entryNode assetEntry=curEntry field="Thumbnail"/>; 
255
256 
257        if (null == image) { 
258            image = ""; 
259
260 
261 
262        var componentData = { 
263        	locale: "${locale}", 
264            structureName: "${structureName}", 
265            displayType: displayType, 
266            slug: slug, 
267            title: title, 
268            subtitle: subtitle, 
269            description: description, 
270            linkText: linkText, 
271            linkType: linkType, 
272            svgMaskURL: svgMaskURL, 
273            svgMask: svgMask, 
274            image: image.trim(), 
275            locationOffset: locationOffset, 
276            titlesWidth: titleWidth, 
277            titleSize: titleSize, 
278            titleTextSize: titleTextSize, 
279            descriptionsWidth: subtitleWidth, 
280            largeSubtitleText: useLargeSubtitleText, 
281            hideSubtitle: hideSubtitle, 
282            largeDescriptionText: useLargeDescriptionText, 
283            groupFriendlyUrl: '${articleGroup.getFriendlyURL()}', 
284            isMicrosite: ${isMicroSite?c}, 
285            multiArtBehavior: '${multiArtBehavior}' 
286        }; 
287 
288            <#if structureName == "Video"> 
289 
290            if (linkType != "Hidden"){ 
291                componentData.link = <@entryNode assetEntry=curEntry field="LinkURL"/>; 
292                componentData.videoUrl = <@entryNode assetEntry=curEntry field="VideoURL"/>; 
293
294 
295            <#elseif structureName == "Article"> 
296 
297            var linkTargetOverride = <@entryNode assetEntry=curEntry field="LinkTargetOverride"/>; 
298 
299            if (linkTargetOverride !== ""){ 
300                componentData.link = linkTargetOverride; 
301            } else { 
302				<#assign assetCategories = AssetCategoryLocalService.getAssetEntryAssetCategories(curEntry.getEntryId())> 
303 
304                var articleCategories = []; 
305 
306				<#list assetCategories as category> 
307                    <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())> 
308                    <#assign categoryUrl = "#"> 
309 
310                    <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty> 
311 
312                        <#if categoryProperty.key == "url"> 
313                            <#assign categoryUrl = categoryProperty.value> 
314                        </#if> 
315                    </#list> 
316 
317                    articleCategories.push({ 
318                        id: "${category.categoryId}", 
319                        name: "${category.name}", 
320                        url: "${categoryUrl}", 
321                        vocabularyName: "${categoryVocabulary.getName()?js_string}", 
322                    }); 
323                </#list> 
324 
325                componentData.categories = articleCategories; 
326                componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; 
327
328 
329            var byline = <@entryNode assetEntry=curEntry field="Byline"/>; 
330 
331            if (byline != null && byline != ""){ 
332                componentData.byline = [byline]; 
333            }; 
334 
335 
336            <#elseif structureName == "External Article"> 
337 
338            var articleCategories = []; 
339 
340            <#-- All External Articles should display at /media-center/article, so populate categories accordingly --> 
341            if (linkType != "Hidden"){ 
342                articleCategories.push({ 
343                    id: "0", 
344                    name: "Media Center", 
345                    url: "media-center", 
346                    vocabularyName: "Topics", 
347                }); 
348                articleCategories.push({ 
349                    id: "1", 
350                    name: "Article", 
351                    url: "article", 
352                    vocabularyName: "Article Type", 
353                }); 
354 
355                componentData.categories = articleCategories; 
356                componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; 
357
358 
359            var bylineSegments = []; 
360            var pubName = <@entryNode assetEntry=curEntry field="PublicationName"/>; 
361 
362            if (pubName != null && pubName != ""){ 
363                bylineSegments.push(pubName); 
364                componentData.italicizeFirstByline = true; 
365            }; 
366 
367            bylineSegments.push(<@entryNode assetEntry=curEntry field="PublicationDate"/>); 
368            componentData.byline = bylineSegments; 
369 
370            <#elseif structureName == "Link"> 
371 
372            componentData.link = <@entryNode assetEntry=curEntry field="LinkURL"/>; 
373            componentData.isExternal = true; 
374 
375            var bylineSegments = []; 
376 
377                <#assign linkja = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK()) > 
378                <#assign linkdocument = saxReaderUtil.read(linkja.getContent())> 
379                <#assign linknodes = document.selectNodes("/root/dynamic-element[@name='BylineSegment']/dynamic-content")> 
380 
381                <#list linknodes as curN> 
382                bylineSegments.push("${curN.getText()?js_string}"); 
383                </#list> 
384 
385            componentData.byline = bylineSegments; 
386 
387            </#if> 
388 
389            <#if structureName == "Micro Article"> 
390 
391            componentData["gridDescription"] = componentData["subtitle"]; 
392            componentData["description"] = <@entryNode assetEntry=curEntry field="Intro"/>; 
393 
394            ATK.React.App.ExpandingTopToBottomGrid("article_${jArt.getArticleId()?js_string}", 1, "featured", "bio", [componentData]); 
395            <#else> 
396            ATK.React.Component.ComponentSelector("article_${jArt.getArticleId()?js_string}", componentType, componentData); 
397            </#if> 
398 
399            <#assign articleNum++> 
400        </#list> 
401    </#if> 
402 
403	<#if multiArtBehavior = "Carousel"> 
404    ATK.Utility.sennaDomReady(function () { 
405 
406        var carousel = jQuery('#carousel_${portletId}'); 
407 
408        carousel.css('width', window.innerWidth); 
409 
410        setTimeout(function(){ 
411 
412            var setDotWidth = function() { 
413                setTimeout(function() { 
414                    var width = $(window).width(); 
415                    var padding = 0; 
416 
417                    if(width <= 767) { 
418                    	padding = 20; 
419                    } else if(width <= 1024) { 
420                        padding = 60; 
421                    } else if(width > 1000) { 
422                        width = 1000; 
423
424 
425                    $('.atk-container .owl-dots').width(width - padding*2); 
426                }, 200); 
427            }; 
428 
429            carousel.on('initialized.owl.carousel', setDotWidth); 
430            carousel.on('refreshed.owl.carousel', setDotWidth); 
431 
432            carousel.owlCarousel({ 
433                loop:true, 
434                dots:true, 
435                items:1 
436            }); 
437        }, 700); 
438 
439        $('#carouselNext_${portletId}').click(function() { 
440            carousel.trigger('next.owl.carousel'); 
441        }); 
442 
443        // Go to the previous item 
444        $('#carouselPrev_${portletId}').click(function() { 
445            carousel.trigger('prev.owl.carousel'); 
446        }); 
447 
448    }); 
449    </#if> 
450 
451</script>