Class DSpaceObjectRestRepository<M extends org.dspace.content.DSpaceObject,​R extends DSpaceObjectRest>

    • Method Detail

      • patchDSpaceObject

        protected void patchDSpaceObject​(String apiCategory,
                                         String model,
                                         UUID id,
                                         Patch patch)
                                  throws org.dspace.authorize.AuthorizeException,
                                         org.springframework.data.rest.webmvc.ResourceNotFoundException,
                                         SQLException,
                                         UnprocessableEntityException
        Updates the DSpaceObject according to the given Patch.
        Parameters:
        apiCategory - the api category.
        model - the api model.
        id - the id of the DSpaceObject.
        patch - the patch to apply.
        Throws:
        org.dspace.authorize.AuthorizeException - if the action is unauthorized.
        org.springframework.data.rest.webmvc.ResourceNotFoundException - if the DSpace object was not found.
        SQLException - if a database error occurs.
        UnprocessableEntityException - if the patch attempts to modify an unmodifiable attribute of the object.
      • findDomainObjectByPk

        public M findDomainObjectByPk​(org.dspace.core.Context context,
                                      UUID uuid)
                               throws SQLException
        Specified by:
        findDomainObjectByPk in interface ReloadableEntityObjectRepository<M extends org.dspace.content.DSpaceObject,​R extends DSpaceObjectRest>
        Parameters:
        context - the DSpace context
        uuid - the primary key shared between the rest and dspace api object
        Returns:
        the dspace api model object related to the specified id
        Throws:
        SQLException - if a database error occurs