Package com.google.livingstories.client

Examples of com.google.livingstories.client.EventContentItem


        parentPlayer = null;
        formatParentPlayerDisplay();

        switch (selectedContentItem.getContentItemType()) {
          case EVENT:
            EventContentItem eventContentItem = (EventContentItem) selectedContentItem;
            Date startDate = eventContentItem.getEventStartDate();
            Date endDate = eventContentItem.getEventEndDate();
            if (startDate == null) {
              startDate = new Date();
            }
            startDatePicker.setValue(startDate);
            startDatePicker.setCurrentMonth(startDatePicker.getValue());
            startTime.setValue(DateUtil.formatTime(startDate));
            hasSeparateEndDate.setValue(endDate != null, true);
            endDatePicker.setValue(endDate == null ? startDatePicker.getValue() : endDate);
            endDatePicker.setCurrentMonth(endDatePicker.getValue());
            endTime.setText(endDate == null ? startTime.getText() : DateUtil.formatTime(endDate));
            setDateTriggerText();
            updateEditor.setText(eventContentItem.getEventUpdate());
            summaryEditor.setContent(eventContentItem.getEventSummary());
            break;
          case PLAYER:
            if (selectedContentItem.getLivingStoryId() == null) {
              PlayerContentItem playerContentItem = (PlayerContentItem) selectedContentItem;
              nameTextBox.setText(playerContentItem.getName());
View Full Code Here


          String update = updateEditor.getText().trim();
          if (update.isEmpty()) {
            showInputError("Event update cannot be empty.");
            return;
          }
          contentItem = new EventContentItem(contentItemId, creationDate, currentContributorIds,
              importance, livingStoryId, startDate, endDate, update, summaryEditor.getContent(),
              content);
          break;
        case PLAYER:
          if (livingStoryId == null) {
View Full Code Here

*/
public class SummarySnippetWidget extends Composite {
  public static SummarySnippetWidget create(BaseContentItem contentItem) {
    if (contentItem.getImportance() != Importance.LOW) {
      if (contentItem.getContentItemType() == ContentItemType.EVENT) {
        EventContentItem event = (EventContentItem) contentItem;
        if (!GlobalUtil.isContentEmpty(event.getEventSummary())) {
          return new SummarySnippetWidget(event);
        }
      } else if (contentItem.getContentItemType() == ContentItemType.NARRATIVE) {
        NarrativeContentItem narrative = (NarrativeContentItem) contentItem;
        if (!GlobalUtil.isContentEmpty(narrative.getNarrativeSummary())
View Full Code Here

      @SuppressWarnings("unchecked")
      List<BaseContentEntity> results =
          (List<BaseContentEntity>) query.execute(livingStoryId);
      List<EventContentItem> events = new ArrayList<EventContentItem>();
      for (BaseContentEntity result : results) {
        EventContentItem event = (EventContentItem) result.toClientObject();
        events.add(event);
      }
      Collections.sort(events, BaseContentItem.REVERSE_COMPARATOR);
      return events;
    } finally {
View Full Code Here

        NarrativeContentItem narrative = (NarrativeContentItem)update;
        headline = new Anchor(narrative.getHeadline() + "<span class=\"greyFont\">&nbsp;-&nbsp;"
            + narrative.getNarrativeType().toString(),
            true, getStoryUrl(story) + getUpdateUrl(narrative));
      } else {
        EventContentItem event = (EventContentItem)update;
        headline = new Anchor(event.getEventUpdate(), true,
            getStoryUrl(story) + getUpdateUrl(event));
      }
      DOM.setStyleAttribute(headline.getElement(), "paddingLeft", "5px");
      panel.add(headline);
     
View Full Code Here

    setLocation(clientContentItem.getLocation());
    setSourceDescription(clientContentItem.getSourceDescription());
    setSourceContentEntityId(clientContentItem.getSourceContentItemId());
    switch (clientContentItem.getContentItemType()) {
      case EVENT:
        EventContentItem eventContentItem = (EventContentItem) clientContentItem;
        setEventStartDate(eventContentItem.getEventStartDate());
        setEventEndDate(eventContentItem.getEventEndDate());
        setEventUpdate(fixLinks(trimWithBrs(eventContentItem.getEventUpdate())));
        setEventSummary(fixLinks(trimWithBrs(eventContentItem.getEventSummary())));
        break;
      case PLAYER:
        if (clientContentItem.getLivingStoryId() == null) {
          PlayerContentItem playerContentItem = (PlayerContentItem) clientContentItem;
          setName(playerContentItem.getName());
View Full Code Here

    switch (getContentItemType()) {
      case EVENT:
        if (getEventUpdate().isEmpty()) {
          return new DefaultContentItem(getId(), getLivingStoryId());
        } else {
          return new EventContentItem(getId(), getTimestamp(), getContributorIds(),
              getImportance(), getLivingStoryId(), getEventStartDate(), getEventEndDate(),
              getEventUpdate(), getEventSummary(), getContent());
        }
      case PLAYER:
        Long livingStoryId = getLivingStoryId();
View Full Code Here

    List<SyndEntry> items = Lists.newArrayList();
    for (BaseContentItem update : updates) {
      SyndContent title = new SyndContentImpl();
      SyndContent content = new SyndContentImpl();
      if (update.getContentItemType() == ContentItemType.EVENT) {
        EventContentItem event = (EventContentItem) update;
        title.setType("text/html");
        title.setValue(event.getEventUpdate());
        content.setType("text/html");
        content.setValue(StringUtil.stripForExternalSites(event.getEventSummary()));
      } else if (update.getContentItemType() == ContentItemType.NARRATIVE) {
        NarrativeContentItem narrative = (NarrativeContentItem) update;
        title.setType("text/html");
        title.setValue(narrative.getHeadline() + "&nbsp;-&nbsp;"
            + narrative.getNarrativeType().toString());
View Full Code Here

TOP

Related Classes of com.google.livingstories.client.EventContentItem

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.