/// <summary> /// Saves the activity settings. /// </summary> public override ActivitySettingsPartData PersistSettings() { ActivitySettingsPartData data = new ActivitySettingsPartData(); data[OktaFactorReset.AllowedFactorTypesPropertyName] = this.GetText(OktaFactorResetUI.AllowedFactorTypesID); data[OktaFactorReset.TenantUrlPropertyName] = this.GetText(OktaFactorResetUI.TenantUrlID); data[OktaFactorReset.OktaIdAttributeNamePropertyName] = this.GetText(OktaFactorResetUI.OktaIdAttributeNameID); return(data); }
/// <summary> /// Saves the activity settings. /// </summary> public override ActivitySettingsPartData PersistSettings() { ActivitySettingsPartData data = new ActivitySettingsPartData(); data["_upnSuffix"] = this.GetText("_upnSuffix"); // data["_src"] = this.GetText("_src"); //data["_dest"] = this.GetText("_dest"); return(data); }
public override void RestoreSettings(ActivitySettingsPartData activitySettingsPartData) { if (activitySettingsPartData != null) { this.SetText("txtPowerShellVariables", (String)activitySettingsPartData["PowerShellVariables"]); this.SetText("txtPowerShellModule", (String)activitySettingsPartData["PowerShellModule"]); this.SetText("txtScript", (String)activitySettingsPartData["Script"]); } }
/// <summary> /// Saves the activity settings. /// </summary> public override ActivitySettingsPartData PersistSettings() { ActivitySettingsPartData activitySettingsPartData = new ActivitySettingsPartData(); activitySettingsPartData["PowerShellVariables"] = this.GetText("txtPowerShellVariables"); activitySettingsPartData["PowerShellModule"] = this.GetText("txtPowerShellModule"); activitySettingsPartData["Script"] = this.GetText("txtScript"); activitySettingsPartData["WorkflowDataNameForOutput"] = this.GetText("txtWorkflowDataNameForOutput"); return activitySettingsPartData; }
public override void RestoreSettings(ActivitySettingsPartData activitySettingsPartData) { if (activitySettingsPartData != null) { this.SetText("txtPowerShellVariables", (String)activitySettingsPartData["PowerShellVariables"]); this.SetText("txtPowerShellModule", (String)activitySettingsPartData["PowerShellModule"]); this.SetText("txtScript", (String)activitySettingsPartData["Script"]); } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// Converts the activity settings part data to a list of definitions /// which can be applied to the available definition listings (web controls) /// Assigning a definition to a listing will make it active and visible /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public void RestoreSettings(ActivitySettingsPartData data) { this.ResetListings(); DefinitionsConverter converter = new DefinitionsConverter(data, this.Id); for (int i = 0; i < converter.Definitions.Count; i++) { this.definitionListings[i].Definition = converter.Definitions[i]; } }
/// <summary> /// Saves the activity settings. /// </summary> public override ActivitySettingsPartData PersistSettings() { ActivitySettingsPartData data = new ActivitySettingsPartData(); data[OktaGroupMembership.AllowedFactorTypesPropertyName] = this.GetText(OktaGroupMembershipUI.OktaGroupID); data[OktaGroupMembership.TenantUrlPropertyName] = this.GetText(OktaGroupMembershipUI.TenantUrlID); data[OktaGroupMembership.OktaIdAttributeNamePropertyName] = this.GetText(OktaGroupMembershipUI.OktaIdAttributeNameID); data[OktaGroupMembership.MembershipOperationPropertyName] = this.GetDropDownValue(OktaGroupMembershipUI.MembershipOperationID); return(data); }
/// <summary> /// Saves the activity settings. /// </summary> public override ActivitySettingsPartData PersistSettings() { ActivitySettingsPartData activitySettingsPartData = new ActivitySettingsPartData(); activitySettingsPartData["PowerShellVariables"] = this.GetText("txtPowerShellVariables"); activitySettingsPartData["PowerShellModule"] = this.GetText("txtPowerShellModule"); activitySettingsPartData["Script"] = this.GetText("txtScript"); activitySettingsPartData["WorkflowDataNameForOutput"] = this.GetText("txtWorkflowDataNameForOutput"); return(activitySettingsPartData); }
/// <summary> /// Restores the activity settings in the UI /// </summary> public override void RestoreSettings(ActivitySettingsPartData data) { if (data == null) { return; } this.SetText(OktaFactorResetUI.AllowedFactorTypesID, (string)data[OktaFactorReset.AllowedFactorTypesPropertyName]); this.SetText(OktaFactorResetUI.TenantUrlID, (string)data[OktaFactorReset.TenantUrlPropertyName]); this.SetText(OktaFactorResetUI.OktaIdAttributeNameID, (string)data[OktaFactorReset.OktaIdAttributeNamePropertyName]); }
/// <summary> /// Restores the activity settings in the UI /// </summary> public override void RestoreSettings(ActivitySettingsPartData data) { if (data == null) { return; } this.SetText(OktaGroupMembershipUI.OktaGroupID, (string)data[OktaGroupMembership.AllowedFactorTypesPropertyName]); this.SetText(OktaGroupMembershipUI.TenantUrlID, (string)data[OktaGroupMembership.TenantUrlPropertyName]); this.SetText(OktaGroupMembershipUI.OktaIdAttributeNameID, (string)data[OktaGroupMembership.OktaIdAttributeNamePropertyName]); this.SetDropDownValue(OktaGroupMembershipUI.MembershipOperationID, (string)data[OktaGroupMembership.MembershipOperationPropertyName]); }
public override void RestoreSettings(ActivitySettingsPartData data) { if (data != null) { setControlText("txtActivityName", "" + data["TheActivityName"]); setControlText("ddlActor", "" + data["ActorID"].ToString()); setControlText("txtPropertyCount", "" + data["PropertyCount"].ToString()); setControlText("ddlReturnType", "" + data["ReturnType"].ToString()); setControlText("tbTarget", "" + data["Target"].ToString()); setControlText("ddlLanguage", "" + data["Language"].ToString()); setControlText("tbCode", "" + data["Code"].ToString()); setControlText("txtParamList", "" + data["Parameters"].ToString()); setControlText("txtIncludes", "" + data["Includes"].ToString()); setControlText("txtAssemblies", "" + data["Assemblies"].ToString()); } }
public override ActivitySettingsPartData PersistSettings() { ActivitySettingsPartData data = new ActivitySettingsPartData(); data["TheActivityName"] = getControlText("txtActivityName"); data["ActorID"] = new Guid(getControlText("ddlActor")); data["PropertyCount"] = getControlText("txtPropertyCount"); data["ReturnType"] = getControlText("ddlReturnType"); data["Target"] = getControlText("tbTarget"); data["Language"] = getControlText("ddlLanguage"); data["Code"] = getControlText("tbCode"); data["Parameters"] = getControlText("txtParamList"); data["Includes"] = getControlText("txtIncludes"); data["Assemblies"] = getControlText("txtAssemblies"); return(data); }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Use the controller and definitions controller to restore settings for activity controls this.controller.RestoreSettings(data); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { this.controller.RestoreSettings(data); this.ManageAdvancedControls(); this.ManageTargetControl(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Saves the current UI control settings. /// </summary> /// <returns>Returns <see cref="ActivitySettingsPartData"/>.</returns> public override ActivitySettingsPartData PersistSettings() { Logger.Instance.WriteMethodEntry(); try { // Use the controller to persist the settings for standard activity controls // The definitions controller will manage persistance of associated values ActivitySettingsPartData data = this.controller.PersistSettings(); return(data); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Saves the current UI control settings. /// </summary> /// <returns>Returns <see cref="ActivitySettingsPartData"/>.</returns> public override ActivitySettingsPartData PersistSettings() { Logger.Instance.WriteMethodEntry(); try { // Use the controller to persist the settings for standard activity controls ActivitySettingsPartData data = this.controller.PersistSettings(); data = this.ldapQueries.PersistSettings(data); data["ValueExpressions"] = this.FetchValueExpressions(); return(data); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Initializes a new instance of the <see cref="DefinitionsConverter"/> class. /// </summary> /// <param name="definitionListings">The definition listings.</param> /// <param name="settingsPartData">The settings part data.</param> /// <param name="controllerId">The controller identifier.</param> public DefinitionsConverter(IEnumerable <DefinitionListing> definitionListings, ActivitySettingsPartData settingsPartData, string controllerId) { // This constructor handles a list of definition listings which exist for a controller // Throw an exception if that list is null if (definitionListings == null) { throw Logger.Instance.ReportError(new ArgumentNullException("definitionListings", ActivitySettings.NullDefinitionListingsError)); } // If settings part data was supplied, the activity has other controls which were // stored to the data before calling this constructor // In this circumstance, the published definitions settings part data needs // to start with the provided data so we don't lose those values if (settingsPartData != null) { this.settingsPartData = settingsPartData; } int i = 0; foreach (DefinitionListing listing in definitionListings.Where(listing => listing.Active && listing.Definition != null)) { // For each active listing where the definition can be appropriately constructed: // Add the definition to the published list // Add the definition to the published settings part data // Add each value of the definition to the published hash table this.definitions.Add(listing.Definition); this.settingsPartData[string.Format(CultureInfo.InvariantCulture, "Definition:{0}:{1}", listing.ControllerId, i)] = listing.Definition; this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:0", i), listing.Definition.Left); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:1", i), listing.Definition.Right); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:2", i), listing.Definition.Check); i += 1; } // Add the number of active definitions to the published hashtable and settings part data // so that it can be used later to reconstruct a list of definitions this.definitionsTable.Add("Count", i); this.settingsPartData[string.Format(CultureInfo.InvariantCulture, "{0}:Count", controllerId)] = i; }
/// <summary> /// Initializes a new instance of the <see cref="DefinitionsConverter"/> class. /// </summary> /// <param name="definitionListings">The definition listings.</param> /// <param name="settingsPartData">The settings part data.</param> /// <param name="controllerId">The controller identifier.</param> public DefinitionsConverter(IEnumerable<DefinitionListing> definitionListings, ActivitySettingsPartData settingsPartData, string controllerId) { // This constructor handles a list of definition listings which exist for a controller // Throw an exception if that list is null if (definitionListings == null) { throw Logger.Instance.ReportError(new ArgumentNullException("definitionListings", ActivitySettings.NullDefinitionListingsError)); } // If settings part data was supplied, the activity has other controls which were // stored to the data before calling this constructor // In this circumstance, the published definitions settings part data needs // to start with the provided data so we don't lose those values if (settingsPartData != null) { this.settingsPartData = settingsPartData; } int i = 0; foreach (DefinitionListing listing in definitionListings.Where(listing => listing.Active && listing.Definition != null)) { // For each active listing where the definition can be appropriately constructed: // Add the definition to the published list // Add the definition to the published settings part data // Add each value of the definition to the published hash table this.definitions.Add(listing.Definition); this.settingsPartData[string.Format(CultureInfo.InvariantCulture, "Definition:{0}:{1}", listing.ControllerId, i)] = listing.Definition; this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:0", i), listing.Definition.Left); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:1", i), listing.Definition.Right); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:2", i), listing.Definition.Check); i += 1; } // Add the number of active definitions to the published hashtable and settings part data // so that it can be used later to reconstruct a list of definitions this.definitionsTable.Add("Count", i); this.settingsPartData[string.Format(CultureInfo.InvariantCulture, "{0}:Count", controllerId)] = i; }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Use the controller and definitions controller to restore settings for activity controls this.controller.RestoreSettings(data); this.queries.RestoreSettings(data); this.workflowDataVariables.RestoreSettings(data); this.ManageQueryControls(); this.ManageAdvancedControls(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Saves the current UI control settings. /// </summary> /// <returns>Returns <see cref="ActivitySettingsPartData"/>.</returns> public override ActivitySettingsPartData PersistSettings() { Logger.Instance.WriteMethodEntry(); try { // The standard form controller will persist most settings // Parameters will be persisted using the definitions controller, // but arguments implement custom logic because we're only interested in an array list of values ActivitySettingsPartData data = this.controller.PersistSettings(); this.parameters.PersistSettings(data); data["Arguments"] = this.FetchArguments(); return(data); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Saves the current UI control settings. /// </summary> /// <returns>Returns <see cref="ActivitySettingsPartData"/>.</returns> public ActivitySettingsPartData PersistSettings() { // Build a new activity settings part data object // and loop through each control managed by the controller to add its value ActivitySettingsPartData data = new ActivitySettingsPartData(); foreach (ActivityControl control in this.controls) { // Because the value is based on the activity control type, // determine the type of the control before adding it to the settings part data if (control.GetType() == typeof(ActivityTextBox)) { data[control.ID] = ((ActivityTextBox)control).Value; } else if (control.GetType() == typeof(ActivityTextBoxMultiline)) { data[control.ID] = ((ActivityTextBoxMultiline)control).Value; } else if (control.GetType() == typeof(ActivityTextBoxNumeric)) { data[control.ID] = ((ActivityTextBoxNumeric)control).Value; } else if (control.GetType() == typeof(ActivityTextBoxGuid)) { data[control.ID] = ((ActivityTextBoxGuid)control).Value; } else if (control.GetType() == typeof(ActivityCheckBox)) { data[control.ID] = ((ActivityCheckBox)control).Value; } else if (control.GetType() == typeof(ActivityDropDownList)) { data[control.ID] = ((ActivityDropDownList)control).Value; } else if (control.GetType() == typeof(ActivityRadioButtonList)) { data[control.ID] = ((ActivityRadioButtonList)control).Value; } } return data; }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Restore settings for activity controls and apply the logic which // manages the control visibility and configuration this.controller.RestoreSettings(data); this.parameters.RestoreSettings(data); if (data != null && data["Arguments"] != null) { this.LoadArguments((ArrayList)data["Arguments"]); } this.ManageScriptControl(); this.ManageInputControls(); this.ManageReturnValueLookupControl(); this.ManageImpersonationControls(); this.ManageAdvancedControls(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
public override void RestoreSettings(ActivitySettingsPartData data) { }
public override ActivitySettingsPartData PersistSettings() { //Nothing to track yet; might add resolver grammer ActivitySettingsPartData data = new ActivitySettingsPartData(); return data; }
/// <summary> /// Initializes a new instance of the <see cref="DefinitionsConverter"/> class. /// </summary> /// <param name="settingsPartData">The settings part data.</param> /// <param name="controllerId">The controller identifier.</param> public DefinitionsConverter(ActivitySettingsPartData settingsPartData, string controllerId) { // This constructor handles activity settings part data provided by the activity settings part interface // Do nothing if that data is null or missing the Count key which indicates how many definitions it stores if (settingsPartData == null || settingsPartData[string.Format(CultureInfo.InvariantCulture, "{0}:Count", controllerId)] == null) { return; } // Publish the supplied settings part data this.settingsPartData = settingsPartData; // Extract the number of definitions stored in the table // and publish it to the hashtable int count = (int)settingsPartData[string.Format(CultureInfo.InvariantCulture, "{0}:Count", controllerId)]; this.definitionsTable.Add("Count", count); for (int i = 0; i < count; i++) { string id = string.Format(CultureInfo.InvariantCulture, "Definition:{0}:{1}", controllerId, i); if (settingsPartData[id] != null) { // For each definition: // Add the definition to the published list // Add each value of the definition to the published hash table Definition definition = (Definition)settingsPartData[id]; this.definitions.Add(definition); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:0", i), definition.Left); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:1", i), definition.Right); this.definitionsTable.Add(string.Format(CultureInfo.InvariantCulture, "{0}:2", i), definition.Check); } } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// Converts the activity settings part data to a list of definitions /// which can be applied to the available definition listings (web controls) /// Assigning a definition to a listing will make it active and visible /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public void RestoreSettings(ActivitySettingsPartData data) { this.ResetListings(); DefinitionsConverter converter = new DefinitionsConverter(data, this.Id); for (int i = 0; i < converter.Definitions.Count; i++) { this.definitionListings[i].Definition = converter.Definitions[i]; } }
/// <summary> /// Saves the current UI control settings. /// Converts the definition listings (web controls) to settings part data entries /// If an existing settings part data object (presumably created by the form controller) was supplied, /// all settings part data for the definition listings will be added to the existing data /// </summary> /// <param name="data">The <see cref="ActivitySettingsPartData"/> data created by the form controller.</param> /// <returns>Returns <see cref="ActivitySettingsPartData"/>.</returns> public ActivitySettingsPartData PersistSettings(ActivitySettingsPartData data) { DefinitionsConverter converter = new DefinitionsConverter(this.definitionListings, data, this.Id); return(converter.SettingsPartData); }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Use the controller and definitions controllers to restore settings for activity controls // Run the methods which manage the visibility of the query and conflict controls this.controller.RestoreSettings(data); this.queries.RestoreSettings(data); this.attributes.RestoreSettings(data); this.ManageQueryControls(); this.ManageActorControls(); this.ManageConflictControls(); this.ManageAdvancedControls(); this.ManageFeatureDisablement(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Use the controller and definitions controller to restore settings for activity controls this.controller.RestoreSettings(data); this.ldapQueries.RestoreSettings(data); if (data != null && data["ValueExpressions"] != null) { this.LoadValueExpressions((ArrayList)data["ValueExpressions"]); } this.ManageQueryLdapControls(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Use the controller and definitions controllers to restore settings for activity controls // and apply the logic which manages control visibility this.controller.RestoreSettings(data); this.queries.RestoreSettings(data); this.updates.RestoreSettings(data); this.ManageQueryControls(); this.ManageActorControls(); this.ManageAdvancedControls(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public void RestoreSettings(ActivitySettingsPartData data) { foreach (ActivityControl control in this.controls.Where(control => data != null && data[control.ID] != null)) { // If a key was identified for the control, extract the value from the settings part data // and assign it to the activity control based on its type if (control.GetType() == typeof(ActivityTextBox)) { ((ActivityTextBox)control).Value = (string)data[control.ID]; } else if (control.GetType() == typeof(ActivityTextBoxMultiline)) { ((ActivityTextBoxMultiline)control).Value = (string)data[control.ID]; } else if (control.GetType() == typeof(ActivityTextBoxNumeric)) { ((ActivityTextBoxNumeric)control).Value = (int)data[control.ID]; } else if (control.GetType() == typeof(ActivityTextBoxGuid)) { ((ActivityTextBoxGuid)control).Value = (Guid)data[control.ID]; } else if (control.GetType() == typeof(ActivityCheckBox)) { ((ActivityCheckBox)control).Value = (bool)data[control.ID]; } else if (control.GetType() == typeof(ActivityDropDownList)) { ((ActivityDropDownList)control).Value = (string)data[control.ID]; } else if (control.GetType() == typeof(ActivityRadioButtonList)) { ((ActivityRadioButtonList)control).Value = (string)data[control.ID]; } } }
/// <summary> /// Saves the current UI control settings. /// Converts the definition listings (web controls) to settings part data entries /// If an existing settings part data object (presumably created by the form controller) was supplied, /// all settings part data for the definition listings will be added to the existing data /// </summary> /// <param name="data">The <see cref="ActivitySettingsPartData"/> data created by the form controller.</param> /// <returns>Returns <see cref="ActivitySettingsPartData"/>.</returns> public ActivitySettingsPartData PersistSettings(ActivitySettingsPartData data) { DefinitionsConverter converter = new DefinitionsConverter(this.definitionListings, data, this.Id); return converter.SettingsPartData; }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { this.controller.RestoreSettings(data); this.ManageAdvancedControls(); this.ManageTargetControl(); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
/// <summary> /// Restores UI control settings stored in the data parameter. /// </summary> /// <param name="data">Contains data about the values of UI controls.</param> public override void RestoreSettings(ActivitySettingsPartData data) { Logger.Instance.WriteMethodEntry(); try { // Use the controller and definitions controller to restore settings for activity controls this.controller.RestoreSettings(data); } catch (Exception e) { Logger.Instance.ReportError(e); throw; } finally { Logger.Instance.WriteMethodExit(); } }
public override void RestoreSettings(ActivitySettingsPartData data) { }