RecommendationMboxImpl.java 1009 Bytes
/*
 * 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);
        }
    }
}