¡Liferay es Líder en el Cuadrante Mágico de Gartner por Sexto Año consecutivo! Sepa por qué aquí
The Proposals Wiki has been deprecated in favor of creating Feature Requests in JIRA. If you wish to propose a new idea for a feature, visit the Community Ideas Dashboard and read the Feature Requests Wiki page for more information about submitting your proposal.
« Volver a 2012 Google...

Expire Documents

Project Title #

Expire Documents in Document Library

Background #

Liferay provides one central place to aggregate and manage all your content. Each community within Liferay Portal gets its own separate Document Library, which is equipped with customizable folders and act as a web-based shared drive for all your team members, no matter where they are. Because content is accessible only by those authorized by the administrator, each individual file is as open or as secure as you need it to be.

Documents are often collaborated on, live for a while, then become deprecated, obsolete, or wrong over time.

Use Cases #

A document that has become obsolete needs to be expired such that it can no longer be viewed or accessed, but is instead archived as a previous, no longer valid, document.

The Problem #

Currently, Documents in the document library have no expiration date, and live forever unless manually deleted by an administrator.

The Solution #

Modify the Document Library to give the ability to expire documents.

Now that Liferay has implemented the workflow infrastructure it's much easier to implement this project, since DLFiles has the hability to store the status. Custom fields like expiration date can be added to the form and then create the logic that changes the status when the user decides.

Skills Needed #

  • Required: Java, JSP, XML
  • Nice to have: Liferay experience

Prerequisites #

None.

Deliverables #

  • Complete code changes to Liferay Portal blog tool to enable a "print view" option displayed as part of a given blog post or blog aggregator.
  • Unit tests for all new and changed code.
  • Documentation required to configure the blog tool for print view.

References #

Related Issues #

LPS-4500

External References #

Document Library Portlet

Liferay Workflow Blog Post

Official Workflow documentation

0 archivos adjuntos
20446 Accesos
Promedio (0 Votos)
La valoración media es de 0.0 estrellas de 5.
Comentarios
Respuestas anidadas Autor Fecha
Hi, I have achieved this functionality. I have... Dileepkumar R 27 de marzo de 2013 22:15
Hi Dileep, I tried to update some document in... Julien GRESSE 17 de mayo de 2013 8:33
Hi, I have achieved this functionality. I have... Dileepkumar R 27 de marzo de 2013 22:15
Dileep, I'm trying to achieve this also, but... Adam Spence 2 de abril de 2013 9:15
Hi Adam, Even i did the same as you. I have... Dileepkumar R 2 de abril de 2013 22:13
Hi Adam, Even I have the same exception. So, I... Dileepkumar R 4 de abril de 2013 6:47
Dileep, Are you republishing the expired... Adam Spence 4 de abril de 2013 8:15

Hi,
I have achieved this functionality. I have added a custom expiration date field to Document and Media Document and i insert all the details into a custom table which is scanned by a scheduler class and once the expiration date is reached, a notification is sent to the content contributor and the File Version status is changed to 3(Expired).

Regards,
Dileep.
Publicado el día 27/03/13 22:15.
Hi,
I have achieved this functionality. I have added a custom expiration date field to Document and Media Document and i insert all the details into a custom table which is scanned by a scheduler class and once the expiration date is reached, a notification is sent to the content contributor and the File Version status is changed to 3(Expired).

Regards,
Dileep.
Publicado el día 27/03/13 22:15.
Dileep,

I'm trying to achieve this also, but I'm seeing some weird behavior(losing assigned asset categories for the document after changing the file version status to expired, getting BatchUpdateException/ConstraintViolationException related to duplicate entry keys when trying to republish the document). Currently I'm just using DLFileVersionLocalServiceUtil to update the file version status. I can't say that I fully understand the intricacies of all the database stuff though. Was there any additional work you had to do to get this to work?

Thanks,
Adam
Publicado el día 2/04/13 9:15 en respuesta a Dileepkumar R.
Hi Adam,
Even i did the same as you. I have changed the status using DLFileVersionLocalServiceUtil. And i'm able to re-publish the same document again. From workflow, there is a provision to set the document status to approved/pending/reject/draft/expired/incomplete. That means we also can update programatically to any status right.

Regards,
Dileep.
Publicado el día 2/04/13 22:13 en respuesta a Adam Spence.
Hi Adam,
Even I have the same exception. So, I have changed my update call using
DLFileEntryLocalServiceUtil.updateStatus(). Then I'm able to republish the expired document.
Regards,Dileep
Publicado el día 4/04/13 6:47 en respuesta a Dileepkumar R.
Dileep,

Are you republishing the expired document in a folder that has a workflow configured? It seems to work for me when I publish/expire/republish the document in a folder with a workflow configured, but not when I'm in a folder without a workflow(I get BatchUpdateException). Also, in my hook which overrides EditFileEntryAction, I had to set the status of an expired document to 'approved' before calling the original processAction() for add/update, otherwise after the document was republished and approved, its status would be stuck at 'pending'.

Regards,
Adam
Publicado el día 4/04/13 8:15 en respuesta a Dileepkumar R.
Hi Dileep,

I tried to update some document in the database with this:
UPDATE `mskportaldemo`.`dlfileversion` SET `status`='3' WHERE `fileVersionId`='16234';
but it do not seems to change anything.
Did you do some changes in JSP or Java code to handle document expiration ?

Julien
Publicado el día 17/05/13 8:33 en respuesta a Dileepkumar R.