Show / Hide Table of Contents

Class MetadataUpdateBuilder

Tracks changes to IVersionable items. This allows tracking changes for manual version propagation, and creating a human-readable change log.

Inheritance
System.Object
MetadataUpdateBuilder
Namespace: Algenta.Colectica.Model.Ddi.Utility
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public class MetadataUpdateBuilder : object

Properties

IncrementVersionOnUpdate

Determines whether the MarkItemAsUpdated method increments the version of the updated item.

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

Log

Gets the human-readable list of changes.

Declaration
public StringBuilder Log { get; }
Property Value
Type Description
StringBuilder

NewAndUpdatedItems

Gets the list of new and updated items.

Declaration
public List<IVersionable> NewAndUpdatedItems { get; }
Property Value
Type Description
List<IVersionable>

Methods

EnsureCustomFieldExists(IVersionable, String, String)

Ensures the CustomField with the specified title exists, creating it if necessary.

Declaration
public void EnsureCustomFieldExists(IVersionable item, string title, string value)
Parameters
Type Name Description
IVersionable item
System.String title
System.String value

EnsureCustomFieldExists(IVersionable, String, String, Type)

Ensures the CustomField with the specified title exists, creating it if necessary.

Declaration
public void EnsureCustomFieldExists(IVersionable item, string title, string value, Type valueType)
Parameters
Type Name Description
IVersionable item
System.String title
System.String value
Type valueType

EnsureDublinCoreIdentifierExists(IVersionable, DublinCore, String)

Ensures the specified ID exists on the citation, creating it if necessary.

Declaration
public void EnsureDublinCoreIdentifierExists(IVersionable item, DublinCore dublinCoreMetadata, string idStr)
Parameters
Type Name Description
IVersionable item
DublinCore dublinCoreMetadata
System.String idStr

EnsureUserIdExists(IVersionable, String, String)

Ensures the UserID with the specified type exists, creating it if necessary.

Declaration
public void EnsureUserIdExists(IVersionable item, string type, string identifier)
Parameters
Type Name Description
IVersionable item
System.String type
System.String identifier

MarkItemAsNew(IVersionable)

Marks an item as newly created.

Declaration
public void MarkItemAsNew(IVersionable item)
Parameters
Type Name Description
IVersionable item

MarkItemAsRemoved(IVersionable)

Marks an item as removed.

Declaration
public void MarkItemAsRemoved(IVersionable item)
Parameters
Type Name Description
IVersionable item

MarkItemAsUpdated(IVersionable, String)

Marks an item as updated.

Declaration
public void MarkItemAsUpdated(IVersionable item, string message = "")
Parameters
Type Name Description
IVersionable item
System.String message

MarkItemPartAsRemoved(IVersionable, String, String)

Marks the item as removed, along with a message to be added to the change log.

Declaration
public void MarkItemPartAsRemoved(IVersionable item, string type, string label)
Parameters
Type Name Description
IVersionable item
System.String type
System.String label

UpdateOtherMaterial(IVersionable, String, String)

Ensures the OtherMaterial with the specified key/title exists, creating it if necessary.

Declaration
public void UpdateOtherMaterial(IVersionable item, string key, string value)
Parameters
Type Name Description
IVersionable item
System.String key
System.String value

UpdateProperty(IVersionable, CodeValue, String)

Updates a property, if the value is different than the existing value.

Declaration
public void UpdateProperty(IVersionable item, CodeValue property, string value)
Parameters
Type Name Description
IVersionable item
CodeValue property
System.String value

UpdateProperty(IVersionable, MultilingualString, MultilingualString)

Updates a property, if the value is different than the existing value.

Declaration
public void UpdateProperty(IVersionable item, MultilingualString x, MultilingualString y)
Parameters
Type Name Description
IVersionable item
MultilingualString x
MultilingualString y

UpdateProperty(IVersionable, MultilingualString, String, String)

Updates a property, if the value is different than the existing value.

Declaration
public void UpdateProperty(IVersionable item, MultilingualString mlstr, string language, string newValue)
Parameters
Type Name Description
IVersionable item
MultilingualString mlstr
System.String language
System.String newValue

UpdateProperty(IVersionable, Nullable<Decimal>, Action<Nullable<Decimal>>, Nullable<Int32>)

Updates a property, if the value is different than the existing value.

Declaration
public void UpdateProperty(IVersionable item, decimal ? existingValue, Action<decimal ? > propertySetter, int ? newValue)
Parameters
Type Name Description
IVersionable item
System.Nullable<System.Decimal> existingValue
Action<System.Nullable<System.Decimal>> propertySetter
System.Nullable<System.Int32> newValue

UpdateProperty(IVersionable, Nullable<Int32>, Action<Nullable<Int32>>, Nullable<Int32>)

Updates a property, if the value is different than the existing value.

Declaration
public void UpdateProperty(IVersionable item, int ? existingValue, Action<int ? > propertySetter, int ? newValue)
Parameters
Type Name Description
IVersionable item
System.Nullable<System.Int32> existingValue
Action<System.Nullable<System.Int32>> propertySetter
System.Nullable<System.Int32> newValue

UpdateProperty(IVersionable, Uri, Action<Uri>, Uri)

Updates a property, if the value is different than the existing value.

Declaration
public void UpdateProperty(IVersionable item, Uri existingValue, Action<Uri> propertySetter, Uri newValue)
Parameters
Type Name Description
IVersionable item
Uri existingValue
Action<Uri> propertySetter
Uri newValue

UpdateUserAttribute(IVersionable, String, String)

Ensures the OtherMaterial with the specified key/title exists, creating it if necesseary.

Declaration
public void UpdateUserAttribute(IVersionable item, string key, string value)
Parameters
Type Name Description
IVersionable item
System.String key
System.String value

Extension Methods

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