@Path(value="/") public class RestIndex extends Object
| Modifier and Type | Field and Description |
|---|---|
protected EPersonService |
epersonService |
| Constructor and Description |
|---|
RestIndex() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
login()
Method to login a user into REST API.
|
javax.ws.rs.core.Response |
logout(javax.ws.rs.core.HttpHeaders headers)
Method to logout a user from DSpace REST API.
|
String |
sayHtmlHello(javax.servlet.ServletContext servletContext)
Return html page with information about REST api.
|
javax.ws.rs.core.Response |
shibbolethLogin() |
javax.ws.rs.core.Response |
shibbolethLoginEndPoint() |
Status |
status(javax.ws.rs.core.HttpHeaders headers)
Method to check current status of the service and logged in user.
|
String |
test()
Method only for testing whether the REST API is running.
|
protected EPersonService epersonService
@GET @Produces(value="text/html") public String sayHtmlHello(@Context javax.servlet.ServletContext servletContext)
servletContext - Context of the servlet container.@GET @Path(value="/test") public String test()
@POST
@Path(value="/login")
@Consumes(value={"application/json","application/xml"})
public javax.ws.rs.core.Response login()
@GET
@Path(value="/shibboleth-login")
@Consumes(value={"application/json","application/xml"})
public javax.ws.rs.core.Response shibbolethLogin()
@GET
@Path(value="/login-shibboleth")
@Consumes(value={"application/json","application/xml"})
public javax.ws.rs.core.Response shibbolethLoginEndPoint()
@POST
@Path(value="/logout")
@Consumes(value={"application/json","application/xml"})
public javax.ws.rs.core.Response logout(@Context
javax.ws.rs.core.HttpHeaders headers)
headers - Request header which contains the header named
"rest-dspace-token" containing the token as value.@GET
@Path(value="/status")
@Consumes(value={"application/json","application/xml"})
public Status status(@Context
javax.ws.rs.core.HttpHeaders headers)
throws UnsupportedEncodingException
headers - Request header which contains the header named
"rest-dspace-token" containing the token as value.UnsupportedEncodingException - The Character Encoding is not supported.Copyright © 2019 DuraSpace. All rights reserved.