Example usage for com.liferay.portal.kernel.repository Repository lockFolder

List of usage examples for com.liferay.portal.kernel.repository Repository lockFolder

Introduction

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

Prototype

public Lock lockFolder(long folderId, String owner, boolean inheritable, long expirationTime)
            throws PortalException;

Source Link

Usage

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

License:Open Source License

/**
 * Locks the folder. This method is primarily used by WebDAV.
 *
 * @param  repositoryId the primary key of the repository
 * @param  folderId the primary key of the folder
 * @param  owner the owner string for the checkout (optionally
 *         <code>null</code>)
 * @param  inheritable whether the lock must propagate to descendants
 * @param  expirationTime the time in milliseconds before the lock expires.
 *         If the value is <code>0</code>, the default expiration time will
 *         be used from <code>portal.properties>.
 * @return the lock object/* w w  w .  j  a  va 2 s.c  o  m*/
 * @throws PortalException if the repository or folder could not be found
 * @throws SystemException if a system exception occurred
 */
public Lock lockFolder(long repositoryId, long folderId, String owner, boolean inheritable, long expirationTime)
        throws PortalException, SystemException {

    Repository repository = getRepository(repositoryId);

    return repository.lockFolder(folderId, owner, inheritable, expirationTime);
}