Open Source Content Management System

mRFC 0037: Name uniqueness

  1. Revision history
  2. Background
  3. Terminology
  4. Name uniqueness
  5. Configuration
    1. Examples
    2. Examples
    3. TODO
  6. References:

Revision history

2007-12-05 Created by Piotr Pokora

Background

This document describes Midgard objects' name uniqueness, scope of uniqueness and configuration possibilities. It is also part of Midgard Tree functionality.

Terminology

Whenever name word is used in this document it refers to object property registered with MgdSchema and configured to be unique in particular scope.

Name uniqueness

Unique name should be a property of any type, however it's recommended to use string type with unique names. Name should be configured in Midgard Schema xml file and there should be only one unique name defined per class ( type ). Name should be configured only for classes which may be represented in Midgard Tree. For any other class, unique name should be ignored.

Reserved configuration attribute which defines unique name itself, doesn't qualifies a class ( for which name belongs to) as Midgard Tree enabled.

Name uniqueness should not be supported by underlying database storage provider, unless such functionality would not break sitegroup or Midgard Tree specifications.

Configuration

Unique name should be configured only with reserved unique attribute(s) in xml file. A value for the given attribute should define 3 different scopes of uniquness:

  • parent

It guarantees a name is unique in scope of parent type object's identifier.

  • self

It guarantees a name is unique in scope of the same type object's identifier.

  • both

It guarantees a name is unique in scope of the same and parent type object's identifier.

Examples

<property name="title" unique="both">
<property name="name" unique="parent">

OR Unique name should be configured only with reserved unique and scope attribute(s) in xml file.

Examples

<property name="title" unique="yes" unique_scope="both">
<property name="name" unique="yes" unique_scope="self">

TODO

Describe parent name uniqueness enforce when value is set to 'both'.

References:

  1. MgdSchema documentation

Back

Designed by Nemein, hosted by Anykey