Class HierarchyResource


  • @Path("/hierarchy")
    @Produces({"application/json","application/xml"})
    public class HierarchyResource
    extends Resource
    • Field Detail

      • siteService

        protected org.dspace.content.service.SiteService siteService
      • communityService

        protected org.dspace.content.service.CommunityService communityService
      • authorizeService

        protected org.dspace.authorize.service.AuthorizeService authorizeService
    • Constructor Detail

      • HierarchyResource

        public HierarchyResource()
    • Method Detail

      • getHierarchy

        @GET
        @Produces({"application/json","application/xml"})
        public HierarchySite getHierarchy​(@QueryParam("userAgent")
                                          String user_agent,
                                          @QueryParam("xforwardedfor")
                                          String xforwardedfor,
                                          @Context
                                          javax.ws.rs.core.HttpHeaders headers,
                                          @Context
                                          javax.servlet.http.HttpServletRequest request)
                                   throws UnsupportedEncodingException,
                                          javax.ws.rs.WebApplicationException
        Parameters:
        user_agent - User agent string (specifies browser used and its version).
        xforwardedfor - When accessed via a reverse proxy, the application sees the proxy's IP as the source of the request. The proxy may be configured to add the "X-Forwarded-For" HTTP header containing the original IP of the client so that the reverse-proxied application can get the client's IP.
        headers - If you want to access the collection as the user logged into the context. The value of the "rest-dspace-token" header must be set to the token received from the login method response.
        request - Servlet's HTTP request object.
        Returns:
        Return instance of collection. It can also return status code NOT_FOUND(404) if id of collection is incorrect or status code
        Throws:
        UnsupportedEncodingException - The Character Encoding is not supported.
        javax.ws.rs.WebApplicationException - It is thrown when was problem with database reading (SQLException) or problem with creating context(ContextException). It is thrown by NOT_FOUND and UNATHORIZED status codes, too.