List of usage examples for com.liferay.portal.kernel.bean PortalBeanLocatorUtil locate
public static Object locate(String name)
From source file:com.liferay.counter.service.CounterLocalServiceUtil.java
License:Open Source License
public static CounterLocalService getService() { if (_service == null) { _service = (CounterLocalService) PortalBeanLocatorUtil.locate(CounterLocalService.class.getName()); ReferenceRegistry.registerReference(CounterLocalServiceUtil.class, "_service"); MethodCache.remove(CounterLocalService.class); }/*from w w w.j av a 2s. c om*/ return _service; }
From source file:com.liferay.counter.service.persistence.CounterFinderUtil.java
License:Open Source License
public static CounterFinder getFinder() { if (_finder == null) { _finder = (CounterFinder) PortalBeanLocatorUtil.locate(CounterFinder.class.getName()); ReferenceRegistry.registerReference(CounterFinderUtil.class, "_finder"); }/* w w w . j ava2 s. c o m*/ return _finder; }
From source file:com.liferay.counter.service.persistence.CounterPersistenceTest.java
License:Open Source License
@Override public void setUp() throws Exception { super.setUp(); _persistence = (CounterPersistence) PortalBeanLocatorUtil.locate(CounterPersistence.class.getName()); }
From source file:com.liferay.counter.service.persistence.CounterUtil.java
License:Open Source License
public static CounterPersistence getPersistence() { if (_persistence == null) { _persistence = (CounterPersistence) PortalBeanLocatorUtil.locate(CounterPersistence.class.getName()); ReferenceRegistry.registerReference(CounterUtil.class, "_persistence"); }/*ww w.j a v a2 s . c o m*/ return _persistence; }
From source file:com.liferay.customsql.user.UserFinder.java
License:Open Source License
public UserFinder() { setDataSource(InfrastructureUtil.getDataSource()); setSessionFactory((SessionFactory) PortalBeanLocatorUtil.locate("liferaySessionFactory")); ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try {/*from w w w . j a va 2 s.c om*/ _userImplClass = classLoader.loadClass("com.liferay.portal.model.impl.UserImpl"); } catch (ClassNotFoundException cnfe) { throw new RuntimeException(cnfe.getMessage(), cnfe); } }
From source file:com.liferay.devhacks.ServiceLocatorHack.java
License:Open Source License
public Object findService(String serviceName) { Object bean = null;/*w w w.j av a 2 s . c o m*/ try { bean = PortalBeanLocatorUtil.locate(_getServiceName(serviceName)); } catch (Exception e) { _log.error(e, e); } return bean; }
From source file:com.liferay.devhacks.UtilLocatorHack.java
License:Open Source License
public Object findUtil(String utilName) { Object bean = null;/*from w ww . j ava 2 s.c om*/ try { bean = PortalBeanLocatorUtil.locate(_getUtilName(utilName)); } catch (Exception e) { _log.error(e, e); } return bean; }
From source file:com.liferay.document.library.content.service.test.DLContentLocalServiceTest.java
License:Open Source License
@Before public void setUp() throws Exception { _dlContentLocalService = (DLContentLocalService) PortalBeanLocatorUtil .locate(DLContentLocalService.class.getName()); _companyId = RandomTestUtil.nextLong(); _repositoryId = RandomTestUtil.nextLong(); }
From source file:com.liferay.mail.service.CyrusServiceUtil.java
License:Open Source License
public static CyrusService getService() { if (_service == null) { _service = (CyrusService) PortalBeanLocatorUtil.locate(CyrusService.class.getName()); ReferenceRegistry.registerReference(CyrusServiceUtil.class, "_service"); MethodCache.remove(CyrusService.class); }//from w ww.j av a2 s .com return _service; }
From source file:com.liferay.mail.service.MailServiceUtil.java
License:Open Source License
public static MailService getService() { if (_service == null) { _service = (MailService) PortalBeanLocatorUtil.locate(MailService.class.getName()); ReferenceRegistry.registerReference(MailServiceUtil.class, "_service"); MethodCache.remove(MailService.class); }/*from www . j av a2 s.co m*/ return _service; }