protected void moveFolder(ActionRequest actionRequest) throws Exception {
    long folderId = ParamUtil.getLong(actionRequest, "folderId");

    long parentFolderId = ParamUtil.getLong(actionRequest, "parentFolderId");

    ServiceContext serviceContext =
        ServiceContextFactory.getInstance(JournalFolder.class.getName(), actionRequest);

    JournalFolderServiceUtil.moveFolder(folderId, parentFolderId, serviceContext);
  }
Exemplo n.º 2
0
  protected void moveEntries(ActionRequest actionRequest) throws Exception {
    long newFolderId = ParamUtil.getLong(actionRequest, "newFolderId");

    long[] folderIds = StringUtil.split(ParamUtil.getString(actionRequest, "folderIds"), 0L);

    ServiceContext serviceContext =
        ServiceContextFactory.getInstance(JournalArticle.class.getName(), actionRequest);

    for (long folderId : folderIds) {
      JournalFolderServiceUtil.moveFolder(folderId, newFolderId, serviceContext);
    }

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    String[] articleIds = StringUtil.split(ParamUtil.getString(actionRequest, "articleIds"));

    for (String articleId : articleIds) {
      JournalArticleServiceUtil.moveArticle(themeDisplay.getScopeGroupId(), articleId, newFolderId);
    }
  }