public ExchangeAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
 {
     this.eventAggregator = eventAggregator;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
     this.entityService = entityService;
     this.Exchange = new ExchangeViewModel(this.eventAggregator);
 }
        /// <summary>
        /// Perform a mapping search.
        /// </summary>
        /// <typeparam name="T">Type of entity to find</typeparam>
        /// <param name="service">MDM service to use</param>
        /// <param name="systemName">System name to use</param>
        /// <param name="identifier">Identifier to use</param>
        /// <returns>Result of the search.</returns>
        public static IList <T> MappingSearch <T>(this IMdmService service, string systemName, string identifier = null)
            where T : IMdmEntity
        {
            var search = systemName.MappingSearch(identifier);

            return(service.Search <T>(search).HandleResponse());
        }
 public BrokerAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
 {
     this.eventAggregator = eventAggregator;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
     this.entityService = entityService;
     this.Broker = new BrokerViewModel(this.eventAggregator);
 }
Exemple #4
0
        /// <summary>
        /// Attempt multiple calls to the MDM service until we are successful or exhaust the retries.
        /// </summary>
        /// <typeparam name="T">Type we are returning</typeparam>
        /// <param name="service">MDM service to use</param>
        /// <param name="func">Function to invoke against MDM</param>
        /// <param name="logger">Action to perform on failure</param>
        /// <param name="retries">Number of retries, defaults to 5</param>
        /// <param name="sleep">Dwell time between retries, defaults to 100 ms</param>
        /// <returns>Result of the MDM action</returns>
        public static WebResponse <T> TrySearch <T>(this IMdmService service, ILogger logger, Func <WebResponse <T> > func, int retries = 5, int sleep = 100)
        {
            var response = service.TrySearch(func, logger, retries, sleep);

            response.LogResponse();
            return(response);
        }
Exemple #5
0
 public ExchangeAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
 {
     this.eventAggregator = eventAggregator;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
     this.entityService = entityService;
     this.Exchange      = new ExchangeViewModel(this.eventAggregator);
 }
 public BrokerAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
 {
     this.eventAggregator = eventAggregator;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
     this.entityService = entityService;
     this.Broker        = new BrokerViewModel(this.eventAggregator);
 }
Exemple #7
0
 public PartyAccountabilitySelectorViewModel(IEventAggregator eventAggregator, IMdmService entityService, IRegionManager regionManager)
 {
     this.eventAggregator = eventAggregator;
     this.entityService   = entityService;
     this.regionManager   = regionManager;
     this.AsOf            = SystemTime.UtcNow().Date;
 }
 public PartyAccountabilitySelectorViewModel(IEventAggregator eventAggregator, IMdmService entityService, IRegionManager regionManager)
 {
     this.eventAggregator = eventAggregator;
     this.entityService = entityService;
     this.regionManager = regionManager;
     this.AsOf = SystemTime.UtcNow().Date;
 }
        public SourceSystemAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.entityService = entityService;

            this.SourceSystem = new SourceSystemViewModel(this.eventAggregator);
        }
        public SourceSystemAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.entityService = entityService;

            this.SourceSystem = new SourceSystemViewModel(this.eventAggregator);
        }
        public PartyAccountabilityAddViewModel(IEventAggregator eventAggregator, IMdmService entityService, IList<string> partyaccountabilitytypeConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.entityService = entityService;

            this.PartyAccountability = new PartyAccountabilityViewModel(this.eventAggregator);
                         this.PartyAccountabilityTypeConfiguration = partyaccountabilitytypeConfiguration;
        }
Exemple #12
0
        public PartyAccountabilityAddViewModel(IEventAggregator eventAggregator, IMdmService entityService, IList <string> partyaccountabilitytypeConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.entityService = entityService;

            this.PartyAccountability = new PartyAccountabilityViewModel(this.eventAggregator);
            this.PartyAccountabilityTypeConfiguration = partyaccountabilitytypeConfiguration;
        }
 public PartyAccountabilitySearchResultsViewModel(
     INavigationService navigationService, 
     IEventAggregator eventAggregator, 
     IMdmService entityService)
 {
     this.navigationService = navigationService;
     this.eventAggregator = eventAggregator;
     this.entityService = entityService;
     this.IsActiveChanged += this.OnIsActiveChanged;
 }
 public ExchangeSearchResultsViewModel(
     INavigationService navigationService,
     IEventAggregator eventAggregator,
     IMdmService entityService)
 {
     this.navigationService = navigationService;
     this.eventAggregator   = eventAggregator;
     this.entityService     = entityService;
     this.IsActiveChanged  += this.OnIsActiveChanged;
 }
 public LegalEntityAddViewModel(
     IEventAggregator eventAggregator, 
     IMdmService entityService, 
     IList<string> partystatusConfiguration)
 {
     this.eventAggregator = eventAggregator;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
     this.entityService = entityService;
     this.LegalEntity = new LegalEntityViewModel(this.eventAggregator);
     this.PartyStatusConfiguration = partystatusConfiguration;
 }
