Beispiel #1
0
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            ScanToFolderData data = executionData.GetMetadata <ScanToFolderData>(ConverterProvider.GetMetadataConverters());

            var manager = string.IsNullOrWhiteSpace(data.DigitalSendServer)
                          ? new NetworkFolderScanManager(executionData)
                          : new NetworkFolderScanManager(executionData, data.DigitalSendServer);

            manager.ActivityStatusChanged += UpdateStatus;
            manager.DeviceSelected        += UpdateDevice;
            return(manager.RunScanActivity());
        }
        /// <summary>
        /// Validates the given metadata against the ScanToFolder Activity data.
        /// </summary>
        /// <param name="configurationData">The configuration data.</param>
        /// <returns>true if valid</returns>
        public bool ValidateMetadata(ref PluginConfigurationData configurationData)
        {
            bool             validData    = true;
            ScanToFolderData activityData = null;

            try
            {
                activityData = configurationData.GetMetadata <ScanToFolderData>(ConverterProvider.GetMetadataConverters());
            }
            catch
            {
                activityData = new ScanToFolderData();
                validData    = false;
            }

            configurationData = new PluginConfigurationData(activityData, ScanToFolderConfigControl.Version);

            return(validData);
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NetworkFolderScanManager" /> class.
 /// </summary>
 /// <param name="executionData">The execution data.</param>
 /// <param name="scanOptions">The scan options.</param>
 /// <param name="serverName">Name of the server.</param>
 public NetworkFolderScanManager(PluginExecutionData executionData, string serverName)
     : base(executionData, serverName)
 {
     _data       = executionData.GetMetadata <ScanToFolderData>(ConverterProvider.GetMetadataConverters());
     ScanOptions = _data.ScanOptions;
 }
        /// <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)
        {
            ScanToFolderData activityData = configuration.GetMetadata <ScanToFolderData>(ConverterProvider.GetMetadataConverters());

            ConfigureControls(activityData);

            assetSelectionControl.Initialize(configuration.Assets, _deviceAttributes);
            assetSelectionControl.AdfDocuments = configuration.Documents;
        }