/// <summary>
        /// Webs the content meta data finished with redirect URL.
        /// </summary>
        /// <param name="clientReport">The client report.</param>
        /// <param name="url">The URL.</param>
        public void WebContentMetaDataFinishedWithRedirectUrl(UPWebContentMetadata clientReport, Uri url)
        {
            this.ControllerState = GroupModelControllerState.Finished;
            UPMWebContentGroup webcontentGroup = (UPMWebContentGroup)this.Group;

            webcontentGroup.WebContentUrl = url;
            this.ControllerState          = GroupModelControllerState.Finished;
            this.Delegate.GroupModelControllerFinished(this);
        }
        /// <summary>
        /// Webs the content meta data finished with XML string.
        /// </summary>
        /// <param name="clientReport">The client report.</param>
        /// <param name="xmlString">The XML string.</param>
        public void WebContentMetaDataFinishedWithXmlString(UPWebContentMetadata clientReport, string xmlString)
        {
            this.ControllerState = GroupModelControllerState.Pending;
            UPMWebContentGroup webcontentGroup = (UPMWebContentGroup)this.Group;

            if (webcontentGroup != null)
            {
                webcontentGroup.WebContentHtml = xmlString;
            }

            this.ControllerState = GroupModelControllerState.Finished;
            this.Delegate.GroupModelControllerFinished(this);
        }
        /// <summary>
        /// Applies the link record identification.
        /// </summary>
        /// <param name="recordIdentification">The record identification.</param>
        /// <param name="context">The context.</param>
        /// <param name="_viewReference">The view reference.</param>
        /// <returns></returns>
        public UPMGroup ApplyLinkRecordIdentification(string recordIdentification, Dictionary <string, object> context, ViewReference _viewReference)
        {
            IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;

            if (this.formItem != null)
            {
                string reportType = this.formItem.ViewReference.ContextValueForKey("ReportType");
                if (reportType == "ClientReport")
                {
                    Menu configMenu = configStore.MenuByName(this.formItem.ViewReference.ContextValueForKey("ConfigName"));
                    this.viewReference = this.formItem.ViewReference.ViewReferenceWith(context);
                    if (configMenu != null)
                    {
                        this.viewReference = configMenu.ViewReference.ViewReferenceWith(this.viewReference.ContextValueForKey("RecordId"));
                    }
                }
                else
                {
                    this.viewReference = this.formItem.ViewReference;
                }
            }
            else
            {
                if (_viewReference == null)
                {
                    Menu configMenu = configStore.MenuByName(this.TabConfig.Type.Substring("WEBCONTENT_".Length));
                    this.viewReference = configMenu.ViewReference.ViewReferenceWith(recordIdentification);
                }
                else
                {
                    this.viewReference = _viewReference;
                }
            }

            this.webContentMetadata   = UPWebContentMetadata.WebContentMetaDataFromViewReference(this.viewReference, this);
            this.RecordIdentification = this.viewReference.ContextValueForKey("RecordId");
            if (this.ExplicitTabIdentifier == null)
            {
                this.ExplicitTabIdentifier = this.TabIdentifierForRecordIdentification(
                    !string.IsNullOrEmpty(this.RecordIdentification) ? this.RecordIdentification : recordIdentification);
            }

            this.tmpGroup = new UPMWebContentGroup(this.ExplicitTabIdentifier);
            string linkIdStr = this.viewReference.ContextValueForKey("LinkId");

            if (!string.IsNullOrEmpty(linkIdStr))
            {
                this.LinkId = Convert.ToInt32(linkIdStr);
            }
            else
            {
                this.LinkId = -1;
            }

            string parentLink = this.viewReference.ContextValueForKey("ParentLink");

            if (!string.IsNullOrEmpty(parentLink))
            {
                this.linkReader = new UPCRMLinkReader(this.RecordIdentification, parentLink, UPRequestOption.FastestAvailable, this);
                this.linkReader.Start();
                this.ControllerState = GroupModelControllerState.Pending;
                return(null);
            }

            this.ContinueBuildGroup();
            return(this.Group);
        }
 private void BuildClientReportForGroup(UPMWebContentGroup webcontentGroup)
 {
     ((UPWebContentMetadataClientReport)this.webContentMetadata).StartWithRecordIdentificationLinkIdParameters(this.RecordIdentification, this.LinkId, null);
 }