Class RequestItemRepository

    • Field Detail

      • requestItemService

        @Autowired(required=true)
        protected org.dspace.app.requestitem.service.RequestItemService requestItemService
      • bitstreamService

        @Autowired(required=true)
        protected org.dspace.content.service.BitstreamService bitstreamService
      • itemService

        @Autowired(required=true)
        protected org.dspace.content.service.ItemService itemService
      • requestItemConverter

        @Autowired(required=true)
        protected RequestItemConverter requestItemConverter
      • requestItemAuthorExtractor

        @Autowired(required=true)
        protected org.dspace.app.requestitem.RequestItemAuthorExtractor requestItemAuthorExtractor
      • configurationService

        @Autowired(required=true)
        protected ConfigurationService configurationService
    • Constructor Detail

      • RequestItemRepository

        public RequestItemRepository()
    • Method Detail

      • findOne

        @PreAuthorize("permitAll()")
        public RequestItemRest findOne​(org.dspace.core.Context context,
                                       String token)
        Description copied from class: DSpaceRestRepository
        Method to implement to support retrieval of a specific REST object instance
        Specified by:
        findOne in class DSpaceRestRepository<RequestItemRest,​String>
        Parameters:
        context - the dspace context
        token - the rest object id
        Returns:
        the REST object identified by its ID
      • findAll

        public org.springframework.data.domain.Page<RequestItemRest> findAll​(org.dspace.core.Context context,
                                                                             org.springframework.data.domain.Pageable pageable)
        Description copied from class: DSpaceRestRepository
        Method to implement to support scroll of entity instances from the collection resource endpoint
        Specified by:
        findAll in class DSpaceRestRepository<RequestItemRest,​String>
        Parameters:
        context - the dspace context
        pageable - object embedding the requested pagination info
        Returns:
      • createAndReturn

        @PreAuthorize("permitAll()")
        public RequestItemRest createAndReturn​(org.dspace.core.Context ctx)
                                        throws org.dspace.authorize.AuthorizeException,
                                               SQLException
        Description copied from class: DSpaceRestRepository
        Method to implement to support the creation of a new instance. Usually require to retrieve the http request from the thread bound attribute
        Overrides:
        createAndReturn in class DSpaceRestRepository<RequestItemRest,​String>
        Parameters:
        ctx - the dspace context
        Returns:
        the created REST object
        Throws:
        org.dspace.authorize.AuthorizeException
        SQLException
      • put

        @PreAuthorize("isAuthenticated()")
        public RequestItemRest put​(org.dspace.core.Context context,
                                   javax.servlet.http.HttpServletRequest request,
                                   String apiCategory,
                                   String model,
                                   String token,
                                   com.fasterxml.jackson.databind.JsonNode requestBody)
                            throws org.dspace.authorize.AuthorizeException
        Description copied from class: DSpaceRestRepository
        Implement this method in the subclass to support updating a REST object.
        Overrides:
        put in class DSpaceRestRepository<RequestItemRest,​String>
        Parameters:
        context - the dspace context
        apiCategory - the API category e.g. "api"
        model - the DSpace model e.g. "metadatafield"
        token - the ID of the target REST object
        requestBody - the part of the request body representing the updated rest object
        Returns:
        the updated REST object
        Throws:
        org.dspace.authorize.AuthorizeException - if the context user is not authorized to perform this operation