Package org.dspace.rest
Class HierarchyResource
- java.lang.Object
-
- org.dspace.rest.Resource
-
- org.dspace.rest.HierarchyResource
-
@Path("/hierarchy") @Produces({"application/json","application/xml"}) public class HierarchyResource extends Resource
-
-
Field Summary
Fields Modifier and Type Field Description protected org.dspace.authorize.service.AuthorizeServiceauthorizeServiceprotected org.dspace.content.service.CommunityServicecommunityServiceprotected ConfigurationServiceconfigurationServiceprotected org.dspace.content.service.SiteServicesiteService-
Fields inherited from class org.dspace.rest.Resource
servletContext
-
-
Constructor Summary
Constructors Constructor Description HierarchyResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HierarchySitegetHierarchy(String user_agent, String xforwardedfor, javax.ws.rs.core.HttpHeaders headers, javax.servlet.http.HttpServletRequest request)-
Methods inherited from class org.dspace.rest.Resource
createContext, getActionString, mySplit, processException, processFinally, writeStats
-
-
-
-
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
-
configurationService
protected ConfigurationService configurationService
-
-
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.
-
-