Package org.eurekastreams.server.action.request.stream

Examples of org.eurekastreams.server.action.request.stream.SetActivityStarRequest


     * Test adding a star.
     */
    @Test
    public void testAddStar()
    {
        SetActivityStarRequest currentRequest = new SetActivityStarRequest(1L, StarActionType.ADD_STAR);
        context.checking(new Expectations()
        {
            {
                oneOf(principalMock).getId();
                will(returnValue(5L));
View Full Code Here


    /**
     * Test removing a star.
     */
    public void testRemoveStar()
    {
        SetActivityStarRequest currentRequest = new SetActivityStarRequest(1L, StarActionType.REMOVE_STAR);
        context.checking(new Expectations()
        {
            {
                oneOf(principalMock).getId();
                will(returnValue(5L));
View Full Code Here

     * {@inheritDoc}.
     */
    @Override
    public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        SetActivityStarRequest request = (SetActivityStarRequest) inActionContext.getParams();
        StarredActivity starActivityData = new StarredActivity(
                inActionContext.getPrincipal().getId(),
                request.getActivityId());

        return (request.getStarActionType() == StarActionType.ADD_STAR)
            ? insertStarredActivity.execute(starActivityData)
            : deleteStarredActivity.execute(starActivityData);
    }
View Full Code Here

        addClickHandler(new ClickHandler()
        {
            public void onClick(final ClickEvent event)
            {
                SetActivityStarRequest request = new SetActivityStarRequest(activityId,
                        starred ? StarActionType.REMOVE_STAR : StarActionType.ADD_STAR);

                Session.getInstance().getActionProcessor()
                        .makeRequest("setActivityStar", request, new AsyncCallback<Boolean>()
                        {
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.stream.SetActivityStarRequest

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.