PolicyBasedSynchronousEventHandler Class Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Provides a base class for event handlers that uses a policy based rule system that can be interpreted by an implementation.
Inheritance Hierarchy

SystemObject
  ContentStudio.EventActions.SynchronousEventHandlersSynchronousEventHandlerBase
    ContentStudio.EventActions.SynchronousEventHandlersPolicyBasedSynchronousEventHandler
      More...

Namespace: ContentStudio.EventActions.SynchronousEventHandlers
Assembly: SyncEvtHand (in SyncEvtHand.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public abstract class PolicyBasedSynchronousEventHandler : SynchronousEventHandlerBase

The PolicyBasedSynchronousEventHandler type exposes the following members.

Constructors

  NameDescription
Protected methodPolicyBasedSynchronousEventHandler
Initializes a new instance of the PolicyBasedSynchronousEventHandler class.
Top
Properties

  NameDescription
Public propertyApprovedByUser
Gets an object that represents the user that approved the document that triggered the event. This value is null if the document is not approved yet.
(Inherited from SynchronousEventHandlerBase.)
Public propertyArchiveDate
Gets the archive date of the document that triggered the event. This value can be null to indicate no limit.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCalledByUser
Gets an object that represents the user that initiated the event.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCallerEmailAddress
Gets or sets the caller email address.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCallerLogOnName
Gets the logon name of the calling user.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCallerName
Gets the name of the caller.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCallerSessionId
Gets the caller's session id.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCallerSid
Gets the SecurityIdentifier of the calling user.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCallerUserKey
Gets the caller's user key.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCancel
Gets or sets a value indicating whether this SynchronousEventHandlerBase is cancelled.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCategoryId
Gets the category id.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCheckedOutByUser
Gets an object that represents the user that has checked out the document that triggered the event. This value is null if the document is not checked out
(Inherited from SynchronousEventHandlerBase.)
Public propertyConnectionId
Gets or sets the connection id.
(Inherited from SynchronousEventHandlerBase.)
Public propertyContent
Gets or sets the content of the affected Content Studio document.
(Inherited from SynchronousEventHandlerBase.)
Public propertyContentBinary
Gets the binary content passed in.
(Inherited from SynchronousEventHandlerBase.)
Public propertyCreatedByUser
Gets an object that represents the user that created the document that triggered the event. This value is null if the document is not yet created (OnBeforeDocumentSave).
(Inherited from SynchronousEventHandlerBase.)
Public propertyCredentials
Gets the credentials passed in to the event handler.
(Inherited from SynchronousEventHandlerBase.)
Public propertyDeletedByUser
Gets an object that represents the user that deleted the document that triggered the event. This value is null if the document is not deleted
(Inherited from SynchronousEventHandlerBase.)
Public propertyDocumentId
Gets the document id.
(Inherited from SynchronousEventHandlerBase.)
Public propertyDocumentName
Gets or sets the name of the document.
(Inherited from SynchronousEventHandlerBase.)
Public propertyDocumentStatus
Gets a value that specifies a set of different status properties of the document that triggered the event.
(Inherited from SynchronousEventHandlerBase.)
Public propertyDocumentTitle
Gets or sets the document title.
(Inherited from SynchronousEventHandlerBase.)
Public propertyDocumentType
Gets the type of the document that triggered the event.
(Inherited from SynchronousEventHandlerBase.)
Public propertyEncodingName
Gets or sets the encoding name of the document. This value can be null
(Inherited from SynchronousEventHandlerBase.)
Public propertyEptContent
Gets the content of the ept document as an object as Content Studio's implementation of the ICSEptContent interface.
(Inherited from SynchronousEventHandlerBase.)
Public propertyEventHandlerName
Gets the name of the event handler.
(Inherited from SynchronousEventHandlerBase.)
Public propertyEventId
Gets the event id.
(Inherited from SynchronousEventHandlerBase.)
Public propertyEventTimestamp
Gets the event timestamp.
(Inherited from SynchronousEventHandlerBase.)
Public propertyExtendedProperties
Gets a collection of extended properties passed in.
(Inherited from SynchronousEventHandlerBase.)
Public propertyFileName
Gets or sets the name of the document's file of disc.
(Inherited from SynchronousEventHandlerBase.)
Public propertyGuoid
Gets the Guoid identifier of the document.
(Inherited from SynchronousEventHandlerBase.)
Public propertyMessageId
Gets or sets the message id.
(Inherited from SynchronousEventHandlerBase.)
Public propertyModifiedByUser
Gets an object that represents the user that modified the document that triggered the event. This value is null if the document is not modified.
(Inherited from SynchronousEventHandlerBase.)
Protected propertyPolicies
Gets a list of custom policies that was sent in from the event actions definition.
Public propertyPublishDate
Gets the publish date of the document that triggered the event.
(Inherited from SynchronousEventHandlerBase.)
Public propertyRejectedByUser
Gets an object that represents the user rejected the document that triggered the event. This value is null if the document is not sent for revison and has not been rejected.
(Inherited from SynchronousEventHandlerBase.)
Public propertySaveOperationArguments
Gets an object that contains the argument that was passed in to the save operation operation that triggered the event. This property has a value only for the OnBeforeDocumentSave and the OnDocumentPreview events, otherwise the value is null
(Inherited from SynchronousEventHandlerBase.)
Public propertySentForApprovalByUser
Gets an object that represents the user sent the document that triggered the event for revision. This value is null if the document is not sent for revison.
(Inherited from SynchronousEventHandlerBase.)
Public propertyStatus
Gets or sets the status in the event handler call.
(Inherited from SynchronousEventHandlerBase.)
Public propertyStatusText
Gets or sets the status text in the event handler call.
(Inherited from SynchronousEventHandlerBase.)
Public propertyVirtualPath
Gets the virtual path of the document.
(Inherited from SynchronousEventHandlerBase.)
Top
Methods

  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from SynchronousEventHandlerBase.)
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources
(Inherited from SynchronousEventHandlerBase.)
Protected methodDoWork
When implemented in derived class performs the actual work in the event handler.
(Inherited from SynchronousEventHandlerBase.)
Public methodEquals (Inherited from Object.)
Public methodEventHandler
Defines a standard event handler for Content Studio syncronous server side events. Content Studio calls this implements this interface when an synchrous event occurs.
(Inherited from SynchronousEventHandlerBase.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the SynchronousEventHandlerBase is reclaimed by garbage collection.
(Inherited from SynchronousEventHandlerBase.)
Protected methodFinish
Performs actions after that the actual work of the event handler has finished.
(Inherited from SynchronousEventHandlerBase.)
Public methodCode exampleGetCustomConfiguration
Gets a configuration file with a specific name. This file is located in the same directory as the Content Studio runtime.
(Inherited from SynchronousEventHandlerBase.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodGetValidationXmlSchema
Gets the XML schema that is used to validate the passed in XML-based policy definitions.
Protected methodInit
Inits this instance and performs the actual validation operation
(Overrides SynchronousEventHandlerBaseInit.)
Protected methodInterpretPolicyValue
Interprets the value of a specific Policy.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodParseCustomData
Parses the xml based custom data that contains the policy definitions. This data is supplied by the person in Content Studio that creates the event subscription.
(Overrides SynchronousEventHandlerBaseParseCustomData(String).)
Protected methodParseInputXml
Parses the xml passed in the eventhandler's eventXmlArguments argument.
(Inherited from SynchronousEventHandlerBase.)
Protected methodCode examplePerformPolicyValidation
Performs the policy validation.
Public methodToString (Inherited from Object.)
Protected methodValidateEvent
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.
(Inherited from SynchronousEventHandlerBase.)
Protected methodCode exampleValidatePolicy
When implemented in derived classes validates that the affected Content Studio document meets the rule specified in the policy.
Top
Remarks

Note Note
This class was added in Content Studio version 5.2 SP1.

The policy is provided as data in the Custom data property in Content Studio and each policy is Xml based.

The following xml fragment shows an example of a policy

<customData>
 <policies>
  <policy Enabled="true"
          Name="MaxUploadedFileSize"
          Value="23" 
          ValueClass="Mb" 
          InterpretValueAs="Maximum"
          Description="Policy: Limits the size of an uploaded file." 
          ViolationMessage="A rule on this web site limits the size of an uploaded file, Please use a smaller file instead. Max value = {0}" />
 </policies>
</customData>

Even though you can derive directly from this base class when you create a validating synchronous event handler in Content Studio version 5.2 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.

See Also

Reference

Other Resources

Inheritance Hierarchy

SystemObject
  ContentStudio.EventActions.SynchronousEventHandlersSynchronousEventHandlerBase
    ContentStudio.EventActions.SynchronousEventHandlersPolicyBasedSynchronousEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersBeforeDocumentSavePolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersBeforeDocumentSynchronizePolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentApprovePolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentCheckInPolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentCheckOutPolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentCreatePolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentDeletePolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentDestroyPolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentMoveInHierarchyPolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentRejectPolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentRestorePolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentRevisionPolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentRevisionRestorePolicySyncEventHandler
      ContentStudio.EventActions.SynchronousEventHandlersDocumentSavePolicySyncHandler
      ContentStudio.EventActions.SynchronousEventHandlersXmlIndexPolicySyncHandler