private static void PrepareParameters(FixGroupMastersAndCollectionsParameters parameters) { }
private static object executeAdminOperationWithFormValues(IContainerOwner containerOwner, string operationName, NameValueCollection form, HttpFileCollection fileContent) { var filterFields = new string[] { "ExecuteOperation", "ObjectDomainName", "ObjectName", "ObjectID", "NORELOAD" }; string adminGroupID = InstanceConfiguration.AdminGroupID; if(containerOwner.LocationPrefix != adminGroupID) throw new SecurityException("Only Admin Group can execute these operations"); switch (operationName) { case "FixAllGroupsMastersAndCollections": { var allGroupIDs = TBRGroupRoot.GetAllGroupIDs(); foreach (var groupID in allGroupIDs) { Debug.WriteLine("Fixing group: " + groupID); FixGroupMastersAndCollectionsParameters parameters = new FixGroupMastersAndCollectionsParameters () { GroupID = groupID }; FixGroupMastersAndCollections.Execute(parameters); } break; } case "FixGroupMastersAndCollections": { FixGroupMastersAndCollectionsParameters parameters = new FixGroupMastersAndCollectionsParameters () { GroupID = form["GroupID"] }; FixGroupMastersAndCollections.Execute(parameters); break; } default: throw new NotSupportedException("Operation not (yet) supported: " + operationName); } return null; }
public static void Execute(FixGroupMastersAndCollectionsParameters parameters) { PrepareParameters(parameters); FixGroupMastersAndCollectionsImplementation.ExecuteMethod_FixMastersAndCollections(parameters.GroupID); }