List of usage examples for com.liferay.portal.kernel.repository RepositoryProviderUtil getFileEntryRepository
public static Repository getFileEntryRepository(long fileEntryId) throws PortalException
From source file:com.liferay.document.library.internal.trash.DLFileEntryTrashHandler.java
License:Open Source License
protected DLFileEntry fetchDLFileEntry(long classPK) throws PortalException { Repository repository = RepositoryProviderUtil.getFileEntryRepository(classPK); if (!repository.isCapabilityProvided(TrashCapability.class)) { return null; }//from www. j a va2 s .c om FileEntry fileEntry = repository.getFileEntry(classPK); return (DLFileEntry) fileEntry.getModel(); }
From source file:com.liferay.document.library.internal.trash.DLFileEntryTrashHandler.java
License:Open Source License
protected DLFileEntry getDLFileEntry(long classPK) throws PortalException { Repository repository = RepositoryProviderUtil.getFileEntryRepository(classPK); if (!repository.isCapabilityProvided(TrashCapability.class)) { throw new UnsupportedCapabilityException(TrashCapability.class, "Repository " + repository.getRepositoryId()); }//from w w w . ja v a 2s. co m FileEntry fileEntry = repository.getFileEntry(classPK); return (DLFileEntry) fileEntry.getModel(); }