use of com.liferay.portal.kernel.cluster.Clusterable in project liferay-ide by liferay.
the class GadgetLocalServiceImpl method destroyGadget.
@Clusterable
public void destroyGadget(String uuid, long companyId) throws SystemException {
try {
Portlet portlet = _portletsPool.remove(uuid);
if (portlet == null) {
portlet = PortletLocalServiceUtil.getPortletById(companyId, getPortletId(uuid));
}
PortletInstanceFactoryUtil.destroy(portlet);
} catch (SystemException se) {
throw se;
} catch (Exception e) {
throw new SystemException(e);
}
}
use of com.liferay.portal.kernel.cluster.Clusterable in project liferay-ide by liferay.
the class GadgetLocalServiceImpl method initGadget.
@Clusterable
public void initGadget(String uuid, long companyId, long gadgetId, String name, String portletCategoryNames) throws PortalException, SystemException {
try {
Portlet portlet = getPortlet(uuid, companyId, name);
String[] portletCategoryNamesArray = StringUtil.split(portletCategoryNames);
PortletLocalServiceUtil.deployRemotePortlet(portlet, portletCategoryNamesArray);
} catch (PortalException pe) {
throw pe;
} catch (SystemException se) {
throw se;
} catch (Exception e) {
throw new SystemException(e);
}
}
Aggregations