Example usage for com.liferay.portal.kernel.repository RepositoryProviderUtil getFileShortcutLocalRepository

List of usage examples for com.liferay.portal.kernel.repository RepositoryProviderUtil getFileShortcutLocalRepository

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.repository RepositoryProviderUtil getFileShortcutLocalRepository.

Prototype

public static LocalRepository getFileShortcutLocalRepository(long fileShortcutId) throws PortalException 

Source Link

Usage

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());
    }/*w  ww. j a va 2s  .com*/

    return localRepository;
}