Package org.dspace.app.rest.repository
Class TemplateItemRestRepository
java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.DSpaceRestRepository<TemplateItemRest,UUID>
org.dspace.app.rest.repository.TemplateItemRestRepository
- All Implemented Interfaces:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<TemplateItemRest,,UUID> org.springframework.data.repository.PagingAndSortingRepository<TemplateItemRest,,UUID> org.springframework.data.repository.Repository<TemplateItemRest,UUID>
@Component("core.itemtemplates")
public class TemplateItemRestRepository
extends DSpaceRestRepository<TemplateItemRest,UUID>
This is the repository class that is responsible for handling
TemplateItemRest objects-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<TemplateItemRest>Method to implement to support scroll of entity instances from the collection resource endpointMethod to implement to support retrieval of a specific REST object instanceThe REST model supported by the repositorypatchTemplateItem(TemplateItem templateItem, com.fasterxml.jackson.databind.JsonNode jsonNode) Modify a template Item which is a template ItemvoidremoveTemplateItem(Context context, TemplateItem templateItem) Remove an Item which is a template for a Collection.Methods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, patch, put, put, put, put, save, save, saveAll, setBeanName, upload, upload, uploadMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
Constructor Details
-
TemplateItemRestRepository
public TemplateItemRestRepository()
-
-
Method Details
-
findOne
Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<TemplateItemRest,UUID> - Parameters:
context- the dspace contextuuid- the rest object id- Returns:
- the REST object identified by its ID
-
findAll
public org.springframework.data.domain.Page<TemplateItemRest> 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<TemplateItemRest,UUID> - Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
getDomainClass
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<TemplateItemRest,UUID>
-
patchTemplateItem
public TemplateItemRest patchTemplateItem(TemplateItem templateItem, com.fasterxml.jackson.databind.JsonNode jsonNode) throws SQLException, AuthorizeException Modify a template Item which is a template Item- Parameters:
templateItem- The Item to be modifiedjsonNode- The patch to be applied- Returns:
- The Item as it is after applying the patch
- Throws:
SQLExceptionAuthorizeException
-
removeTemplateItem
public void removeTemplateItem(Context context, TemplateItem templateItem) throws SQLException, IOException, AuthorizeException Remove an Item which is a template for a Collection. Note: The caller is responsible for checking that this item is in fact a template item.- Parameters:
context-templateItem- The item to be removed- Throws:
SQLExceptionIOExceptionAuthorizeException
-