@Override public TrashRenderer getTrashRenderer(long classPK) throws PortalException, SystemException { DLFileShortcut fileShortcut = DLFileShortcutLocalServiceUtil.getDLFileShortcut(classPK); return new DLFileShortcutTrashRenderer(fileShortcut); }
@Override public boolean isInTrashContainer(long classPK) throws PortalException, SystemException { DLFileShortcut fileShortcut = DLFileShortcutLocalServiceUtil.getDLFileShortcut(classPK); return fileShortcut.isInTrashContainer(); }
@Override protected int getBaseModelsNotInTrashCount(BaseModel<?> parentBaseModel) throws Exception { DLFolder dlFolder = (DLFolder) parentBaseModel; return DLFileShortcutLocalServiceUtil.getFileShortcutsCount( dlFolder.getGroupId(), dlFolder.getFolderId(), true, WorkflowConstants.STATUS_APPROVED); }
@Override public String getRestoreMessage(PortletRequest portletRequest, long classPK) throws PortalException, SystemException { DLFileShortcut fileShortcut = DLFileShortcutLocalServiceUtil.getDLFileShortcut(classPK); return DLUtil.getAbsolutePath(portletRequest, fileShortcut.getFolderId()); }
@Override public String getRestoreLink(PortletRequest portletRequest, long classPK) throws PortalException, SystemException { DLFileShortcut fileShortcut = DLFileShortcutLocalServiceUtil.getDLFileShortcut(classPK); return DLUtil.getDLControlPanelLink(portletRequest, fileShortcut.getFolderId()); }
@Test public void testActionableDynamicQuery() throws Exception { final IntegerWrapper count = new IntegerWrapper(); ActionableDynamicQuery actionableDynamicQuery = DLFileShortcutLocalServiceUtil.getActionableDynamicQuery(); actionableDynamicQuery.setPerformActionMethod( new ActionableDynamicQuery.PerformActionMethod() { @Override public void performAction(Object object) { DLFileShortcut dlFileShortcut = (DLFileShortcut) object; Assert.assertNotNull(dlFileShortcut); count.increment(); } }); actionableDynamicQuery.performActions(); Assert.assertEquals(count.getValue(), _persistence.countAll()); }
@Override public List<DLFileShortcut> getFileShortcuts() { return DLFileShortcutLocalServiceUtil.getFileShortcuts(getFileEntryId()); }
@Override protected BaseModel<?> getBaseModel(long primaryKey) throws Exception { return DLFileShortcutLocalServiceUtil.fetchDLFileShortcut(primaryKey); }
protected DLFileShortcut getDLFileShortcut(long classPK) throws PortalException, SystemException { return DLFileShortcutLocalServiceUtil.getDLFileShortcut(classPK); }