DefaultProductRelationship.java 1.34 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.sling.api.resource.ValueMap
 *  org.apache.sling.api.wrappers.ValueMapDecorator
 */
package com.adobe.cq.commerce.common;

import com.adobe.cq.commerce.api.Product;
import com.adobe.cq.commerce.api.ProductRelationship;
import java.util.HashMap;
import java.util.Map;
import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.api.wrappers.ValueMapDecorator;

public class DefaultProductRelationship
implements ProductRelationship {
    protected String relationshipType;
    protected String relationshipTitle;
    protected Product product;
    protected ValueMap metadata;

    public DefaultProductRelationship(String relationshipType, String relationshipTitle, Product product) {
        this.relationshipType = relationshipType;
        this.relationshipTitle = relationshipTitle;
        this.product = product;
        this.metadata = new ValueMapDecorator(new HashMap());
    }

    @Override
    public String getRelationshipType() {
        return this.relationshipType;
    }

    @Override
    public String getRelationshipTitle() {
        return this.relationshipTitle;
    }

    @Override
    public Product getProduct() {
        return this.product;
    }

    @Override
    public ValueMap getMetadata() {
        return this.metadata;
    }
}