News Releases - Page Introduction

News Releases

Recent A.T. Kearney media releases

자산 발행인

템플렛을 가공하고 있는 동안 과실은 일어났다.
Java method "com.sun.proxy.$Proxy557.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy557 object "[email protected]6274becb"; 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 120, 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 
28<#assign portletId = themeDisplay.getPortletDisplay().getId()> 
29<#assign locale = themeDisplay.getLocale()> 
30<#assign PortletPreferencesLocalService = serviceLocator.findService( 
31"com.liferay.portal.kernel.service.PortletPreferencesLocalService")/> 
32<#assign portletPreferencesXML = saxReaderUtil.read((PortletPreferencesLocalService.getPortletPreferences(themeDisplay.getPlid(), portletId)?first).getPreferences())> 
33 
34 
35<#-- Macro used to get specific field text from an Asset Entry --> 
36<#macro entryNode document field> 
37    <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??> 
38    "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}" 
39    <#else> 
40    "" 
41    </#if> 
42</#macro> 
43 
44<#-- Macro used to get specific portlet preference --> 
45<#macro preference prefKey prefIndex defaultValue> 
46    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??> 
47    "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return> 
48    <#else> 
49    "${defaultValue?js_string}"<#return> 
50    </#if> 
51</#macro> 
52 
53<div id="articleAdtDiv_${portletId}"></div> 
54<script> 
55    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerHeadings']/value")?? && 
56    portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerHeadings']/value").getText()?js_string == "true"> 
57        <#assign overrideHeadingSize = "heading3 mobile-heading2"> 
58    </#if> 
59 
60	<#assign multiArtBehavior = "Vertical Stack"> 
61	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='multiArticleBehavior']/value")??> 
62        <#assign multiArtBehavior = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='multiArticleBehavior']/value").getText()?js_string> 
63    </#if> 
64 
65    <#assign fullWidthDisplay = "false"> 
66	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='fullWidthDisplay']/value")??> 
67        <#assign fullWidthDisplay = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='fullWidthDisplay']/value").getText()?js_string> 
68    </#if> 
69 
70    <#assign featureDisplayType = "Image Right"> 
71	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayType']/value")??> 
72        <#assign featureDisplayType = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayType']/value").getText()?js_string> 
73    </#if> 
74 
75    <#assign greyBackground = "false"> 
76	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='greyBackground']/value")??> 
77        <#assign greyBackground = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='greyBackground']/value").getText()?js_string> 
78    </#if> 
79 
80    <#assign extraSpacer = "None"> 
81	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='extraSpacer']/value")??> 
82        <#assign extraSpacer = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='extraSpacer']/value").getText()?js_string> 
83    </#if> 
84 
85    <#assign autoplay = "false"> 
86    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='autoPlay']/value")??> 
87        <#assign autoplay = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='autoPlay']/value").getText()?js_string> 
88    </#if> 
89 
90	<#assign seeAllLink = ""> 
91	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLink']/value")??> 
92        <#assign seeAllLink = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLink']/value").getText()?js_string> 
93    </#if> 
94 
95    <#assign seeAllLinkText = ""> 
96	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLinkText']/value")??> 
97        <#assign seeAllLinkText = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLinkText']/value").getText()?js_string> 
98    </#if> 
99 
100    <#assign featureDisplayButtonType = "Visible"> 
101    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonType']/value")??> 
102    <#assign featureDisplayButtonType = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonType']/value").getText()?js_string> 
103    </#if> 
104 
105    <#assign featureDisplayButtonText = ""> 
106    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonText']/value")??> 
107        <#assign featureDisplayButtonText = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonText']/value").getText()?js_string> 
108    </#if> 
109 
110	<#assign gridTitle = ""> 
111	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='gridTitle']/value")??> 
112		<#assign gridTitle = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='gridTitle']/value").getText()?js_string> 
113	</#if> 
114 
115	var entries = []; 
116 
117	<#if entries?has_content> 
118        <#list entries as curEntry> 
119 
120            <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())> 
121            <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))> 
122 
123            <#assign structureName = jArt.getDDMStructure().getName("en_US")> 
124 
125 
126            var componentType = "FEATURED_ARTICLE"; 
127 
128            var title = <@entryNode document=document field="ArticleTitle"/>; 
129 
130            var subtitle = <@entryNode document=document field="Subtitle"/>; 
131 
132            var description = <@entryNode document=document field="Description"/>; 
133            if (description == ""){ 
134				description = <@entryNode document=document field="Intro"/>; 
135
136 
137            var slug = <@entryNode document=document field="Slug"/>; 
138 
139            <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())> 
140 
141            <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)?? 
142            && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? > 
143                <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")> 
144            <#else> 
145                <#assign isMicroSite = false> 
146            </#if> 
147 
148            var image = <@entryNode document=document field="ThumbnailSquare"/>; 
149            if (null == image || "" == image || ${(fullWidthDisplay == "true")?c}) { 
150				image = <@entryNode document=document field="Thumbnail"/>; 
151
152            if (null == image) { 
153				image = ""; 
154
155 
156            var componentData = { 
157				locale: "${locale}", 
158				structureName: "${structureName}", 
159				displayType: "${featureDisplayType}", 
160				slug: slug, 
161				title: title, 
162				subtitle: subtitle, 
163				description: description, 
164				image: image.trim(), 
165				groupFriendlyUrl: '${articleGroup.getFriendlyURL()}', 
166				isMicrosite: ${isMicroSite?c}, 
167				multiArtBehavior: '${multiArtBehavior}', 
168                featureDisplayButtonText: '${featureDisplayButtonText}', 
169                featureDisplayButtonType: '${featureDisplayButtonType}', 
170				componentType: componentType 
171			}; 
172 
173            <#if structureName == "Video"> 
174 
175                componentData.displayType = "Video"; 
176                componentData.link = <@entryNode document=document field="LinkURL"/>; 
177                componentData.videoUrl = <@entryNode document=document field="VideoURL"/>; 
178 
179            <#elseif structureName == "Article"> 
180 
181                var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>; 
182 
183                if (linkTargetOverride !== ""){ 
184					componentData.link = linkTargetOverride; 
185				} else { 
186                    <#assign assetCategories = AssetCategoryLocalService.getAssetEntryAssetCategories(curEntry.getEntryId())> 
187 
188					var articleCategories = []; 
189 
190                    <#list assetCategories as category> 
191                        <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())> 
192                        <#assign categoryUrl = "#"> 
193 
194                        <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty> 
195 
196                            <#if categoryProperty.key == "url"> 
197                                <#assign categoryUrl = categoryProperty.value> 
198                            </#if> 
199                        </#list> 
200 
201                        articleCategories.push({ 
202							id: "${category.categoryId}", 
203							name: "${category.name}", 
204							url: "${categoryUrl}", 
205							vocabularyName: "${categoryVocabulary.getName()?js_string}", 
206						}); 
207                    </#list> 
208 
209					componentData.categories = articleCategories; 
210					componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; 
211
212 
213                var byline = <@entryNode document=document field="Byline"/>; 
214                if (byline != null && byline != ""){ 
215					componentData.byline = []; 
216				}; 
217 
218            <#elseif structureName == "External Article"> 
219 
220 
221 
222            <#-- All External Articles should display at /media-center/article, so populate categories accordingly --> 
223			<#-- var articleCategories = []; 
224                articleCategories.push({ 
225					id: "0", 
226					name: "Media Center", 
227					url: "media-center", 
228					vocabularyName: "Topics", 
229				}); 
230                articleCategories.push({ 
231					id: "1", 
232					name: "Article", 
233					url: "article", 
234					vocabularyName: "Article Type", 
235				}); 
236 
237                componentData.categories = articleCategories; 
238                componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; --> 
239 
240				componentData.link = <@entryNode document=document field="LinkURL"/>; 
241				componentData.isExternal = true; 
242 
243                var bylineSegments = []; 
244                var pubName = <@entryNode document=document field="PublicationName"/>; 
245 
246                if (pubName != null && pubName != ""){ 
247					bylineSegments.push(pubName); 
248					componentData.italicizeFirstByline = true; 
249				}; 
250 
251            <#--bylineSegments.push(<@entryNode document=document field="PublicationDate"/>); --> 
252                componentData.byline = bylineSegments; 
253 
254            <#elseif structureName == "Link"> 
255 
256                componentData.link = <@entryNode document=document field="LinkURL"/>; 
257                componentData.isExternal = true; 
258 
259                var bylineSegments = []; 
260 
261                <#assign linkja = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK()) > 
262                <#assign linkdocument = saxReaderUtil.read(linkja.getContent())> 
263                <#assign linknodes = document.selectNodes("/root/dynamic-element[@name='BylineSegment']/dynamic-content")> 
264 
265                <#list linknodes as curN> 
266                    bylineSegments.push("${curN.getText()?js_string}"); 
267                </#list> 
268 
269                componentData.byline = bylineSegments; 
270                componentData.italicizeFirstByline = true; 
271 
272            </#if> 
273 
274            entries.push(componentData); 
275        </#list> 
276    </#if> 
277 
278	<#if multiArtBehavior == "Carousel"> 
279        var carouselProps = { 
280			entries: entries, 
281			gridTitle: "${gridTitle}", 
282			fullWidthDisplay: ${(fullWidthDisplay == "true")?c}, 
283			greyBackground: "${greyBackground}", 
284			autoplay: ${(autoplay == "true")?c} 
285		}; 
286 
287        ATK.React.Component.Carousel("articleAdtDiv_${portletId?js_string}", carouselProps); 
288    <#else> 
289        var extraProps = { 
290			multiArtBehavior: "${multiArtBehavior}", 
291			gridTitle: "${gridTitle}", 
292			fullWidthDisplay: "${fullWidthDisplay}", 
293			greyBackground: "${greyBackground}", 
294			extraSpacer: "${extraSpacer}", 
295			seeAllLink: "${seeAllLink}", 
296			seeAllLinkText: "${seeAllLinkText}" 
297		}; 
298        ATK.React.Component.FeaturedMultiDisplay("articleAdtDiv_${portletId?js_string}", extraProps, entries); 
299    </#if> 
300 
301</script>