Example usage for com.liferay.portal.kernel.messaging DestinationNames DOCUMENT_LIBRARY_AUDIO_PROCESSOR

List of usage examples for com.liferay.portal.kernel.messaging DestinationNames DOCUMENT_LIBRARY_AUDIO_PROCESSOR

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.messaging DestinationNames DOCUMENT_LIBRARY_AUDIO_PROCESSOR.

Prototype

String DOCUMENT_LIBRARY_AUDIO_PROCESSOR

To view the source code for com.liferay.portal.kernel.messaging DestinationNames DOCUMENT_LIBRARY_AUDIO_PROCESSOR.

Click Source Link

Usage

From source file:com.liferay.portlet.documentlibrary.util.AudioProcessorImpl.java

License:Open Source License

private void _queueGeneration(FileVersion fileVersion) {
    if (_fileVersionIds.contains(fileVersion.getFileVersionId()) || !isSupported(fileVersion)) {

        return;//from ww  w .  j  a va  2  s . com
    }

    _fileVersionIds.add(fileVersion.getFileVersionId());

    if (PropsValues.DL_FILE_ENTRY_PROCESSORS_TRIGGER_SYNCHRONOUSLY) {
        try {
            MessageBusUtil.sendSynchronousMessage(DestinationNames.DOCUMENT_LIBRARY_AUDIO_PROCESSOR,
                    fileVersion);
        } catch (MessageBusException mbe) {
            if (_log.isWarnEnabled()) {
                _log.warn(mbe, mbe);
            }
        }
    } else {
        MessageBusUtil.sendMessage(DestinationNames.DOCUMENT_LIBRARY_AUDIO_PROCESSOR, fileVersion);
    }
}