Example usage for com.liferay.portal.kernel.repository LocalRepository getFileVersion

List of usage examples for com.liferay.portal.kernel.repository LocalRepository getFileVersion

Introduction

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

Prototype

public FileVersion getFileVersion(long fileVersionId) throws PortalException;

Source Link

Usage

From source file:com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.java

License:Open Source License

/**
 * Returns the file version with the primary key.
 *
 * @param  fileVersionId the primary key of the file version
 * @return the file version with the primary key
 * @throws PortalException if the file version could not be found
 * @throws SystemException if a system exception occurred
 *//*from   w w w .  ja  v  a  2 s.c o  m*/
public FileVersion getFileVersion(long fileVersionId) throws PortalException, SystemException {

    LocalRepository localRepository = getLocalRepository(0, 0, fileVersionId);

    return localRepository.getFileVersion(fileVersionId);
}