Examples of SetTabOrderRequest


Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

        final Long tabId = TAB0_ID;
        final Integer newIndex = 3;

        setupExpectations();

        SetTabOrderRequest currentRequest = new SetTabOrderRequest(TabGroupType.START, tabId, newIndex);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        assertPositions(TAB1_ID, TAB2_ID, TAB3_ID, TAB0_ID, TAB4_ID);
View Full Code Here

Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

        final Long tabId = TAB4_ID;
        final Integer newIndex = 2;

        setupExpectations();

        SetTabOrderRequest currentRequest = new SetTabOrderRequest(TabGroupType.START, tabId, newIndex);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        assertPositions(TAB0_ID, TAB1_ID, TAB4_ID, TAB2_ID, TAB3_ID);
View Full Code Here

Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

        final Long tabId = TAB2_ID;
        final Integer newIndex = 4;

        setupExpectations();

        SetTabOrderRequest currentRequest = new SetTabOrderRequest(TabGroupType.START, tabId, newIndex);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        assertPositions(TAB0_ID, TAB1_ID, TAB3_ID, TAB4_ID, TAB2_ID);
View Full Code Here

Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

        final Long tabId = TAB2_ID;
        final Integer newIndex = 0;

        setupExpectations();

        SetTabOrderRequest currentRequest = new SetTabOrderRequest(TabGroupType.START, tabId, newIndex);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        assertPositions(TAB2_ID, TAB0_ID, TAB1_ID, TAB3_ID, TAB4_ID);
View Full Code Here

Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

        final Long tabId = NO_SUCH_TAB_ID;
        final Integer newIndex = 0;

        setupExpectations();

        SetTabOrderRequest currentRequest = new SetTabOrderRequest(TabGroupType.START, tabId, newIndex);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

    {
        StartPageTab tab = (StartPageTab) event.getContext().draggable;
        HorizontalPanel dropPanel = (HorizontalPanel) event.getContext().finalDropController.getDropTarget();

        StartTabsModel.getInstance().reorder(
                new SetTabOrderRequest(TabGroupType.START, tab.getTab().getId(), new Integer(dropPanel
                        .getWidgetIndex(tab))));
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.start.SetTabOrderRequest

    }

    @Override
    public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        SetTabOrderRequest currentRequest = (SetTabOrderRequest) inActionContext.getParams();

        Person person = personMapper.findByAccountId(inActionContext.getPrincipal().getAccountId());

        List<Tab> tabs = person.getTabs(currentRequest.getTabType());

        // Find the tab to be moved
        int oldIndex = findTabIndex(tabs, currentRequest.getTabId());

        Tab movingTab = tabs.get(oldIndex);

        // move the tab
        tabs.remove(oldIndex);
        tabs.add(currentRequest.getNewIndex(), movingTab);

        deleteKeysMapper.execute(Collections.singleton(CacheKeys.PERSON_PAGE_PROPERTIES_BY_ID
                + inActionContext.getPrincipal().getId()));

        personMapper.flush();
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.