Class CollectionParentCommunityLinkRepository

java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.CollectionParentCommunityLinkRepository
All Implemented Interfaces:
LinkRestRepository

@Component("core.collections.parentCommunity") public class CollectionParentCommunityLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository
LinkRepository for the ParentCommunity object for a Collection
  • Constructor Details

    • CollectionParentCommunityLinkRepository

      public CollectionParentCommunityLinkRepository()
  • Method Details

    • getParentCommunity

      @PreAuthorize("hasPermission(#collectionId, \'COLLECTION\', \'READ\')") public CommunityRest getParentCommunity(@Nullable jakarta.servlet.http.HttpServletRequest httpServletRequest, UUID collectionId, @Nullable org.springframework.data.domain.Pageable optionalPageable, Projection projection)
      This method retrieves the ParentCommunity object for the Collection which is defined by the given collectionId It'll transform this Parent Community to a REST object and return this
      Parameters:
      httpServletRequest - The current request
      collectionId - The given Collection UUID that will be used to find the Collection
      optionalPageable - The pageable
      projection - The current Projection
      Returns:
      The Parent Community REST object