Package io.lumify.web.clientapi.model

Examples of io.lumify.web.clientapi.model.ClientApiWorkspaceUndoResponse


        User user = getUser(request);
        Authorizations authorizations = getAuthorizations(request, user);
        String workspaceId = getActiveWorkspaceId(request);

        LOGGER.debug("undoing:\n%s", Joiner.on("\n").join(undoData));
        ClientApiWorkspaceUndoResponse workspaceUndoResponse = new ClientApiWorkspaceUndoResponse();
        undoVertices(undoData, workspaceUndoResponse, workspaceId, user, authorizations);
        undoEdges(undoData, workspaceUndoResponse, workspaceId, user, authorizations);
        undoProperties(undoData, workspaceUndoResponse, workspaceId, user, authorizations);
        LOGGER.debug("undoing results: %s", workspaceUndoResponse);
        respondWithClientApiObject(response, workspaceUndoResponse);
View Full Code Here


    protected void assertUndoAll(LumifyApi lumifyApi, int expectedDiffsBeforeUndo) throws ApiException {
        ClientApiWorkspaceDiff diff = lumifyApi.getWorkspaceApi().getDiff();
        LOGGER.info("diff before undo: %s", diff.toString());
        assertEquals(expectedDiffsBeforeUndo, diff.getDiffs().size());
        ClientApiWorkspaceUndoResponse undoAllResult = lumifyApi.getWorkspaceApi().undoAll(diff.getDiffs());
        LOGGER.info("undo all results: %s", undoAllResult.toString());
        Assert.assertTrue("undo all failed: " + undoAllResult, undoAllResult.isSuccess());
        assertEquals("undo all expected 0 failures: " + undoAllResult, 0, undoAllResult.getFailures().size());

        diff = lumifyApi.getWorkspaceApi().getDiff();
        LOGGER.info("diff after undo: %s", diff.toString());
        assertEquals(0, diff.getDiffs().size());
    }
View Full Code Here

TOP

Related Classes of io.lumify.web.clientapi.model.ClientApiWorkspaceUndoResponse

Copyright © 2018 www.massapicom. 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.