/// <summary> /// Move the data address of an item within the data store /// </summary> /// <param name="contentType">the type of the item</param> /// <param name="rd">the route data from which to obtain the new address of the item</param> /// <param name="id">the id of the item</param> public void MoveAddress(ItemId id, Address moveTo) { Registered(id.Type).MoveAddress(id, moveTo); }
/// <summary> /// Creates an ItemVersionedId for a content item specified by its ItemId and an /// ItemVersion without removing any version keys inapplicable to the type of the item /// </summary> /// <param name="id">The ItemId of the content item</param> /// <param name="vers">The version required</param> /// <returns>The ItemVersionedId made of the given ItemId and ItemVersion</returns> public static ItemVersionedId CreateWithoutVersionApplicability(ItemId id, ItemVersion vers) { return(new ItemVersionedId { Id = id, Version = vers }); }
/// <summary> /// Create an ItemVersionedId from an ItemId and an ItemVersion, restricting the ItemVersion /// to only those keys applicable to the type of the ItemId /// </summary> /// <param name="id">the ItemId</param> /// <param name="version">the ItemVersion</param> public ItemVersionedId(ItemId id, ItemVersion version) : base(id.Type, id.Id) { Version = VersionManager.Instance.GetApplicableVersion(version, id.Type); }
/// <summary> /// Make an ItemVersionedId for the current version of a content item specified by /// its ItemId /// </summary> /// <param name="id">The ItemId of the content item</param> /// <returns>The currently versioned ItemVersionedId for the content item</returns> public static ItemVersionedId CurrentFromId(ItemId id) { ItemVersion currApplic = VersionManager.Instance.CurrentVersionForType(id.Type); return(new ItemVersionedId(id, currApplic)); }
/// <summary> /// Create an ItemVersionedId from an ItemId by adding the current version to it /// </summary> /// <param name="id">The ItemId</param> public ItemVersionedId(ItemId id) : this(id, VersionManager.Instance.CurrentVersion) { }