/// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="userConnection">Instance of the UserConnection.</param>
 /// <param name="campaignId">Campaign identifier.</param>
 protected BaseCampaignAudience(UserConnection userConnection, Guid campaignId)
 {
     userConnection.CheckArgumentNull("userConnection");
     campaignId.CheckArgumentEmpty("campaignId");
     UserConnection = userConnection;
     CampaignId     = campaignId;
 }
 public IncludeEntitiesInFolderExecutor(UserConnection userConnection, FolderActionParameters parameters)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     parameters.CheckArgumentNull(nameof(parameters));
     _userConnection = userConnection;
     _parameters     = parameters;
 }
        /// <inheritdoc cref="IForecastSummaryColumnCalculator.ApplySummaryColumns"/>
        public void ApplySummaryColumns(UserConnection userConnection, ICollection <TableColumn> columns)
        {
            userConnection.CheckArgumentNull(nameof(userConnection));
            if (columns.IsEmpty() || columns.Any(c => c.Code == SummaryCode))
            {
                return;
            }
            var summaryColumn = new TableColumn {
                Code     = SummaryCode,
                Caption  = userConnection.GetLocalizableString("ForecastLczResources", "SummaryCaption"),
                Children = new List <TableColumn>()
            };
            var subColumns = columns.ElementAt(0).Children;

            foreach (TableColumn column in subColumns)
            {
                if (!column.IsHide)
                {
                    summaryColumn.Children.Add(new TableColumn {
                        Caption = column.Caption,
                        Code    = column.Code,
                        Id      = column.Id
                    });
                }
            }
            columns.Add(summaryColumn);
        }
 public CurrencyRateStorage(UserConnection userConnection, EntitySchema schema)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     schema.CheckArgumentNull(nameof(schema));
     UserConnection     = userConnection;
     CurrencyRateSchema = schema;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes the specified EntitySchemaQuery filters.
        /// </summary>
        /// <param name="userConnection">User connection.</param>
        /// <param name="processActivity">Process activity.</param>
        /// <param name="entitySchema">Entity schema.</param>
        /// <param name="esq">Instance of the EntitySchemaQuery class.</param>
        /// <param name="dataSourceFilters">Serialized filters.</param>
        public static void SpecifyESQFilters(UserConnection userConnection, ProcessActivity processActivity,
                                             EntitySchema entitySchema, EntitySchemaQuery esq, string dataSourceFilters)
        {
            userConnection.CheckArgumentNull("userConnection");
            processActivity.CheckArgumentNull("processActivity");
            entitySchema.CheckArgumentNull("entitySchema");
            esq.CheckArgumentNull("esq");
            if (string.IsNullOrEmpty(dataSourceFilters))
            {
                return;
            }
            IEntitySchemaQueryFilterItem esqFilter;
            var userConnectionArgument             = new ConstructorArgument("userConnection", userConnection);
            var processDataContractFilterConverter = ClassFactory
                                                     .Get <IProcessDataContractFilterConverter>(userConnectionArgument);

            if (processDataContractFilterConverter.GetIsDataContractFilter(dataSourceFilters))
            {
                ServiceConfig.Initialize();
                esqFilter = processDataContractFilterConverter.ConvertToEntitySchemaQueryFilterItem(esq,
                                                                                                    processActivity.Owner, dataSourceFilters);
            }
            else
            {
                DataSourceFilterCollection filterCollection = ConvertToProcessDataSourceFilterCollection(userConnection,
                                                                                                         entitySchema, processActivity, dataSourceFilters);
                esqFilter = filterCollection.ToEntitySchemaQueryFilterCollection(esq);
            }
            esq.Filters.Add(esqFilter);
        }
Ejemplo n.º 6
0
 public CopyOrderProductsFromOpportunityOperation(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     UserConnection     = userConnection;
     OrderProductSchema = UserConnection.EntitySchemaManager
                          .GetInstanceByName(OrderProductSchemaName);
 }
Ejemplo n.º 7
0
 public EsnSecurityEngine(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     userConnection.DBSecurityEngine.CheckDependencyNull("UserConnection.DBSecurityEngine");
     _userConnection = userConnection;
     _permissions    = new Dictionary <Guid, bool>();
 }
