예제 #1
0
        /// <summary>
        /// Creates filter data from the request
        /// </summary>
        public RegistryQueryRequest CreateFilterData(MARC.Everest.Interfaces.IInteraction request, List <MARC.Everest.Connectors.IResultDetail> dtls)
        {
            ILocalizationService locale = Context.GetService(typeof(ILocalizationService)) as ILocalizationService;

            // Componentize the message into the data model
            CaComponentUtil compUtil = new CaComponentUtil();

            compUtil.Context = this.Context;
            PRPA_IN101103CA rqst = request as PRPA_IN101103CA;

            List <DomainIdentifier> ids = new List <DomainIdentifier>();
            var queryData = compUtil.CreateQueryMatch(rqst.controlActEvent, dtls, ref ids);

            if (ids == null || queryData == null)
            {
                throw new MessageValidationException(locale.GetString("MSGE00A"), request);
            }

            var filter = MessageUtil.CreateQueryData(rqst.controlActEvent.QueryByParameter, String.Format("{1}^^^&{0}&ISO",
                                                                                                          rqst.Sender.Device.Id.Root,
                                                                                                          rqst.Sender.Device.Id.Extension)
                                                     );

            filter.OriginalMessageQueryId = String.Format("{1}^^^&{0}&ISO", request.Id.Root, request.Id.Extension);
            filter.QueryRequest           = queryData;
            filter.TargetDomain           = ids;
            filter.IsSummary = true;

            return(filter);
        }