Package com.google.livingstories.client

Examples of com.google.livingstories.client.PlayerContentItem


    addOrCreateButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        String playerName = textBox.getText();
        PlayerContentItem selectedPlayer = nameToPlayerMap.get(playerName);
        if (selectedPlayer == null) {
          onTheFlyPlayerBox.open(playerName, addOrCreateButton);
        } else {
          callbackWork.onSuccess(selectedPlayer);
          clear();
View Full Code Here


            aliasList.add(trimmed);
          }
        }
       
        // Collections.emptySet() and Collections.emptyList() don't serialize properly.
        PlayerContentItem player = new PlayerContentItem(null, new Date(), new HashSet<Long>(),
            bioArea.getText(), Importance.MEDIUM, nameBox.getText(), aliasList,
            typeSelector.getSelectedConstant(), photo);
        // Kinda broken, but this isn't done automatically:
        player.setLocation(new Location(null, null, ""));
        player.setPublishState(PublishState.PUBLISHED);
        problemLabel.setVisible(false);
        contentService.createOrChangeContentItem(player, new AsyncCallback<BaseContentItem>() {
          @Override
          public void onFailure(Throwable caught) {
            problemLabel.setVisible(true);
View Full Code Here

      @Override
      public void onFailure(Throwable caught) {}
         
      @Override
      public void onSuccess(BaseContentItem result) {
        PlayerContentItem contributor = (PlayerContentItem)result;
        addUnassignedPlayer(contributor);
        currentContributorIdsToNamesMap.put(result.getId(), contributor.getName());
        formatCurrentContributorList();
      }
    });
   
    if (unassignedPlayersIdToContentItemMap == null) {
View Full Code Here

            updateEditor.setText(eventContentItem.getEventUpdate());
            summaryEditor.setContent(eventContentItem.getEventSummary());
            break;
          case PLAYER:
            if (selectedContentItem.getLivingStoryId() == null) {
              PlayerContentItem playerContentItem = (PlayerContentItem) selectedContentItem;
              nameTextBox.setText(playerContentItem.getName());
              aliasesTextBox.setText(GlobalUtil.join(",", playerContentItem.getAliases()));
              playerTypeSelector.selectConstant(playerContentItem.getPlayerType());
              photoSelector.setSelection(playerContentItem.getPhotoContentItem());
            } else {
              parentPlayer =
                  ((StoryPlayerContentItem) selectedContentItem).getParentPlayerContentItem();
              formatParentPlayerDisplay();
            }
View Full Code Here

                && (photoContentItem.getContentItemType() != ContentItemType.ASSET
                || ((AssetContentItem) photoContentItem).getAssetType() != AssetType.IMAGE)) {
              showInputError("Player photo must be an image");
              return;
            }
            contentItem = new PlayerContentItem(contentItemId, creationDate, currentContributorIds,
                content, importance, nameString, aliasList,
                playerTypeSelector.getSelectedConstant(), (AssetContentItem) photoContentItem);
          } else {
            if (parentPlayer == null) {
              showInputError("Parent player must be chosen or created");
View Full Code Here

        setEventUpdate(fixLinks(trimWithBrs(eventContentItem.getEventUpdate())));
        setEventSummary(fixLinks(trimWithBrs(eventContentItem.getEventSummary())));
        break;
      case PLAYER:
        if (clientContentItem.getLivingStoryId() == null) {
          PlayerContentItem playerContentItem = (PlayerContentItem) clientContentItem;
          setName(playerContentItem.getName());
          setAliases(playerContentItem.getAliases());
          setPlayerType(playerContentItem.getPlayerType());
          setPhotoContentEntityId(playerContentItem.getPhotoContentItemId());
        } else {
          StoryPlayerContentItem storyPlayerContentItem =
              (StoryPlayerContentItem) clientContentItem;
          setParentPlayerContentEntityId(
              storyPlayerContentItem.getParentPlayerContentItem().getId());
View Full Code Here

                  getPhotoContentEntityId(), false);
            } catch (JDOException ex) {
              // leave photoContentItem as null;
            }
          }
          return new PlayerContentItem(getId(), getTimestamp(), getContributorIds(), getContent(),
              getImportance(), getName(), getAliases(), getPlayerType(), photoContentItem);
        } else {
          return new StoryPlayerContentItem(getId(), getTimestamp(), getContributorIds(),
              getContent(), getImportance(), livingStoryId,
              (PlayerContentItem) new ContentRpcImpl().getContentItem(
View Full Code Here

TOP

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

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.