List of usage examples for com.liferay.portal.kernel.bean PortalBeanLocatorUtil getBeanLocator
public static BeanLocator getBeanLocator()
From source file:com.liferay.faces.demos.hook.RegisterPortalAction.java
License:Open Source License
@Override public void run(String[] companyIds) throws ActionException { Portal portal = PortalUtil.getPortal(); try {/*from www . ja va2s . c om*/ ClassLoader classLoader = Portal.class.getClassLoader(); portal = (Portal) Proxy.newProxyInstance(classLoader, new Class[] { Portal.class }, new PortalHookImpl(portal)); } catch (Exception e) { logger.error(e); } PortalUtil portalUtil = (PortalUtil) PortalBeanLocatorUtil.getBeanLocator() .locate(PortalUtil.class.getName()); portalUtil.setPortal(portal); }