DirectiveControlDelete Method (ConnectionId, SessionId, Int32, CSFileObjectTypes, DirectiveControlDirectiveClass) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Deletes the directive definition for a certain object.

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

public void Delete(
	ConnectionId connectionId,
	SessionId sessionId,
	int objectId,
	CSFileObjectTypes objectType,
	DirectiveControlDirectiveClass directiveType
)

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).
objectId
Type: SystemInt32
The object to get attributes for.
objectType
Type: ContentStudio.DocumentCSFileObjectTypes
The type of Content Studio object referenced by the objectId parameter. This value cannot be Root.
directiveType
Type: ContentStudio.DocumentDirectiveControlDirectiveClass
The type of directive to delete. This must be one of the supported directives (except for the Undefined directive) in the DirectiveClass enumeration.
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
  • 1001 - Session is invalid.
  • 1002 - Permission denied.
  • 1004 - The container is missing.
  • 1009 - Invalid parameter value
  • 1022 - Invalid action: The directive does not exist
  • 1100 - The document is missing
  • 1811 - The document is protected.
InvalidOperationExceptionCannot delete a directive for the root level
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

WRITE / WRITECONTAINER permission on the document / container is required.
Remarks

When a directive is deleted, the object will implicitly use the directive that is defined on the nearest parent object that has a definition. For this reasons you cannot delete a directive for the site root since it is possible that an object needs to rely on the definition on that level.
See Also

Reference