@Override public void deleteFolder(long folderId) throws PortalException, SystemException { boolean dlAppHelperEnabled = DLAppHelperThreadLocal.isEnabled(); try { DLAppHelperThreadLocal.setEnabled(false); DLAppLocalServiceUtil.deleteFolder(folderId); } finally { DLAppHelperThreadLocal.setEnabled(dlAppHelperEnabled); } }
@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); } }
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); }
@After public void tearDown() throws Exception { DLAppLocalServiceUtil.deleteFolder(_folder.getFolderId()); }