[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public string GetSubscriptionDetails( ConnectionId connectionId, SessionId sessionId, Guid subscriptionDefinitionId )
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 usually originates from a call to OpenSession(ConnectionId). - subscriptionDefinitionId
- Type: SystemGuid
An identifier to a specific subscription definition
Return Value
Type: StringXml 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="" scheduledata="" propertydata="" /> </root>
This xml has the following elements and attributes
Element/attribute | Description |
---|---|
status | Integer: The outcome of the call, always 0 |
statustext | String: The textual representation of the outcome of the call, always Success |
category | The elements that holds the property attributes of the subscription |
category@documenttype | The type of content the category can contain. This value is the string representation of one of the members in the DocumentTypes enumeration. |
category@categoryid | The category identifier. |
category@identifier | Guid: A unique identifier of this subscription. This attribute can be missing. |
category@name | String: The name of the category |
category@description | String: A description of the category |
category@enabled | Bit (0/1): A value that indicates whether the category is enabled for subscription. |
category@sender | String: 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@presentationtemplate | Integer: the identifier to a presentation template that is used to present the a document that is subscribed on. |
category@siteurl | String: 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@authenticationschema | String: 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@servername | String: the name of the server that the event hander uses when sending messages. |
category@username | String: A user name used when the event handler executes. This attribute can be missing. |
category@scheduledata | Xml, containing one or more schedule schemas for the subscription. See the following section for details on this xml. |
category@propertydata | Xml, 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/attribute | description |
---|---|
schedules | The root node. This node is present even if there are no schedules defined |
schedule | Represents a single schedule. There can be one or more schedules in the document. |
schedule@name | String: A name that identifies the schema within the collection of schemas |
schedule@enabled | Boolean (true/false): A value that specifies whether a schema is enabled |
schedule@immediate | Boolean (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@start | DateTime: A value that specifies the earlies point in time when the schedule is valid. |
schedule@end | DateTime: This attribute is optional. A value that specifies the last point in time when the schedule is valid. |
weekDays | This elements acts a placeholder for one or more weekDay elements |
weekDay | This element specifies a weekday where the schedule can be effective. |
weekDay@value | String: Must be the name (in English) of one of the week days. |
occurence | This element acts as a placeholder for one or more occurrences in time during any of the weekdays specified in the schedule. |
time | An element that contain time information |
time@hour | Integer: Specifies an hour (0 - 23) |
time@minute | Integer: 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/Attribute | Description |
---|---|
property@name | The name of the property, this name is case sensitive and must be unique. |
property@value | The value of the property |
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database |
CSPermissionDeniedException | The caller has no permission to perform the requested action |
CSDocumentNotFoundException | The specified subscriptionDefinitionId is not valid. |
CSInvalidSessionException | The session is invalid |
SqlException | An error occurred when executing the command against the Content Studio database |
Read permission on the category is required.
This method can also successfully be executed by sessions that have the ServiceQueueAdmin global right.
Note |
---|
This method is new in Content Studio version 5.2 |