package com.atlassian.stash.internal.rest.renderer;

import com.atlassian.bitbucket.rest.enrich.AvatarEnricher;
import com.atlassian.bitbucket.rest.enrich.LinkEnricher;
import com.atlassian.bitbucket.rest.enrich.MarkupEnricher;
import com.atlassian.json.marshal.JsonableMarshaller;
import com.atlassian.bitbucket.nav.NavBuilder;
import com.atlassian.bitbucket.request.RequestManager;

/**
 * Renders model objects to JSON strings on demand. Only model objects with a known JSON surrogate
 * (typically a Rest* class) will be rendered.
 */
public class CommonRestJsonRenderer extends BaseSurrogateJsonRenderer {

    public CommonRestJsonRenderer(NavBuilder navBuilder,
                                  RequestManager requestManager,
                                  AvatarEnricher avatarEnricher,
                                  MarkupEnricher markupEnricher,
                                  LinkEnricher linkEnricher,
                                  JsonableMarshaller jsonableMarshaller) {
        super(requestManager, new CommonRestAggregateBuilder(navBuilder, jsonableMarshaller), avatarEnricher, markupEnricher, linkEnricher);
    }
}
