Forums de discussion

Staging to live web content list

thumbnail
kartik shiroya, modifié il y a 8 années.

Staging to live web content list

Junior Member Publications: 47 Date d'inscription: 29/12/14 Publications récentes
Hi

I am want the list of web content(journal artical) from current scope group which are not published with latest version on live from staging

I m using liferay-portal-tomcat-6.2-ee-sp11-20150407182402908 version.

Thanks
Kartik Shiroya
thumbnail
kartik shiroya, modifié il y a 8 années.

RE: Staging to live web content list

Junior Member Publications: 47 Date d'inscription: 29/12/14 Publications récentes
Any idea on this
please reply
thumbnail
Jorge Díaz, modifié il y a 8 années.

RE: Staging to live web content list

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Hi kartik,

Can you explain better what is your issue?

If you have any kind of exception during Staging publish operation, please post it.

You have more information about staging at https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/staging-page-publication
Juan Miguel García, modifié il y a 6 années.

RE: Staging to live web content list

New Member Envoyer: 1 Date d'inscription: 13/01/18 Publications récentes
Hi, I'd like to achieve the same goal. I mean I'd like to retrieve more information of the web content and documents and media about to publish from staging to live.
I attach an image where you can see the amount of content or documents and media it will publish. Well I'd like to get as much information of it, let's say the title, description, modifed date...

I know that 'new approved content' will be published, I can get that information using JournalArticle.isNew(); But if the content has published already but we perform a modification, how can we know if this one is ready to publish from staging to live?

Many thanks in advance.

Pièces jointes:

thumbnail
Bryan Cheung, modifié il y a 6 années.

RE: Staging to live web content list

Expert Publications: 373 Date d'inscription: 27/08/04 Publications récentes
Let me ask staging team to weigh in.
thumbnail
Máté Thurzó, modifié il y a 6 années.

RE: Staging to live web content list

New Member Publications: 6 Date d'inscription: 28/01/11 Publications récentes
The staging framework uses more factors to identify what's going to be published.

In case of the web content the date range is being used to look for contents. Let's say you have a web content article which is new, the framework will look for the createDate and modifiedDate to see if it needs to be published. The isNew() method is way too low level for this operation, it's more used in the persistence layer.

Generally speaking the numbers are coming from the data handlers, in this case the JournalPortletDataHandler. The actual method being called for the number is the doPrepareManifestSummary(). This method will count the number of entities for the given portlet to be published.

For the actual logic however we will need to dig deeper, the export actionable dynamic query has the addCriteria method will assemble the actual criteria which will be used to determine the number back on the UI.

So just to add more clarification this is the call chain (in s simplified form):

UI asking for the manifest summary which contains the numbers ->
JournalPortletDataHandler.doPrepareManifestSummary() calling the export actionable dynamic queries for each relevant asset (article, folder, etc) ->
JournalArticleExportActionableDynamicQuery will take the parameter settings from the UI and adds extra filtering such as the date range settings ->
a query ends up in the DB determining the number of the items we want to publish.

So back to your original question that you need more information on the items you will be publishing. Unfortunately the framework does not have built in for that, but using the very similar approach I think it would be fairly easy to implement your own.

The ExportActionableDynamicQuery is specifically used to execute a certain action (hence the Actionable part of the name) but the concept is the same for DynamicQueries.

You would simple need to implement a DynamicQuery which queries articles from the DB and add the same logic from the ExportActionableDynamicQuery:


				@Override
				public void addCriteria(DynamicQuery dynamicQuery) {
					super.addCriteria(dynamicQuery);

					if (portletDataContext.getBooleanParameter(
							NAMESPACE, "version-history")) {

						return;
					}

					DynamicQuery articleVersionDynamicQuery =
						DynamicQueryFactoryUtil.forClass(
							JournalArticle.class, "articleVersion",
							PortalClassLoaderUtil.getClassLoader());

					articleVersionDynamicQuery.setProjection(
						ProjectionFactoryUtil.alias(
							ProjectionFactoryUtil.max("articleVersion.version"),
							"articleVersion.version"));

					// We need to use the "this" default alias to make sure the
					// database engine handles this subquery as a correlated
					// subquery

					articleVersionDynamicQuery.add(
						RestrictionsFactoryUtil.eqProperty(
							"this.resourcePrimKey",
							"articleVersion.resourcePrimKey"));

					Property versionProperty = PropertyFactoryUtil.forName(
						"version");

					dynamicQuery.add(
						versionProperty.eq(articleVersionDynamicQuery));
				}


This piece is copied from the JournalPortletDataHandler. So executing a DynamicQuery having this criteria, will give you the result of the entities selected for publication.

Hope this helps. It's a lot of info, so let me know if you need more clarification.

Thanks,

Máté

Juan Miguel García:
Hi, I'd like to achieve the same goal. I mean I'd like to retrieve more information of the web content and documents and media about to publish from staging to live.
I attach an image where you can see the amount of content or documents and media it will publish. Well I'd like to get as much information of it, let's say the title, description, modifed date...

I know that 'new approved content' will be published, I can get that information using JournalArticle.isNew(); But if the content has published already but we perform a modification, how can we know if this one is ready to publish from staging to live?

Many thanks in advance.
nazim zmirli, modifié il y a 5 années.

RE: Staging to live web content list

New Member Publications: 7 Date d'inscription: 26/03/18 Publications récentes
Hi pobster,

Thank you for the link.

Some more informations on how the staging is managed.
- persons create content on staging.
- site modifications (new content types, display, updates...) are done on staging too.
- When necessary, /sites folder is uploaded in production.

PS: The websites are hosted locally but I don't manage the servers.

Thanks,