Exemple #16
0
 public LegalEntityAddViewModel(
     IEventAggregator eventAggregator,
     IMdmService entityService,
     IList <string> partystatusConfiguration)
 {
     this.eventAggregator = eventAggregator;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
     this.entityService            = entityService;
     this.LegalEntity              = new LegalEntityViewModel(this.eventAggregator);
     this.PartyStatusConfiguration = partystatusConfiguration;
 }
        public PartyRoleAddViewModel(
            IEventAggregator eventAggregator, 
            IMdmService entityService, 
            IList<string> partyroletypeConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.entityService = entityService;

            this.PartyRole = new PartyRoleViewModel(this.eventAggregator);
            this.PartyRoleTypeConfiguration = partyroletypeConfiguration;
        }
        public PersonAddViewModel(
            IEventAggregator eventAggregator,
            IMdmService entityService,
            IList <string> roleConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.entityService = entityService;

            this.Person            = new PersonViewModel(this.eventAggregator);
            this.RoleConfiguration = roleConfiguration;
        }
        public PersonAddViewModel(
            IEventAggregator eventAggregator, 
            IMdmService entityService, 
            IList<string> roleConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.entityService = entityService;

            this.Person = new PersonViewModel(this.eventAggregator);
            this.RoleConfiguration = roleConfiguration;
        }
        public LocationAddViewModel(
            IEventAggregator eventAggregator,
            IMdmService entityService,
            IList <string> typeConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.entityService = entityService;

            this.Location          = new LocationViewModel(this.eventAggregator);
            this.TypeConfiguration = typeConfiguration;
        }
 public LegalEntityEmbeddedSearchResultsViewModel(
     INavigationService navigationService,
     IEventAggregator eventAggregator,
     IMdmService entityService,
     IRegionManager regionManager)
 {
     this.navigationService = navigationService;
     this.eventAggregator   = eventAggregator;
     this.entityService     = entityService;
     this.regionManager     = regionManager;
     this.IsActiveChanged  += this.OnIsActiveChanged;
 }
Exemple #22
0
        public PartyRoleAddViewModel(
            IEventAggregator eventAggregator,
            IMdmService entityService,
            IList <string> partyroletypeConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.entityService = entityService;

            this.PartyRole = new PartyRoleViewModel(this.eventAggregator);
            this.PartyRoleTypeConfiguration = partyroletypeConfiguration;
        }
 public LocationEmbeddedSearchResultsViewModel(
     INavigationService navigationService, 
     IEventAggregator eventAggregator, 
     IMdmService entityService, 
     IRegionManager regionManager)
 {
     this.navigationService = navigationService;
     this.eventAggregator = eventAggregator;
     this.entityService = entityService;
     this.regionManager = regionManager;
     this.IsActiveChanged += this.OnIsActiveChanged;
 }
        public LocationAddViewModel(
            IEventAggregator eventAggregator, 
            IMdmService entityService, 
            IList<string> typeConfiguration)
        {
            this.eventAggregator = eventAggregator;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.entityService = entityService;

            this.Location = new LocationViewModel(this.eventAggregator);
            this.TypeConfiguration = typeConfiguration;
        }
 public BrokerEditViewModel(
     IEventAggregator eventAggregator, 
     IMdmService entityService, 
     INavigationService navigationService, 
     IMappingService mappingService, 
     IApplicationCommands applicationCommands)
 {
     this.navigationService = navigationService;
     this.mappingService = mappingService;
     this.applicationCommands = applicationCommands;
     this.eventAggregator = eventAggregator;
     this.entityService = entityService;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
     this.CanEdit = AuthorisationHelpers.HasEntityRights("Broker");
 }
 public BrokerEditViewModel(
     IEventAggregator eventAggregator,
     IMdmService entityService,
     INavigationService navigationService,
     IMappingService mappingService,
     IApplicationCommands applicationCommands)
 {
     this.navigationService   = navigationService;
     this.mappingService      = mappingService;
     this.applicationCommands = applicationCommands;
     this.eventAggregator     = eventAggregator;
     this.entityService       = entityService;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
     this.CanEdit = AuthorisationHelpers.HasEntityRights("Broker");
 }
