Package org.dspace.identifier
Class FilteredIdentifierProvider
- java.lang.Object
-
- org.dspace.identifier.IdentifierProvider
-
- org.dspace.identifier.FilteredIdentifierProvider
-
- Direct Known Subclasses:
DOIIdentifierProvider
public abstract class FilteredIdentifierProvider extends IdentifierProvider
This abstract class adds extra method signatures so that implementing IdentifierProviders can handle "skip filter" booleans, so that any configured filters can be skipped and DOI registration forced.- Version:
- $Revision$
- Author:
- Kim Shepherd
-
-
Field Summary
Fields Modifier and Type Field Description protected FilterfilterService-
Fields inherited from class org.dspace.identifier.IdentifierProvider
configurationService, parentService
-
-
Constructor Summary
Constructors Constructor Description FilteredIdentifierProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcheckMintable(Context context, DSpaceObject dso)Check configured item filters to see if this identifier is allowed to be mintedabstract Stringmint(Context context, DSpaceObject dso, boolean skipFilter)Mint a new identifier in DSpace - this is usually the first step of registrationabstract Stringregister(Context context, DSpaceObject dso, boolean skipFilter)Register a new identifier for a given DSpaceObjectabstract voidregister(Context context, DSpaceObject dso, String identifier, boolean skipFilter)Register a specified identifier for a given DSpaceObjectabstract voidreserve(Context context, DSpaceObject dso, String identifier, boolean skipFilter)Reserve a specified identifier for a given DSpaceObject (eg.voidsetFilterService(Filter filterService)Setter for spring to set the filter service from the property in configuration XML-
Methods inherited from class org.dspace.identifier.IdentifierProvider
delete, delete, lookup, mint, register, register, reserve, resolve, setConfigurationService, setParentService, supports, supports
-
-
-
-
Field Detail
-
filterService
protected Filter filterService
-
-
Method Detail
-
setFilterService
@Autowired public void setFilterService(Filter filterService)
Setter for spring to set the filter service from the property in configuration XML- Parameters:
filterService- - an object implementing the org.dspace.content.logic.Filter interface
-
register
public abstract String register(Context context, DSpaceObject dso, boolean skipFilter) throws IdentifierException
Register a new identifier for a given DSpaceObject- Parameters:
context- - DSpace contextdso- - DSpaceObject to use for identifier registrationskipFilter- - boolean indicating whether to skip any filtering of items before performing registration- Returns:
- identifier
- Throws:
IdentifierException
-
register
public abstract void register(Context context, DSpaceObject dso, String identifier, boolean skipFilter) throws IdentifierException
Register a specified identifier for a given DSpaceObject- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new identifieridentifier- - String containing the identifier to registerskipFilter- - boolean indicating whether to skip any filtering of items before performing registration- Throws:
IdentifierException
-
reserve
public abstract void reserve(Context context, DSpaceObject dso, String identifier, boolean skipFilter) throws IdentifierException, IllegalArgumentException, SQLException
Reserve a specified identifier for a given DSpaceObject (eg. reserving a DOI online with a registration agency)- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by this identifieridentifier- - String containing the identifier to reserveskipFilter- - boolean indicating whether to skip any filtering of items before performing reservation- Throws:
IdentifierExceptionIllegalArgumentExceptionSQLException
-
mint
public abstract String mint(Context context, DSpaceObject dso, boolean skipFilter) throws IdentifierException
Mint a new identifier in DSpace - this is usually the first step of registration- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new identifierskipFilter- - boolean indicating whether to skip any filtering of items before minting.- Returns:
- a String containing the new identifier
- Throws:
IdentifierException
-
checkMintable
public abstract void checkMintable(Context context, DSpaceObject dso) throws IdentifierException
Check configured item filters to see if this identifier is allowed to be minted- Parameters:
context- - DSpace contextdso- - DSpaceObject to be inspected- Throws:
IdentifierException
-
-