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:
org.springframework.data.repository.CrudRepository<TemplateItemRest,UUID>,org.springframework.data.repository.PagingAndSortingRepository<TemplateItemRest,UUID>,org.springframework.data.repository.Repository<TemplateItemRest,UUID>
@Component("core.itemtemplate") public class TemplateItemRestRepository extends DSpaceRestRepository<TemplateItemRest,UUID>This is the repository class that is responsible for handlingTemplateItemRestobjects
-
-
Field Summary
-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils
-
-
Constructor Summary
Constructors Constructor Description TemplateItemRestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<TemplateItemRest>findAll(org.dspace.core.Context context, org.springframework.data.domain.Pageable pageable)Method to implement to support scroll of entity instances from the collection resource endpointTemplateItemRestfindOne(org.dspace.core.Context context, UUID uuid)Method to implement to support retrieval of a specific REST object instanceClass<TemplateItemRest>getDomainClass()The REST model supported by the repositoryTemplateItemRestpatchTemplateItem(TemplateItem templateItem, com.fasterxml.jackson.databind.JsonNode jsonNode)Modify a template Item which is a template ItemvoidremoveTemplateItem(org.dspace.core.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, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, patch, put, put, put, put, save, save, saveAll, upload, upload, upload
-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
-
-
-
Method Detail
-
findOne
@PreAuthorize("permitAll()") public TemplateItemRest findOne(org.dspace.core.Context context, UUID uuid)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(org.dspace.core.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
public Class<TemplateItemRest> 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, org.dspace.authorize.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:
SQLExceptionorg.dspace.authorize.AuthorizeException
-
removeTemplateItem
public void removeTemplateItem(org.dspace.core.Context context, TemplateItem templateItem) throws SQLException, IOException, org.dspace.authorize.AuthorizeExceptionRemove 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:
SQLExceptionIOExceptionorg.dspace.authorize.AuthorizeException
-
-