Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.GadgetUserPrefDTO


     */
    @Test
    public void testPerformAction() throws Exception
    {
        final String userPrefsJson = "{'userPref1':'value1','userPref2':'value2'}";
        final GadgetUserPrefDTO testPrefs1 = context.mock(GadgetUserPrefDTO.class);
        final GadgetUserPrefActionRequest requestParam = new GadgetUserPrefActionRequest(new Long(1L), userPrefsJson);
        context.checking(new Expectations()
        {
            {
                oneOf(mapper).execute(with(any(GadgetUserPrefRequest.class)));
View Full Code Here


    public void testGetGadgetUserPrefWithResults()
    {
        final long gadgetId = 7841L;
        final String userPrefParam = "{userPref1:value1,userPref2:value2}";
        GadgetUserPrefRequest request = new GadgetUserPrefRequest(gadgetId, userPrefParam);
        GadgetUserPrefDTO userPref = mapper.execute(request);

        assertNotNull(userPref);
    }
View Full Code Here

    public void testGetGadgetUserPrefWithNoResults()
    {
        final long gadgetId = 7881L;
        final String userPrefParam = "{userPref1:value1,userPref2:value2}";
        GadgetUserPrefRequest request = new GadgetUserPrefRequest(gadgetId, userPrefParam);
        GadgetUserPrefDTO userPref = mapper.execute(request);

        assertNotNull(userPref);
    }
View Full Code Here

        Query q = getEntityManager()
            .createQuery("select new org.eurekastreams.server.domain.GadgetUserPrefDTO( g.id, g.gadgetUserPref ) "
                    + "FROM Gadget g WHERE g.id =:gadgetId")
            .setParameter("gadgetId", inRequest.getGadgetId());
       
        GadgetUserPrefDTO currentUserPref = (GadgetUserPrefDTO) q.getSingleResult();
       
        return currentUserPref;
    }
View Full Code Here

    {
        GadgetUserPrefActionRequest request = (GadgetUserPrefActionRequest) inActionContext.getParams();
        String userPrefs;
        try
        {
            GadgetUserPrefDTO currentPrefs = mapper.execute(new GadgetUserPrefRequest(request.getGadgetId(), request
                    .getGadgetUserPref()));
            userPrefs = currentPrefs.getJsonUserPref();
        }
        catch (NoResultException nex)
        {
            userPrefs = DEFAULT_USER_PREFS;
        }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.GadgetUserPrefDTO

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.