/// <summary> /// This method is used to record the status of switching to the windows based claims authentication. /// </summary> public void RecordDisableClaimsBasedAuthentication() { Action function = () => { IMS_FSSHTTP_FSSHTTPBSUTControlAdapter sutAdapter = this.site.GetAdapter <IMS_FSSHTTP_FSSHTTPBSUTControlAdapter>(); if (!sutAdapter.SwitchClaimsAuthentication(true)) { this.errorMessage.Add("Failed to enable claims based authentication."); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(ServerStatus.DisableClaimsBasedAuthentication, function); }
/// <summary> /// This method is used to record the status of disable coauthoring feature. /// </summary> public void RecordDisableCoauth() { Action function = () => { IMS_FSSHTTP_FSSHTTPBSUTControlAdapter sutAdapter = this.site.GetAdapter <IMS_FSSHTTP_FSSHTTPBSUTControlAdapter>(); if (!sutAdapter.SwitchCoauthoringFeature(false)) { this.errorMessage.Add("Failed to enable coauthoring feature."); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(ServerStatus.DisableCoauth, function); }
/// <summary> /// This method is used to record the status of disable the versioning for the specified document library. /// </summary> /// <param name="documentLibraryName">Specify the document library name.</param> public void RecordDisableVersioning(string documentLibraryName) { Action function = () => { IMS_FSSHTTP_FSSHTTPBSUTControlAdapter sutAdapter = this.site.GetAdapter <IMS_FSSHTTP_FSSHTTPBSUTControlAdapter>(); if (!sutAdapter.SwitchMajorVersioning(documentLibraryName, true)) { this.errorMessage.Add(string.Format("Failed to enable versioning on the document library {0}.", documentLibraryName)); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(ServerStatus.DisableVersioning, function); }
/// <summary> /// This method is used to record the specified file URL which has been checked out. /// </summary> /// <param name="fileUrl">Specify the file URL which has been checked out.</param> /// <param name="userName">Specify the user name of the user who calls cell storage service.</param> /// <param name="password">Specify the password of the user who calls cell storage service.</param> /// <param name="domain">Specify the domain of the user who calls cell storage service.</param> public void RecordFileCheckOut(string fileUrl, string userName, string password, string domain) { Action function = () => { IMS_FSSHTTP_FSSHTTPBSUTControlAdapter sutAdapter = this.site.GetAdapter <IMS_FSSHTTP_FSSHTTPBSUTControlAdapter>(); if (!sutAdapter.CheckInFile(fileUrl, userName, password, domain, "Check In for test purpose.")) { this.errorMessage.Add(string.Format("Failed to check in the file {0} using the user {1}/{2} and password: {3}", fileUrl, userName, domain, password)); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(fileUrl, function, KeyStatus.CheckOut); }
/// <summary> /// This method is used to record the status of saving file to document library that needs files checked out. /// </summary> public void RecordDocumentLibraryCheckOutRequired() { Action function = () => { IMS_FSSHTTP_FSSHTTPBSUTControlAdapter sutAdapter = this.site.GetAdapter <IMS_FSSHTTP_FSSHTTPBSUTControlAdapter>(); if (!sutAdapter.ChangeDocLibraryStatus(false)) { this.errorMessage.Add("Failed to change the status of saving document to the library that does not require check out files."); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(ServerStatus.CheckOutRequired, function); }