News Releases - Page Introduction

News Releases

Recent A.T. Kearney media releases

자산 발행인

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