Example usage for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_THUMBNAIL_ENABLED

List of usage examples for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_THUMBNAIL_ENABLED

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_THUMBNAIL_ENABLED.

Prototype

String DL_FILE_ENTRY_THUMBNAIL_ENABLED

To view the source code for com.liferay.portal.kernel.util PropsKeys DL_FILE_ENTRY_THUMBNAIL_ENABLED.

Click Source Link

Usage

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

License:Open Source License

protected boolean isThumbnailEnabled(int index) throws SystemException {
    if ((index == THUMBNAIL_INDEX_DEFAULT)
            && GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_ENABLED))) {

        return true;
    } else if ((index == THUMBNAIL_INDEX_CUSTOM_1)
            && ((PrefsPropsUtil.getInteger(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_HEIGHT) > 0)
                    || (PrefsPropsUtil.getInteger(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_WIDTH) > 0))) {

        return true;
    } else if ((index == THUMBNAIL_INDEX_CUSTOM_2)
            && ((PrefsPropsUtil.getInteger(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_HEIGHT) > 0)
                    || (PrefsPropsUtil.getInteger(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_WIDTH) > 0))) {

        return true;
    }/*w w  w.  j a  va 2 s. c  om*/

    return false;
}