Package org.dspace.handle.hdlresolver
Class HdlResolverServiceImpl
- java.lang.Object
-
- org.dspace.handle.hdlresolver.HdlResolverServiceImpl
-
- All Implemented Interfaces:
HdlResolverService
@Service public class HdlResolverServiceImpl extends Object implements HdlResolverService
Handle Resolver that uses anHandleServiceto retrieve the right URL of a target Handle.- Author:
- Vincenzo Mecca (vins01-4science - vincenzo.mecca at 4science.it)
-
-
Field Summary
Fields Modifier and Type Field Description static StringLISTHANDLES_HIDE_PROP
-
Constructor Summary
Constructors Constructor Description HdlResolverServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisListhandlesEnabled()Verifies status of handle controllerList<String>listHandles(Context context, String prefix)List all available handles with `prefix`List<String>listPrefixes()List all available prefixes for this installationHdlResolverDTOresolveBy(String requestURI, String path)Method that creates anHdlResovlerDTOusing the requestURI (full requested handle URI) and the path (REST handler URI)StringresolveToURL(Context context, HdlResolverDTO hdlResolver)Converts the hdlResovler into URL fetching it from repository using the DSpace context
-
-
-
Field Detail
-
LISTHANDLES_HIDE_PROP
public static final String LISTHANDLES_HIDE_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolveBy
public HdlResolverDTO resolveBy(String requestURI, String path)
Description copied from interface:HdlResolverServiceMethod that creates anHdlResovlerDTOusing the requestURI (full requested handle URI) and the path (REST handler URI)- Specified by:
resolveByin interfaceHdlResolverService- Returns:
HdlResolverDTO
-
resolveToURL
public String resolveToURL(Context context, HdlResolverDTO hdlResolver)
Description copied from interface:HdlResolverServiceConverts the hdlResovler into URL fetching it from repository using the DSpace context- Specified by:
resolveToURLin interfaceHdlResolverService- Returns:
- URL found or null
-
listPrefixes
public List<String> listPrefixes()
Description copied from interface:HdlResolverServiceList all available prefixes for this installation- Specified by:
listPrefixesin interfaceHdlResolverService- Returns:
- `List
` of Handle prefixes
-
listHandles
public List<String> listHandles(Context context, String prefix)
Description copied from interface:HdlResolverServiceList all available handles with `prefix`- Specified by:
listHandlesin interfaceHdlResolverService- Parameters:
context- DSpace contextprefix- prefix to search- Returns:
- `List
` of handles
-
isListhandlesEnabled
public boolean isListhandlesEnabled()
Description copied from interface:HdlResolverServiceVerifies status of handle controller- Specified by:
isListhandlesEnabledin interfaceHdlResolverService- Returns:
- `true` if enabled, `false` otherwise
-
-