Examples of prefer()


Examples of org.apache.sling.servlets.post.impl.helper.MediaRangeList.prefer()

        }

        // Fall through to default behavior
        @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
        final MediaRangeList mediaRangeList = new MediaRangeList(req);
        if (JSONResponse.RESPONSE_CONTENT_TYPE.equals(mediaRangeList.prefer("text/html", JSONResponse.RESPONSE_CONTENT_TYPE))) {
            return new JSONResponse();
        } else {
            return new HtmlResponse();
        }
    }
View Full Code Here

Examples of org.apache.syncope.client.SyncopeClient.prefer()

    }

    @Test
    public void noContent() throws IOException {
        SyncopeClient noContentclient = clientFactory.create(ADMIN_UNAME, ADMIN_PWD);
        UserService noContentService = noContentclient.prefer(UserService.class, Preference.RETURN_NO_CONTENT);

        UserTO user = getUniqueSampleTO("nocontent@syncope.apache.org");

        Response response = noContentService.create(user, true);
        assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
View Full Code Here

Examples of org.apache.syncope.client.SyncopeClient.prefer()

    @Test
    public void noContent() throws IOException {
        Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers());

        SyncopeClient anonClient = clientFactory.createAnonymous();
        UserSelfService noContentService = anonClient.prefer(UserSelfService.class, Preference.RETURN_NO_CONTENT);

        UserTO user = UserTestITCase.getUniqueSampleTO("nocontent-anonymous@syncope.apache.org");

        Response response = noContentService.create(user, true);
        assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
View Full Code Here

Examples of org.apache.syncope.client.SyncopeClient.prefer()

    }

    @Test
    public void noContent() throws IOException {
        SyncopeClient noContentclient = clientFactory.create(ADMIN_UNAME, ADMIN_PWD);
        RoleService noContentService = noContentclient.prefer(RoleService.class, Preference.RETURN_NO_CONTENT);

        RoleTO role = buildRoleTO("noContent");

        Response response = noContentService.create(role);
        assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.