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

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

Gets a list of all subscribable categories with information about subscriptions for a specific address.

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

public static ReadOnlyCollection<SubscriptionDefinitionListItem> SubscriptionsWithUserData(
	ConnectionId connectionId,
	SessionId sessionId,
	SubscriptionType subscriptionType,
	string address,
	SubscriberAddressType addressType,
	bool includeDisabled
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value typically is retrieved from a call to the OpenSession method
subscriptionType
Type: ContentStudio.Document.SubscriptionSubscriptionType
Type of the subscription.
address
Type: SystemString
The subscriber's address.
addressType
Type: ContentStudio.Document.SubscriptionSubscriberAddressType
The type of address represented by the parameter.
includeDisabled
Type: SystemBoolean
Defines whether the list includes disabled subscription definitions where the subscriber still have a subscription.

Return Value

Type: ReadOnlyCollectionSubscriptionDefinitionListItem
A ReadOnlyCollectionT of SubscriptionDefinitionListItem object that represents a the subscriptions that the subscriber has subscribed to.

Return Value

Type: ReadOnlyCollectionSubscriptionDefinitionListItem
Exceptions

ExceptionCondition
SqlExceptionAn error occurred when executing the command against the Content Studio database
NotSupportedExceptionThe value of the subscriptionType or addressType is not supported.
Content Studio permissions

Anyone, including anonymous caller, can successfully execute this method.
Remarks

SubscriptionsWithUserData can be used when building a "My existing and possible subscriptions" application. For example a developer might want to display a list of checkboxes that represents all subscribable categories, where the checkboxes are checked for each subscription that the subscriber already subscribes to.

This method combines the result from the SubscriptionsBySubscriber(ConnectionId, SessionId, String, SubscriberAddressType, Boolean) and GetList(ConnectionId, SessionId, SubscriptionType) methods. All found items from SubscriptionsBySubscriber(ConnectionId, SessionId, String, SubscriberAddressType, Boolean) are kept while any duplicates are removed from GetList(ConnectionId, SessionId, SubscriptionType). The documents are joined together and sorted by name.

The returned list of SubscriptionDefinitionListItem objects can represent a subscribable category where a subscriber (represented by the address parameter) has or has not a subscription. If there is a subscription the Subscription property will contain a SubscriptionInfo object with information about the subscription. Otherwise this property will be null (Nothing in Visual Basic).

See Also

Reference