Search in sources :

Example 11 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getResponse.

private ContainerResponse getResponse(ContainerRequest request) {
    ContainerResponse response = new ContainerResponse(new WebApplicationImpl(), request, null);
    response.setStatus(200);
    return response;
}
Also used : ContainerResponse(com.sun.jersey.spi.container.ContainerResponse) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl)

Example 12 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getRequest.

private ContainerRequest getRequest() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, "application/xml");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "POST", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("https://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 13 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getRequestWithNoCategory.

private ContainerRequest getRequestWithNoCategory() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, "application/xml");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "POST", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("https://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 14 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getGetRequestWithJsonLdAcceptHeader.

private ContainerRequest getGetRequestWithJsonLdAcceptHeader() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, "application/json");
    headers.add(HttpHeaders.ACCEPT, OrcidApiConstants.JSON_LD);
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "GET", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("http://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 15 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getGetRequestWithUnknownAcceptHeader.

private ContainerRequest getGetRequestWithUnknownAcceptHeader() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, OrcidApiConstants.VND_ORCID_JSON);
    headers.add(HttpHeaders.ACCEPT, "something/weird");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "GET", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("http://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Aggregations

WebApplicationImpl (com.sun.jersey.server.impl.application.WebApplicationImpl)16 InBoundHeaders (com.sun.jersey.core.header.InBoundHeaders)15 ContainerRequest (com.sun.jersey.spi.container.ContainerRequest)15 ContainerResponse (com.sun.jersey.spi.container.ContainerResponse)1