[This is preliminary documentation and is subject to change.]
ContentStudio.EventActions.AsynchronousEventHandlersAsynchronousEventHandlerBase
More...
Namespace: ContentStudio.EventActions.AsynchronousEventHandlers
Assembly: AsynchronousEventHandlers (in AsynchronousEventHandlers.dll) Version: 1.0.0.0 (1.0.0.0)
The AsynchronousEventHandlerBase type exposes the following members.
Name | Description | |
---|---|---|
AsynchronousEventHandlerBase |
Initializes a new instance of the AsynchronousEventHandlerBase class.
|
Name | Description | |
---|---|---|
CallerEmailAddress |
Gets or sets the caller email address.
Currently (CS 5.2 SP1) this property is not implemented and always returns null (Nothing in Visual Basic).
| |
CallerIdentifier |
Gets the internal Content Studio identifier of the caller.
| |
CallerLogOnName |
Gets the login name of the calling user.
| |
CallerName |
Gets the name of the caller.
| |
CallerSessionId |
Gets the caller's session id.
| |
CallerSid |
Gets or sets the SecurityIdentifier of the calling user.
Currently (CS 5.2 SP1) this property is not implemented and always returns null (Nothing in Visual Basic).
| |
CallerUserKey |
Gets or sets the caller's user key.
Currently (CS 5.2 SP1) this property is not implemented and always returns null (Nothing in Visual Basic).
| |
CategoryId |
Gets the category id.
| |
ConnectionId |
Gets the connection id.
| |
Credentials |
Gets the credentials passed in to the event handler.
| |
DocumentId |
Gets the document id.
| |
DocumentName |
Gets the name of the document. This is the name including the path relative the site root
ex. System/Stylesheets/IE_Style | |
DocumentTitle |
Gets the document title which is the name of the document without the path
ex. IE_Style | |
EncodingName |
Gets the encoding name of the document. This value can be null (Nothing in Visual Basic).
| |
EventId |
Gets the numeric event identifier.
| |
EventName |
Gets the name of the event.
| |
EventTimestamp |
Gets A date time value that indicates when the event was triggered in Content Studio.
| |
ExtendedPropertyCount |
Gets the number of extended properties.
| |
ExtendedPropertyNames |
Gets the extended property names.
| |
ExternalDocumentId |
Gets the document identifier of an object that has been scheduled by an external provider.
| |
FileName |
Gets the name of the document's file on disc.
Ex. C:\Content Studio\CS52\Sites\Site52\System\Stylesheets\F0B85EEC-925B-4A70-8D95-D14D48C76978.aspx | |
Guoid |
Gets the document GUOID (Global object unique identifier) in its string format.
| |
MessageId |
Gets the unique message id.
| |
QueueId |
Gets the queue identifier. Service manager can inject this value when it handles the job
| |
Status |
Gets or sets the status to report back to Content Studio after a successful operation.
This message will be recorded in the Content Studio event log.
| |
TimeOut |
Gets the time out value that was provided to the event handler.
|
Name | Description | |
---|---|---|
Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
| |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources
| |
DoWork |
When implemented in derived class performs the actual work in the event handler.
| |
Equals | (Inherited from Object.) | |
ExistsExtendedProperty |
Determines whether the specified extended property exists.
| |
Finalize |
Releases unmanaged resources and performs other cleanup operations before the
AsynchronousEventHandlerBase is reclaimed by garbage collection.
(Overrides ObjectFinalize.) | |
Finish |
This method gets called after that the event handler work operation has been
completed.
| |
GetExtendedPropertyValue(Type, String) |
Gets the extended property value as a specific data type.
| |
GetExtendedPropertyValueT(String) |
Gets the extended property value as a specific data type.
| |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Init |
When overridden in derived classes, performs custom initialization.
| |
MemberwiseClone | (Inherited from Object.) | |
ParseCustomData |
When overridden in derived classes,
developers can use this method to get the custom data passed in to the event handler.
| |
ParseInputXml |
Parses the event data xml passed in the event handler.
| |
PreInit |
Initializes the value of the passed event handler properties to their corresponding properties.
| |
ToString | (Inherited from Object.) | |
ValidateEvent |
When implemented in derived classes, examines the event that triggered this event
handler and returns a value that specifies whether the handler is valid for the
event executed.
|
This class was introduced in Content Studio version 5.2 SP1.
Even though you can derive directly from this base class when you create an asynchronous event handler in Content Studio version 5.2 SP1 and later, unless your event handler should be able to handle multiple events, it is recommended to use some of the specialized derived class as a base class for your event handler implementation.
For more information see the See Also section in this document.
The following code shows an event handler that handles the OnDocumentSave asynchronous event in Content Studio. The handler checks that only callers authenticated by a specific domain can perform the action. It the reports the result of the operation to Content Studio.
public class MyOnDocumentSaveAsyncHandler : AsynchronousEventHandlerBase { string status; protected override void DoWork() { //Check the permission, only members in a specific domain can execute the //operation. if (!CallerLogOnName.StartsWith(@"MyDomain\", StringComparison.OrdinalIgnoreCase)) { //Create a message that indicates that the operation was a failure //but the event handler itself did not fail. status = String.Format("Operation was not performed, Permission denied for user '{0}'.", CallerLogOnName); return; } //Do some work here. // // //create a success message to return to Content Studio status = String.Format("The operation has been performed by '{0}'.", CallerLogOnName); } protected override string Finish() { //Tell Content Studio about the outcome of the operation Status = status; } protected override bool ValidateEvent(int csEvent) { //Make sure that only OnDocumentSave (csEvent is 11) //can be handled by this event handler. return csEvent == 11; } }
Reference
Other Resources
ContentStudio.EventActions.AsynchronousEventHandlersAsynchronousEventHandlerBase
ContentStudio.EventActions.AsynchronousEventHandlersDocumentApproveAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentCheckInAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentCheckoutAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentCreateAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentDeleteAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentDestroyAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentExpireAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentPublishAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentRejectAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentRevisionAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentSaveAsyncHandler
ContentStudio.EventActions.AsynchronousEventHandlersDocumentUnPublishAsyncHandler