示例#1
0
 internal TypeCollection(ISchemaRoot schemaRoot)
 {
     if (schemaRoot == null)
     {
         throw new ArgumentNullException("schemaRoot");
     }
     _schemaRoot = schemaRoot;
     _list       = new Dictionary <string, T>();
 }
示例#2
0
		//================================================================================ Construction

		internal PropertyType(ISchemaRoot schemaRoot, string name, int id, DataType dataType, int mapping, bool isContentListProperty)
			: base(schemaRoot, name, id)
		{
			_dataType = dataType;
			_mapping = mapping;
			_isContentListProperty = isContentListProperty;
			if (!isContentListProperty)
				CheckMapping();
		}
示例#3
0
        //===================================================================================== Construction

        internal PermissionType(int id, string name, ISchemaRoot schemaRoot) : base(schemaRoot, name, id)
        {
            for (int i = 0; i < DefaultPermissionNames.Length; i++)
            {
                if ((_isDefaultPermission = (name == DefaultPermissionNames[i])) == true)
                {
                    break;
                }
            }
        }
示例#4
0
 internal PropertyType(ISchemaRoot schemaRoot, string name, int id, DataType dataType, int mapping, bool isContentListProperty)
     : base(schemaRoot, name, id)
 {
     _dataType = dataType;
     _mapping  = mapping;
     _isContentListProperty = isContentListProperty;
     if (!isContentListProperty)
     {
         CheckMapping();
     }
 }
示例#5
0
		//================================================================================ Construction

		internal NodeType(int id, string name, ISchemaRoot schemaRoot, string className, NodeType parent) : base(id, name, schemaRoot)
		{
			_declaredPropertyTypes = new TypeCollection<PropertyType>(this.SchemaRoot);
			_parent = parent;
			_children = new TypeCollection<NodeType>(this.SchemaRoot);
			_className = className;
			_nodeTypePath = name;

			if (parent != null)
			{
				parent._children.Add(this);
				//-- Inherit PropertyTypes
				foreach (PropertyType propType in parent.PropertyTypes)
					this.PropertyTypes.Add(propType);
				_nodeTypePath = String.Concat(parent._nodeTypePath, "/", _nodeTypePath);
			}
		}
示例#6
0
        //================================================================================ Construction

        internal NodeType(int id, string name, ISchemaRoot schemaRoot, string className, NodeType parent) : base(id, name, schemaRoot)
        {
            _declaredPropertyTypes = new TypeCollection <PropertyType>(this.SchemaRoot);
            _parent       = parent;
            _children     = new TypeCollection <NodeType>(this.SchemaRoot);
            _className    = className;
            _nodeTypePath = name;

            if (parent != null)
            {
                parent._children.Add(this);
                //-- Inherit PropertyTypes
                foreach (PropertyType propType in parent.PropertyTypes)
                {
                    this.PropertyTypes.Add(propType);
                }
                _nodeTypePath = String.Concat(parent._nodeTypePath, "/", _nodeTypePath);
            }
        }
示例#7
0
		//============================================================================== Construction

		internal SchemaItem(ISchemaRoot schemaRoot, string name, int id)
		{
			_id = id;
			_name = name;
			_schemaRoot = schemaRoot;
		}
示例#8
0
        //================================================================================ Construction

        internal PropertySet(int id, string name, ISchemaRoot schemaRoot) : base(schemaRoot, name, id)
        {
            _propertyTypes = new TypeCollection <PropertyType>(schemaRoot);
        }
示例#9
0
		//================================================================================ Construction

		internal PropertySet(int id, string name, ISchemaRoot schemaRoot) : base(schemaRoot, name, id)
		{
			_propertyTypes = new TypeCollection<PropertyType>(schemaRoot);
		}
示例#10
0
		//===================================================================================== Construction

		internal PermissionType(int id, string name, ISchemaRoot schemaRoot) : base(schemaRoot, name, id)
		{
			for (int i = 0; i < DefaultPermissionNames.Length; i++)
				if ((_isDefaultPermission = (name == DefaultPermissionNames[i])) == true)
					break;
		}
示例#11
0
        //=====================================================================================

        internal PermissionType(int id, int index, string name, ISchemaRoot schemaRoot) : base(schemaRoot, name, id)
        {
            Index = index;

            switch (name)
            {
            case "See":                      _see = this;                      _isSystemPermission = true; break;

            case "Open":                     _open = this;                     _isSystemPermission = true; break;

            case "OpenMinor":                _openMinor = this;                _isSystemPermission = true; break;

            case "Save":                     _save = this;                     _isSystemPermission = true; break;

            case "Publish":                  _publish = this;                  _isSystemPermission = true; break;

            case "ForceCheckin":             _forceCheckin = this;             _isSystemPermission = true; break;

            case "AddNew":                   _addNew = this;                   _isSystemPermission = true; break;

            case "Approve":                  _approve = this;                  _isSystemPermission = true; break;

            case "Delete":                   _delete = this;                   _isSystemPermission = true; break;

            case "RecallOldVersion":         _recallOldVersion = this;         _isSystemPermission = true; break;

            case "DeleteOldVersion":         _deleteOldVersion = this;         _isSystemPermission = true; break;

            case "SeePermissions":           _seePermissions = this;           _isSystemPermission = true; break;

            case "SetPermissions":           _setPermissions = this;           _isSystemPermission = true; break;

            case "RunApplication":           _runApplication = this;           _isSystemPermission = true; break;

            case "ManageListsAndWorkspaces": _manageListsAndWorkspaces = this; _isSystemPermission = true; break;

            case "Preview":                  _preview = this;                  _isSystemPermission = true; break;

            case "PreviewWithoutWatermark":  _previewWithoutWatermark = this;  _isSystemPermission = true; break;

            case "PreviewWithoutRedaction":  _previewWithoutRedaction = this;  _isSystemPermission = true; break;

            case "Custom01":                 _custom01 = this; break;

            case "Custom02":                 _custom02 = this; break;

            case "Custom03":                 _custom03 = this; break;

            case "Custom04":                 _custom04 = this; break;

            case "Custom05":                 _custom05 = this; break;

            case "Custom06":                 _custom06 = this; break;

            case "Custom07":                 _custom07 = this; break;

            case "Custom08":                 _custom08 = this; break;

            case "Custom09":                 _custom09 = this; break;

            case "Custom10":                 _custom10 = this; break;

            case "Custom11":                 _custom11 = this; break;

            case "Custom12":                 _custom12 = this; break;

            case "Custom13":                 _custom13 = this; break;

            case "Custom14":                 _custom14 = this; break;

            default:
                break;
            }
        }
示例#12
0
 internal ContentListType(int id, string name, ISchemaRoot schemaRoot) : base(id, name, schemaRoot)
 {
 }
示例#13
0
		internal ContentListType(int id, string name, ISchemaRoot schemaRoot) : base(id, name, schemaRoot) { }
示例#14
0
        //============================================================================== Construction

        internal SchemaItem(ISchemaRoot schemaRoot, string name, int id)
        {
            _id         = id;
            _name       = name;
            _schemaRoot = schemaRoot;
        }