public PluginExecutionResult Execute(PluginExecutionData executionData) { ScanToEmailData data = executionData.GetMetadata <ScanToEmailData>(ConverterProvider.GetMetadataConverters()); var manager = string.IsNullOrWhiteSpace(data.DigitalSendServer) ? new EmailScanManager(executionData) : new EmailScanManager(executionData, data.DigitalSendServer); manager.ActivityStatusChanged += UpdateStatus; manager.DeviceSelected += UpdateDevice; return(manager.RunScanActivity()); }
/// <summary> /// Validates the given metadata against the ScanToEmail Activity data. /// </summary> /// <param name="configurationData">The configuration data.</param> /// <returns>true if valid</returns> public bool ValidateMetadata(ref PluginConfigurationData configurationData) { bool validData = true; ScanToEmailData activityData = null; try { activityData = configurationData.GetMetadata <ScanToEmailData>(ConverterProvider.GetMetadataConverters()); } catch { activityData = new ScanToEmailData(); validData = false; } configurationData = new PluginConfigurationData(activityData, ScanToEmailConfigControl.Version); return(validData); }
/// <summary> /// Initializes this configuration control with the specified <see cref="PluginConfigurationData" />. /// </summary> /// <param name="configuration">The configuration data.</param> /// <param name="environment">Information about the plugin environment.</param> public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment) { ScanToEmailData activityData = configuration.GetMetadata <ScanToEmailData>(ConverterProvider.GetMetadataConverters()); ConfigureControls(activityData); assetSelectionControl.Initialize(configuration.Assets, DeviceAttributes); assetSelectionControl.AdfDocuments = configuration.Documents; lockTimeoutControl.Initialize(activityData.ScanOptions.LockTimeouts); }
public EmailScanManager(PluginExecutionData executionData, string serverName) : base(executionData, serverName) { _data = executionData.GetMetadata <ScanToEmailData>(ConverterProvider.GetMetadataConverters()); ScanOptions = _data.ScanOptions; }