We can create journal article programmatically by using add article method
JournalArticleLocalServiceUtil.addArticle (10198, 10181, 0, nameMap, nameMap,content, "23303",ddmTemplate.getTemplateKey(), serviceContext);
To create the title map and description map use localizationutil
Creating titlemap:
String mycustomwebcontent = "New title";
Map<Locale,String> nameMap = LocalizationUtil.getLocalizationMap(mycustomwebcontent);
In template key and structure key pass your structure and template key.
And use servicecontext object
ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
0 comments:
Post a Comment