Search in sources :

Example 6 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class AdminPortletDataHandler method doExportData.

@Override
protected String doExportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws Exception {
    portletDataContext.addPortletPermissions(RESOURCE_NAME);
    Element rootElement = addExportDataRootElement(portletDataContext);
    rootElement.addAttribute("group-id", String.valueOf(portletDataContext.getScopeGroupId()));
    ActionableDynamicQuery kbArticleActionableDynamicQuery = getKBArticleActionableDynamicQuery(portletDataContext);
    kbArticleActionableDynamicQuery.performActions();
    ActionableDynamicQuery kbTemplateActionableDynamicQuery = new KBTemplateExportActionableDynamicQuery(portletDataContext);
    kbTemplateActionableDynamicQuery.performActions();
    ActionableDynamicQuery kbCommentActionableDynamicQuery = getKBCommentActionableDynamicQuery(portletDataContext);
    kbCommentActionableDynamicQuery.performActions();
    return getExportDataRootElementString(rootElement);
}
Also used : Element(com.liferay.portal.kernel.xml.Element) KBTemplateExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery) KBTemplateExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery) KBArticleExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBArticleExportActionableDynamicQuery) KBCommentExportActionableDynamicQuery(com.liferay.knowledgebase.service.persistence.KBCommentExportActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Example 7 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class ArtistIndexer method reindexEntries.

protected void reindexEntries(long companyId) throws PortalException, SystemException {
    final Collection<Document> documents = new ArrayList<Document>();
    ActionableDynamicQuery actionableDynamicQuery = new ArtistActionableDynamicQuery() {

        @Override
        protected void addCriteria(DynamicQuery dynamicQuery) {
        }

        @Override
        protected void performAction(Object object) throws PortalException {
            Artist artist = (Artist) object;
            Document document = getDocument(artist);
            documents.add(document);
        }
    };
    actionableDynamicQuery.setCompanyId(companyId);
    actionableDynamicQuery.performActions();
    SearchEngineUtil.updateDocuments(getSearchEngineId(), companyId, documents);
}
Also used : Artist(org.liferay.jukebox.model.Artist) DynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery) ArtistActionableDynamicQuery(org.liferay.jukebox.service.persistence.ArtistActionableDynamicQuery) ArrayList(java.util.ArrayList) ArtistActionableDynamicQuery(org.liferay.jukebox.service.persistence.ArtistActionableDynamicQuery) Document(com.liferay.portal.kernel.search.Document) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery) ArtistActionableDynamicQuery(org.liferay.jukebox.service.persistence.ArtistActionableDynamicQuery)

Example 8 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class AdminPortletDataHandler method doPrepareManifestSummary.

@Override
protected void doPrepareManifestSummary(PortletDataContext portletDataContext, PortletPreferences portletPreferences) throws Exception {
    ActionableDynamicQuery actionableDynamicQuery = new GadgetExportActionableDynamicQuery(portletDataContext);
    actionableDynamicQuery.performCount();
}
Also used : GadgetExportActionableDynamicQuery(com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery) GadgetExportActionableDynamicQuery(com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Example 9 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class AdminPortletDataHandler method doExportData.

@Override
protected String doExportData(final PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws Exception {
    Element rootElement = addExportDataRootElement(portletDataContext);
    portletDataContext.addPortletPermissions(GadgetPermission.RESOURCE_NAME);
    rootElement.addAttribute("group-id", String.valueOf(portletDataContext.getScopeGroupId()));
    ActionableDynamicQuery actionableDynamicQuery = new GadgetExportActionableDynamicQuery(portletDataContext);
    actionableDynamicQuery.performActions();
    return getExportDataRootElementString(rootElement);
}
Also used : Element(com.liferay.portal.kernel.xml.Element) GadgetExportActionableDynamicQuery(com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery) GadgetExportActionableDynamicQuery(com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Example 10 with ActionableDynamicQuery

use of com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery in project liferay-ide by liferay.

the class JukeboxPortletDataHandler method doExportData.

@Override
protected String doExportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences) throws Exception {
    Element rootElement = addExportDataRootElement(portletDataContext);
    if (portletDataContext.getBooleanParameter(NAMESPACE, "albums")) {
        ActionableDynamicQuery albumActionableDynamicQuery = new AlbumExportActionableDynamicQuery(portletDataContext);
        albumActionableDynamicQuery.performActions();
    }
    if (portletDataContext.getBooleanParameter(NAMESPACE, "artists")) {
        ActionableDynamicQuery artistActionableDynamicQuery = new ArtistExportActionableDynamicQuery(portletDataContext);
        artistActionableDynamicQuery.performActions();
    }
    return getExportDataRootElementString(rootElement);
}
Also used : Element(com.liferay.portal.kernel.xml.Element) AlbumExportActionableDynamicQuery(org.liferay.jukebox.service.persistence.AlbumExportActionableDynamicQuery) ArtistExportActionableDynamicQuery(org.liferay.jukebox.service.persistence.ArtistExportActionableDynamicQuery) AlbumExportActionableDynamicQuery(org.liferay.jukebox.service.persistence.AlbumExportActionableDynamicQuery) ArtistExportActionableDynamicQuery(org.liferay.jukebox.service.persistence.ArtistExportActionableDynamicQuery) ActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)

Aggregations

ActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)21 DefaultActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery)6 IndexableActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery)6 DynamicQuery (com.liferay.portal.kernel.dao.orm.DynamicQuery)4 Document (com.liferay.portal.kernel.search.Document)4 IntegerWrapper (com.liferay.portal.kernel.util.IntegerWrapper)4 Test (org.junit.Test)4 KBArticleExportActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBArticleExportActionableDynamicQuery)3 KBCommentExportActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBCommentExportActionableDynamicQuery)3 KBTemplateExportActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBTemplateExportActionableDynamicQuery)3 Element (com.liferay.portal.kernel.xml.Element)3 ArrayList (java.util.ArrayList)3 GadgetExportActionableDynamicQuery (com.liferay.opensocial.service.persistence.GadgetExportActionableDynamicQuery)2 AlbumExportActionableDynamicQuery (org.liferay.jukebox.service.persistence.AlbumExportActionableDynamicQuery)2 ArtistExportActionableDynamicQuery (org.liferay.jukebox.service.persistence.ArtistExportActionableDynamicQuery)2 Foo (com.liferay.blade.samples.servicebuilder.model.Foo)1 KBArticle (com.liferay.knowledgebase.model.KBArticle)1 KBArticleActionableDynamicQuery (com.liferay.knowledgebase.service.persistence.KBArticleActionableDynamicQuery)1 KBArticleVersionComparator (com.liferay.knowledgebase.util.comparator.KBArticleVersionComparator)1 ExportActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery)1