Ejemplo n.º 1
0
        public void Update(String callingUserLogin, String reasonForUpdate)
        {
            if (Metadata.ValuesHaveChanged)
            {
                WBLogging.RecordsTypes.Verbose("In WBRecords.Update() With changed metadata values - so saving the update");
                ProtectedMasterRecord.MaybeUpdateRecordColumns(callingUserLogin, Metadata, WBRecord.DefaultMasterColumnsToSave, reasonForUpdate);

                WBLogging.RecordsTypes.Verbose("In WBRecords.Update() Updated the master record.");

                UpdateWhichLibrariesNeedACopy();
                WBLogging.RecordsTypes.Verbose("In WBRecords.Update() Updated list of libraries that need a copy: " + String.Join(";", _librariesNeedingACopy.ToArray()));

                CheckNoCopiesInWrongLibraries();
                WBLogging.RecordsTypes.Verbose("In WBRecords.Update() Removed any copies from libraries that don't need a copy: " + String.Join(";", this._librariesMustNotHaveCopy.ToArray()));

                CheckAllCopiesAreCreatedAndLoaded(null);
                WBLogging.RecordsTypes.Verbose("In WBRecords.Update() Checked that there at least exists a copy in each library that needs a copy");

                foreach (WBDocument recordCopy in _recordCopies.Values)
                {
                    WBLogging.RecordsTypes.Verbose("In WBRecords.Update() About to update metadata in record copy in: " + recordCopy.RecordsLibrary.URL);
                    recordCopy.MaybeUpdateRecordColumns(callingUserLogin, Metadata, WBRecord.DefaultColumnsToCopy, reasonForUpdate);
                    WBLogging.RecordsTypes.Verbose("In WBRecords.Update() Finished updating metadata in record copy in: " + recordCopy.RecordsLibrary.URL);
                }
            }
        }
Ejemplo n.º 2
0
        public void UpdateMasterAndCreateCopies(WBTaskFeedback feedback, String callingUser)
        {
            ProtectedMasterRecord.MaybeCopyColumns(Metadata, WBRecord.DefaultMasterColumnsToSave);
            ProtectedMasterRecord.UpdateAs(callingUser);
            if (feedback != null)
            {
                feedback.AddFeedback("Updated metadata in protected, master records library");
            }

            UpdateWhichLibrariesNeedACopy();
            CheckAllCopiesAreCreatedAndLoaded(feedback);
        }
Ejemplo n.º 3
0
 public bool IsNullOrEmpty(WBColumn column)
 {
     return(ProtectedMasterRecord.IsNullOrEmpty(column));
 }