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

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


    public void setHappiestWhen() {
        new FieldRestrictingPerson(null, null).setHappiestWhen(SUFFIX);
    }

    private org.apache.rave.portal.model.Person getTestPerson() {
        org.apache.rave.portal.model.Person person = new PersonImpl();
        person.setUsername(USERNAME);
        person.setAboutMe(ABOUT_ME);
        person.setAdditionalName(ADDITIONAL_NAME);
        person.setDisplayName(DISPLAY_NAME);
        person.setEmail(E_MAIL_ADDRESS);
        person.setFamilyName(FIRST_NAME);
        person.setGivenName(GIVEN_NAME);
        person.setHonorificPrefix(PREFIX);
        person.setHonorificSuffix(SUFFIX);
        person.setPreferredName(PREFERRED_NAME);
        person.setStatus(STATUS);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl(1L, "gender", Person.Gender.female.toString(), null, "", false));
        properties.add(new PersonPropertyImpl(1L, "drinker", Drinker.HEAVILY.toString(), null, "", false));
        properties.add(new PersonPropertyImpl(1L, "age", AGE.toString(), null, "", false));
        properties.add(new PersonPropertyImpl(1L, "birthday", BIRTHDAY_STRING, null, "", false));
        properties.add(new PersonPropertyImpl(1L, "bodyType", BODY_BUILD, null, "build", false));
        properties.add(new PersonPropertyImpl(1L, "bodyType", BODY_EYE_COLOR, null, "eyeColor", false));
        properties.add(new PersonPropertyImpl(1L, "bodyType", "25.24", null, "height", false));
        properties.add(new PersonPropertyImpl(1L, "ims", IM_1, null, IM_PROVIDER_1, true));
        properties.add(new PersonPropertyImpl(1L, "ims", IM_2, null, IM_PROVIDER_2, false));
        properties.add(new PersonPropertyImpl(1L, "emails", E_MAIL_ADDRESS_2, null, "personal", false));
        properties.add(new PersonPropertyImpl(1L, "emails", E_MAIL_ADDRESS_3, null, "junk", true));
        properties.add(new PersonPropertyImpl(1L, "activities", ACTIVITY_1, null, "", false));
        properties.add(new PersonPropertyImpl(1L, "activities", ACTIVITY_2, null, "", false));
        properties.add(new PersonPropertyImpl(1L, "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl(1L, "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl(1L, "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl(1L, "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.portal.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
        address.setLocality(CITY);
        address.setRegion(STATE);
        address.setPostalCode(POSTAL_CODE);
        address.setStreetAddress(STREET);
        address.setQualifier(QUALIFIER);
        List<org.apache.rave.portal.model.Address> addresses = new ArrayList<org.apache.rave.portal.model.Address>();
        addresses.add(new AddressImpl());
        addresses.add(address);
        person.setAddresses(addresses);

        return person;
    }
View Full Code Here


    @Transactional(readOnly=false)
    @Rollback(true)
    public void delete_implObject() {
        Person person = repository.get(VALID_ID);
        assertThat(person, is(notNullValue()));
        PersonImpl impl = new PersonImpl();
        impl.setUsername(person.getUsername());
        repository.delete(impl);
        person = repository.get(VALID_ID);
        assertThat(person, is(nullValue()));
    }
View Full Code Here

    public void setHappiestWhen() {
        new FieldRestrictingPerson(null, null).setHappiestWhen(SUFFIX);
    }

    private org.apache.rave.portal.model.Person getTestPerson() {
        org.apache.rave.portal.model.Person person = new PersonImpl();
        person.setUsername(USERNAME);
        person.setAboutMe(ABOUT_ME);
        person.setAdditionalName(ADDITIONAL_NAME);
        person.setDisplayName(DISPLAY_NAME);
        person.setEmail(E_MAIL_ADDRESS);
        person.setFamilyName(FIRST_NAME);
        person.setGivenName(GIVEN_NAME);
        person.setHonorificPrefix(PREFIX);
        person.setHonorificSuffix(SUFFIX);
        person.setPreferredName(PREFERRED_NAME);
        person.setStatus(STATUS);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl("1", "gender", Person.Gender.female.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "drinker", Drinker.HEAVILY.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "age", AGE.toString(), null, "", false));
        properties.add(new PersonPropertyImpl("1", "birthday", BIRTHDAY_STRING, null, "", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", BODY_BUILD, null, "build", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", BODY_EYE_COLOR, null, "eyeColor", false));
        properties.add(new PersonPropertyImpl("1", "bodyType", "25.24", null, "height", false));
        properties.add(new PersonPropertyImpl("1", "ims", IM_1, null, IM_PROVIDER_1, true));
        properties.add(new PersonPropertyImpl("1", "ims", IM_2, null, IM_PROVIDER_2, false));
        properties.add(new PersonPropertyImpl("1", "emails", E_MAIL_ADDRESS_2, null, "personal", false));
        properties.add(new PersonPropertyImpl("1", "emails", E_MAIL_ADDRESS_3, null, "junk", true));
        properties.add(new PersonPropertyImpl("1", "activities", ACTIVITY_1, null, "", false));
        properties.add(new PersonPropertyImpl("1", "activities", ACTIVITY_2, null, "", false));
        properties.add(new PersonPropertyImpl("1", "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl("1", "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl("1", "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl("1", "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.portal.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
        address.setLocality(CITY);
        address.setRegion(STATE);
        address.setPostalCode(POSTAL_CODE);
        address.setStreetAddress(STREET);
        address.setQualifier(QUALIFIER);
        List<org.apache.rave.portal.model.Address> addresses = new ArrayList<org.apache.rave.portal.model.Address>();
        addresses.add(new AddressImpl());
        addresses.add(address);
        person.setAddresses(addresses);

        return person;
    }
View Full Code Here

    private static final String ownerId = "12345";

    @Before
    public void setup() {
        members = new ArrayList<String>();
        owner = new PersonImpl();
        owner.setDisplayName(ownerDisplayName);
        owner.setGivenName(ownerGivenName);
        members.add(ownerId);

        group = new GroupImpl();
View Full Code Here

        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

        ids.add(new UserId(UserId.Type.userId, ID_3));
        return ids;
    }

    private org.apache.rave.portal.model.Person getDbPerson() {
        PersonImpl dbPerson = new PersonImpl();
        dbPerson.setUsername(ID_1);
        dbPerson.setDisplayName(DISPLAY_NAME);
        return dbPerson;
    }
View Full Code Here

        dbPerson.setDisplayName(DISPLAY_NAME);
        return dbPerson;
    }

    private org.apache.rave.portal.model.Person getDbPerson(String id) {
        PersonImpl dbPerson = new PersonImpl();
        dbPerson.setUsername(id);
        dbPerson.setDisplayName(DISPLAY_NAME);
        List<PersonProperty> properties = new ArrayList<PersonProperty>();
        properties.add(new PersonPropertyImpl("1", Person.Field.TAGS.toString(), TAG, null, null, null));
        properties.add(new PersonPropertyImpl("2", Person.Field.HAPPIEST_WHEN.toString(), HAPPIEST_WHEN, null, null, null));
        dbPerson.setProperties(properties);
        return dbPerson;
    }
View Full Code Here

    @Test
    public void converts() {
        new JpaConverter(converters);
        assertThat(JpaConverter.getInstance().convert(new AddressImpl(), Address.class), is(instanceOf(JpaAddress.class)));
        assertThat(JpaConverter.getInstance().convert(new PersonImpl(), Person.class), is(instanceOf(JpaPerson.class)));

    }
View Full Code Here

    public void proxyAdd() {
        List<ModelConverter> converters = new ArrayList<ModelConverter>();
        ModelConverter converterMock = createMock(ModelConverter.class);
        expect(converterMock.getSourceType()).andReturn(Person.class).anyTimes();
        converters.add(converterMock);
        Person personImpl1 = new PersonImpl();
        PersonImpl personImpl2 = new PersonImpl();
        expect(converterMock.convert(personImpl1)).andReturn(personImpl2);
        replay(converterMock);
        List<PersonImpl> underlying = createMock(List.class);
        expect(underlying.add(personImpl2)).andReturn(true);
        replay(underlying);
View Full Code Here

    public void proxySet() {
        List<ModelConverter> converters = new ArrayList<ModelConverter>();
        ModelConverter converterMock = createMock(ModelConverter.class);
        expect(converterMock.getSourceType()).andReturn(Person.class).anyTimes();
        converters.add(converterMock);
        Person personImpl1 = new PersonImpl();
        Person personImpl2 = new PersonImpl();
        expect(converterMock.convert(personImpl1)).andReturn(personImpl2);
        replay(converterMock);
        List<PersonImpl> underlying = createMock(List.class);
        expect(underlying.set(0, (PersonImpl)personImpl2)).andReturn((PersonImpl) personImpl2);
        replay(underlying);
View Full Code Here

TOP

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

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.