DefaultProductRelationship.java
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* 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;
}
}