@Path(value="/filtered-collections") public class FilteredCollectionsResource extends Resource
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected CollectionService |
collectionService |
protected ConfigurationService |
configurationService |
servletContext| Constructor and Description |
|---|
FilteredCollectionsResource() |
| Modifier and Type | Method and Description |
|---|---|
FilteredCollection |
getCollection(String collection_id,
String expand,
Integer limit,
Integer offset,
String user_ip,
String user_agent,
String xforwardedfor,
String filters,
javax.ws.rs.core.HttpHeaders headers,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext servletContext)
Return instance of collection with passed id.
|
FilteredCollection[] |
getCollections(String expand,
Integer limit,
Integer offset,
String user_ip,
String user_agent,
String filters,
String xforwardedfor,
javax.servlet.ServletContext servletContext,
javax.ws.rs.core.HttpHeaders headers,
javax.servlet.http.HttpServletRequest request)
Return array of all collections in DSpace.
|
createContext, getActionString, mySplit, processException, processFinally, writeStatsprotected AuthorizeService authorizeService
protected CollectionService collectionService
protected ConfigurationService configurationService
@GET
@Produces(value={"application/json","application/xml"})
public FilteredCollection[] getCollections(@QueryParam(value="expand")
String expand,
@QueryParam(value="limit") @DefaultValue(value="100")
Integer limit,
@QueryParam(value="offset") @DefaultValue(value="0")
Integer offset,
@QueryParam(value="userIP")
String user_ip,
@QueryParam(value="userAgent")
String user_agent,
@QueryParam(value="filters") @DefaultValue(value="is_item")
String filters,
@QueryParam(value="xforwardedfor")
String xforwardedfor,
@Context
javax.servlet.ServletContext servletContext,
@Context
javax.ws.rs.core.HttpHeaders headers,
@Context
javax.servlet.http.HttpServletRequest request)
throws javax.ws.rs.WebApplicationException
expand - String in which is what you want to add to returned instance
of collection. Options are: "all", "parentCommunityList",
"parentCommunity", "topCommunity", "items", "license" and "logo".
If you want to use multiple options, it must be separated by commas.limit - Limit value for items in list in collection. Default value is
100.offset - Offset of start index in list of items of collection. Default
value is 0.user_ip - User's IP address.user_agent - User agent string (specifies browser used and its version).filters - Comma separated list of Item Filters to use to evaluate against
the items in a collectionxforwardedfor - 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.servletContext - Context of the servlet container.headers - If you want to access the collections 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.javax.ws.rs.WebApplicationException - It is thrown when was problem with database reading
(SQLException) or problem with creating
context(ContextException).@GET
@Path(value="/{collection_id}")
@Produces(value={"application/json","application/xml"})
public FilteredCollection getCollection(@PathParam(value="collection_id")
String collection_id,
@QueryParam(value="expand")
String expand,
@QueryParam(value="limit") @DefaultValue(value="1000")
Integer limit,
@QueryParam(value="offset") @DefaultValue(value="0")
Integer offset,
@QueryParam(value="userIP")
String user_ip,
@QueryParam(value="userAgent")
String user_agent,
@QueryParam(value="xforwardedfor")
String xforwardedfor,
@QueryParam(value="filters") @DefaultValue(value="is_item")
String filters,
@Context
javax.ws.rs.core.HttpHeaders headers,
@Context
javax.servlet.http.HttpServletRequest request,
@Context
javax.servlet.ServletContext servletContext)
collection_id - Id of collection in DSpace.expand - String in which is what you want to add to returned instance
of collection. Options are: "all", "parentCommunityList",
"parentCommunity", "topCommunity", "items", "license" and "logo".
If you want to use multiple options, it must be separated by commas.limit - Limit value for items in list in collection. Default value is
100.offset - Offset of start index in list of items of collection. Default
value is 0.user_ip - User's IP address.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.filters - Comma separated list of Item Filters to use to evaluate against
the items in a collectionheaders - 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.servletContext - Context of the servlet container.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.Copyright © 2019 DuraSpace. All rights reserved.