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

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

Writes an HTML insert button or link to delete the current document, to the supplied stream or the default response stream. The DeleteDocument class acts as the underlying engine for the Delete document AS component.
Inheritance Hierarchy

SystemObject
  ContentStudio.SiteCodeBase
    ContentStudio.Site.ActiveScriptingActiveScriptingBase
      ContentStudio.Site.ActiveScriptingDocumentBase
        ContentStudio.Site.ActiveScripting.DocumentDeleteDocument

Namespace: ContentStudio.Site.ActiveScripting.Document
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public class DeleteDocument : DocumentBase

The DeleteDocument type exposes the following members.

Constructors

  NameDescription
Public methodDeleteDocument
Constructs a new instance of the DeleteDocumentDev class that writes to the default response stream
Public methodDeleteDocument(Stream)
Constructs a new instance of the DeleteDocumentDev class that writes to the supplied stream
Top
Properties

  NameDescription
Public propertyBackwardsComponentCompatibilityMode
Sets or gets a value that indicates whether the code runs in backwards compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.)
Public propertyClassName
Sets or gets a value that specifies a CSS class name to be applied to the generated link or button element. The default value is an empty string
Public propertyComponentName
Gets the name of the component
(Overrides ActiveScriptingBaseComponentName.)
Public propertyConfirmText
Sets or gets a confirmation message to be displayed to the caller prior to the actual delete. The default value is "Are you sure you want to delete the document?"
Public propertyConformance
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.)
Protected propertyCode exampleCS_DataFields
Gets a EPTXmlParser that contains a collection of EPT field definitions and values. This property is the replacement for the obsolete EPT_GetFieldName(String) and EPT_GetFieldValue(String) methods.
(Inherited from CodeBase.)
Public propertyDeleteParentChildRelation
Sets or gets a value that indicates whether it is allowed to delete a document that has child documents or not. When this property is set the relation is broken between the document and its children thus breaking off the document hierarchy at this point. This property is ignored unless the DeletePermanently property is set also. The default value is false.
Public propertyDeletePermanently
Sets or gets a value that indicates if the document should be deleted permanently rather that being thrown in the recycling bin. This will not work unless the caller has administrative permissions on the document or has the DestroyDocuments global right set. The default value is false.
Public propertyDeleteRoot
Sets or gets a value that specifies whether to delete the root document or not. This value has no meaning unless the document to delete is an include document. The default value is false
Public propertyDoAccessCheck
Sets or gets a value the defines whether the component should do an access check to determine if the user has access to delete or not. If the access check, the component will not display a delete button. The default value is true.
Public propertyDocToDelete
Sets or gets a document to delete. If this property is zero the current document is deleted. The default value is an empty string
Public propertyElementType
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.)
Public propertyEncoding
Sets or gets the encoding the component uses. The default encoding is the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.)
Public propertyLabel
Sets or gets the text for the generated button or link. The default value is "Delete"
Public propertyLinkType
Sets or gets a value that specifies what type of HTML element to generate The default value is Link
Protected propertyPage
A reference to the current context page. This will initialize in the constructor of this class.
(Inherited from CodeBase.)
Public propertyRedirectDocument
Sets or gets a value that specifies a document to redirect to after that the document has been deleted. The default value is an empty string
Public propertyRedirectPresentationTemplate
Sets or gets an optional presentation template to be used present the document indicated in the RedirectDocument property. The default value is an empty string
Protected propertyRunningUserControl
Gets the current running user control.
(Inherited from CodeBase.)
Top
Methods

  NameDescription
Protected methodBuildHTMLComponentException
Returns an component exception in HTML format.
(Inherited from ActiveScriptingBase.)
Protected methodCheckAccess
Determines if the caller has delete access to a document. If permanent delete is specified, the GlobalRights.DestroyDocuments right is checked as well.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Protected methodGenerateLinkTargetAttribute
Returns the attribute string to be written to the link.
(Inherited from ActiveScriptingBase.)
Protected methodGetCorrectField
Extracts the correct value from a passed in EPT field name and a static field value.
(Inherited from ActiveScriptingBase.)
Protected methodGetDeleteLink
Generates the link (hyperlink reference) to use when deleting a document.
Protected methodGetDocumentToDelete
Determines, from the properties of this component, what document to delete.
Protected methodGetEncodedConfirmText
Gets the correctly encoded confirm text depending on the setting of the BackwardsComponentCompatibilityMode property.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInvoke
This method invokes the component and writes its content into the specified stream
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodPerformDocumentDelete
Performs a delete operation using the current delete options.
Protected methodReadFromApplicationCache
Returns data that is read from the application cache.
(Inherited from ActiveScriptingBase.)
Protected methodRenderAdvancedButton
Renders an advanced button (the HTML element Button) to the input stream that contains a link back to the same page with delete instructions. Derived classes can override this method to provide their own rendering code.
Protected methodRenderButton
Renders a standard button (the HTML element Input type button) to the Input stream that contains a link back to the same page with delete instructions. Derived classes can override this method to provide their own rendering code.
Protected methodRenderLink
Renders an advanced button (the HTML element Butoon) to the Input stream that contains a link back to the same page with delete instructions. Derived classes can override this method to provide their own rendering code.
Protected methodRenderSubmitButton
Renders a submit button (the HTML element Input type submit) contained within a form element to the Input stream that submits back to the same page with delete instructions in the query string. Derived classes can override this method to provide their own rendering code.
Protected methodSetApplicationCache
Stores a string in the application cache.
(Inherited from ActiveScriptingBase.)
Protected methodSyncronizeMLC
Provides support for components that needs to be MLC aware, by localizing the supplied category or presentation template from the current document, or the preferred language of the visitor.
(Inherited from ActiveScriptingBase.)
Public methodToString (Inherited from Object.)
Protected methodWriteAttribute(TextWriter, String, String)
Writes an attribute string to the supplied stream, unless Value is an empty string or null
(Inherited from ActiveScriptingBase.)
Protected methodWriteAttribute(TextWriter, String, String, Boolean)
Writes an attribute string to the supplied stream.
(Inherited from ActiveScriptingBase.)
Top
Remarks

To use this class, create an instance of this object, set up the properties and call the Invoke method with an appropriate set of parameters. This class can throw exceptions, thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash. This class generates inline code, thus you must wrap it into a block element to make the page validate according to the HTML/XHTML regulations. The generated code is fully HTML/XHTML strict compatible.
See Also

Reference