public CacheManager(ILanguageCache languageCache, IPublishingStatusCache publishingStatusCache, ITypesCache typesCache, ILanguageOrderCache languageOrderCache) { this.languageCache = languageCache; this.publishingStatusCache = publishingStatusCache; this.typesCache = typesCache; this.languageOrderCache = languageOrderCache; }
public OrganizationService( IContextManager contextManager, // IUserIdentification userIdentification, ITranslationEntity translationManagerToVm, ITranslationViewModel translationManagerToEntity, // ILogger<Services.ChannelService> logger, ICommonServiceInternal commonService, // VmListItemLogic listItemLogic, // DataUtils dataUtils, // VmOwnerReferenceLogic ownerReferenceLogic, ICacheManager cacheManager, IPublishingStatusCache publishingStatusCache, IUserOrganizationChecker userOrganizationChecker, IVersioningManager versionManager, ServiceUtilities utilities, IValidationManager validationManager ) : base(translationManagerToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker, contextManager, utilities, commonService, validationManager) { this.contextManager = contextManager; // this.logger = logger; // this.userIdentification = userIdentification; // this.listItemLogic = listItemLogic; // this.dataUtils = dataUtils; // this.ownerReferenceLogic = ownerReferenceLogic; this.typesCache = cacheManager.TypesCache; // this.languageCache = cacheManager.LanguageCache; this.versionManager = versionManager; }
public ServiceAndChannelService(IContextManager contextManager, ITranslationEntity translationEntToVm, ITranslationViewModel translationVmtoEnt, ILogger <ServiceAndChannelService> logger, ServiceUtilities utilities, DataUtils dataUtils, IServiceService serviceService, IChannelService channelService, IPublishingStatusCache publishingStatusCache, IVersioningManager versioningManager, IUserOrganizationChecker userOrganizationChecker, ICacheManager cacheManager, IUserOrganizationService userOrganizationService ) : base(translationEntToVm, translationVmtoEnt, publishingStatusCache, userOrganizationChecker) { this.contextManager = contextManager; this.logger = logger; this.utilities = utilities; this.dataUtils = dataUtils; this.serviceService = serviceService; this.channelService = channelService; this.versioningManager = versioningManager; this.userOrganizationService = userOrganizationService; typesCache = cacheManager.TypesCache; }
public TranslationDefinitions(IResolveManager resolveManager, ITranslationPrimitives translationPrimitives, ITranslationUnitOfWork unitOfWork, TranslationDirection directionDefinition, IVersioningManager versioningManager, Type typeToInstantiate = null, TOut predefinedTarget = null, Guid?requestlanguageId = null, TranslationPolicy translationPolicies = TranslationPolicy.Defaults) { this.resolveManager = resolveManager; this.translationPrimitives = translationPrimitives; this.directionDefinition = directionDefinition; this.typeToInstantiate = typeToInstantiate ?? typeof(TOut); this.unitOfWork = unitOfWork; this.targetInstance = predefinedTarget; this.requestlanguageIdAssigned = requestlanguageId; var cacheManager = resolveManager.Resolve <ICacheManager>(); this.languageCache = cacheManager.LanguageCache; this.publishingStatusCache = cacheManager.PublishingStatusCache; this.versioningManager = versioningManager; this.translationPolicies = translationPolicies; this.entityOutSet = unitOfWork?.GetSet <TOut>() as IQueryable <TOut>; if (this.unitOfWork != null && this.targetInstance != null) { var cached = unitOfWork.TranslationCloneCache.GetFromCachedSet <TOut>(); clonedTargetApplied = cached.Any(i => i.ClonedEntity == this.targetInstance); } }
public ServiceCollectionService( IContextManager contextManager, ITranslationEntity translationManagerToVm, ITranslationViewModel translationManagerToEntity, ILogger <ServiceService> logger, ServiceUtilities utilities, DataUtils dataUtils, ICommonServiceInternal commonService, VmOwnerReferenceLogic ownerReferenceLogic, ITypesCache typesCache, ILanguageCache languageCache, IPublishingStatusCache publishingStatusCache, IVersioningManager versioningManager, IGeneralDescriptionService generalDescriptionService, IUserOrganizationChecker userOrganizationChecker) : base(translationManagerToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker) { this.contextManager = contextManager; this.logger = logger; this.utilities = utilities; this.dataUtils = dataUtils; this.commonService = commonService; this.ownerReferenceLogic = ownerReferenceLogic; this.typesCache = typesCache; this.languageCache = languageCache; this.versioningManager = versioningManager; }
public TypeDataService( IContextManager contextManager, ITranslationEntity translationManagerToVm, ITranslationViewModel translationManagerToEntity, IPublishingStatusCache publishingStatusCache, IUserOrganizationChecker userOrganizationChecker) : base(translationManagerToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker) { this.contextManager = contextManager; }
public AddressService(IContextManager contextManager, IResolveManager resolveManager, MapServiceProvider mapServiceProvider, ITranslationEntity translationManagerToVm, ITranslationViewModel translationManagerToEntity, IPublishingStatusCache publishingStatusCache, IUserOrganizationChecker userOrganizationChecker, ICacheManager cacheManager) : base(translationManagerToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker) { this.resolveManager = resolveManager; this.mapServiceProvider = mapServiceProvider; this.contextManager = contextManager; this.typesCache = cacheManager.TypesCache; }
public FintoService( IContextManager contextManager, ITranslationEntity translationEntToVm, ITranslationViewModel translationVmToEntity, IPublishingStatusCache publishingStatusCache, AnnotationServiceProvider annotationProvider, IUserOrganizationChecker userOrganizationChecker) : base(translationEntToVm, translationVmToEntity, publishingStatusCache, userOrganizationChecker) { this.contextManager = contextManager; this.annotationProvider = annotationProvider; }
public static List <ServiceVersioned> GetServiceEntityList(int count, IPublishingStatusCache publishingStatusCache) { var list = CreateEntityList <ServiceVersioned, Service, ServiceLanguageAvailability>(count, publishingStatusCache); // set unific root and main responsible organization list.ForEach(o => { o.UnificRoot = new Service() { Id = o.UnificRootId }; o.Organization = new Organization(); }); return(list); }
internal EntityServiceBase(ITranslationEntity translationManagerToVm, ITranslationViewModel translationManagerToEntity, IPublishingStatusCache publishingStatusCache, IUserOrganizationChecker userOrganizationChecker, IContextManager contextManager, ServiceUtilities utilities, ICommonServiceInternal commonService, IValidationManager validationManager) : base(translationManagerToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker) { ContextManager = contextManager; Utilities = utilities; CommonService = commonService; ValidationManager = validationManager; }
public PostalCodeService(IContextManager contextManager, ITranslationEntity translationEntToVm, ITranslationViewModel translationManagerToEntity, IPublishingStatusCache publishingStatusCache, IUserOrganizationChecker userOrganizationChecker, ILogger <PostalCodeService> logger, ILanguageCache languageCache) : base(translationEntToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker) { this.contextManager = contextManager; this.logger = logger; this.languageCache = languageCache; }
public PublishingStatusFilter(IPublishingStatusCache publishingStatusCache) { this.statusDeletedId = publishingStatusCache.Get(PublishingStatus.Deleted); }
/// <summary> /// Creates a list of organizations that includes each publishing status type 'count' times. /// For example if count is 2, the list will include 2 * 5 items (because we have 5 different publishing statuses). /// </summary> /// <typeparam name="TEntity"></typeparam> /// <typeparam name="TLanguageAvailability"></typeparam> /// <param name="count">Indicates how many of each publishing status type items the list will include.</param> /// <returns></returns> public static List <OrganizationVersioned> GetOrganizationEntityList(int count, IPublishingStatusCache publishingStatusCache) { var list = CreateEntityList <OrganizationVersioned, Organization, OrganizationLanguageAvailability>(count, publishingStatusCache); // set unific root list.ForEach(o => o.UnificRoot = new Organization() { Id = o.UnificRootId }); return(list); }
public static List <StatutoryServiceGeneralDescriptionVersioned> GetGeneralDescriptionEntityList(int count, IPublishingStatusCache publishingStatusCache) { var list = CreateEntityList <StatutoryServiceGeneralDescriptionVersioned, StatutoryServiceGeneralDescription, GeneralDescriptionLanguageAvailability>(count, publishingStatusCache); // set unific root list.ForEach(o => { o.UnificRoot = new StatutoryServiceGeneralDescription { Id = o.UnificRootId }; }); return(list); }
public static List <ServiceChannelVersioned> GetServiceChannelEntityList(int count, IPublishingStatusCache publishingStatusCache) { var list = CreateEntityList <ServiceChannelVersioned, ServiceChannel, ServiceChannelLanguageAvailability>(count, publishingStatusCache); // set unific root list.ForEach(o => o.UnificRoot = new ServiceChannel() { Id = o.UnificRootId }); return(list); }
/// <summary> /// Creates a list of entities that includes each publishing status type 'count' times. /// For example if count is 2, the list will include 2 * 5 items (because we have 5 different publishing statuses). /// </summary> /// <typeparam name="TEntity"></typeparam> /// <typeparam name="TLanguageAvailability"></typeparam> /// <param name="count">Indicates how many of each publishing status type items the list will include.</param> /// <returns></returns> private static List <TEntity> CreateEntityList <TEntity, TRootEntity, TLanguageAvailability>(int count, IPublishingStatusCache publishingStatusCache) where TEntity : EntityIdentifierBase, IVersionedVolume <TRootEntity>, IPublishingStatus, IMultilanguagedEntity <TLanguageAvailability>, new() where TRootEntity : VersionedRoot <TEntity> where TLanguageAvailability : LanguageAvailability, new() { var list = new List <TEntity>(); for (var i = 0; i < count; i++) { list.Add(CreateEntity <TEntity, TRootEntity, TLanguageAvailability>(publishingStatusCache.Get(PublishingStatus.Published))); list.Add(CreateEntity <TEntity, TRootEntity, TLanguageAvailability>(publishingStatusCache.Get(PublishingStatus.Draft))); list.Add(CreateEntity <TEntity, TRootEntity, TLanguageAvailability>(publishingStatusCache.Get(PublishingStatus.Modified))); list.Add(CreateEntity <TEntity, TRootEntity, TLanguageAvailability>(publishingStatusCache.Get(PublishingStatus.OldPublished))); list.Add(CreateEntity <TEntity, TRootEntity, TLanguageAvailability>(publishingStatusCache.Get(PublishingStatus.Deleted))); } return(list); }