public SdmxMutableProvisionBeanRetrievalManagerImpl( IProvisionRetrievalManager provisionBeanRetrievalManager0) { this.provisionBeanRetrievalManager = provisionBeanRetrievalManager0; if (provisionBeanRetrievalManager0 == null) { throw new ArgumentException( "IProvisionRetrievalManager can not be null"); } }
/// <summary> /// Returns a set of IdentifiableBeans that are directly referenced from this registration /// </summary> /// <param name="registation"> - the registration to resolve the references for </param> /// <param name="structRetrievalManager"> - Used to resolve the structure references. can be null if level = 1 and registration is linked to a provision (as only the provision manager is needed) </param> /// <param name="provRetrievalManager"> - Used to resolve the provision references. Can be null if registration is not linked to a provision </param> /// <returns> a set of IdentifiableBeans that are directly referenced from this registration </returns> public virtual ISet<IIdentifiableObject> ResolveReferences( IRegistrationObject registation, IProvisionRetrievalManager provRetrievalManager) { ISet<IIdentifiableObject> returnSet = new HashSet<IIdentifiableObject>(); if (registation.ProvisionAgreementRef != null) { if (provRetrievalManager == null) { throw new ArgumentException("ProvisionRetrievalManager can not be null"); } IProvisionAgreementObject provision = provRetrievalManager.GetProvision(registation); if (provision == null) { throw new CrossReferenceException( registation.ProvisionAgreementRef); } returnSet.Add(provision); } return returnSet; }
/// <summary> /// Returns a set of IdentifiableBeans that are directly referenced from this registration /// </summary> /// <param name="registation"> /// - the registration to resolve the references for /// </param> /// <param name="structRetrievalManager"> /// - Used to resolve the structure references. can be null if level = 1 and registration is linked to a provision (as only the provision manager is needed) /// </param> /// <param name="provRetrievalManager"> /// - Used to resolve the provision references. Can be null if registration is not linked to a provision /// </param> /// <returns> /// a set of IdentifiableBeans that are directly referenced from this registration /// </returns> public virtual ISet<IIdentifiableObject> ResolveReferences( IRegistrationObject registation, ISdmxRetrievalManager structRetrievalManager, IProvisionRetrievalManager provRetrievalManager) { ISet<IIdentifiableObject> returnSet = new HashSet<IIdentifiableObject>(); if (registation.ProvisionAgreementRef != null) { if (provRetrievalManager == null) { throw new ArgumentException("ProvisionRetrievalManager can not be null"); } IProvisionAgreementObject provision = provRetrievalManager.GetProvision(registation); if (provision == null) { throw new ReferenceException( ExceptionCode.ReferenceErrorUnresolvable, SdmxStructureType.GetFromEnum(SdmxStructureEnumType.ProvisionAgreement).ToString(), registation.ProvisionAgreementRef); } returnSet.Add(provision); } return returnSet; }