Examples of PersonImpl


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

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

    private org.apache.rave.model.Person getTestPerson() {
        org.apache.rave.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.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.model.Address> addresses = new ArrayList<org.apache.rave.model.Address>();
        addresses.add(new AddressImpl());
        addresses.add(address);
        person.setAddresses(addresses);

        return person;
    }
View Full Code Here

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

    @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

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

        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

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

    }


    @Test
    public void convertValid() {
        Person template = new PersonImpl();
        template.setUsername("TEST_A");
        template.setEmail("TEST_B");
        template.setDisplayName("TEST_C");
        template.setAdditionalName("TEST_D");
        template.setFamilyName("TEST_E");
        template.setGivenName("TEST_F");
        template.setHonorificPrefix("TEST_G");
        template.setHonorificSuffix("TEST_H");
        template.setPreferredName("TEST_I");
        template.setAboutMe("TEST_J");
        template.setStatus("TEST_K");
        template.setAddresses(new ArrayList<Address>());
        template.setOrganizations(new ArrayList<Organization>());
        template.setProperties(new ArrayList<PersonProperty>());
        template.setFriends(new ArrayList<Person>());

        JpaPerson jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPerson.class)));
        assertThat(jpaTemplate.getUsername(), is(equalTo(template.getUsername())));
        assertThat(jpaTemplate.getEmail(), is(equalTo(template.getEmail())));
        assertThat(jpaTemplate.getDisplayName(), is(equalTo(template.getDisplayName())));
        assertThat(jpaTemplate.getUsername(), is(equalTo(template.getUsername())));
        assertThat(jpaTemplate.getFamilyName(), is(equalTo(template.getFamilyName())));
        assertThat(jpaTemplate.getGivenName(), is(equalTo(template.getGivenName())));
        assertThat(jpaTemplate.getHonorificPrefix(), is(equalTo(template.getHonorificPrefix())));
        assertThat(jpaTemplate.getHonorificSuffix(), is(equalTo(template.getHonorificSuffix())));
        assertThat(jpaTemplate.getPreferredName(), is(equalTo(template.getPreferredName())));
        assertThat(jpaTemplate.getAboutMe(), is(equalTo(template.getAboutMe())));
        assertThat(jpaTemplate.getStatus(), is(equalTo(template.getStatus())));
        assertThat(jpaTemplate.getAddresses(), is(equalTo(template.getAddresses())));
        assertThat(jpaTemplate.getOrganizations(), is(equalTo(template.getOrganizations())));
        assertThat(jpaTemplate.getProperties(), is(equalTo(template.getProperties())));
        assertThat(jpaTemplate.getFriends(), is(equalTo(template.getFriends())));
    }
View Full Code Here

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

        return sb.toString();
    }

    @Override
    public Person toPerson() {
        PersonImpl p = new PersonImpl();
        p.setAboutMe(this.getAboutMe());
        p.setAdditionalName(this.getAdditionalName());
        p.setAddresses(this.getAddresses());
        p.setDisplayName(this.getDisplayName());
        p.setEmail(this.getEmail());
        p.setFamilyName(this.getFamilyName());
        p.setFriends(this.getFriends());
        p.setGivenName(this.getGivenName());
        p.setHonorificPrefix(this.getHonorificPrefix());
        p.setHonorificSuffix(this.getHonorificSuffix());
        p.setOrganizations(this.getOrganizations());
        p.setPreferredName(this.getPreferredName());
        p.setProperties(this.getProperties());
        p.setStatus(this.getStatus());
        p.setUsername(this.getUsername());
        return p;
    }
View Full Code Here

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

    @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

Examples of org.apache.servicemix.samples.wsdl_first.PersonImpl

    protected void assertValidContext(CamelContext context) {
        assertNotNull("No context found!", context);
    }

    protected void startService() {
       Object implementor = new PersonImpl();
        String address = "http://localhost:9000/PersonService/";
        Endpoint.publish(address, implementor);
    }
View Full Code Here

Examples of org.apache.shindig.social.core.model.PersonImpl




    private org.apache.shindig.social.opensocial.model.Person getDbPerson() {
        PersonImpl  dbPerson = new PersonImpl();
        dbPerson.setId(ID_1);

        dbPerson.setDisplayName("Test");
        return dbPerson;
    }
View Full Code Here

Examples of org.apache.shindig.social.core.model.PersonImpl

        dbPerson.setDisplayName("Test");
        return dbPerson;
    }

    private org.apache.shindig.social.opensocial.model.Person getDbPerson(String id) {
        PersonImpl dbPerson = new PersonImpl();
        dbPerson.setId(id);
        dbPerson.setDisplayName("Test");

        return dbPerson;
    }
View Full Code Here

