Example usage for com.liferay.portal.kernel.util OSDetector isApple

List of usage examples for com.liferay.portal.kernel.util OSDetector isApple

Introduction

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

Prototype

public static boolean isApple() 

Source Link

Usage

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

License:Open Source License

public String getGlobalSearchPath() throws Exception {
    PortletPreferences preferences = PrefsPropsUtil.getPreferences();

    String globalSearchPath = preferences.getValue(PropsKeys.IMAGEMAGICK_GLOBAL_SEARCH_PATH, null);

    if (Validator.isNotNull(globalSearchPath)) {
        return globalSearchPath;
    }/*from   w  w  w .  java  2  s . c o m*/

    String filterName = null;

    if (OSDetector.isApple()) {
        filterName = "apple";
    } else if (OSDetector.isWindows()) {
        filterName = "windows";
    } else {
        filterName = "unix";
    }

    return PropsUtil.get(PropsKeys.IMAGEMAGICK_GLOBAL_SEARCH_PATH, new Filter(filterName));
}