Show / Hide Table of Contents

Class VersionableBase

Defines the basic identification of a repository-managed item: agency identifier, identifier, and item version. Implements the IVersionable interface.

Inheritance
System.Object
NotificationObject
IdentifiableBase
VersionableBase
Agent
DataCollectionMethodology
DdiInstance
GeneralInstructionCoding
GenerationInstructionCoding
PhysicalInstance
ResourcePackage
StudyBase
VariableStatistic
DescribableBase
OtherMaterial
Inherited Members
IdentifiableBase.DefaultAgencyId
IdentifiableBase.AgencyId
IdentifiableBase.Identifier
IdentifiableBase.UserIds
IdentifiableBase.GetUserIdValue(String)
NotificationObject.PropertyChanged
NotificationObject.RaisePropertyChanged(String)
NotificationObject.RaisePropertyChanged(String[])
NotificationObject.RaisePropertyChanged<T>(Expression<Func<T>>)
NotificationObject.OnPropertyChanged(String)
NotificationObject.ResumePropertyEvents()
NotificationObject.SuspendPropertyEvents()
NotificationObject.PropertyEventsSuspended
NotificationObject.PropagateChildChanges(INotifyCollectionChanged, String)
Namespace: Algenta.Colectica.Model
Assembly: Algenta.Colectica.Model.dll
Syntax
public abstract class VersionableBase : IdentifiableBase, IVersionable, IIdentifiable, IVisitable, IHasCustomFields

Constructors

VersionableBase()

Initializes a new instance of the VersionableBase class. Sets the AgencyId to the value of DefaultAgencyId.

Declaration
protected VersionableBase()

Properties

Attachments

Gets a collection of file URIs stored in the File Storage Service attached to this item.

Declaration
public virtual ObservableCollection<Attachment> Attachments { get; }
Property Value
Type Description
ObservableCollection<Attachment>
Implements
IVersionable.Attachments

BasedOn

Gets a collection that describes previous items on which this item is based

Declaration
public BasedOn BasedOn { get; set; }
Property Value
Type Description
BasedOn
Implements
IVersionable.BasedOn

ChildrenDereferenced

Gets or sets a value indicating whether the item's children have been dereferenced.

Declaration
public bool ChildrenDereferenced { get; set; }
Property Value
Type Description
System.Boolean

true if the item's children have been dereferenced; otherwise, false.

Implements
IVersionable.ChildrenDereferenced

ChildTypesAccepted

Gets the child types that may be added to this item type.

Declaration
public virtual Collection<Guid> ChildTypesAccepted { get; }
Property Value
Type Description
Collection<Guid>

The child types that may be added to this item type.

Implements
IVersionable.ChildTypesAccepted

CompositeId

Gets or sets the item's composite id, consisting of the agency identifier, identifier, and version.

Declaration
public IdentifierTriple CompositeId { get; set; }
Property Value
Type Description
IdentifierTriple

The item's composite identifier.

Implements
IVersionable.CompositeId

CustomFields

Gets a collection of custom fields defined for this item.

Declaration
public ObservableCollection<CustomField> CustomFields { get; }
Property Value
Type Description
ObservableCollection<CustomField>
Implements
IHasCustomFields.CustomFields

DisplayLabel

Gets the display label.

Declaration
public virtual string DisplayLabel { get; }
Property Value
Type Description
System.String

The display label.

IsDirty

Gets or sets a value indicating whether this instance has unsaved changes.

Declaration
public virtual bool IsDirty { get; set; }
Property Value
Type Description
System.Boolean

true if this instance has unsaved changes; otherwise, false.

Implements
IVersionable.IsDirty

IsPopulated

Gets or sets a value indicating whether this instance's information is populated.

