package ru.yandex.wmconsole.data.wrappers;

import ru.yandex.wmconsole.data.info.NotificationTypeInfo;
import ru.yandex.wmtools.common.util.XmlDataWrapper;

/**
 * @author avhaliullin
 */
public class NotificationTypeInfoWrapper extends XmlDataWrapper<NotificationTypeInfo> {
    private static final String TAG_ROOT = "notification-type";
    private static final String ATTRIBUTE_SERVICE_NAME = "service";

    public NotificationTypeInfoWrapper(NotificationTypeInfo data) {
        super(data, TAG_ROOT, ATTRIBUTE_SERVICE_NAME, data.getServiceName());
    }

    @Override
    protected void doToXml(StringBuilder result) {
        result.append(data.getType());
    }
}
