Package org.dspace.app.rest.repository
Class WorkflowItemRestRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.DSpaceRestRepository<WorkflowItemRest,Integer>
org.dspace.app.rest.repository.WorkflowItemRestRepository
- All Implemented Interfaces:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<WorkflowItemRest,,Integer> org.springframework.data.repository.PagingAndSortingRepository<WorkflowItemRest,,Integer> org.springframework.data.repository.Repository<WorkflowItemRest,Integer>
@Component("workflow.workflowitems")
public class WorkflowItemRestRepository
extends DSpaceRestRepository<WorkflowItemRest,Integer>
This is the repository responsible to manage WorkflowItem Rest object
- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected XmlWorkflowFactoryprotected XmlWorkflowItemServiceFields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected WorkflowItemRestcreateAndReturn(Context context, List<String> stringList) Method to implement to support the creation of a new instance.protected voidMethod to implement to support delete of a single object instanceorg.springframework.data.domain.Page<WorkflowItemRest>Method to implement to support scroll of entity instances from the collection resource endpointfindByItemUuid(UUID itemUuid, org.springframework.data.domain.Pageable pageable) This is a search method that will return the WorkflowItemRest object found through the UUID of an item.org.springframework.data.domain.Page<WorkflowItemRest>findBySubmitter(UUID submitterID, org.springframework.data.domain.Pageable pageable) Method to implement to support retrieval of a specific REST object instanceThe REST model supported by the repositoryvoidpatch(Context context, jakarta.servlet.http.HttpServletRequest request, String apiCategory, String model, Integer id, Patch patch) Method to implement to allow partial update of the REST object via JSON Patchupload(jakarta.servlet.http.HttpServletRequest request, String apiCategory, String model, Integer id, MultipartFile file) Method to implement to attach/upload a file to a specific REST objectMethods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, put, put, put, put, save, save, saveAll, setBeanName, upload, uploadMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
Field Details
-
OPERATION_PATH_SECTIONS
- See Also:
-
REQUESTPARAMETER_EXPUNGE
- See Also:
-
xmlWorkflowItemService
-
workflowFactory
-
-
Constructor Details
-
WorkflowItemRestRepository
- Throws:
SubmissionConfigReaderException
-
-
Method Details
-
findOne
@PreAuthorize("hasPermission(#id, \'WORKFLOWITEM\', \'READ\')") public WorkflowItemRest findOne(Context context, Integer id) Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<WorkflowItemRest,Integer> - Parameters:
context- the dspace contextid- the rest object id- Returns:
- the REST object identified by its ID
-
findAll
@PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<WorkflowItemRest> findAll(Context context, org.springframework.data.domain.Pageable pageable) Description copied from class:DSpaceRestRepositoryMethod to implement to support scroll of entity instances from the collection resource endpoint- Specified by:
findAllin classDSpaceRestRepository<WorkflowItemRest,Integer> - Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
findBySubmitter
@PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<WorkflowItemRest> findBySubmitter(UUID submitterID, org.springframework.data.domain.Pageable pageable) -
createAndReturn
Description copied from class:DSpaceRestRepositoryMethod to implement to support the creation of a new instance. Usually require to retrieve the http request from the thread bound attribute- Overrides:
createAndReturnin classDSpaceRestRepository<WorkflowItemRest,Integer> - Parameters:
context- the dspace contextstringList- The list of Strings that will be used as data for the object that's to be created This list is retrieved from the uri-list body- Returns:
- the created REST object
-
getDomainClass
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<WorkflowItemRest,Integer>
-
upload
public WorkflowItemRest upload(jakarta.servlet.http.HttpServletRequest request, String apiCategory, String model, Integer id, MultipartFile file) throws SQLException Description copied from class:DSpaceRestRepositoryMethod to implement to attach/upload a file to a specific REST object- Overrides:
uploadin classDSpaceRestRepository<WorkflowItemRest,Integer> - Parameters:
request- the http requestid- the ID of the target REST objectfile- the uploaded file- Returns:
- the new state of the REST object
- Throws:
SQLException
-
patch
public void patch(Context context, jakarta.servlet.http.HttpServletRequest request, String apiCategory, String model, Integer id, Patch patch) throws SQLException, AuthorizeException Description copied from class:DSpaceRestRepositoryMethod to implement to allow partial update of the REST object via JSON Patch- Overrides:
patchin classDSpaceRestRepository<WorkflowItemRest,Integer> request- the http requestid- the ID of the target REST objectpatch- the JSON Patch (https://tools.ietf.org/html/rfc6902) operation- Throws:
SQLExceptionAuthorizeException
-
delete
Description copied from class:DSpaceRestRepositoryMethod to implement to support delete of a single object instance- Overrides:
deletein classDSpaceRestRepository<WorkflowItemRest,Integer> - Parameters:
context- the dspace contextid- the id of the rest object to delete
-
findByItemUuid
public WorkflowItemRest findByItemUuid(UUID itemUuid, org.springframework.data.domain.Pageable pageable) This is a search method that will return the WorkflowItemRest object found through the UUID of an item. It'll find the Item through the given UUID and try to resolve the WorkflowItem relevant for that item and return it. It'll return a 401/403 if the current user isn't allowed to view the WorkflowItem. It'll return a 204 if nothing was found- Parameters:
itemUuid- The UUID for the Item to be usedpageable- The pageable if present- Returns:
- The resulting WorkflowItemRest object
-