ISchemaManager Interface Ingeniux CMS Content Store API

Represents the manager object that provides means to query and managee schemas and schema field favorites. It also provides the built-in field definitions.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
Syntax

public interface ISchemaManager : ITransactionalEntity, 
	IDisposable

The ISchemaManager type exposes the following members.

Properties

  NameDescription
Public propertyContentStore
Gets the Content Store.
(Inherited from ITransactionalEntity.)
Public propertyCurrentUser
Gets the Operating User for the Session .
(Inherited from ITransactionalEntity.)
Public propertyFieldDefinitions
Gets the built-in field definitions of schemas and pages. Schemas are constructued from these units.
Public propertySession
Gets the User Session that this manager instance was initiated from.
(Inherited from ITransactionalEntity.)
Public propertyVersionsLimit
Gets and sets the settings for the number of schema versions the CMS keeps. If the limit is reached, the oldest previous versions of a schema are removed when a new version is saved.
Top
Methods

  NameDescription
Public methodAddFavorite
Adds a new schema field favorite entry to a collection.
Public methodCode exampleCreateComponentSchema
Creates a new component schema. This schema creates a component page, which doesn't have a fixed view associated with it.
Public methodCode exampleCreateSchema
Creates a new Schema. This can be either a page or component schema.
Public methodDeepCloneT, TManager
Duplicates an object instance, not including its unique ID.
(Inherited from ITransactionalEntity.)
Public methodFavorite
Retrieves a schema field favorite entry by it unique ID.
Public methodFavorites
Retrieves all the schema field favorites, in a paginated fashion. These favorites are field combinations used to make schema design more convenient for users.
Public methodHasSchemaFriendlyName
Checks whether a schema with a given friendly name exists in the collection.
Public methodHasSchemaID
Checks whether a schema with a given ID exists in collection.
Public methodImportSchema(String, Boolean)
Imports a schema with a string serialization of the previous-generation schema XML file.
Public methodImportSchema(XDocument, Boolean)
Imports a schema with a string serialization of the previous-generation schema XML file.
Public methodParseSchema
Parse xml document and convert it into schema entity. Please note that this entity is not saved to database yet.
Public methodQuickWrite
Creates a temporary Write Session to quickly write something outside the current Session and transaction. This is a way to bypass the transaction and quickly put something into the content store.
(Inherited from ITransactionalEntity.)
Public methodRemoveFavorite
Removes a schema field favorite entry from a collection by its unique ID.
Public methodRemoveSchema
Removes an existing schema.
Public methodSchemaByFriendlyName
Retrieves a schema by its friendly name. Friendly names are unique to a schema's collection.
Public methodSchemaByID
Retrieves a schema by its ID.
Public methodSchemaByRootName
Retrieves a schema by its page root element name. Root element names are unique to a schema's collection.
Public methodSchemaRootNameAvailable
Checks whether a schema with a given page root element name exists in the collection.
Public methodSchemas(String)
Retrieves schemas by unique ID.
Public methodSchemas(Int32, Int32, Int32)
Retrieves schemas in a paginated fashion.
Public methodSchemasCount
Gets the count of all schemas, including schemas with errors that cannot be used to create pages.
Public methodSystemSchema
Retrieves one of the six system schemas. These system schemas are essential to CMS functionality and cannot be modified via the CSAPI.
Public methodValidSchemasCount
Gets the count of valid schemas, which can be used to create pages.
Top
Remarks

Like all manager objects, instances of this manager are retrieved from an IUserSession object and only work within that session.

C#
using (IUserSession session = store.OpenReadSession(currentUser))
{
    ISchemaManager schemasManager = session.SchemasManager;
    ...
}
Examples

There is a metadata XML file from previous-generation CMS content for schema manager; therefore, its output is simply the schema count.

<Schemas Count="123" />
See Also

Reference