public final class SetupArticles extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addDDMStructure(eu.lundegaard.liferay.db.setup.domain.Structure structure,
long groupId,
long classNameId,
long companyId)
The method addDDMStructure adds a new structure to the Liferay portal based
on the provided structure information.
|
static void |
addDDMTemplate(eu.lundegaard.liferay.db.setup.domain.Adt template,
long groupId,
long companyId)
This method adds an ADT (Asset Display Template) to Liferay portal.
|
static void |
addDDMTemplate(eu.lundegaard.liferay.db.setup.domain.ArticleTemplate template,
long groupId,
long companyId)
This method adds a DDMTemplate to the Liferay portal
|
static void |
addJournalArticle(eu.lundegaard.liferay.db.setup.domain.Article article,
long groupId,
long companyId)
This method creates a journal article in Liferay.
|
static void |
processRelatedAssets(eu.lundegaard.liferay.db.setup.domain.Article article,
com.liferay.journal.model.JournalArticle ja,
long runAsUserId,
long groupId,
long companyId)
This method process the related assets for a Journal Article.
|
static void |
setupSiteArticles(eu.lundegaard.liferay.db.setup.domain.Site site,
long groupId,
long companyId) |
static void |
setupSiteStructuresAndTemplates(eu.lundegaard.liferay.db.setup.domain.Site site,
long groupId,
long companyId)
This method is used to call setup actions on the
Site object and
groupId, companyId. |
public static void setupSiteStructuresAndTemplates(eu.lundegaard.liferay.db.setup.domain.Site site,
long groupId,
long companyId)
throws com.liferay.portal.kernel.exception.PortalException
Site object and
groupId, companyId. It classifies into:
If any exception occurs, it logs the error.
site - the Site object containing the structures and templates to be
addedgroupId - the group id where the structures and templates should be
addedcompanyId - the company id of the groupcom.liferay.portal.kernel.exception.PortalException - if an error occurs while adding the structures or
templatespublic static void setupSiteArticles(eu.lundegaard.liferay.db.setup.domain.Site site,
long groupId,
long companyId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalExceptioncom.liferay.portal.kernel.exception.SystemExceptionpublic static void addDDMStructure(eu.lundegaard.liferay.db.setup.domain.Structure structure,
long groupId,
long classNameId,
long companyId)
throws com.liferay.portal.kernel.exception.SystemException,
com.liferay.portal.kernel.exception.PortalException,
IOException,
URISyntaxException
structure - the structure to be addedgroupId - the groupId to which the structure will belongclassNameId - the classNameId of the structure, this is typically the
class name of the object associated with the structurecompanyId - the companyId to which the structure will belongcom.liferay.portal.kernel.exception.SystemException - thrown when there is a system errorcom.liferay.portal.kernel.exception.PortalException - thrown when there is a portal errorIOException - thrown when there is an error reading the structure fileURISyntaxException - thrown when there is an error with the URI syntaxpublic static void addDDMTemplate(eu.lundegaard.liferay.db.setup.domain.ArticleTemplate template,
long groupId,
long companyId)
throws com.liferay.portal.kernel.exception.SystemException,
com.liferay.portal.kernel.exception.PortalException,
IOException,
URISyntaxException
template - The article template to be addedgroupId - The groupId where the template will be addedcompanyId - The companyId where the template will be addedcom.liferay.portal.kernel.exception.SystemException - if a system exception occurredcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredIOException - if an IO exception occurredURISyntaxException - if URI syntax exception occurredpublic static void addDDMTemplate(eu.lundegaard.liferay.db.setup.domain.Adt template,
long groupId,
long companyId)
throws com.liferay.portal.kernel.exception.SystemException,
com.liferay.portal.kernel.exception.PortalException,
IOException,
URISyntaxException
template - an Adt object representing the ADT to be addedgroupId - the ID of the group to which the ADT should be addedcompanyId - the ID of the company to which the ADT should be addedcom.liferay.portal.kernel.exception.SystemException - if there is a problem accessing Liferay's template
servicescom.liferay.portal.kernel.exception.PortalException - if there is a problem with the group or template
informationIOException - if there is a problem reading the ADT's script fileURISyntaxException - if there is a problem with the file path of the
ADT's scriptpublic static void addJournalArticle(eu.lundegaard.liferay.db.setup.domain.Article article,
long groupId,
long companyId)
article - object that contains information about the article such as its
title, path, and structure key.groupId - specifies the group the article belongs to.companyId - that specifies the company the article belongs to.public static void processRelatedAssets(eu.lundegaard.liferay.db.setup.domain.Article article,
com.liferay.journal.model.JournalArticle ja,
long runAsUserId,
long groupId,
long companyId)
article - the Article object that contains the related assets
informationja - the JournalArticle object that the related assets will be added or
cleared fromrunAsUserId - the user id used to perform the actiongroupId - the id of the group the assets belong tocompanyId - the id of the company the assets belong toCopyright © 2016–2023 Lundegaard a.s.. All rights reserved.