[ https://jira.duraspace.org/browse/DS-1110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Donohue updated DS-1110: ---------------------------- Attachment: AbstractCurationTask-v2.patch Richard, Thanks for the feedback. Makes perfect sense. I have an alternative, compromise solution to propose. I've attached a new version of the patch (AbstractCurationTask-v2.patch) which does the following: (1) Still updates 'distribute()' to run across all DSpaceObjects, calling 'performObject()' for each. (Same as initial patch) (2) Creates a default 'performObject()' method that just wraps a call to 'performItem()' by default. (3) Leaves the empty 'performItem()' method in place. This new implementation means that Tasks can continue to use distribute()/performItem() as they see fit (i.e. existing tasks will not break). However, tasks that wish to run across all DSOs can choose to instead use distribute()/performObject() and override the default implementation of performObject(). Does this seem like a reasonable compromise? I can understand the need for both performItem() and performObject(). I'd just hate to have to implement two different 'distribute()' methods if we don't really need to do so. > AbstractCurationTask.distribute() convenience method doesn't distribute > across all DSpace Objects > ------------------------------------------------------------------------------------------------- > > Key: DS-1110 > URL: https://jira.duraspace.org/browse/DS-1110 > Project: DSpace > Issue Type: Bug > Components: DSpace API > Affects Versions: 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1 > Reporter: Tim Donohue > Assignee: Tim Donohue > Fix For: post-1.8.x > > Attachments: AbstractCurationTask.patch, AbstractCurationTask-v2.patch > > > The org.dspace.curate.AbstractCurationTask provides a 'distribute()' > convenience method which is recommended for any Curation Task that declares > the @Distributive annotation. > However, as implemented, that 'distribute()' method only distributes > (recursively performs) the Curation Task across all DSpace *ITEMS*. This > means that a task which should be performed on other DSpace Objects (e.g. > Communities, Collections) cannot use the 'distribute()' method. > Rather than implement a separate convenience method to allow for distributing > tasks across all Communities/Collections/Items, I feel the 'distribute()' > method should be reimplemented to properly distribute the task across all > DSpace Objects. > I've attached a patch (AbstractCurationTask.patch) which changes the > 'distribute()' method and renames the corresponding 'performItem()' method to > be 'performObject()'. This patch also fixes/refactors the single > out-of-the-box Task (ProfileFormats) which uses these convenience methods. > Finally this patch ensures that the 'distribute()' method can also distribute > a task across all objects in DSpace when it is called with the Site Object. > I've tested these changes via the ProfileFormats task and it all seems to be > working as planned. > I'd appreciate it if someone could perform a quick review of this work before > I commit it. I just want to ensure that others agree that this seems to be a > logical refactoring of the AbstractCurationTask. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.duraspace.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Dspace-devel mailing list Dspace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-devel