<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Verifier suggestion?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Verifier suggestion?</description>
  <pubDate>Sun, 12 Apr 2026 04:40:11 -700</pubDate>
  <lastBuildDate>Thu, 25 Aug 2011 17:29:50 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2923</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Verifier suggestion? :  Hi midnit;Before I answer your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2923&amp;PID=11537#11537</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2923<br /><strong>Posted:</strong> 25-Aug-2011 at 5:29pm<br /><br />Hi midnit;<div><br></div><div>Before I answer your questions, I just want to point out our Verifier write up on the DRC (DevForce Resource Center).&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/validate" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/validate</a></div><div><br></div><div>Now, let me attempt and answer your specific questions, as well as give some suggestions. Please keep in mind that my suggestions might not be the best way for your application but I hope it should get you thinking and started.</div><div><br></div><div><table width="99%"><tr><td class="BBquote"></div><div><span ="apple-style-span"="" style=": rgb251, 251, 253; "><div>I am wanting to a simple way to indicate the entity should undergo the "LockedMonthVerification" check&nbsp;- as in perhaps it either implements an interface or perhaps through your MetadataType attribute?</div><div></td></tr></table></div><div><br></div><div>Once you've read our Verifier write up, you'll notice that to use DevForce Verification, we advice you to do the following steps:</div><div><br></div><div>1. Create a class that implements an IVerifierProvider.&nbsp;</div><div>2. Implements the GetVerifiers method that returns IEnumerable&lt;Verifier&gt;.</div><div>2. Create your Verifier(s) and add that to a list of Verifiers and return the list.</div><div><br></div><div>To indicate whether an entity should undergo a Verifier check, you have to add a trigger to the Verifier. A trigger ultimately consists of an entity type and the entity's property. This is where a Verifier knows when to be invoked. Again, you can read this in more detail in our write up.</div><div><br></div><div><table width="99%"><tr><td class="BBquote"></div></span><span ="apple-style-span"="" style=": rgb251, 251, 253; ">I presume the verifier has to query for the locked months for each entity marked as needing that type of verification - assuming they don't have override permission. Can this be done once per call to SaveChangesAsync, or must it be done for every entity?</span></div><div><span ="apple-style-span"="" style=": rgb251, 251, 253; "></td></tr></table></span></div><div><br></div><div>The query can be done once per call to SaveChangesAsync on the SaveInterceptor.</div><div><br></div><div>Since you're doing SL, one suggestion that I have is to override the ValidateSave method on the SaveInterceptor. Inside that method, before you're calling base.ValidateSave, you can query your "locked" months synchronously on the server into the server-side EntityManager. That server-side EntityManager, in turn, can be accessible through the entity you're verifying inside your Verifier and you can retrieve your "locked" months there.</div><div><br></div><div>I have attached a code sample/pseudocode here (You can rename it to .cs). Hopefully it can get you started.</div><div><br></div><div><a href="uploads/912/CodeSample.txt" target="_blank">uploads/912/CodeSample.txt</a><br></div>]]>
   </description>
   <pubDate>Thu, 25 Aug 2011 17:29:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2923&amp;PID=11537#11537</guid>
  </item> 
  <item>
   <title>Verifier suggestion? : Oh, there are also entities that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2923&amp;PID=11517#11517</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2923<br /><strong>Posted:</strong> 24-Aug-2011 at 12:23pm<br /><br />Oh, there are also entities that have certain fields (ie. Comment) that can be edited even though the entity is in a locked month. So if anything other than Comment is being edited then it would fail, if just Comment was being edited it would pass.]]>
   </description>
   <pubDate>Wed, 24 Aug 2011 12:23:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2923&amp;PID=11517#11517</guid>
  </item> 
  <item>
   <title>Verifier suggestion? : Could I get a couple suggestions...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2923&amp;PID=11515#11515</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2923<br /><strong>Posted:</strong> 24-Aug-2011 at 11:30am<br /><br />Could I get a couple suggestions on how (or if) to user your verification in my scenario.<DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV>&nbsp;<DIV>In our business we "lock" each month which means certain data cannot be added, edited, or deleted if the data effects a locked month. These entities vary in either having a single date, or a begin and end date. If its a single date you check just the month that dates in, if its a range you verify there are no locked months overlapping or&nbsp;between the dates. Simple enough. We add a little complication that there is an Override security privilege that ignores the date checks.</DIV><DIV>&nbsp;</DIV><DIV>I am wanting to a simple way to indicate the entity should undergo the "LockedMonthVerification" check&nbsp;- as in perhaps it either implements an interface or perhaps through your MetadataType attribute?</DIV><DIV>&nbsp;</DIV><DIV>Being unfamliar with your verification I was worried about where to start with this. We are already handling this on the client and UI&nbsp;but the client can be stale so the server needs to do this so Verifiers seemed the way to head.</DIV><DIV>&nbsp;</DIV><DIV>I presume the verifier has to query for the locked months for each entity marked as needing that type of verification - assuming they don't have override permission. Can this be done once per call to SaveChangesAsync, or must it be done for every entity?</DIV><DIV>&nbsp;</DIV><DIV>I had also considered a SaveInterceptor.</DIV><DIV>&nbsp;</DIV><DIV>Unfortunately we are late in our dev cycle and this need to be implemented as quickly as possible.</DIV>]]>
   </description>
   <pubDate>Wed, 24 Aug 2011 11:30:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2923&amp;PID=11515#11515</guid>
  </item> 
 </channel>
</rss>