Ejemplo n.º 8
0
 public RemindingRepository(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     _userConnection = userConnection;
     _notificationSettingsRepository = ClassFactory.Get <NotificationSettingsRepository>(
         new ConstructorArgument("userConnection", _userConnection));
 }
 /// <summary>
 /// Creates a new instance with specified user connection.
 /// </summary>
 /// <param name="userConnection">User connection.</param>
 /// <param name="channelManager">Channel manager.</param>
 public NotificationMessageChannel(UserConnection userConnection, IMsgChannelManager channelManager)
 {
     userConnection.CheckArgumentNull("userConnection");
     channelManager.CheckArgumentNull("channelManager");
     _userConnection = userConnection;
     _channelManager = channelManager;
 }
 public FullPipelineDataRetriever(UserConnection userConnection,
                                  IFullPipelineQueryBuilder builder)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     builder.CheckArgumentNull(nameof(builder));
     _userConnection = userConnection;
     _builder        = builder;
 }
Ejemplo n.º 11
0
 public void Execute(UserConnection userConnection, IDictionary <string, object> parameters)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     _userConnection = userConnection;
     if (_userConnection.GetIsFeatureEnabled("NotificationV2"))
     {
         InternalExecute();
     }
 }
 /// <summary>
 /// Creates a new instance of the <see cref="QueueCacheHelper"/> type.
 /// </summary>
 /// <param name="userConnection">User connection.</param>
 /// <param name="esq">Represents query for the queue object schema.</param>
 public QueueCacheHelper(UserConnection userConnection, EntitySchemaQuery esq)
 {
     userConnection.CheckArgumentNull("userConnection");
     esq.CheckArgumentNull("esq");
     _userConnection   = userConnection;
     esq.Cache         = _applicationCache;
     esq.CacheItemName = _cacheItemName;
     _esq = esq;
 }
 public CacheGetRepositoryProxy(UserConnection userConnection, IGetRepository <TData> repository, string schemaName)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     repository.CheckArgumentNull(nameof(repository));
     schemaName.CheckArgumentNullOrWhiteSpace(nameof(schemaName));
     UserConnection = userConnection;
     Repository     = repository;
     SchemaName     = schemaName;
 }
 /// <summary>
 /// Creates a new instance with specified user connection.
 /// </summary>
 /// <param name="userConnection">User connection.</param>
 /// <param name="writeLog">Delegate to write log information.</param>
 public FillProcessElementNotifications(UserConnection userConnection, Action <string, MessageType> writeLog)
 {
     userConnection.CheckArgumentNull("userConnection");
     _userConnection = userConnection;
     if (writeLog != null)
     {
         _writeLog = writeLog;
     }
 }
 public ForecastSummaryRepository(UserConnection userConnection, IPeriodRepository periodRepository,
                                  IForecastColumnRepository columnRepository)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     periodRepository.CheckArgumentNull(nameof(periodRepository));
     columnRepository.CheckArgumentNull(nameof(columnRepository));
     UserConnection   = userConnection;
     PeriodRepository = periodRepository;
     ColumnRepository = columnRepository;
 }
        public PrimaryEntityFinder(UserConnection userConnection, IColumnsAggregatorAdapter columnsProcessor)
        {
            userConnection.CheckArgumentNull(nameof(UserConnection));
            columnsProcessor.CheckArgumentNull(nameof(IColumnsAggregatorAdapter));

            _userConnection = userConnection;

            _constructorArguments = new ConstructorArgument[] {
                new ConstructorArgument("columnsProcessor", columnsProcessor),
                new ConstructorArgument("userConnection", _userConnection)
            };
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Converts a set of filters to process format.
        /// </summary>
        /// <param name="userConnection">User connection.</param>
        /// <param name="entitySchema">Entity schema.</param>
        /// <param name="processActivity">Process activity.</param>
        /// <param name="dataSourceFilters">Serialized filters.</param>
        /// <returns>Set of filters in the process format.</returns>
        public static string ConvertToProcessDataSourceFilters(UserConnection userConnection, EntitySchema entitySchema,
                                                               ProcessActivity processActivity, string dataSourceFilters)
        {
            userConnection.CheckArgumentNull("userConnection");
            entitySchema.CheckArgumentNull("entitySchema");
            processActivity.CheckArgumentNull("processActivity");
            dataSourceFilters.CheckArgumentNullOrEmpty("dataSourceFilters");
            var userConnectionArgument            = new ConstructorArgument("userConnection", userConnection);
            var processDataSourceFiltersConverter = ClassFactory
                                                    .Get <IProcessDataSourceFiltersConverter>(userConnectionArgument);

            return(processDataSourceFiltersConverter.ConvertToProcessDataSourceFilters(processActivity,
                                                                                       entitySchema.UId, dataSourceFilters));
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MLModelTrainer"/> class.
        /// </summary>
        /// <param name="userConnection">The user connection.</param>
        /// <param name="modelConfig">The model configuration.</param>
        public MLModelTrainer(UserConnection userConnection, MLModelConfig modelConfig)
        {
            userConnection.CheckArgumentNull("userConnection");
            modelConfig.CheckArgumentNull("modelConfig");
            modelConfig.Id.CheckArgumentEmpty("MLModelConfig.Id");
            _userConnection = userConnection;
            _modelConfig    = modelConfig;
            _proxy          = InitServiceProxy();
            ConstructorArgument userConnectionArg = new ConstructorArgument("userConnection", _userConnection);

            _modelEventsNotifier = ClassFactory.Get <MLModelEventsNotifier>(userConnectionArg);
            _metadataGenerator   = ClassFactory.Get <IMLMetadataGenerator>();
            _queryBuilder        = ClassFactory.Get <IMLModelQueryBuilder>(userConnectionArg);
        }
 /// <inheritdoc cref="IForecastSummaryColumnCalculator.ApplySummaryData"/>
 public void ApplySummaryData(UserConnection userConnection, Guid forecastId, IEnumerable <TreeTableDataItem> records)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     records.CheckArgumentNull(nameof(records));
     if (records.IsEmpty())
     {
         return;
     }
     _userConnection = userConnection;
     ForecastColumns = ColumnRepository.GetColumns(forecastId);
     foreach (TreeTableDataItem record in records)
     {
         var calculatedCells = CalcSummaryCells(forecastId, record);
         record.ColumnValues.AddRange(calculatedCells);
     }
 }
        /// <summary>
        /// Converts attribute model with type <see cref="DCConstants.DCAttributeFilterTypeId"/> to <see cref="Select"/>.
        /// </summary>
        /// <param name="model">Extensible model object.</param>
        /// <param name="userConnection">User connection.</param>
        /// <returns>Converted <see cref="Select"/> object when attribute is filter and value is correct
        /// search data string. And null in othervise.</returns>
        public static Select ToFilter(this DCAttributeModel model, UserConnection userConnection)
        {
            model.CheckArgumentNull(nameof(model));
            userConnection.CheckArgumentNull(nameof(userConnection));
            if (!model.IsFilter())
            {
                return(null);
            }
            var dataSourceFilters = Json.Deserialize <Nui.ServiceModel.DataContract.Filters>(model.Value);
            var esq = new EntitySchemaQuery(userConnection.EntitySchemaManager, dataSourceFilters.RootSchemaName);

            esq.AddColumn(esq.RootSchema.GetPrimaryColumnName());
            IEntitySchemaQueryFilterItem filters = dataSourceFilters.BuildEsqFilter(esq.RootSchema.UId, userConnection);

            CommonUtilities.DisableEmptyEntitySchemaQueryFilters(new[] { filters });
            if (filters != null)
            {
                esq.Filters.Add(filters);
            }
            return(esq.GetSelectQuery(userConnection));
        }
Ejemplo n.º 21
0
 public ForecastSheetRepository(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     UserConnection = userConnection;
 }
 public ForecastSummaryProvider(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     _userConnection = userConnection;
 }
 public SysModuleStageHistoryRepository(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     UserConnection = userConnection;
 }
 public DeleteFolderCommand(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     _userConnection = userConnection;
 }
 public EsnMessageReader(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     UserConnection = userConnection;
 }
 /// <summary>
 /// Force synchronizes all campaign participants independently from campaign fragment execution results.
 /// </summary>
 /// <param name="userConnection">An instance of <see cref="UserConnection"/>.</param>
 /// <param name="campaignSchema">Current instance of <see cref="CoreCampaignSchema"/>.</param>
 /// <returns>Count of synchronized campaign participants.</returns>
 public CampaignSynchronizationInfo ForceSynchronize(UserConnection userConnection, CoreCampaignSchema campaignSchema)
 {
     userConnection.CheckArgumentNull("userConnection");
     campaignSchema.CheckArgumentNull("campaignSchema");
     return(InternalSynchronize(userConnection, campaignSchema, true));
 }
 public EntityInForecastCellRepository(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     UserConnection = userConnection;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MLModelEventsNotifier"/> class.
 /// </summary>
 /// <param name="userConnection">The user connection.</param>
 public MLModelEventsNotifier(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull("userConnection");
     _userConnection = userConnection;
 }
 public ShowInFunnelStagesRepositoryFactory(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     _userConnection = userConnection;
 }
Ejemplo n.º 30
0
 public NotificationCounterFactory(UserConnection userConnection)
 {
     userConnection.CheckArgumentNull(nameof(userConnection));
     _userConnection = userConnection;
 }