brianchandotcom/liferay-portal — pull request #8329 by epgarcia (2013-01-04 10:01:11+00:00)
Title: LPS-31579 Remove unused/unnecessary restore paths

Hey Brian,

Probably you remember that after reviewing LPS-29174 we decided to standarize the struts paths for restoring trashed entries, because the current ones were confusing. Currently there are no written rules for the naming and structure of struts paths and action classes in the Peer Reviews Checklist, so I've extracted some here:

* The [portlet_struts_path]/edit_entry paths are used for those actions which are common to more than one entity within the same portlet. The EditEntryAction class contains those common actions. The set of common actions depends of the GUI design: In portlets with a general toolbar, like D&M and WCM, many actions are common. In other cases, like Message Boards, only the restore action is common so far. And in other, like the Wiki, there are no common actions (and thus, no edit_entry path). This might change if we extend the same GUI design in D&M and WCM to all portlets.

* The [portlet_struts_path]/restore_entry paths are used to forward to the restore_entry.jsp view in case an attachment document is duplicated. We need a path for every portlet using attachments based in the Document Library (so far Wiki and Message Boards).

* The [portlet_struts_path]/restore_[entity]_attachments paths define the action class for restoring attachments: trash.action.EditEntryAction. Once more we need a path for every portlet using attachments.

I removed some paths that were unnused or unnecessary (see my commit). For all others, though we initially considered renaming the restore_* paths to edit_trash_entry_*, giving the above described rules I'm not sure whether that solution will be better in terms of semantic and simplicity. What do you think?

Thanks

@juliocamarero We could add these rules to the Peer Reviews Checklist once we close this ticket.