Пример #1
0
  private BtVodEntry episodeRow(String title, String guid) {
    BtVodEntry entry = new BtVodEntry();
    entry.setGuid(guid);
    entry.setId(PRODUCT_ID);
    entry.setTitle(title);
    entry.setProductOfferStartDate(1364774400000L); // "Apr  1 2013 12:00AM"
    entry.setProductOfferEndDate(1398816000000L); // "Apr 30 2014 12:00AM"
    entry.setDescription(SYNOPSIS);
    entry.setProductType("episode");
    entry.setProductPricingPlan(new BtVodProductPricingPlan());
    entry.setProductTrailerMediaId(TRAILER_URI);
    BtVodProductScope productScope = new BtVodProductScope();
    BtVodProductMetadata productMetadata = new BtVodProductMetadata();
    productMetadata.setEpisodeNumber("1");
    productScope.setProductMetadata(productMetadata);
    entry.setProductScopes(ImmutableList.of(productScope));
    entry.setProductRatings(ImmutableList.<BtVodProductRating>of());
    BtVodPlproduct$productTag tag = new BtVodPlproduct$productTag();
    tag.setPlproduct$scheme("subscription");
    tag.setPlproduct$title(SUBSCRIPTION_CODE);

    BtVodPlproduct$productTag trailerCdnAvailabilityTag = new BtVodPlproduct$productTag();
    trailerCdnAvailabilityTag.setPlproduct$scheme("trailerServiceType");
    trailerCdnAvailabilityTag.setPlproduct$title("OTG");

    BtVodPlproduct$productTag itemCdnAvailabilityTag = new BtVodPlproduct$productTag();
    itemCdnAvailabilityTag.setPlproduct$scheme("serviceType");
    itemCdnAvailabilityTag.setPlproduct$title("OTG");

    BtVodPlproduct$productTag itemMasterAgreementAvailabilityTag = new BtVodPlproduct$productTag();
    itemMasterAgreementAvailabilityTag.setPlproduct$scheme("masterAgreementOtgTvodPlay");
    itemMasterAgreementAvailabilityTag.setPlproduct$title("TRUE");

    entry.setProductTags(
        ImmutableList.of(
            tag,
            trailerCdnAvailabilityTag,
            itemCdnAvailabilityTag,
            itemMasterAgreementAvailabilityTag));

    return entry;
  }
Пример #2
0
  private BtVodEntry filmRow(String title) {
    BtVodEntry entry = new BtVodEntry();
    entry.setGuid(PRODUCT_GUID);
    entry.setId(PRODUCT_ID);
    entry.setTitle(title);
    entry.setProductOfferStartDate(
        new DateTime(2013, DateTimeConstants.APRIL, 1, 0, 0, 0, 0).getMillis());
    entry.setProductOfferEndDate(
        new DateTime(2014, DateTimeConstants.APRIL, 30, 0, 0, 0).getMillis());
    entry.setDescription(SYNOPSIS);
    entry.setProductType("film");
    entry.setProductPricingPlan(new BtVodProductPricingPlan());
    entry.setProductTrailerMediaId(TRAILER_URI);
    BtVodProductScope productScope = new BtVodProductScope();
    BtVodProductMetadata productMetadata = new BtVodProductMetadata();
    productMetadata.setReleaseYear("2015");
    productScope.setProductMetadata(productMetadata);
    entry.setProductScopes(ImmutableList.of(productScope));
    entry.setProductRatings(ImmutableList.<BtVodProductRating>of());
    BtVodPlproduct$productTag tag = new BtVodPlproduct$productTag();
    tag.setPlproduct$scheme("subscription");
    tag.setPlproduct$title(SUBSCRIPTION_CODE);

    BtVodPlproduct$productTag itemCdnAvailabilityTag = new BtVodPlproduct$productTag();
    itemCdnAvailabilityTag.setPlproduct$scheme("serviceType");
    itemCdnAvailabilityTag.setPlproduct$title("OTG");

    BtVodPlproduct$productTag itemMasterAgreementAvailabilityTag = new BtVodPlproduct$productTag();
    itemMasterAgreementAvailabilityTag.setPlproduct$scheme("masterAgreementOtgTvodPlay");
    itemMasterAgreementAvailabilityTag.setPlproduct$title("TRUE");

    entry.setProductTags(
        ImmutableList.of(tag, itemCdnAvailabilityTag, itemMasterAgreementAvailabilityTag));

    return entry;
  }