예제 #1
0
        /// -----------------------------------------------------------------------------
        /// 
        public static void processDocument(_Document doc)
        {
            CustomiseRegionalSetting custom = new CustomiseRegionalSetting();
            try
            {
                PolicyResponseProcessor.process(doc.PolicyList);
            }
            finally
            {
                custom.RestoreCulture();
            }

            PolicyResponseProcessor._RiskElements.Document = doc;

            string xmlContent = PolicyResponseProcessor._RiskElements.GetXml();
            string htmContent = PolicyResponseProcessor._RiskElements.GetHtml();

            doc.XmlContent = xmlContent;
            doc.HtmlContent = htmContent;
        }
예제 #2
0
		private List<_Document> getDocumentPolicies(IPolicyResponseObject upi)
		{
			foreach(Workshare.Policy.Engine.ContentItem content in upi.ContentCollection)
			{
				List<PolicyResponse>    policyResponses = new List<PolicyResponse>();

				foreach(PolicySetResponse set in content.PolicySetCollection)
				{
					foreach(PolicyResponse policyResponse in set.PolicyReportCollection)
					{
						// We check ActionCollection because Legacy policies all hace Active Content Channels
						// therefore policy will run through NXBRE and possibly  be triggered.  But only
						// legacy policies with Active Content channels that have Actions will have
						// policyResponse.ActionCollection.Count > 0 (JE 08.10.2010)
						if ((policyResponse.Triggered) && (policyResponse.ActionCollection.Count > 0 || shouldAllowPDFWithNoActions(upi, policyResponse)))
						{
							policyResponses.Add(policyResponse);
						}
					}
				}

				if(policyResponses.Count > 0)
				{
					_Document doc = new _Document();

					doc.Name        = content.DisplayName;
					doc.PolicyList  = policyResponses;

					_DocumentList.Add(doc);
				}
			}

			return _DocumentList;
		}