Foros de discusión

Staging to live web content list

thumbnail
kartik shiroya, modificado hace 8 años.

Staging to live web content list

Junior Member Mensajes: 47 Fecha de incorporación: 29/12/14 Mensajes recientes
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, modificado hace 8 años.

RE: Staging to live web content list

Junior Member Mensajes: 47 Fecha de incorporación: 29/12/14 Mensajes recientes
Any idea on this
please reply
thumbnail
Jorge Díaz, modificado hace 8 años.

RE: Staging to live web content list

Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientes
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, modificado hace 6 años.

RE: Staging to live web content list

New Member Mensaje: 1 Fecha de incorporación: 13/01/18 Mensajes recientes
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.

Archivos adjuntos:

thumbnail
Bryan Cheung, modificado hace 6 años.

RE: Staging to live web content list

Expert Mensajes: 373 Fecha de incorporación: 27/08/04 Mensajes recientes
Let me ask staging team to weigh in.
thumbnail
Máté Thurzó, modificado hace 6 años.

RE: Staging to live web content list

New Member Mensajes: 6 Fecha de incorporación: 28/01/11 Mensajes recientes
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, modificado hace 6 años.

RE: Staging to live web content list

New Member Mensajes: 7 Fecha de incorporación: 26/03/18 Mensajes recientes
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,