[ 
https://jira.duraspace.org/browse/DS-906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20360#action_20360
 ] 

Mark Diggory commented on DS-906:
---------------------------------

I'm really hoping that method would move off the domain object and into the 
business tier. Possibly be a method on a business service called 
ItemPolicyManager that can be easily overridden.

Might make a good spring services topic...

dspace.getSingletonService(ItemPolicyManager.class).inheritCollectionDefaultPolicies(item)

Leaving off the "collection" because it would come from item.getParent().

Note, we just finished work in an area where we did similar for managing 
Embargo settings... For instance, we need to determine what the appropriate 
state is for the item+bitstreams as embargo is applied in the submission UI. 
Those policies are set as part of the submission workflow, but would have been 
better encapsulated in a business service like this which we would have 
overridden on ItemInstall or otherwise...

In-fact... this should be a larger discussion... when should methods be added / 
deprecated on the Domain Model?
When should methods be Business services.
When should such capabilities be overridaable
What is the appropriate design pattern for such services and their overrides.

In most cases Business Services have the following
a.) a target one or more objects
b.) an Action performed on that alters the relationships/state of those 
objects..
c.) state change can be executed entirely off public methods available on those 
objects.


> For moving items in the Admin UI, add checkbox option to replace resource 
> policies with defaults of the new collection
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DS-906
>                 URL: https://jira.duraspace.org/browse/DS-906
>             Project: DSpace
>          Issue Type: Improvement
>          Components: XMLUI
>    Affects Versions: 1.7.2, 1.8.0
>            Reporter: Bill Hays
>
> This is a single call in the API: 
> item.inheritCollectionDefaultPolicies(targetCollection)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.duraspace.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to