Declaration
public bool IsPopulated { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is populated; otherwise, false.

Implements
IVersionable.IsPopulated

IsPublished

Gets or sets a value indicating whether this instance is published.

Declaration
public bool IsPublished { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is published; otherwise, false.

Implements
IVersionable.IsPublished

ItemType

Gets the universally unique identifier representing the item's type.

Declaration
public abstract Guid ItemType { get; }
Property Value
Type Description
Guid

The identifier representing the item's type.

Implements
IHasCustomFields.ItemType

ManagedCollections

Gets the managed collections.

Declaration
protected Collection<INotifyCollectionChanged> ManagedCollections { get; }
Property Value
Type Description
Collection<INotifyCollectionChanged>

The managed collections.

OtherMaterials

Gets a collection of Other Material fields defined for this item.

Declaration
public ObservableCollection<OtherMaterial> OtherMaterials { get; }
Property Value
Type Description
ObservableCollection<OtherMaterial>
Implements
IVersionable.OtherMaterials

UserAttributes

Gets a collection of user defined fields defined for this item.

Declaration
public ObservableCollection<UserAttribute> UserAttributes { get; }
Property Value
Type Description
ObservableCollection<UserAttribute>
Implements
IVersionable.UserAttributes

Version

Gets or sets the version.

Declaration
public long Version { get; set; }
Property Value
Type Description
System.Int64

The version.

Implements
IVersionable.Version

VersionDate

Gets or sets the this version of the item was created.

Declaration
public DateTime VersionDate { get; set; }
Property Value
Type Description
DateTime

The this version was created.

Implements
IVersionable.VersionDate

VersionRationale

Gets the log message given by the user who created this version of the item.

Declaration
public MultilingualString VersionRationale { get; set; }
Property Value
Type Description
MultilingualString
Implements
IVersionable.VersionRationale

VersionResponsibility

Gets or sets the name of the user who created this version of the item.

Declaration
public string VersionResponsibility { get; set; }
Property Value
Type Description
System.String

The name of the user who created this version of the item.

Implements
IVersionable.VersionResponsibility

Methods

Accept(IVersionableVisitor)

Accepts the specified visitor.

Declaration
public void Accept(IVersionableVisitor visitor)
Parameters
Type Name Description
IVersionableVisitor visitor

The visitor.

Implements
IVisitable.Accept(IVersionableVisitor)

AddChild(IVersionable)

Adds the provided child to this item.

Declaration
public virtual void AddChild(IVersionable child)
Parameters
Type Name Description
IVersionable child

The item to be added as a child of this item.

Implements
IVersionable.AddChild(IVersionable)

GetChildren()

Gets the identifiers of the item's children.

Declaration
public virtual ChildItemCollection GetChildren()
Returns
Type Description
ChildItemCollection

The identifiers of the item's children.

Implements
IVersionable.GetChildren()

ManageCollection(INotifyCollectionChanged, String)

Watch collections for changes and relay the change notification upwards.

Declaration
protected void ManageCollection(INotifyCollectionChanged collection, string name)
Parameters
Type Name Description
INotifyCollectionChanged collection
System.String name

RemoveChild(IVersionable, IList[])

Removes the specified child from any of the provided lists.

Declaration
public static bool RemoveChild(IVersionable itemToRemove, params IList[] lists)
Parameters
Type Name Description
IVersionable itemToRemove

The item to remove.

IList[] lists

The lists from which the child should be removed.

Returns
Type Description
System.Boolean

RemoveChild(IdentifierTriple)

Removes the specified child.

Declaration
public virtual int RemoveChild(IdentifierTriple child)
Parameters
Type Name Description
IdentifierTriple child

The child to be removed.

Returns
Type Description
System.Int32

The number of children removed from the item.

Implements
IVersionable.RemoveChild(IdentifierTriple)

RemoveChild(IdentifierTriple, IList[])

Removes the child with the specified identifier from any of the provided lists.

Declaration
public static int RemoveChild(IdentifierTriple itemToRemove, params IList[] lists)
Parameters
Type Name Description
IdentifierTriple itemToRemove

The identifier of the item to remove.

IList[] lists

The lists.

Returns
Type Description
System.Int32

ReplaceChild(IdentifierTriple, IVersionable)

Replaces the child with the specified identifier with the provided item.

Declaration
public virtual int ReplaceChild(IdentifierTriple toReplace, IVersionable child)
Parameters
Type Name Description
IdentifierTriple toReplace

The identifier of the child to replace.

IVersionable child

The new child.

Returns
Type Description
System.Int32

The number of children replaced.

Implements
IVersionable.ReplaceChild(IdentifierTriple, IVersionable)

ToString()

Returns a that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A that represents this instance.

TryReplaceChild<T>(Func<T>, Action<T>, IdentifierTriple, IVersionable)

Tries the replace child.

Declaration
public static int TryReplaceChild<T>(Func<T> getter, Action<T> setter, IdentifierTriple toReplace, IVersionable child)where T : class, IVersionable
Parameters
Type Name Description
Func<T> getter

A function to get the item that will be replaced.

Action<T> setter

A function to set the item that will be replaced.

IdentifierTriple toReplace

To identifier of the item to replace.

IVersionable child

The child that will replace the previous child.

Returns
Type Description
System.Int32
Type Parameters
Name Description
T

The type of item being replaced

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica