예제 #1
0
 /// <summary>
 /// Validate the specified <paramref name="authManager"/>.
 /// </summary>
 /// <param name="authManager">
 /// The dataflow authorization manager.
 /// </param>
 /// <param name="allowedDataflows">
 /// The allowed dataflows.
 /// </param>
 /// <exception cref="ArgumentException">
 /// <paramref name="authManager"/> is null but <paramref name="allowedDataflows"/> is not
 /// </exception>
 public static void ValidateAuthManager(this IAuthSdmxMutableObjectRetrievalManager authManager, IList <IMaintainableRefObject> allowedDataflows)
 {
     if (allowedDataflows != null && authManager == null)
     {
         _log.Error(ErrorMessages.ExceptionISdmxMutableObjectAuthRetrievalManagerNotSet);
         throw new ArgumentException(ErrorMessages.ExceptionISdmxMutableObjectAuthRetrievalManagerNotSet, "allowedDataflows");
     }
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthCrossReferenceRetrievalManager"/> class.
        /// </summary>
        /// <param name="retrievalManager">
        /// The retrieval manager
        /// </param>
        /// <param name="mappingStoreDatabase">
        /// The mapping Store Database.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="retrievalManager"/> is null
        /// -or-
        /// <paramref name="mappingStoreDatabase"/> is null
        /// </exception>
        public AuthCrossReferenceRetrievalManager(IAuthSdmxMutableObjectRetrievalManager retrievalManager, Database mappingStoreDatabase)
        {
            if (retrievalManager == null)
            {
                throw new ArgumentNullException("retrievalManager");
            }

            if (mappingStoreDatabase == null)
            {
                throw new ArgumentNullException("mappingStoreDatabase");
            }

            this._retrievalManager         = retrievalManager;
            this._retrievalEngineContainer = new RetrievalEngineContainer(mappingStoreDatabase);
            this._fromMutable = new StructureReferenceFromMutableBuilder();
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthCrossReferenceRetrievalManager"/> class.
        /// </summary>
        /// <param name="retrievalManager">
        /// The retrieval manager
        /// </param>
        /// <param name="connectionStringSettings">
        /// The connection String Settings.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="retrievalManager"/> is null
        /// -or-
        /// <paramref name="connectionStringSettings"/> is null
        /// </exception>
        public AuthCrossReferenceRetrievalManager(
            IAuthSdmxMutableObjectRetrievalManager retrievalManager, ConnectionStringSettings connectionStringSettings)
        {
            if (retrievalManager == null)
            {
                throw new ArgumentNullException("retrievalManager");
            }

            if (connectionStringSettings == null)
            {
                throw new ArgumentNullException("connectionStringSettings");
            }

            this._retrievalManager         = retrievalManager;
            this._retrievalEngineContainer = new RetrievalEngineContainer(new Database(connectionStringSettings));
            this._fromMutable = new StructureReferenceFromMutableBuilder();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthCrossReferenceRetrievalManager"/> class.
        /// </summary>
        /// <param name="retrievalManager">
        /// The retrieval manager
        /// </param>
        /// <param name="connectionStringSettings">
        /// The connection String Settings.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="retrievalManager"/> is null
        /// -or-
        /// <paramref name="connectionStringSettings"/> is null
        /// </exception>
        public AuthCrossReferenceRetrievalManager(
            IAuthSdmxMutableObjectRetrievalManager retrievalManager, ConnectionStringSettings connectionStringSettings)
        {
            if (retrievalManager == null)
            {
                throw new ArgumentNullException("retrievalManager");
            }

            if (connectionStringSettings == null)
            {
                throw new ArgumentNullException("connectionStringSettings");
            }

            this._retrievalManager = retrievalManager;
            this._retrievalEngineContainer = new RetrievalEngineContainer(new Database(connectionStringSettings));
            this._fromMutable = new StructureReferenceFromMutableBuilder();
        }
예제 #5
0
        /// <summary>
        /// Returns an instance of <see cref="IAuthSdmxMutableObjectRetrievalManager"/> created using the specified
        ///     <paramref name="settings"/>
        /// </summary>
        /// <param name="settings">
        /// The settings.
        /// </param>
        /// <param name="retrievalManager">
        /// The retrieval Manager.
        /// </param>
        /// <returns>
        /// The <see cref="IAuthSdmxMutableObjectRetrievalManager"/>.
        /// </returns>
        public IAuthSdmxMutableObjectRetrievalManager GetRetrievalManager <T>(T settings, ISdmxMutableObjectRetrievalManager retrievalManager)
        {
            IAuthSdmxMutableObjectRetrievalManager manager = null;

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

            Func <object, ISdmxMutableObjectRetrievalManager, IAuthSdmxMutableObjectRetrievalManager> method;

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

            return(manager);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthCategorisationV20MutableStructureSearchManager"/> class. 
 /// </summary>
 /// <param name="fullRetrievalManager">
 /// The full retrieval manager. Used for <see cref="StructureQueryDetailEnumType.Full"/> or
 ///     <see cref="StructureQueryDetailEnumType.ReferencedStubs"/>
 /// </param>
 /// <param name="crossReferenceManager">
 /// The cross reference manager. Set it to be able to retrieve cross references. Used for
 ///     <see cref="StructureQueryDetailEnumType.Full"/>
 ///     .
 /// </param>
 public AuthCategorisationV20MutableStructureSearchManager(IAuthSdmxMutableObjectRetrievalManager fullRetrievalManager, IAuthCrossRetrievalManagerFactory crossReferenceManager)
     : base(fullRetrievalManager, crossReferenceManager)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthMutableStructureSearchManagerBase"/> class.
        /// </summary>
        /// <param name="fullRetrievalManager">
        /// The full retrieval manager. Used for <see cref="StructureQueryDetailEnumType.Full"/> or
        ///     <see cref="StructureQueryDetailEnumType.ReferencedStubs"/>
        /// </param>
        /// <param name="crossReferenceManager">
        /// The cross reference manager. Set it to be able to retrieve cross references. Used for
        ///     <see cref="StructureQueryDetailEnumType.Full"/>
        ///     .
        /// </param>
        protected AuthMutableStructureSearchManagerBase(IAuthSdmxMutableObjectRetrievalManager fullRetrievalManager, IAuthCrossRetrievalManagerFactory crossReferenceManager)
        {
            if (fullRetrievalManager == null)
            {
                throw new ArgumentNullException("fullRetrievalManager");
            }

            this._crossReferenceManager = crossReferenceManager;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthStructureRetrieverV21"/> class. 
 /// </summary>
 /// <param name="fullRetrievalManager">
 /// The full retrieval manager. Used for <see cref="StructureQueryDetailEnumType.Full"/> or
 ///     <see cref="StructureQueryDetailEnumType.ReferencedStubs"/>
 /// </param>
 /// <param name="crossReferenceManager">
 /// The cross reference manager. Set it to be able to retrieve cross references. Used for
 ///     <see cref="StructureQueryDetailEnumType.Full"/>
 ///     .
 /// </param>
 public AuthStructureRetrieverV21(IAuthSdmxMutableObjectRetrievalManager fullRetrievalManager, IAuthCrossRetrievalManagerFactory crossReferenceManager)
     : base(fullRetrievalManager, crossReferenceManager)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthCrossReferenceRetrievalManager"/> class.
        /// </summary>
        /// <param name="retrievalManager">
        /// The retrieval manager
        /// </param>
        /// <param name="mappingStoreDatabase">
        /// The mapping Store Database.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="retrievalManager"/> is null
        /// -or-
        /// <paramref name="mappingStoreDatabase"/> is null
        /// </exception>
        public AuthCrossReferenceRetrievalManager(IAuthSdmxMutableObjectRetrievalManager retrievalManager, Database mappingStoreDatabase)
        {
            if (retrievalManager == null)
            {
                throw new ArgumentNullException("retrievalManager");
            }

            if (mappingStoreDatabase == null)
            {
                throw new ArgumentNullException("mappingStoreDatabase");
            }

            this._retrievalManager = retrievalManager;
            this._retrievalEngineContainer = new RetrievalEngineContainer(mappingStoreDatabase);
            this._fromMutable = new StructureReferenceFromMutableBuilder();
        }