Package org.apache.shindig.social.core.model

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


        }
        List<MediaItem> mediaItemList = new ArrayList<MediaItem>();

        if (activityObj.getMediaItems() != null) {
            for (org.wso2.carbon.registry.social.api.activity.MediaItem item : activityObj.getMediaItems()) {
                MediaItem itemObj = new MediaItemImpl();
                if (item != null) {
                    if (item.getMimeType() != null) {
                        itemObj.setMimeType(item.getMimeType());
                    }
                    if (item.getThumbnailUrl() != null) {
                        itemObj.setThumbnailUrl(item.getThumbnailUrl());
                    }
                    if (item.getType() != null) {
                        org.wso2.carbon.registry.social.api.activity.MediaItem.Type itemType = item.getType();
                        if (itemType.name().equals(MEDIA_ITEM_TYPE_AUDIO)) {
                            itemObj.setType(MediaItem.Type.AUDIO);
                        }
                        if (itemType.name().equals(MEDIA_ITEM_TYPE_IMAGE)) {
                            itemObj.setType(MediaItem.Type.IMAGE);
                        }
                        if (itemType.name().equals(MEDIA_ITEM_TYPE_VIDEO)) {
                            itemObj.setType(MediaItem.Type.VIDEO);
                        }

                    }
                    if (item.getUrl() != null) {
                        itemObj.setUrl(item.getUrl());
                    }
                    mediaItemList.add(itemObj);
                }

            }
View Full Code Here


        "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());
    activity.setUrl("http://foo.com/");

    activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
        "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));


    beanXmlConverter = new BeanXStreamConverter(new XStream081Configuration(injector));
  }
View Full Code Here

    johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
        "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
        "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));
    activity.setUrl("http://foo.com");

    beanXmlConverter = new BeanXStreamAtomConverter(
        new XStream081Configuration(injector));
View Full Code Here

    johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
        "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    MediaItemImpl mediaItem = new MediaItemImpl();
    mediaItem.setMimeType("image/jpg");
    mediaItem.setType(MediaItem.Type.IMAGE);
    mediaItem.setUrl("http://foo.bar");
    mediaItem.setLocation(new AddressImpl("Foo bar address"));
    mediaItem.setNumViews("10000");

    activity.setMediaItems(Lists.<MediaItem> newArrayList(mediaItem));
    activity.setUrl("http://foo.com");

    beanXmlConverter = new BeanXStreamAtomConverter(
View Full Code Here

        "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());
    activity.setUrl("http://foo.com/");

    activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
        "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));


    beanXmlConverter = new BeanXStreamConverter(new XStream081Configuration(injector));
  }
View Full Code Here

        new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem>newArrayList(
        new MediaItemImpl("image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));

    beanXmlConverter = new BeanXmlConverter();
  }
View Full Code Here

        new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem>newArrayList(
        new MediaItemImpl("image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));

    beanJsonConverter = new BeanJsonConverter(
        Guice.createInjector(new SocialApiTestsGuiceModule()));
  }
View Full Code Here

    johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
        "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
        "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));
   

    beanXmlConverter = new BeanXStreamConverter(new XStream081Configuration(injector));
  }
View Full Code Here

        new ListFieldImpl("work", "john.doe@work.bar"), new ListFieldImpl("home",
            "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl("image/jpg",
        MediaItem.Type.IMAGE, "http://foo.bar")));

    Injector injector = Guice.createInjector(new JsonLibTestsGuiceModule());
    beanJsonLibConverter = injector.getInstance(BeanJsonLibConverter.class);
View Full Code Here

    johnDoe.setEmails(Lists.<ListField> newArrayList(new ListFieldImpl("work",
        "john.doe@work.bar"), new ListFieldImpl("home", "john.doe@home.bar")));

    activity = new ActivityImpl("activityId", johnDoe.getId());

    activity.setMediaItems(Lists.<MediaItem> newArrayList(new MediaItemImpl(
        "image/jpg", MediaItem.Type.IMAGE, "http://foo.bar")));

    beanXmlConverter = new BeanXStreamAtomConverter(
        new XStream081Configuration(injector));
  }
View Full Code Here

TOP

Related Classes of org.apache.shindig.social.core.model.MediaItemImpl

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.