Search in sources :

Example 21 with Element

use of com.liferay.portal.kernel.xml.Element in project liferay-ide by liferay.

the class KBFolderStagedModelDataHandler method doExportStagedModel.

@Override
protected void doExportStagedModel(PortletDataContext portletDataContext, KBFolder kbFolder) throws Exception {
    if (kbFolder.getParentKBFolderId() != KBFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
        KBFolder parentKBFolder = KBFolderLocalServiceUtil.getKBFolder(kbFolder.getParentKBFolderId());
        StagedModelDataHandlerUtil.exportReferenceStagedModel(portletDataContext, kbFolder, parentKBFolder, PortletDataContext.REFERENCE_TYPE_PARENT);
    }
    Element kbFolderElement = portletDataContext.getExportDataElement(kbFolder);
    portletDataContext.addClassedModel(kbFolderElement, ExportImportPathUtil.getModelPath(kbFolder), kbFolder);
}
Also used : KBFolder(com.liferay.knowledgebase.model.KBFolder) Element(com.liferay.portal.kernel.xml.Element)

Example 22 with Element

use of com.liferay.portal.kernel.xml.Element in project liferay-ide by liferay.

the class KBTemplateStagedModelDataHandler method doExportStagedModel.

@Override
protected void doExportStagedModel(PortletDataContext portletDataContext, KBTemplate kbTemplate) throws Exception {
    Element kbTemplateElement = portletDataContext.getExportDataElement(kbTemplate);
    portletDataContext.addClassedModel(kbTemplateElement, ExportImportPathUtil.getModelPath(kbTemplate), kbTemplate);
}
Also used : Element(com.liferay.portal.kernel.xml.Element)

Aggregations

Element (com.liferay.portal.kernel.xml.Element)22 FileEntry (com.liferay.portal.kernel.repository.model.FileEntry)5 DLFileEntry (com.liferay.portlet.documentlibrary.model.DLFileEntry)5 ServiceContext (com.liferay.portal.service.ServiceContext)4 InputStream (java.io.InputStream)4 ActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)3 SystemException (com.liferay.portal.kernel.exception.SystemException)3 UnsyncByteArrayInputStream (com.liferay.portal.kernel.io.unsync.UnsyncByteArrayInputStream)3 NoSuchTagException (com.liferay.portlet.asset.NoSuchTagException)3 ImportFilesException (com.liferay.portlet.wiki.ImportFilesException)3 Artist (org.liferay.jukebox.model.Artist)3 KBArticle (com.liferay.knowledgebase.model.KBArticle)2 KBFolder (com.liferay.knowledgebase.model.KBFolder)2 PortalException (com.liferay.portal.kernel.exception.PortalException)2 ProgressTracker (com.liferay.portal.kernel.util.ProgressTracker)2 Document (com.liferay.portal.kernel.xml.Document)2 DocumentException (com.liferay.portal.kernel.xml.DocumentException)2 NoSuchFileException (com.liferay.portlet.documentlibrary.NoSuchFileException)2 NoSuchPageException (com.liferay.portlet.wiki.NoSuchPageException)2 IOException (java.io.IOException)2