All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.products.ProductData Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show newest version
package io.sphere.sdk.products;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.categories.Category;
import io.sphere.sdk.models.LocalizedStrings;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.search.SearchKeywords;

import java.util.List;
import java.util.Optional;

/**
 * For construction in unit tests use {@link io.sphere.sdk.products.ProductDataBuilder}.
 */
@JsonDeserialize(as=ProductDataImpl.class)
public interface ProductData extends ProductDataLike {
    @Override
    public LocalizedStrings getName();

    @Override
    public List> getCategories();

    @Override
    public Optional getDescription();

    @Override
    public LocalizedStrings getSlug();

    @Override
    public Optional getMetaTitle();

    @Override
    public Optional getMetaDescription();

    @Override
    public Optional getMetaKeywords();

    @Override
    public ProductVariant getMasterVariant();

    @Override
    public List getVariants();

    @Override
    default List getAllVariants() {
        return ProductsPackage.getAllVariants(this);
    }

    @Override
    default Optional getVariant(final int variantId){
        return ProductsPackage.getVariant(variantId, this);
    }

    @Override
    default ProductVariant getVariantOrMaster(final int variantId) {
        return ProductsPackage.getVariantOrMaster(variantId, this);
    }

    @Override
    SearchKeywords getSearchKeywords();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy