Search in sources :

Example 1 with Clusterable

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);
    }
}
Also used : GadgetPortlet(com.liferay.opensocial.gadget.portlet.GadgetPortlet) InvokerPortlet(com.liferay.portlet.InvokerPortlet) Portlet(com.liferay.portal.model.Portlet) SystemException(com.liferay.portal.kernel.exception.SystemException) DuplicateGadgetURLException(com.liferay.opensocial.DuplicateGadgetURLException) PortalException(com.liferay.portal.kernel.exception.PortalException) SystemException(com.liferay.portal.kernel.exception.SystemException) GadgetPortletCategoryNamesException(com.liferay.opensocial.GadgetPortletCategoryNamesException) NoSuchGadgetException(com.liferay.opensocial.NoSuchGadgetException) GadgetURLException(com.liferay.opensocial.GadgetURLException) Clusterable(com.liferay.portal.kernel.cluster.Clusterable)

Example 2 with Clusterable

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);
    }
}
Also used : GadgetPortlet(com.liferay.opensocial.gadget.portlet.GadgetPortlet) InvokerPortlet(com.liferay.portlet.InvokerPortlet) Portlet(com.liferay.portal.model.Portlet) SystemException(com.liferay.portal.kernel.exception.SystemException) PortalException(com.liferay.portal.kernel.exception.PortalException) DuplicateGadgetURLException(com.liferay.opensocial.DuplicateGadgetURLException) PortalException(com.liferay.portal.kernel.exception.PortalException) SystemException(com.liferay.portal.kernel.exception.SystemException) GadgetPortletCategoryNamesException(com.liferay.opensocial.GadgetPortletCategoryNamesException) NoSuchGadgetException(com.liferay.opensocial.NoSuchGadgetException) GadgetURLException(com.liferay.opensocial.GadgetURLException) Clusterable(com.liferay.portal.kernel.cluster.Clusterable)

Aggregations

DuplicateGadgetURLException (com.liferay.opensocial.DuplicateGadgetURLException)2 GadgetPortletCategoryNamesException (com.liferay.opensocial.GadgetPortletCategoryNamesException)2 GadgetURLException (com.liferay.opensocial.GadgetURLException)2 NoSuchGadgetException (com.liferay.opensocial.NoSuchGadgetException)2 GadgetPortlet (com.liferay.opensocial.gadget.portlet.GadgetPortlet)2 Clusterable (com.liferay.portal.kernel.cluster.Clusterable)2 PortalException (com.liferay.portal.kernel.exception.PortalException)2 SystemException (com.liferay.portal.kernel.exception.SystemException)2 Portlet (com.liferay.portal.model.Portlet)2 InvokerPortlet (com.liferay.portlet.InvokerPortlet)2