<back to all web services

ChangeTemplateDto

The following routes are available for this service:
PUT/RestApi/Sitefinity/mobile-formats/templates/change
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class ChangeTemplateDto
    {
        public ArrayList<ChangeTemplateInfoDto> TemplatesInfo = null;
        public String SiteId = null;
        public String ContentTypeId = null;
        
        public ArrayList<ChangeTemplateInfoDto> getTemplatesInfo() { return TemplatesInfo; }
        public ChangeTemplateDto setTemplatesInfo(ArrayList<ChangeTemplateInfoDto> value) { this.TemplatesInfo = value; return this; }
        public String getSiteId() { return SiteId; }
        public ChangeTemplateDto setSiteId(String value) { this.SiteId = value; return this; }
        public String getContentTypeId() { return ContentTypeId; }
        public ChangeTemplateDto setContentTypeId(String value) { this.ContentTypeId = value; return this; }
    }

    public static class ChangeTemplateInfoDto
    {
        public MobileFormatTemplateDto SelectedTemplate = null;
        public MobileFormatTemplateDto SelectedLayoutTemplate = null;
        public Boolean UseCustomCanonicalUrl = null;
        public String CustomCanonicalUrlFormat = null;
        public String MobileFormatId = null;
        
        public MobileFormatTemplateDto getSelectedTemplate() { return SelectedTemplate; }
        public ChangeTemplateInfoDto setSelectedTemplate(MobileFormatTemplateDto value) { this.SelectedTemplate = value; return this; }
        public MobileFormatTemplateDto getSelectedLayoutTemplate() { return SelectedLayoutTemplate; }
        public ChangeTemplateInfoDto setSelectedLayoutTemplate(MobileFormatTemplateDto value) { this.SelectedLayoutTemplate = value; return this; }
        public Boolean isUseCustomCanonicalUrl() { return UseCustomCanonicalUrl; }
        public ChangeTemplateInfoDto setUseCustomCanonicalUrl(Boolean value) { this.UseCustomCanonicalUrl = value; return this; }
        public String getCustomCanonicalUrlFormat() { return CustomCanonicalUrlFormat; }
        public ChangeTemplateInfoDto setCustomCanonicalUrlFormat(String value) { this.CustomCanonicalUrlFormat = value; return this; }
        public String getMobileFormatId() { return MobileFormatId; }
        public ChangeTemplateInfoDto setMobileFormatId(String value) { this.MobileFormatId = value; return this; }
    }

    public static class MobileFormatTemplateDto
    {
        public String Name = null;
        public String Value = null;
        
        public String getName() { return Name; }
        public MobileFormatTemplateDto setName(String value) { this.Name = value; return this; }
        public String getValue() { return Value; }
        public MobileFormatTemplateDto setValue(String value) { this.Value = value; return this; }
    }

}

Java ChangeTemplateDto DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /RestApi/Sitefinity/mobile-formats/templates/change HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"SiteId":"String","ContentTypeId":"String"}