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

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

Introduction

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

Prototype

String DL_STORE_IMPL

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

Click Source Link

Usage

From source file:com.liferay.document.library.convert.test.DocumentLibraryConvertProcessTest.java

License:Open Source License

@After
public void tearDown() throws Exception {
    _storeFactory.setStore(_CLASS_NAME_DB_STORE);

    _convertProcess.setParameterValues(new String[] { _CLASS_NAME_FILE_SYSTEM_STORE, Boolean.TRUE.toString() });

    try {/*from   ww w.j a  v  a  2  s .c om*/
        _convertProcess.convert();
    } finally {
        PropsValues.DL_STORE_IMPL = PropsUtil.get(PropsKeys.DL_STORE_IMPL);

        _storeFactory.setStore(PropsValues.DL_STORE_IMPL);
    }
}

From source file:com.liferay.portlet.documentlibrary.store.StoreFactory.java

License:Open Source License

public static void checkProperties() {
    if (_warned) {
        return;//from  w w  w.ja v a 2  s  . com
    }

    String dlHookImpl = PropsUtil.get("dl.hook.impl");

    if (Validator.isNotNull(dlHookImpl)) {
        boolean found = false;

        for (String[] dlHookStoreParts : _DL_HOOK_STORES) {
            if (dlHookImpl.equals(dlHookStoreParts[0])) {
                PropsValues.DL_STORE_IMPL = dlHookStoreParts[1];

                found = true;

                break;
            }
        }

        if (!found) {
            PropsValues.DL_STORE_IMPL = dlHookImpl;
        }

        if (_log.isWarnEnabled()) {
            StringBundler sb = new StringBundler(8);

            sb.append("Liferay is configured with the legacy ");
            sb.append("property \"dl.hook.impl=" + dlHookImpl + "\" ");
            sb.append("in portal-ext.properties. Please reconfigure ");
            sb.append("to use the new property \"");
            sb.append(PropsKeys.DL_STORE_IMPL + "\". Liferay will ");
            sb.append("attempt to temporarily set \"");
            sb.append(PropsKeys.DL_STORE_IMPL + "=");
            sb.append(PropsValues.DL_STORE_IMPL + "\".");

            _log.warn(sb.toString());
        }
    }

    _warned = true;
}