Tabnine Logo
ProductData.getMetaDescription
Code IndexAdd Tabnine to your IDE (free)

How to use
getMetaDescription
method
in
io.sphere.sdk.products.ProductData

Best Java code snippets using io.sphere.sdk.products.ProductData.getMetaDescription (Showing top 8 results out of 315)

origin: io.sphere.sdk.jvm/models

@Override
public Optional<LocalizedStrings> getMetaDescription() {
  return productData.getMetaDescription();
}
origin: io.sphere.sdk.jvm/products

@Override
public Optional<LocalizedStrings> getMetaDescription() {
  return productData.getMetaDescription();
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

@Override
@Nullable
public LocalizedString getMetaDescription() {
  return productData.getMetaDescription();
}
origin: io.sphere.sdk.jvm/sphere-models

@Override
@Nullable
public LocalizedString getMetaDescription() {
  return productData.getMetaDescription();
}
origin: commercetools/commercetools-jvm-sdk

@Override
@Nullable
public LocalizedString getMetaDescription() {
  return productData.getMetaDescription();
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void setMetaDescription() throws Exception {
  withUpdateableProduct(client(), product -> {
    final LocalizedString metaDescription = LocalizedString
        .of(ENGLISH, "SPHERE.IO&#8482; is the first Platform-as-a-Service solution for eCommerce.");
    final SetMetaDescription action = SetMetaDescription.of(metaDescription);
    final Product updatedProduct = client().executeBlocking(ProductUpdateCommand.of(product, action));
    assertThat(updatedProduct.getMasterData().getStaged().getMetaDescription()).isEqualTo(metaDescription);
    return updatedProduct;
  });
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void setMetaAttributes() throws Exception {
  withUpdateableProduct(client(), product -> {
    final MetaAttributes metaAttributes = MetaAttributes.metaAttributesOf(ENGLISH,
        "commercetools SPHERE.IO&#8482; - Next generation eCommerce",
        "SPHERE.IO&#8482; is the first and leading Platform-as-a-Service solution for eCommerce.",
        "Platform-as-a-Service, e-commerce, http, api, tool");
    final List<UpdateAction<Product>> updateActions =
        MetaAttributesUpdateActions.of(metaAttributes);
    final Product updatedProduct = client().executeBlocking(ProductUpdateCommand.of(product, updateActions));
    final ProductData productData = updatedProduct.getMasterData().getStaged();
    assertThat(productData.getMetaTitle()).isEqualTo(metaAttributes.getMetaTitle());
    assertThat(productData.getMetaDescription()).isEqualTo(metaAttributes.getMetaDescription());
    assertThat(productData.getMetaKeywords()).isEqualTo(metaAttributes.getMetaKeywords());
    return updatedProduct;
  });
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void productProjectionCanBeUsedToUpdateAProduct() throws Exception {
  withUpdateableProduct(client(), product -> {
    final MetaAttributes metaAttributes = MetaAttributes.metaAttributesOf(ENGLISH,
        "commercetools SPHERE.IO&#8482; - Next generation eCommerce",
        "SPHERE.IO&#8482; is the first and leading Platform-as-a-Service solution for eCommerce.",
        "Platform-as-a-Service, e-commerce, http, api, tool");
    final List<UpdateAction<Product>> updateActions =
        MetaAttributesUpdateActions.of(metaAttributes);
    final ProductProjection productProjection = client().executeBlocking(ProductProjectionByIdGet.of(product, STAGED));
    final Product updatedProduct = client().executeBlocking(ProductUpdateCommand.of(productProjection, updateActions));
    final ProductData productData = updatedProduct.getMasterData().getStaged();
    assertThat(productData.getMetaTitle()).isEqualTo(metaAttributes.getMetaTitle());
    assertThat(productData.getMetaDescription()).isEqualTo(metaAttributes.getMetaDescription());
    assertThat(productData.getMetaKeywords()).isEqualTo(metaAttributes.getMetaKeywords());
    return updatedProduct;
  });
}
io.sphere.sdk.productsProductDatagetMetaDescription

Popular methods of ProductData

  • getCategories
  • getDescription
  • getMasterVariant
  • getMetaKeywords
  • getMetaTitle
  • getName
  • getSlug
  • getVariants
  • getSearchKeywords
  • getCategoryOrderHints
  • getAllVariants
  • getAllVariants

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JLabel (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now