Example usage for com.liferay.portal.kernel.repository.model FileVersion isPending

List of usage examples for com.liferay.portal.kernel.repository.model FileVersion isPending

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.repository.model FileVersion isPending.

Prototype

public boolean isPending();

Source Link

Usage

From source file:com.liferay.document.library.internal.repository.capabilities.LiferaySyncCapability.java

License:Open Source License

protected void registerDLSyncEventCallback(String event, FileEntry fileEntry) {

    if (isStagingGroup(fileEntry.getGroupId()) || !(fileEntry instanceof LiferayFileEntry)) {

        return;/*w  ww. j  av  a 2 s.c o  m*/
    }

    try {
        FileVersion fileVersion = fileEntry.getFileVersion();

        if (fileVersion.isPending()) {
            return;
        }
    } catch (Exception e) {
        _log.error(e, e);
    }

    registerDLSyncEventCallback(event, DLSyncConstants.TYPE_FILE, fileEntry.getFileEntryId());
}