Exemple #27
0
        /// <summary>
        /// Attempt multiple calls to the MDM service until we are successful or exhaust the retries.
        /// </summary>
        /// <param name="service">MDM service to use</param>
        /// <param name="func">Function to invoke against MDM</param>
        /// <param name="logger">Logger to use</param>
        /// <param name="retries">Number of retries, defaults to 5</param>
        /// <param name="sleep">Dwell time between retries, defaults to 100 ms</param>
        /// <returns>Result of the MDM action</returns>
        public static WebResponse <T> Try <T>(this IMdmService service, Func <WebResponse <T> > func, ILogger logger, int retries = 5, int sleep = 100)
        {
            var response = new WebResponse <T> {
                IsValid = false
            };
            var   i = 0;
            var   isServiceUnvailable = false;
            Fault fault = null;

            logger.DebugFormat("Start : IMdmService.Try<{0}>", GetTypeName(typeof(T)));
            while (!response.IsValid && i++ < retries)
            {
                response = func.Invoke();
                if (response.Fault != null)
                {
                    fault = response.Fault;

                    // Logic to handle the Service Unavailable scenarios
                    if (fault.IsServiceUnavailable())
                    {
                        isServiceUnvailable = true;
                    }
                    else if (response.Code == HttpStatusCode.NotFound)
                    {
                        // NB NotFound is not an error under normal circumstances
                        response.IsValid = true;
                    }
                }
                else
                {
                    isServiceUnvailable = false;
                }

                if (!response.IsValid)
                {
                    Thread.Sleep(sleep);
                    logger.Debug("Try_" + GetTypeName(typeof(T)) + ": " + response.Code);
                }
            }

            if (isServiceUnvailable)
            {
                logger.Error("Service Call to MDM Service has failed with the error: " + fault.Message);
            }

            response.LogResponse();
            return(response);
        }
 public SourceSystemEditCloneViewModel(
     IEventAggregator eventAggregator, 
     IMdmService entityService, 
     INavigationService navigationService, 
     IMappingService mappingService, 
     IApplicationCommands applicationCommands)
 {
     this.navigationService = navigationService;
     this.mappingService = mappingService;
     this.applicationCommands = applicationCommands;
     this.eventAggregator = eventAggregator;
     this.entityService = entityService;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
     this.CanEdit = AuthorisationHelpers.HasEntityRights("SourceSystem");
     this.eventAggregator.Subscribe<MappingClonedEvent>(this.MappingCloned);
 }
Exemple #29
0
 public SourceSystemEditCloneViewModel(
     IEventAggregator eventAggregator,
     IMdmService entityService,
     INavigationService navigationService,
     IMappingService mappingService,
     IApplicationCommands applicationCommands)
 {
     this.navigationService   = navigationService;
     this.mappingService      = mappingService;
     this.applicationCommands = applicationCommands;
     this.eventAggregator     = eventAggregator;
     this.entityService       = entityService;
     this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
     this.CanEdit = AuthorisationHelpers.HasEntityRights("SourceSystem");
     this.eventAggregator.Subscribe <MappingClonedEvent>(this.MappingCloned);
 }
        public LegalEntityEditViewModel(
            IEventAggregator eventAggregator,
            IMdmService entityService,
            INavigationService navigationService,
            IMappingService mappingService,
            IApplicationCommands applicationCommands,
            IList <string> partystatusConfiguration)
        {
            this.navigationService   = navigationService;
            this.mappingService      = mappingService;
            this.applicationCommands = applicationCommands;
            this.eventAggregator     = eventAggregator;
            this.entityService       = entityService;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.CanEdit = AuthorisationHelpers.HasEntityRights("LegalEntity");

            this.PartyStatusConfiguration = partystatusConfiguration;
        }
        public LegalEntityEditViewModel(
            IEventAggregator eventAggregator, 
            IMdmService entityService, 
            INavigationService navigationService, 
            IMappingService mappingService, 
            IApplicationCommands applicationCommands, 
            IList<string> partystatusConfiguration)
        {
            this.navigationService = navigationService;
            this.mappingService = mappingService;
            this.applicationCommands = applicationCommands;
            this.eventAggregator = eventAggregator;
            this.entityService = entityService;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.CanEdit = AuthorisationHelpers.HasEntityRights("LegalEntity");

            this.PartyStatusConfiguration = partystatusConfiguration;
        }
        public LocationEditCloneViewModel(
            IEventAggregator eventAggregator, 
            IMdmService entityService, 
            INavigationService navigationService, 
            IMappingService mappingService, 
            IApplicationCommands applicationCommands, 
            IList<string> typeConfiguration)
        {
            this.navigationService = navigationService;
            this.mappingService = mappingService;
            this.applicationCommands = applicationCommands;
            this.eventAggregator = eventAggregator;
            this.entityService = entityService;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
            this.CanEdit = AuthorisationHelpers.HasEntityRights("Location");
            this.eventAggregator.Subscribe<MappingClonedEvent>(this.MappingCloned);

            this.TypeConfiguration = typeConfiguration;
        }
