NativeSubscriptionManagerSaveSubscriptionDetails Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Saves the subscription details for a category.

Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void SaveSubscriptionDetails(
	CategoryId categoryId,
	SubscriptionType subscriptionType,
	Nullable<bool> enabled,
	string sender,
	string eventHandlerMoniker,
	string siteUrl,
	string serverName,
	AuthenticationSchemes authenticationSchema,
	Nullable<int> presentationTemplate,
	Nullable<int> timeout,
	string scheduleXml,
	string propertyXml
)

Parameters

categoryId
Type: ContentStudio.DocumentCategoryId
An identifier to the category to get information for.
subscriptionType
Type: ContentStudio.Document.SubscriptionSubscriptionType
The type of the subscription to return. Currently only Newsletter is valid.
enabled
Type: SystemNullableBoolean
A value that specifies whether the subscription is enabled or not.

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated.

sender
Type: SystemString
Information about the sender. For email subscriptions this should be the sender's email address

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated.

This parameter cannot exceed MaxSenderDataLength characters in length.
eventHandlerMoniker
Type: SystemString
A .NET moniker that specifies an implementation of a custom event handler. This event handler implements the ICSAsyncEventHandler interface. If specified Content Studio Service Manager will use this implementation when executing the OnSubscription event.

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated.

This parameter cannot exceed MaxEventHandlerMonikerDataLength characters in length.
siteUrl
Type: SystemString
The url to the site to use when locating documents to be sent out. This is the site url or one of the alternate url:s.
serverName
Type: SystemString

Defines the name of the SMTP server to use.

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated. If the parameter has a value it must be valid xml and comply with the schema.

authenticationSchema
Type: System.NetAuthenticationSchemes
Defines how the event handler should authenticate against the SMTP server. This value can be set to None if no change should be made or if the default value should be used.
presentationTemplate
Type: SystemNullableInt32
A presentation template to use when presenting the document to be sent out. By default this value is zero (0) which indicates that the default presentation template should be used.

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated. If this parameter is zero no presentation template or the default presentation template is used.

timeout
Type: SystemNullableInt32
This value can be used by the event handler implementation if it implements a time out mechanism. This value should be measured in seconds and the value zero should indicate infinite. Negative values should not be allowed. By default this value is zero (0).

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated. If this parameter is zero no timeout or the default value is used.

scheduleXml
Type: SystemString
The schedule Xml. For more info about this parameter see the GetSubscriptionDetails(CategoryId, SubscriptionType) method documentation.

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated. If the parameter has a value it must be valid xml and comply with the schema.

propertyXml
Type: SystemString
The properties xml. For more info about this parameter see the GetSubscriptionDetails(CategoryId, SubscriptionType) method documentation.

This parameter can be null (Nothing) in Visual Basic to use the default value or if the value should not be updated. If the parameter has a value it must be valid xml and comply with the schema.

Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
CSPermissionDeniedExceptionThe caller has no permission to perform the requested action
CSInvalidSessionExceptionThe session is invalid
CSInvalidParameterExceptionA parameter has an invalid value
NotSupportedException The value of the subscriptionType is not supported. - or - The type of category represented by categoryId is not supported for subscriptions.
ArgumentOutOfRangeException The length of either the eventHandlerMoniker or the sender parameters exceeds the allowed length. or the timeout parameter is negative.
XmlException Either the scheduleXml or the propertyXml is not null (Nothing in Visual Basic) and contains invalid xml or does not comply with the schema.
SqlExceptionAn error occurred when executing the command against the Content Studio database
InvalidEnumArgumentExceptionThe authenticationSchema has an unsupported value.
Content Studio permissions

WriteContainer permission on the category is required.

This method can also successfully be executed by sessions that have the ServiceQueueAdmin global right.

Remarks

Note Note
This method is new in Content Studio version 5.2

If possible use the high-level SubscriptionDefinition class when working with subscription definitions. SubscriptionDefinition provides an object oriented way of programming which is far more easy to use.

See Also

Reference