All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lionbridge.content.sdk.models.templates.AddProjectTemplate Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.lionbridge.content.sdk.models.templates;

import com.lionbridge.content.sdk.models.TranslationOptions;

import java.util.List;

import static com.lionbridge.content.sdk.utilities.XmlUtils.appendXmlTag;

public class AddProjectTemplate extends GenerateQuoteTemplate {
	private String projectName;

	public AddProjectTemplate(String projectName, TranslationOptions options, List fileAssetIds, List referenceFileAssetIds, List notifications) {
		super(fileAssetIds, referenceFileAssetIds, options);

        this.projectName = projectName;

        if (null != notifications) {
            this.addToNotifications(notifications);
        }
    }
	
	public String toXmlString() {
		StringBuilder builder = new StringBuilder();

		builder.append("");
		builder = appendXmlTag(builder, "ProjectName", projectName);
		builder.append(getTranslationOptions().toXmlString());

		if (hasFiles()) {
            appendXmlTag(builder, "Files", filesAsXml(getFiles(), false));
		}

		if (hasReferenceFiles()) {
            appendXmlTag(builder, "ReferenceFiles", filesAsXml(getReferenceFiles(), true));
        }

        builder = appendNofiticationsXml(builder);

        builder.append("");

		return builder.toString();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy