Package org.eurekastreams.server.action.request.start

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


                oneOf(gadgetMapper).flush();
            }
        });

        SetGadgetStateRequest currentRequest = new SetGadgetStateRequest(GADGET_ID1, State.MINIMIZED);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        Gadget actual = sut.execute(currentContext);

        assertEquals("Did not return the right Tab", actual, expected);
    }
View Full Code Here


                will(returnValue(null));

            }
        });

        SetGadgetStateRequest currentRequest = new SetGadgetStateRequest(noSuchGadgetId, State.MINIMIZED);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);
    }
View Full Code Here

            break;
        default:
            break;
        }

        GadgetModel.getInstance().setState(new SetGadgetStateRequest(gadgetData.getId(), state));
    }
View Full Code Here

     * {@inheritDoc}. Retrieve a tab, minimize the specified gadget.
     */
    @Override
    public Gadget execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        SetGadgetStateRequest currentRequest = (SetGadgetStateRequest) inActionContext.getParams();

        if (logger.isDebugEnabled())
        {
            logger.debug("Calling Minimize on Gadget: " + currentRequest.getGadgetId() + ". Setting minimize to: "
                    + currentRequest.isMinimized());
        }

        Gadget gadget = gadgetMapper.findById(currentRequest.getGadgetId());

        if (null == gadget)
        {
            throw new ExecutionException("Failed to set minimized state for gadget. Gadget id "
                    + currentRequest.getGadgetId() + " not found");
        }

        gadget.setMinimized(currentRequest.isMinimized());
        gadget.setMaximized(currentRequest.isMaximized());

        gadgetMapper.flush();

        deleteKeysMapper.execute(Collections.singleton(CacheKeys.PERSON_PAGE_PROPERTIES_BY_ID
                + inActionContext.getPrincipal().getId()));
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.start.SetGadgetStateRequest

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.