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.
« Retour - 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

Moyenne (0 Voter)
L'estimation moyenne est de 0.0 étoiles sur 5.
Commentaires
Réponses Auteur Données
Hi, I have achieved this functionality. I have... Dileepkumar R 27 mars 2013 22:15
Hi Dileep, I tried to update some document in... Julien GRESSE 17 mai 2013 08:33
Hi, I have achieved this functionality. I have... Dileepkumar R 27 mars 2013 22:15
Dileep, I'm trying to achieve this also, but... Adam Spence 2 avril 2013 09:15
Hi Adam, Even i did the same as you. I have... Dileepkumar R 2 avril 2013 22:13
Hi Adam, Even I have the same exception. So, I... Dileepkumar R 4 avril 2013 06:47
Dileep, Are you republishing the expired... Adam Spence 4 avril 2013 08: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.
Publié le 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.
Publié le 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
Publié le 02/04/13 09:15 en réponse à 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.
Publié le 02/04/13 22:13 en réponse à 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
Publié le 04/04/13 06:47 en réponse à 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
Publié le 04/04/13 08:15 en réponse à 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
Publié le 17/05/13 08:33 en réponse à Dileepkumar R.