Examples of org.apache.shindig.social.core.model.PersonImpl

    name.setFamilyName("Digg");
    name.setGivenName("Shin");
    name.setHonorificPrefix("Sir");
    name.setHonorificSuffix("Social Butterfly");

    Person canonical = new PersonImpl("canonical", "Shin Digg", name);

    canonical.setAboutMe("I have an example of every piece of data");
    canonical.setActivities(Lists.newArrayList("Coding Shindig"));

    Address address = new AddressImpl("PoBox 3565, 1 OpenStandards Way, Apache, CA");
    address.setCountry("US");
    address.setLatitude(28.3043F);
    address.setLongitude(143.0859F);
    address.setLocality("who knows");
    address.setPostalCode("12345");
    address.setRegion("Apache, CA");
    address.setStreetAddress("1 OpenStandards Way");
    address.setType("home");
    address.setFormatted("PoBox 3565, 1 OpenStandards Way, Apache, CA");
    canonical.setAddresses(Lists.newArrayList(address));

    canonical.setAge(33);
    BodyTypeImpl bodyType = new BodyTypeImpl();
    bodyType.setBuild("svelte");
    bodyType.setEyeColor("blue");
    bodyType.setHairColor("black");
    bodyType.setHeight(1.84F);
    bodyType.setWeight(74F);
    canonical.setBodyType(bodyType);

    canonical.setBooks(Lists.newArrayList("The Cathedral & the Bazaar", "Catch 22"));
    canonical.setCars(Lists.newArrayList("beetle", "prius"));
    canonical.setChildren("3");
    AddressImpl location = new AddressImpl();
    location.setLatitude(48.858193F);
    location.setLongitude(2.29419F);
    canonical.setCurrentLocation(location);

    canonical.setBirthday(buildDate("1975-01-01"));
    canonical.setDrinker(new EnumImpl<Drinker>(Drinker.SOCIALLY));
    ListField email = new ListFieldImpl("work", "dev@shindig.apache.org");
    canonical.setEmails(Lists.newArrayList(email));

    canonical.setEthnicity("developer");
    canonical.setFashion("t-shirts");
    canonical.setFood(Lists.newArrayList("sushi", "burgers"));
    canonical.setGender(Person.Gender.male);
    canonical.setHappiestWhen("coding");
    canonical.setHasApp(true);
    canonical.setHeroes(Lists.newArrayList("Doug Crockford", "Charles Babbage"));
    canonical.setHumor("none to speak of");
    canonical.setInterests(Lists.newArrayList("PHP", "Java"));
    canonical.setJobInterests("will work for beer");

    Organization job1 = new OrganizationImpl();
    job1.setAddress(new AddressImpl("1 Shindig Drive"));
    job1.setDescription("lots of coding");
    job1.setEndDate(buildDate("2010-10-10"));
    job1.setField("Software Engineering");
    job1.setName("Apache.com");
    job1.setSalary("$1000000000");
    job1.setStartDate(buildDate("1995-01-01"));
    job1.setSubField("Development");
    job1.setTitle("Grand PooBah");
    job1.setWebpage("http://shindig.apache.org/");
    job1.setType("job");

    Organization job2 = new OrganizationImpl();
    job2.setAddress(new AddressImpl("1 Skid Row"));
    job2.setDescription("");
    job2.setEndDate(buildDate("1995-01-01"));
    job2.setField("College");
    job2.setName("School of hard Knocks");
    job2.setSalary("$100");
    job2.setStartDate(buildDate("1991-01-01"));
    job2.setSubField("Lab Tech");
    job2.setTitle("Gopher");
    job2.setWebpage("");
    job2.setType("job");

    canonical.setOrganizations(Lists.newArrayList(job1, job2));

    canonical.setUpdated(new Date());
    canonical.setLanguagesSpoken(Lists.newArrayList("English", "Dutch", "Esperanto"));
    canonical.setLivingArrangement("in a house");
    List<Enum<LookingFor>> lookingFor = Lists.newArrayList();
    Enum<LookingFor> lookingForOne = new EnumImpl<LookingFor>(LookingFor.RANDOM);
    Enum<LookingFor> lookingForTwo = new EnumImpl<LookingFor>(LookingFor.NETWORKING);
    lookingFor.add(lookingForOne);
    lookingFor.add(lookingForTwo);
    canonical.setLookingFor(lookingFor);
    canonical.setMovies(Lists.newArrayList("Iron Man", "Nosferatu"));
    canonical.setMusic(Lists.newArrayList("Chieftains", "Beck"));
    canonical.setNetworkPresence(new EnumImpl<NetworkPresence>(NetworkPresence.ONLINE));
    canonical.setNickname("diggy");
    canonical.setPets("dog,cat");
    canonical.setPhoneNumbers(Lists.<ListField> newArrayList(new ListFieldImpl("work",
        "111-111-111"), new ListFieldImpl("mobile", "999-999-999")));

    canonical.setPoliticalViews("open leaning");
    canonical.setProfileSong(new UrlImpl("http://www.example.org/songs/OnlyTheLonely.mp3",
        "Feelin' blue", "road"));
    canonical.setProfileVideo(new UrlImpl("http://www.example.org/videos/Thriller.flv",
        "Thriller", "video"));

    canonical.setQuotes(Lists.newArrayList("I am therfore I code", "Doh!"));
    canonical.setRelationshipStatus("married to my job");
    canonical.setReligion("druidic");
    canonical.setRomance("twice a year");
    canonical.setScaredOf("COBOL");
    canonical.setSexualOrientation("north");
    canonical.setSmoker(new EnumImpl<Smoker>(Smoker.NO));
    canonical.setSports(Lists.newArrayList("frisbee", "rugby"));
    canonical.setStatus("happy");
    canonical.setTags(Lists.newArrayList("C#", "JSON", "template"));
    canonical.setThumbnailUrl("http://www.example.org/pic/?id=1");
    canonical.setUtcOffset(-8L);
    canonical.setTurnOffs(Lists.newArrayList("lack of unit tests", "cabbage"));
    canonical.setTurnOns(Lists.newArrayList("well document code"));
    canonical.setTvShows(Lists.newArrayList("House", "Battlestar Galactica"));

    canonical.setUrls(Lists.<Url>newArrayList(
        new UrlImpl("http://www.example.org/?id=1", "my profile", "Profile"),
        new UrlImpl("http://www.example.org/pic/?id=1", "my awesome picture", "Thumbnail")));

    return canonical;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.