Ejemplo n.º 1
0
  protected JournalArticle updateJournalArticle(
      JournalArticle journalArticle, String name, String content) throws Exception {

    Map<Locale, String> titleMap = new HashMap<Locale, String>();

    for (Locale locale : _locales) {
      titleMap.put(locale, name.concat(LocaleUtil.toLanguageId(locale)));
    }

    return JournalArticleLocalServiceUtil.updateArticle(
        journalArticle.getUserId(),
        journalArticle.getGroupId(),
        journalArticle.getFolderId(),
        journalArticle.getArticleId(),
        journalArticle.getVersion(),
        titleMap,
        journalArticle.getDescriptionMap(),
        content,
        journalArticle.getLayoutUuid(),
        ServiceTestUtil.getServiceContext());
  }