Class ExternalSourceEntryItemUriListHandler<T>
java.lang.Object
org.dspace.app.rest.repository.handler.ExternalSourceEntryItemUriListHandler<T>
- Type Parameters:
T- The type of Object we're dealing with
- All Implemented Interfaces:
UriListHandler<T>
- Direct Known Subclasses:
ExternalSourceCorrectionTypeUriListHandler,ExternalSourceEntryArchivedItemUriListHandler,ExternalSourceEntryOrcidQueueUriListHandler,ExternalSourceEntryPoolTaskUriListHandler,ExternalSourceEntryWorkspaceItemUriListHandler,ExternalSourceItemUriListHandler
public abstract class ExternalSourceEntryItemUriListHandler<T>
extends Object
implements UriListHandler<T>
This provides an abstract class for the Item and WorkspaceItemUriListHandlers to extend and provide shared logic
to reduce code duplication
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWorkspaceItem(Context context, jakarta.servlet.http.HttpServletRequest request, List<String> uriList) This method will create a WorkspaceItem made from the ExternalDataObject that will be created from the given uriList.booleanThis method will take the UriList and method as input and verify whether the implementing UriListHandler can handle this input or notbooleanThis method will take all the required input and validate them to see if there are any issues before calling the handle methodMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.app.rest.repository.handler.UriListHandler
handle
-
Constructor Details
-
ExternalSourceEntryItemUriListHandler
public ExternalSourceEntryItemUriListHandler()
-
-
Method Details
-
supports
Description copied from interface:UriListHandlerThis method will take the UriList and method as input and verify whether the implementing UriListHandler can handle this input or not- Specified by:
supportsin interfaceUriListHandler<T>- Parameters:
uriList- The list of UriList Strings to be checked if they're supportedmethod- The request method to be checked if it's supportedclazz- The class to be returned by the handle method- Returns:
- A boolean indicating whether the implementing UriListHandler can handle this input
-
validate
public boolean validate(Context context, jakarta.servlet.http.HttpServletRequest request, List<String> uriList) throws AuthorizeException Description copied from interface:UriListHandlerThis method will take all the required input and validate them to see if there are any issues before calling the handle method- Specified by:
validatein interfaceUriListHandler<T>- Parameters:
context- The relevant DSpace contextrequest- The current requesturiList- The list of UriList Strings- Returns:
- A boolean indicating whether all this input is valid for the implementing UriListHandler
- Throws:
AuthorizeException
-
createWorkspaceItem
public WorkspaceItem createWorkspaceItem(Context context, jakarta.servlet.http.HttpServletRequest request, List<String> uriList) throws SQLException, AuthorizeException This method will create a WorkspaceItem made from the ExternalDataObject that will be created from the given uriList. The Collection for the WorkspaceItem will be retrieved through the request.- Parameters:
context- The relevant DSpace contextrequest- The relevant RequesturiList- The uriList that contains the data for the ExternalDataObject- Returns:
- A WorkspaceItem created from the given information
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-