Exemple #33
0
        public LocationEditCloneViewModel(
            IEventAggregator eventAggregator,
            IMdmService entityService,
            INavigationService navigationService,
            IMappingService mappingService,
            IApplicationCommands applicationCommands,
            IList <string> typeConfiguration)
        {
            this.navigationService   = navigationService;
            this.mappingService      = mappingService;
            this.applicationCommands = applicationCommands;
            this.eventAggregator     = eventAggregator;
            this.entityService       = entityService;
            this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>();
            this.CanEdit = AuthorisationHelpers.HasEntityRights("Location");
            this.eventAggregator.Subscribe <MappingClonedEvent>(this.MappingCloned);

            this.TypeConfiguration = typeConfiguration;
        }
        protected override void OnSetup()
        {
            base.OnSetup();

            this.MdmService = this.Container.Resolve <IMdmService>();
        }
Exemple #35
0
 /// <summary>
 /// Attempt multiple calls to the MDM service until we are successful or exhaust the retries.
 /// </summary>
 /// <param name="service">MDM service to use</param>
 /// <param name="func">Function to invoke against MDM</param>
 /// <param name="logger">Logger to use</param>
 /// <param name="retries">Number of retries, defaults to 5</param>
 /// <param name="sleep">Dwell time between retries, defaults to 100 ms</param>
 /// <returns>Result of the MDM action</returns>
 public static WebResponse <T> Try <T>(this IMdmService service, ILogger logger, Func <WebResponse <T> > func, int retries = 5, int sleep = 100)
 {
     return(service.Try(func, logger, retries, sleep));
 }
Exemple #36
0
 public MdmEntitySynchronizer(IMdmService mdmService)
 {
     this.mdmService = mdmService;
 }
Exemple #37
0
 /// <summary>
 ///
 /// </summary>
 public EntityMappingController(IMdmService <TContract, TEntity> service, IMdmNotificationService notificationService, IServiceLocator serviceLocator)
     : base(service, serviceLocator)
 {
     this.notificationService = notificationService;
 }
Exemple #38
0
 /// <summary>
 /// Create a new instance of the <see cref="MdmModelEntityService" /> class.
 /// </summary>
 /// <param name="factory"></param>
 /// <param name="mdmService"></param>
 /// <param name="locatorService"></param>
 public MdmModelEntityService(IMdmModelEntityServiceFactory factory, IMdmService mdmService, IMdmEntityLocatorService locatorService)
 {
     this.factory              = factory;
     this.mdmService           = mdmService;
     this.entityLocatorService = locatorService;
 }
        protected override void OnSetup()
        {
            base.OnSetup();

            this.MdmService = this.Container.Resolve<IMdmService>();
        }
Exemple #40
0
 public PersonSynchronizer(IMdmService mdmService)
     : base(mdmService)
 {
 }
Exemple #41
0
 /// <summary>
 ///
 /// </summary>
 public EntitySearchController(IMdmService <TContract, TEntity> service, IServiceLocator serviceLocator)
     : base(serviceLocator)
 {
     this.service    = service;
     this.entityName = typeof(TContract).Name;
 }
Exemple #42
0
 public LocationSynchronizer(IMdmService mdmService)
     : base(mdmService)
 {
 }
 /// <summary>
 ///
 /// </summary>
 public EntityMappingsController(IMdmService <TContract, TEntity> service, IServiceLocator serviceLocator)
     : base(serviceLocator)
 {
     this.service = service;
 }
Exemple #44
0
 public MdmClient(IMdmService service)
 {
     this.service = service;
 }