List of usage examples for com.liferay.portal.kernel.deploy.hot HotDeployException HotDeployException
public HotDeployException(Throwable cause)
From source file:com.liferay.application.list.deploy.hot.LegacyPortletPanelAppHotDeployListener.java
License:Open Source License
@Override public void invokeDeploy(HotDeployEvent hotDeployEvent) throws HotDeployException { try {/*w ww . jav a 2 s . c o m*/ for (Dictionary<String, Object> properties : getPropertiesList(hotDeployEvent)) { String portletId = (String) properties.get("panel.app.portlet.id"); ServiceRegistration<PanelApp> serviceRegistration = _bundleContext.registerService(PanelApp.class, new PortletPanelAppAdapter(portletId), properties); _serviceRegistrations.put(portletId, serviceRegistration); } } catch (DocumentException | IOException e) { throw new HotDeployException(e); } }
From source file:com.liferay.application.list.deploy.hot.LegacyPortletPanelAppHotDeployListener.java
License:Open Source License
@Override public void invokeUndeploy(HotDeployEvent hotDeployEvent) throws HotDeployException { try {//from www. j a v a2s.c o m for (Dictionary<String, Object> properties : getPropertiesList(hotDeployEvent)) { String portletId = (String) properties.get("panel.app.portlet.id"); ServiceRegistration<PanelApp> serviceRegistration = _serviceRegistrations.get(portletId); if (serviceRegistration != null) { serviceRegistration.unregister(); } } } catch (DocumentException | IOException e) { throw new HotDeployException(e); } }
From source file:eu.ibacz.extlet.conflict.ExtletConflictRegister.java
License:Open Source License
protected void checkConflict(RegistryInfo info) throws HotDeployException { StringBuffer sb = new StringBuffer(); synchronized (lock) { for (String extletFile : info.getFiles()) { if (!isMergeable(extletFile) && extletsOverridenFiles.containsKey(extletFile)) { RegistryInfo deployed = extletsOverridenFiles.get(extletFile); // redeploying if (deployed.getCtxName().equals(info.getCtxName())) { continue; }/*from www .ja va 2s. co m*/ sb.append("File conflict [conflicting-file]: ").append(extletFile); sb.append("[existing-web-app, existing-jar]: [").append(deployed.getCtxName()).append(", ") .append(deployed.getJarName()).append("] - "); sb.append("[deploying-web-app, deploying-jar]: [").append(info.getCtxName()).append(", ") .append(info.getJarName()).append("]\n"); } } } if (sb.length() > 0) { throw new HotDeployException("Cannot deploy " + info.getCtxName() + "!\n" + sb.toString()); } }