Created
August 29, 2015 12:55
Fetch Web Contents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static List<JournalArticle> getSelectedWebContents(List<AssetEntry> assetEntries) { | |
List<JournalArticle> journalArticles = new ArrayList<JournalArticle>(); | |
JournalArticleResource journalArticleResource = null; | |
JournalArticle journalArticle = null; | |
for (AssetEntry entry : assetEntries) { | |
try { | |
journalArticleResource = JournalArticleResourceLocalServiceUtil.getJournalArticleResource(entry.getClassPK()); | |
journalArticle = JournalArticleLocalServiceUtil.getLatestArticle(journalArticleResource.getResourcePrimKey()); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
journalArticles.add(journalArticle); | |
} | |
return journalArticles; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment