Class SiteRestRepository

  • All Implemented Interfaces:
    ReloadableEntityObjectRepository<org.dspace.content.Site,​UUID>, org.springframework.data.repository.CrudRepository<SiteRest,​UUID>, org.springframework.data.repository.PagingAndSortingRepository<SiteRest,​UUID>, org.springframework.data.repository.Repository<SiteRest,​UUID>

    @Component("core.site")
    public class SiteRestRepository
    extends DSpaceObjectRestRepository<org.dspace.content.Site,​SiteRest>
    This is the repository responsible to manage Item Rest object
    Author:
    Andrea Bollini (andrea.bollini at 4science.it)
    • Constructor Detail

      • SiteRestRepository

        @Autowired
        public SiteRestRepository​(org.dspace.content.service.SiteService dsoService)
    • Method Detail

      • findOne

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

        public org.springframework.data.domain.Page<SiteRest> 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<SiteRest,​UUID>
        Parameters:
        context - the dspace context
        pageable - object embedding the requested pagination info
        Returns:
      • patch

        @PreAuthorize("hasAuthority(\'ADMIN\')")
        protected void patch​(org.dspace.core.Context context,
                             javax.servlet.http.HttpServletRequest request,
                             String apiCategory,
                             String model,
                             UUID id,
                             Patch patch)
                      throws org.dspace.authorize.AuthorizeException,
                             SQLException
        Description copied from class: DSpaceRestRepository
        Method to implement to allow partial update of the REST object via JSON Patch
        Overrides:
        patch in class DSpaceRestRepository<SiteRest,​UUID>
        request - the http request
        id - the ID of the target REST object
        patch - the JSON Patch (https://tools.ietf.org/html/rfc6902) operation
        Throws:
        org.dspace.authorize.AuthorizeException
        SQLException