RecommendationMboxImpl.java
1009 Bytes
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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.commons.json.JSONObject
*/
package com.adobe.cq.targetrecommendations.impl.model;
import com.adobe.cq.targetrecommendations.api.TargetRecommendationsException;
import com.adobe.cq.targetrecommendations.api.model.RecommendationMbox;
import org.apache.sling.commons.json.JSONObject;
public class RecommendationMboxImpl
implements RecommendationMbox {
private String name;
public RecommendationMboxImpl(String name) {
this.name = name;
}
@Override
public String getName() {
return this.name;
}
@Override
public String toJson() throws TargetRecommendationsException {
try {
JSONObject templateJson = new JSONObject();
templateJson.put("name", (Object)this.getName());
return templateJson.toString();
}
catch (Exception e) {
throw new TargetRecommendationsException(e);
}
}
}