Package org.apache.rave.portal.model.impl

Examples of org.apache.rave.portal.model.impl.ApplicationDataImpl


        validApplicationDataMap = new HashMap<String, Object>();
        validApplicationDataMap.put("color", "blue");
        validApplicationDataMap.put("speed", "fast");
        validApplicationDataMap.put("state", "MA");
        validApplicationData = new ApplicationDataImpl(VALID_APPLICATION_DATA_ID, VALID_VIEWER_ID, VALID_APPLICATION_ID,
                validApplicationDataMap);

        validPerson = new PersonImpl();
        validPerson.setUsername(VALID_VIEWER_ID);
    }
View Full Code Here


        testDeletePersonDataNoAppDataExpected(null);
    }

    @Test
    public void deletePersonData_validRequest_emptyApplicationData() throws Exception {
        ApplicationData applicationData = new ApplicationDataImpl();
        testDeletePersonDataNoAppDataExpected(applicationData);
    }
View Full Code Here

        lockService.returnLock(lock);
        replay(lockService);

        appDataService.deletePersonData(userId, groupId, VALID_APPLICATION_ID, fieldsToDelete, securityToken);

        ApplicationData expectedApplicationData = new ApplicationDataImpl(applicationData.getId(),
                applicationData.getUserId(), applicationData.getAppUrl(), expectedApplicationDataAfterDelete);

        ApplicationData actualApplicationData = capturedApplicationData.getValue();
        assertEquals(expectedApplicationData.getId(), actualApplicationData.getId());
        assertEquals(expectedApplicationData.getUserId(), actualApplicationData.getUserId());
        assertEquals(expectedApplicationData.getAppUrl(), actualApplicationData.getAppUrl());
        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }
View Full Code Here

        lockService.returnLock(lock);
        replay(lockService);

        appDataService.updatePersonData(userId, groupId, VALID_APPLICATION_ID, fields, values, securityToken);

        ApplicationDataImpl expectedApplicationData = applicationData == null ? new ApplicationDataImpl(null, VALID_USER_ID,
                VALID_APPLICATION_ID, expectedApplicationDataAfterUpdate) :
                new ApplicationDataImpl(applicationData.getId(), applicationData.getUserId(),
                        applicationData.getAppUrl(), expectedApplicationDataAfterUpdate);

        ApplicationData actualApplicationData = capturedApplicationData.getValue();
        assertEquals(expectedApplicationData.getId(), actualApplicationData.getId());
        assertEquals(expectedApplicationData.getUserId(), actualApplicationData.getUserId());
        assertEquals(expectedApplicationData.getAppUrl(), actualApplicationData.getAppUrl());
        assertEquals(expectedApplicationData.getData(), actualApplicationData.getData());
    }
View Full Code Here

            //get the application data for this user and application
            ApplicationData applicationData = applicationDataRepository.getApplicationData(personId, appId);

            //if there is no data, create an empty object to store the data in that we'll save when we're done
            if (applicationData == null) {
                applicationData = new ApplicationDataImpl(null, personId, appId, new HashMap<String, Object>());
            }

            //if the fields parameter is empty, we can just use the values map directly since this is a full update
            if (fields == null || fields.size() == 0) {
                applicationData.setData(values);
View Full Code Here

        assertThat(applicationDataConverter.convert(applicationData), is(nullValue()));
    }

    @Test
    public void newApplicationData() {
        ApplicationData applicationData = new ApplicationDataImpl();
        applicationData.setId("1");
        applicationData.setAppUrl("url");
        applicationData.setData(new HashMap<String, Object>());
        applicationData.setUserId("userid");

        JpaApplicationData converted = applicationDataConverter.convert(applicationData);
        assertThat(converted, is(not(sameInstance(applicationData))));
        assertThat(converted, is(instanceOf(JpaApplicationData.class)));
        assertThat(converted.getId(), is(equalTo(applicationData.getId())));
        assertThat(converted.getEntityId().toString(), is(equalTo(applicationData.getId())));
        assertThat(converted.getAppUrl(), is(equalTo(applicationData.getAppUrl())));
        assertThat(converted.getData(), is(equalTo(applicationData.getData())));
        assertThat(converted.getUserId(), is(equalTo(applicationData.getUserId())));
    }
View Full Code Here

    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_implObject() {
        ApplicationData applicationData = repository.get(VALID_APPLICATION_DATA_ID.toString());
        assertThat(applicationData, is(notNullValue()));
        ApplicationDataImpl impl = new ApplicationDataImpl(applicationData.getId());
        repository.delete(impl);
        applicationData = repository.get(VALID_APPLICATION_DATA_ID.toString());
        assertThat(applicationData, is(nullValue()));
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.impl.ApplicationDataImpl

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.