List of usage examples for com.liferay.portal.kernel.repository.capabilities UnsupportedCapabilityException UnsupportedCapabilityException
public UnsupportedCapabilityException(Class<? extends Capability> capabilityClass, String providerDescription)
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()); }/* ww w.ja va 2s . c om*/ Folder folder = repository.getFolder(classPK); return (DLFolder) folder.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 ww . ja v a 2 s . c o m*/ FileEntry fileEntry = repository.getFileEntry(classPK); return (DLFileEntry) fileEntry.getModel(); }
From source file:com.liferay.document.library.internal.trash.DLFileEntryTrashHandler.java
License:Open Source License
@Override protected DocumentRepository getDocumentRepository(long classPK) throws PortalException { LocalRepository localRepository = RepositoryProviderUtil.getFileEntryLocalRepository(classPK); if (!localRepository.isCapabilityProvided(TrashCapability.class)) { throw new UnsupportedCapabilityException(TrashCapability.class, "Repository " + localRepository.getRepositoryId()); }//w w w . j av a 2 s . co m return localRepository; }
From source file:com.liferay.document.library.internal.trash.DLFileShortcutTrashHandler.java
License:Open Source License
protected DLFileShortcut getDLFileShortcut(long classPK) throws PortalException { Repository repository = RepositoryProviderUtil.getFileShortcutRepository(classPK); if (!repository.isCapabilityProvided(TrashCapability.class)) { throw new UnsupportedCapabilityException(TrashCapability.class, "Repository " + repository.getRepositoryId()); }//ww w.j a v a 2s.c o m FileShortcut fileShortcut = repository.getFileShortcut(classPK); return (DLFileShortcut) fileShortcut.getModel(); }
From source file:com.liferay.document.library.internal.trash.DLFileShortcutTrashHandler.java
License:Open Source License
@Override protected DocumentRepository getDocumentRepository(long classPK) throws PortalException { LocalRepository localRepository = RepositoryProviderUtil.getFileShortcutLocalRepository(classPK); if (!localRepository.isCapabilityProvided(TrashCapability.class)) { throw new UnsupportedCapabilityException(TrashCapability.class, "Repository " + localRepository.getRepositoryId()); }/*from www. ja v a 2 s. c om*/ return localRepository; }
From source file:com.liferay.document.library.internal.trash.DLFolderTrashHandler.java
License:Open Source License
@Override protected DocumentRepository getDocumentRepository(long classPK) throws PortalException { LocalRepository localRepository = RepositoryProviderUtil.getFolderLocalRepository(classPK); if (!localRepository.isCapabilityProvided(TrashCapability.class)) { throw new UnsupportedCapabilityException(TrashCapability.class, "Repository " + localRepository.getRepositoryId()); }// w ww . j a va2s. c o m return localRepository; }