Search in sources :

Example 46 with Gadget

use of com.liferay.opensocial.model.Gadget in project liferay-ide by liferay.

the class GadgetModelImpl method equals.

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof Gadget)) {
        return false;
    }
    Gadget gadget = (Gadget) obj;
    long primaryKey = gadget.getPrimaryKey();
    if (getPrimaryKey() == primaryKey) {
        return true;
    } else {
        return false;
    }
}
Also used : Gadget(com.liferay.opensocial.model.Gadget)

Example 47 with Gadget

use of com.liferay.opensocial.model.Gadget in project liferay-ide by liferay.

the class GadgetExportActionableDynamicQuery method performAction.

@Override
@SuppressWarnings("unused")
protected void performAction(Object object) throws PortalException, SystemException {
    Gadget stagedModel = (Gadget) object;
    StagedModelDataHandlerUtil.exportStagedModel(_portletDataContext, stagedModel);
}
Also used : Gadget(com.liferay.opensocial.model.Gadget)

Example 48 with Gadget

use of com.liferay.opensocial.model.Gadget in project liferay-ide by liferay.

the class ConfigurationActionImpl method render.

@Override
public String render(PortletConfig portletConfig, RenderRequest renderRequest, RenderResponse renderResponse) throws Exception {
    if (hasUserPrefs(portletConfig, renderRequest)) {
        doRender(portletConfig, renderRequest, renderResponse);
    }
    try {
        Gadget gadget = getGadget(portletConfig, renderRequest);
        Map<String, OAuthService> oAuthServices = ShindigUtil.getOAuthServices(gadget.getUrl());
        renderRequest.setAttribute(WebKeys.OAUTH_SERVICES, oAuthServices);
    } catch (Exception e) {
    }
    return "/adhoc_gadget/configuration.jsp";
}
Also used : Gadget(com.liferay.opensocial.model.Gadget) OAuthService(org.apache.shindig.gadgets.spec.OAuthService)

Aggregations

Gadget (com.liferay.opensocial.model.Gadget)48 NoSuchGadgetException (com.liferay.opensocial.NoSuchGadgetException)24 StringBundler (com.liferay.portal.kernel.util.StringBundler)21 SystemException (com.liferay.portal.kernel.exception.SystemException)18 Session (com.liferay.portal.kernel.dao.orm.Session)16 SQLQuery (com.liferay.portal.kernel.dao.orm.SQLQuery)14 QueryPos (com.liferay.portal.kernel.dao.orm.QueryPos)13 GadgetImpl (com.liferay.opensocial.model.impl.GadgetImpl)9 Query (com.liferay.portal.kernel.dao.orm.Query)8 UnmodifiableList (com.liferay.portal.kernel.util.UnmodifiableList)8 ArrayList (java.util.ArrayList)8 List (java.util.List)8 FinderPath (com.liferay.portal.kernel.dao.orm.FinderPath)4 ThemeDisplay (com.liferay.portal.theme.ThemeDisplay)4 GadgetSpec (org.apache.shindig.gadgets.spec.GadgetSpec)3 DuplicateGadgetURLException (com.liferay.opensocial.DuplicateGadgetURLException)2 PermissionChecker (com.liferay.portal.security.permission.PermissionChecker)2 ServiceContext (com.liferay.portal.service.ServiceContext)2 GadgetPortletCategoryNamesException (com.liferay.opensocial.GadgetPortletCategoryNamesException)1 GadgetURLException (com.liferay.opensocial.GadgetURLException)1