Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: New method of selecting copy request strategy. New strategies.

...

The process that DSpace uses to determine who is the recipient of the Item Request is configurable in this Spring file: [dspace]/config/spring/api/requestitem.xml

Info
titleNew in DSpace 7

The strategy is selected using a Spring <alias alias='org.dspace.app.requestitem.RequestItemAuthorExtractor' name='theStrategyClass'/>.  Previously this was done by moving the RequestItemAuthorExtractor id to the selected <bean> definition.


Configure who gets request via a metadata field

By default the RequestItemMetadataStrategy is enabled, but falls back to the Item Submitter eperson's name and email. You can configure the RequestItemMetadataStrategy to load the author's name and email address if you set that information into an item metadata field.  For example:

Code Block
<alias alias='org.dspace.app.requestitem.RequestItemAuthorExtractor'
       name='org.dspace.app.requestitem.RequestItemMetadataStrategy'/>

<bean class="org.dspace.app.requestitem.RequestItemMetadataStrategy"
      id="org.dspace.app.requestitem.RequestItemAuthorExtractorRequestItemMetadataStrategy"
      autowireCandidate="true">
  <!-- 
  Uncomment these properties if you want lookup in metadata the email and the name of the author to contact for request copy.
  If you don't configure that or if the requested item doesn't have these metadata the submitter data are used as fail over
 
  <property name="emailMetadata" value="schema.element.qualifier" />
  <property name="fullNameMatadata" value="schema.element.qualifier" /> 
 
  --> 
 </bean>

Configure this as follows:

...

Another common request strategy is the use a single Helpdesk email address to receive all of these requests (see corresponding helpdesk configs in dspace.cfg above). If you wish to use the Helpdesk Strategy, you must first comment out the default RequestItemMetadataStrategy,  bean and uncomment this bean:

Code Block
<alias alias='org.dspace.app.requestitem.RequestItemAuthorExtractor'
       name='org.dspace.app.requestitem.RequestItemHelpdeskStrategy'/>

<!-- HelpDesk to instead get RequestItem emails-->
<bean class="org.dspace.app.requestitem.RequestItemHelpdeskStrategy"
        id="org.dspace.app.requestitem.RequestItemHelpdeskStrategy"
        autowireCandidate="true"/>

Configure all requests to go to the administrators of a Collection

This strategy sends mail to all of the members of the administrators group for the collection which owns the item.

Code Block
<alias alias='org.dspace.app.requestitem.RequestItemAuthorExtractor"><'
       name='org.dspace.app.requestitem.CollectionAdministratorsRequestItemStrategy'/>

<bean class='org.dspace.app.requestitem.CollectionAdministratorsRequestItemStrategy'
      id='org.dspace.app.requestitem.CollectionAdministratorsRequestItemStrategy'
      autowireCandidate='true'/>

Combine multiple strategies

This strategy combines the results of other strategies into a single list of email recipients.  Pass the strategy a single constructor argument, being a list of the strategy beans whose output should be combined.

In the following example, email will be sent to the address(es) found in the configured metadata fields (or to the submitter if none), and to the owning collection's administrators.

Code Block
<alias alias='org.dspace.app.requestitem.RequestItemAuthorExtractor'
       name='org.dspace.app.requestitem.CombiningRequestItemStrategy'/>

<bean class='org.dspace.app.requestitem.CombiningRequestItemStrategy'
      id='org.dspace.app.requestitem.CombiningRequestItemStrategy'
      autowireCandidate='true'>
    <constructor-arg>
        <description>A list of references to RequestItemAuthorExtractor beans</description>
        <list>
            <ref bean='org.dspace.app.requestitem.RequestItemMetadataStrategy'/>
            <ref bean='org.dspace.app.requestitem.CollectionAdministratorsRequestItemStrategy'/>
        </list>
    </constructor-arg>
</bean>