Class ContentChannelService
Web service for ContentChannel access
Inheritance
Namespace: EPiServer.WebServices
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class ContentChannelService : WebService
Constructors
ContentChannelService()
Declaration
public ContentChannelService()
ContentChannelService(IContentChannelHandler, IContentRepository)
Declaration
public ContentChannelService(IContentChannelHandler handler, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
IContentChannelHandler | handler | |
IContentRepository | contentRepository |
Methods
AppendDataToFile(String, String, Byte[], Boolean)
Appends data to an existing file.
Declaration
public void AppendDataToFile(string channelId, string virtualFilePath, byte[] data, bool expectMoreData)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | virtualFilePath | The virtual file path. |
System.Byte[] | data | The data to append. |
System.Boolean | expectMoreData | if set to |
DeleteContent(String, Guid)
Deletes the content instance with given id.
Declaration
public void DeleteContent(string channelId, Guid contentId)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Guid | contentId | The content id. |
DeleteContentLanguage(String, Guid, String)
Deletes specified language version for given content.
Declaration
public void DeleteContentLanguage(string channelId, Guid contentId, string cultureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Guid | contentId | The content id. |
System.String | cultureName | Name of the language to delete. |
DeleteDirectory(String, String)
Deletes the directory with specified virtual path.
Declaration
public void DeleteDirectory(string channelId, string virtualFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | virtualFilePath | The virtual file path. |
DeleteFile(String, Guid, String)
Deletes the file with given name from a page folder.
Declaration
public void DeleteFile(string channelId, Guid pageId, string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Guid | pageId | The page id of the related page. |
System.String | fileName | Name of the file. |
DeleteFile(String, String)
Deletes the file with specified virtual path.
Declaration
public void DeleteFile(string channelId, string virtualFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | virtualFilePath | The virtual file path. |
DeletePage(String, Guid)
Deletes the page with given id.
Declaration
[Obsolete("Use overload DeleteContent instead", false)]
public void DeletePage(string channelId, Guid pageId)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Guid | pageId | The page id. |
DeletePageLanguage(String, Guid, String)
Deletes specified language version for given page.
Declaration
[Obsolete("Use overload DeleteContentLanguage instead", false)]
public void DeletePageLanguage(string channelId, Guid pageId, string cultureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Guid | pageId | The page id. |
System.String | cultureName | Name of the language to delete. |
GetMaxRequestLength()
Gets the maximum request length that the site is configured to accept.
Declaration
public long GetMaxRequestLength()
Returns
Type | Description |
---|---|
System.Int64 | Size of data |
ImportContent(String, String, String[], String[])
Imports the passed in data as a content item in CMS.
Declaration
public Guid ImportContent(string channelId, string contentName, string[] propertyKeys, string[] propertyValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | contentName | Name of the content. |
System.String[] | propertyKeys | The property keys. |
System.String[] | propertyValues | The property values. |
Returns
Type | Description |
---|---|
System.Guid | The identity of the content. |
ImportContent(String, String, String[], String[], String, Guid, Guid, String)
Imports the passed in data as a content instance.
Declaration
public Guid ImportContent(string channelId, string contentName, string[] propertyKeys, string[] propertyValues, string cultureName, Guid contentId, Guid parentContentId, string contentTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | contentName | Name of the content. |
System.String[] | propertyKeys | The property keys. |
System.String[] | propertyValues | The property values. |
System.String | cultureName | The language for the content. |
System.Guid | contentId | The content id. |
System.Guid | parentContentId | The parent content id. |
System.String | contentTypeName | Name of the content type. |
Returns
Type | Description |
---|---|
System.Guid | The identity for the content. |
ImportFile(String, Byte[], Boolean, Guid, String, String[], String[])
Imports the passed in data as a unified file or as a content based file depending on file root on channel.
Declaration
public string ImportFile(string channelId, byte[] data, bool expectMoreData, Guid fileId, string channelRelativeFilePath, string[] metadataKeys, string[] metadataValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Byte[] | data | The data that will be written to the file. |
System.Boolean | expectMoreData | if set to |
System.Guid | fileId | The file id. |
System.String | channelRelativeFilePath | The channel relative file path. |
System.String[] | metadataKeys | The keys for metadata |
System.String[] | metadataValues | The values for metadata. |
Returns
Type | Description |
---|---|
System.String | The virtual path to the imported file. |
ImportFile(String, Byte[], Boolean, Guid, String, String[], String[], Guid)
Imports the passed in data as a content related unified file or as a content based file depending on channel setting StoreContentResourcesInVpp.
Declaration
public string ImportFile(string channelId, byte[] data, bool expectMoreData, Guid fileId, string fileName, string[] metadataKeys, string[] metadataValues, Guid contentId)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Byte[] | data | The data that will be written to the file. |
System.Boolean | expectMoreData | if set to |
System.Guid | fileId | The file id. |
System.String | fileName | Name of the file. |
System.String[] | metadataKeys | The keys for metadata |
System.String[] | metadataValues | The values for metadata. |
System.Guid | contentId | The content id. |
Returns
Type | Description |
---|---|
System.String | The virtual path to the imported file. |
ImportFile(String, Byte[], Boolean, Guid, String, String[], String[], Int32)
Imports the passed in data as a content related unified file or as a content based file depending on channel setting StoreContentResourcesInVpp.
Declaration
public string ImportFile(string channelId, byte[] data, bool expectMoreData, Guid fileId, string fileName, string[] metadataKeys, string[] metadataValues, int pageId)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Byte[] | data | The data that will be written to the file. |
System.Boolean | expectMoreData | if set to |
System.Guid | fileId | The file id. |
System.String | fileName | Name of the file. |
System.String[] | metadataKeys | The keys for metadata |
System.String[] | metadataValues | The values for metadata. |
System.Int32 | pageId | The integer based id of the page that this file is related to. |
Returns
Type | Description |
---|---|
System.String | The virtual path to the imported file. |
ImportFile(String, Byte[], Boolean, String)
Imports the passed in data as a unified file or as a content based file depending on file root on channel.
Declaration
public string ImportFile(string channelId, byte[] data, bool expectMoreData, string channelRelativeFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.Byte[] | data | The data that will be written to file. |
System.Boolean | expectMoreData | if set to |
System.String | channelRelativeFilePath | The channel relative file path. |
Returns
Type | Description |
---|---|
System.String | The virtual path to the imported file. |
ImportFileMetadata(String, String, String[], String[])
Imports the metadata to an existing file.
Declaration
public string ImportFileMetadata(string channelId, string virtualFilePath, string[] metadataKeys, string[] metadataValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | virtualFilePath | The virtual file path. |
System.String[] | metadataKeys | The metadata keys. |
System.String[] | metadataValues | The metadata values. |
Returns
Type | Description |
---|---|
System.String | The virtual path to the imported file. |
ImportPage(String, String, String[], String[])
Imports the passed in data as a page.
Declaration
[Obsolete("Use overload ImportContent instead", false)]
public Guid ImportPage(string channelId, string pageName, string[] propertyKeys, string[] propertyValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | pageName | Name of the page. |
System.String[] | propertyKeys | The property keys. |
System.String[] | propertyValues | The property values. |
Returns
Type | Description |
---|---|
System.Guid | The identity of the page. |
ImportPage(String, String, String[], String[], String, Guid, Guid, String)
Imports the passed in data as a page.
Declaration
[Obsolete("Use overload ImportContent instead", false)]
public Guid ImportPage(string channelId, string pageName, string[] propertyKeys, string[] propertyValues, string cultureName, Guid pageId, Guid parentPageId, string pageTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | channelId | The channel id. |
System.String | pageName | Name of the page. |
System.String[] | propertyKeys | The property keys. |
System.String[] | propertyValues | The property values. |
System.String | cultureName | The language for the page. |
System.Guid | pageId | The page id. |
System.Guid | parentPageId | The parent page id. |
System.String | pageTypeName | Name of the page type. |
Returns
Type | Description |
---|---|
System.Guid | The identity for the page. |
ValidateWebServiceAccess()
Validates that the caller has been granted web service access.
Declaration
public void ValidateWebServiceAccess()