SyncronizedEPTDocument Constructor (ConnectionId, SessionId, CategoryId, String, SchemaFieldCollection) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Constructs a new instance of the SyncronizedEPTDocument class that represents an empty EPT document that is schema bound to the schema supplied.

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

public SyncronizedEPTDocument(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	string documentName,
	SchemaFieldCollection schema
)

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).
categoryId
Type: ContentStudio.DocumentCategoryId
The category where the document should be saved to. This category must exist and must be a valid container for EPT documents.
documentName
Type: SystemString
A name to give the new document. This value cannot be null or empty
schema
Type: ContentStudio.Document.EPTSchemaFieldCollection
A SchemaFieldCollection object that defines the schema to bind to.
Exceptions

ExceptionCondition
CSPermissionDeniedExceptionThe caller has no permission to perform the requested action
CSInvalidSessionExceptionThe session is invalid
CSException
NumberMeaning
1017Invalid object type: The category is not a category for EPT documents.
1503The category does not exist
1509The name may not be empty
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

READ permission on the category is required.
Remarks

This overloaded constructor can optimize performance when doing a series of updates or creation of documents that share the same EPT schema and schema binding is desired. Content Studio does not have to request, load and parse the schema between each document.
Note
No control is made to ensure that the supplied schema is connected to the category passed in. This makes it possible to share the same schema between different categories but, as a downside, this behavior exposes the possibility to use an incompatible schema for the document thus make it possible to save worthless data into it.
See Also

Reference