コード例 #1
0
  @Override
  public void deleteFolder(long folderId) throws PortalException, SystemException {

    boolean dlAppHelperEnabled = DLAppHelperThreadLocal.isEnabled();

    try {
      DLAppHelperThreadLocal.setEnabled(false);

      DLAppLocalServiceUtil.deleteFolder(folderId);
    } finally {
      DLAppHelperThreadLocal.setEnabled(dlAppHelperEnabled);
    }
  }
コード例 #2
0
  @Override
  public void deletePortletFolder(long folderId) throws PortalException, SystemException {

    boolean dlAppHelperEnabled = DLAppHelperThreadLocal.isEnabled();

    try {
      DLAppHelperThreadLocal.setEnabled(false);

      SystemEventHierarchyEntryThreadLocal.push(Folder.class);

      DLAppLocalServiceUtil.deleteFolder(folderId);
    } catch (NoSuchRepositoryEntryException nsree) {
      if (_log.isErrorEnabled()) {
        _log.error(nsree, nsree);
      }
    } finally {
      DLAppHelperThreadLocal.setEnabled(dlAppHelperEnabled);

      SystemEventHierarchyEntryThreadLocal.pop(Folder.class);
    }
  }
コード例 #3
0
  protected Folder addFolder(long parentFolderId, String name, boolean deleteExisting)
      throws Exception {

    ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(_group.getGroupId());

    if (deleteExisting) {
      try {
        Folder folder = DLAppLocalServiceUtil.getFolder(_group.getGroupId(), parentFolderId, name);

        DLAppLocalServiceUtil.deleteFolder(folder.getFolderId());
      } catch (NoSuchFolderException nsfe) {
      }
    }

    return DLAppLocalServiceUtil.addFolder(
        TestPropsValues.getUserId(),
        _group.getGroupId(),
        parentFolderId,
        name,
        StringPool.BLANK,
        serviceContext);
  }
コード例 #4
0
 @After
 public void tearDown() throws Exception {
   DLAppLocalServiceUtil.deleteFolder(_folder.getFolderId());
 }