List of usage examples for com.liferay.portal.util PropsValues DL_STORE_IMPL
String DL_STORE_IMPL
To view the source code for com.liferay.portal.util PropsValues DL_STORE_IMPL.
Click Source Link
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 va2 s.com*/ _convertProcess.convert(); } finally { PropsValues.DL_STORE_IMPL = PropsUtil.get(PropsKeys.DL_STORE_IMPL); _storeFactory.setStore(PropsValues.DL_STORE_IMPL); } }
From source file:com.liferay.document.library.convert.test.DocumentLibraryConvertProcessTest.java
License:Open Source License
@Test public void testStoreUpdatedAfterConversion() throws Exception { _convertProcess.convert(); Assert.assertEquals(_CLASS_NAME_DB_STORE, 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 ww w . j a va2s.co m*/ } 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; }
From source file:com.liferay.portlet.documentlibrary.store.StoreFactory.java
License:Open Source License
public static Store getInstance() { if (_store == null) { checkProperties();// w w w. j av a 2s . c o m if (_log.isDebugEnabled()) { _log.debug("Instantiate " + PropsValues.DL_STORE_IMPL); } ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _store = (Store) classLoader.loadClass(PropsValues.DL_STORE_IMPL).newInstance(); } catch (Exception e) { _log.error(e, e); } } if (_log.isDebugEnabled()) { _log.debug("Return " + _store.getClass().getName()); } return _store; }