NativeSubscriptionManagerGetSubscriptionDetails Method (CategoryId, SubscriptionType) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Gets subscription definition data for a category using a specific category identifier and type of subscription.

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

public string GetSubscriptionDetails(
	CategoryId categoryId,
	SubscriptionType subscriptionType
)

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.

Return Value

Type: String

Xml with the following syntax.

<root>
    <status>0</status>
    <statustext>Success</statustext>
    <category documenttype="XmlDocument"
             categoryid="2"
             identifier="",
             name="AS_Document"
             description=""
             enabled="0"
             sender=""
             eventhandlermoniker=""
             presentationtemplate=""
             siteurl=""
             authenticationschema=""
             servernameusername=&quot;&quot;
             scheduledata=""
             propertydata="" />
</root>

This xml has the following elements and attributes

Element/attributeDescription
statusInteger: The outcome of the call, always 0
statustextString: The textual representation of the outcome of the call, always Success
categoryThe elements that holds the property attributes of the subscription
category@documenttypeThe type of content the category can contain. This value is the string representation of one of the members in the DocumentTypes enumeration.
category@categoryidThe category identifier.
category@identifierGuid: A unique identifier of this subscription. This attribute can be missing.
category@nameString: The name of the category
category@descriptionString: A description of the category
category@enabledBit (0/1): A value that indicates whether the category is enabled for subscription.
category@senderString: Information about the sender. For email subscriptions this should be the sender's email address
category@timeout Integer: Defines a timeout value in seconds. This value can be used by the event handler implementation to limit the allowed execution time. The value zero should be considered as unlimited and negative values are not allowed.
category@eventhandlermoniker String: 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.
category@presentationtemplateInteger: the identifier to a presentation template that is used to present the a document that is subscribed on.
category@siteurlString: 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.
category@authenticationschemaString: defines the method that the event handler uses when authentication to the message server. This value is the textual representation of the AuthenticationSchemes enumeration members.
category@servernameString: the name of the server that the event hander uses when sending messages.
category@usernameString: A user name used when the event handler executes. This attribute can be missing.
category@scheduledataXml, containing one or more schedule schemas for the subscription. See the following section for details on this xml.
category@propertydataXml, additional properties for the subscription. See the section below for more information.

The category@scheduledata" attribute value contains an xml document that describes the schedule(s) to use with this subscription. This embedded xml has the following syntax.

<schedules>
    <schedule name="Schema1"
             enabled="true"
             immediate="false"
             start="2008-01-01T14:00"
             end="2010-01-12T00:00">
        <weekDays>
            <weekDay value="Sunday" />
            <!-- more weekDay element can follow -->
        </weekDays>
            <occurence>
            <time hour="0" minute="0"/>
            <!-- more time element can follow -->
        </occurence>
    </schedule>
    <!-- more schedule element can follow -->
</schedules>
Element/attributedescription
schedulesThe root node. This node is present even if there are no schedules defined
scheduleRepresents a single schedule. There can be one or more schedules in the document.
schedule@nameString: A name that identifies the schema within the collection of schemas
schedule@enabledBoolean (true/false): A value that specifies whether a schema is enabled
schedule@immediateBoolean (true/false): A value that specifies whether the schema specifies that the schedule specifies immediate action. If true, and has passed, all other values in the schedule are not used when determining the next action.
schedule@startDateTime: A value that specifies the earlies point in time when the schedule is valid.
schedule@endDateTime: This attribute is optional. A value that specifies the last point in time when the schedule is valid.
weekDaysThis elements acts a placeholder for one or more weekDay elements
weekDayThis element specifies a weekday where the schedule can be effective.
weekDay@valueString: Must be the name (in English) of one of the week days.
occurenceThis element acts as a placeholder for one or more occurrences in time during any of the weekdays specified in the schedule.
timeAn element that contain time information
time@hourInteger: Specifies an hour (0 - 23)
time@minuteInteger: Specifies a minute (0 - 59). This value is optional, and if missing 0 (zero) is assumed.

The category@propertydata attribute value contains an xml document that contains other properties to use with this subscription. This embedded xml has the following syntax.

<properties>
    <property name="" value="" />
    <!-- more property elements can follow -->
</properties>
Element/AttributeDescription
property@nameThe name of the property, this name is case sensitive and must be unique.
property@valueThe value of the property
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
SqlExceptionAn error occurred when executing the command against the Content Studio database
NotSupportedExceptionThe value of the subscriptionType is not supported.
Content Studio permissions

Read 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
See Also

Reference