List of usage examples for com.liferay.portal.kernel.repository RepositoryProviderUtil getFolderRepository
public static Repository getFolderRepository(long folderId) throws PortalException
From source file:com.liferay.document.library.internal.trash.DLBaseTrashHandler.java
License:Open Source License
protected DLFolder fetchDLFolder(long classPK) throws PortalException { Repository repository = RepositoryProviderUtil.getFolderRepository(classPK); if (!repository.isCapabilityProvided(TrashCapability.class)) { return null; }//from w w w . j av a2 s . co m Folder folder = repository.getFolder(classPK); return (DLFolder) folder.getModel(); }
From source file:com.liferay.document.library.internal.trash.DLBaseTrashHandler.java
License:Open Source License
protected DLFolder getDLFolder(long classPK) throws PortalException { Repository repository = RepositoryProviderUtil.getFolderRepository(classPK); if (!repository.isCapabilityProvided(TrashCapability.class)) { throw new UnsupportedCapabilityException(TrashCapability.class, "Repository " + repository.getRepositoryId()); }/*w w w . ja v a 2 s .co m*/ Folder folder = repository.getFolder(classPK); return (DLFolder) folder.getModel(); }