Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthMappingStoreRetrievalManager"/> class.
        /// </summary>
        /// <param name="mappingStoreSettings">
        /// The mapping store DB.
        /// </param>
        /// <param name="retrievalManager">
        /// The retrieval manager.
        /// </param>
        public AuthMappingStoreRetrievalManager(ConnectionStringSettings mappingStoreSettings, ISdmxMutableObjectRetrievalManager retrievalManager)
        {
            var mappingStoreDB = new Database(mappingStoreSettings);

            this._retrievalManager         = retrievalManager ?? new MappingStoreRetrievalManager(mappingStoreDB);
            this._retrievalEngineContainer = new RetrievalEngineContainer(mappingStoreDB);
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CrossReferenceRetrievalManager"/> class.
        /// </summary>
        /// <param name="retrievalManager">
        /// The retrieval manager
        /// </param>
        /// <param name="mappingStoreDatabase">
        /// The mapping Store Database.
        /// </param>
        public CrossReferenceRetrievalManager(ISdmxMutableObjectRetrievalManager retrievalManager, Database mappingStoreDatabase)
        {
            if (retrievalManager == null)
            {
                throw new ArgumentNullException("retrievalManager");
            }

            this._authCrossReferenceManager = GetAuthCrossReferenceMutableRetrievalManager(retrievalManager, mappingStoreDatabase);
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CrossReferenceRetrievalManager"/> class.
        /// </summary>
        /// <param name="retrievalManager">
        /// The retrieval manager
        /// </param>
        /// <param name="connectionStringSettings">
        /// The connection String Settings.
        /// </param>
        public CrossReferenceRetrievalManager(ISdmxMutableObjectRetrievalManager retrievalManager, ConnectionStringSettings connectionStringSettings)
        {
            if (retrievalManager == null)
            {
                throw new ArgumentNullException("retrievalManager");
            }

            this._authCrossReferenceManager = GetAuthCrossReferenceMutableRetrievalManager(retrievalManager, connectionStringSettings);
        }
Beispiel #4
0
        /// <summary>
        /// Gets the authentication cross reference mutable retrieval manager.
        /// </summary>
        /// <typeparam name="T">The <paramref name="settings"/> type</typeparam>
        /// <param name="retrievalManager">The retrieval manager.</param>
        /// <param name="settings">The settings.</param>
        /// <returns>the authentication cross reference mutable retrieval manager.</returns>
        private static IAuthCrossReferenceMutableRetrievalManager GetAuthCrossReferenceMutableRetrievalManager <T>(
            ISdmxMutableObjectRetrievalManager retrievalManager,
            T settings)
        {
            IAuthCrossRetrievalManagerFactory   factory = new AuthCrossMutableRetrievalManagerFactory();
            IAuthMutableRetrievalManagerFactory retrievalManagerFactory = new AuthMutableRetrievalManagerFactory();
            var authSdmxMutableObjectRetrievalManager = retrievalManagerFactory.GetRetrievalManager(settings, retrievalManager);

            var authCrossReferenceMutableRetrievalManager = factory.GetCrossRetrievalManager(settings, authSdmxMutableObjectRetrievalManager);

            return(authCrossReferenceMutableRetrievalManager);
        }
Beispiel #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CachedRetrievalManager"/> class.
        /// </summary>
        /// <param name="maintainableMutableObjects">
        /// The mutable objects.
        /// </param>
        /// <param name="retrievalManager">
        /// The retrieval manager.
        /// </param>
        public CachedRetrievalManager(
            IEnumerable <IMaintainableMutableObject> maintainableMutableObjects, ISdmxMutableObjectRetrievalManager retrievalManager)
        {
            this._retrievalManager         = retrievalManager;
            this._requestToLatestArtefacts = new Dictionary <IStructureReference, IMaintainableMutableObject>();
            this._requestToArtefacts       = new DictionaryOfSets <IStructureReference, IMaintainableMutableObject>();

            if (maintainableMutableObjects != null)
            {
                foreach (IMaintainableMutableObject mutableObject in maintainableMutableObjects)
                {
                    this._requestToArtefacts.Add(_fromMutable.Build(mutableObject), new HashSet <IMaintainableMutableObject> {
                        mutableObject
                    });
                }
            }
        }
Beispiel #6
0
        /// <summary>
        /// Returns an instance of <see cref="ISdmxMutableObjectRetrievalManager"/> created using the specified <paramref name="settings"/>
        /// </summary>
        /// <typeparam name="T">
        /// The type of settings
        /// </typeparam>
        /// <param name="settings">
        /// The settings.
        /// </param>
        /// <returns>
        /// The <see cref="ISdmxMutableObjectRetrievalManager"/>.
        /// </returns>
        public ISdmxMutableObjectRetrievalManager GetRetrievalManager <T>(T settings)
        {
            ISdmxMutableObjectRetrievalManager manager = null;

            if (this._factoryMethod != null)
            {
                manager = this._factoryMethod(settings);
            }

            Func <object, ISdmxMutableObjectRetrievalManager> method;

            if (_factoryMethods.TryGetValue(typeof(T), out method))
            {
                manager = method(settings);
            }

            return(manager);
        }
Beispiel #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MappingStoreSdmxObjectRetrievalManager"/> class.
 /// </summary>
 /// <param name="connectionStringSettings">
 /// The connection string settings.
 /// </param>
 public MappingStoreSdmxObjectRetrievalManager(ConnectionStringSettings connectionStringSettings)
 {
     this._mutableObjectRetrievalManager = new MappingStoreRetrievalManager(connectionStringSettings);
 }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MaintainableRefRetrieverEngine"/> class.
 /// </summary>
 /// <param name="mappingStoreDatabase">
 /// The mapping store database.
 /// </param>
 public MaintainableRefRetrieverEngine(Database mappingStoreDatabase)
 {
     this._mappingStoreDatabase    = mappingStoreDatabase;
     this._mutableRetrievalManager = new MappingStoreRetrievalManager(this._mappingStoreDatabase);
     this._itemTableInfoBuilder    = new ItemTableInfoBuilder();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TestMutableStructureSearchManager"/> class. 
 /// </summary>
 /// <param name="connectionName">
 /// The name.
 /// </param>
 public TestMutableStructureSearchManager(string connectionName)
 {
     this._connectionString = ConfigurationManager.ConnectionStrings[connectionName];
     this._fullRetrievalManager = new MutableRetrievalManagerFactory().GetRetrievalManager(this._connectionString);
 }
Beispiel #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthMappingStoreRetrievalManager"/> class.
 /// </summary>
 /// <param name="mappingStoreDB">
 /// The mapping store DB.
 /// </param>
 /// <param name="retrievalManager">
 /// The retrieval manager.
 /// </param>
 public AuthMappingStoreRetrievalManager(Database mappingStoreDB, ISdmxMutableObjectRetrievalManager retrievalManager)
 {
     this._retrievalManager         = retrievalManager ?? new MappingStoreRetrievalManager(mappingStoreDB);
     this._retrievalEngineContainer = new RetrievalEngineContainer(mappingStoreDB);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MappingStoreSdmxObjectRetrievalManager"/> class.
 /// </summary>
 /// <param name="mutableObjectRetrievalManager">
 /// The mutable object retrieval manager.
 /// </param>
 public MappingStoreSdmxObjectRetrievalManager(ISdmxMutableObjectRetrievalManager mutableObjectRetrievalManager)
 {
     this._mutableObjectRetrievalManager = mutableObjectRetrievalManager;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthMappingStoreRetrievalManager"/> class.
 /// </summary>
 /// <param name="mappingStoreDB">
 /// The mapping store DB.
 /// </param>
 /// <param name="retrievalManager">
 /// The retrieval manager.
 /// </param>
 public AuthMappingStoreRetrievalManager(Database mappingStoreDB, ISdmxMutableObjectRetrievalManager retrievalManager)
 {
     this._retrievalManager = retrievalManager ?? new MappingStoreRetrievalManager(mappingStoreDB);
     this._retrievalEngineContainer = new RetrievalEngineContainer(mappingStoreDB);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MaintainableRefRetrieverEngine"/> class.
 /// </summary>
 /// <param name="mappingStoreDatabase">
 /// The mapping store database.
 /// </param>
 public MaintainableRefRetrieverEngine(Database mappingStoreDatabase)
 {
     this._mappingStoreDatabase = mappingStoreDatabase;
     this._mutableRetrievalManager = new MappingStoreRetrievalManager(this._mappingStoreDatabase);
     this._itemTableInfoBuilder = new ItemTableInfoBuilder();
 }
Beispiel #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MappingStoreSdmxObjectRetrievalManager"/> class.
 /// </summary>
 /// <param name="mutableObjectRetrievalManager">
 /// The mutable object retrieval manager.
 /// </param>
 public MappingStoreSdmxObjectRetrievalManager(ISdmxMutableObjectRetrievalManager mutableObjectRetrievalManager)
 {
     this._mutableObjectRetrievalManager = mutableObjectRetrievalManager;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MappingStoreSdmxObjectRetrievalManager"/> class.
 /// </summary>
 /// <param name="connectionStringSettings">
 /// The connection string settings.
 /// </param>
 public MappingStoreSdmxObjectRetrievalManager(ConnectionStringSettings connectionStringSettings)
 {
     this._mutableObjectRetrievalManager = new MappingStoreRetrievalManager(connectionStringSettings);
 }
Beispiel #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestSpecific"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 public TestSpecific(string name)
 {
     this._connectionString = ConfigurationManager.ConnectionStrings [name];
     this._fullRetrievalManager = new MutableRetrievalManagerFactory().GetRetrievalManager(this._connectionString);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthMappingStoreRetrievalManager"/> class.
 /// </summary>
 /// <param name="mappingStoreSettings">
 /// The mapping store DB.
 /// </param>
 /// <param name="retrievalManager">
 /// The retrieval manager.
 /// </param>
 public AuthMappingStoreRetrievalManager(ConnectionStringSettings mappingStoreSettings, ISdmxMutableObjectRetrievalManager retrievalManager)
 {
     var mappingStoreDB = new Database(mappingStoreSettings);
     this._retrievalManager = retrievalManager ?? new MappingStoreRetrievalManager(mappingStoreDB);
     this._retrievalEngineContainer = new RetrievalEngineContainer(mappingStoreDB);
 }