[YMIR-333] [ymir-core] Pageが持つ@ConstraintBundleのついたメソッドに付与されている制約チェックを行なうようにする Created: 2009-05-16  Updated: 2009-05-18  Resolved: 2009-05-18

Status: Closed
Project: Ymir
Component/s: ymir-core
Affects Version/s: 1.0.2
Fix Version/s: 1.0.3

Type: Improvement Priority: Minor
Reporter: skirnir Assignee: skirnir
Resolution: Fixed Votes: 0
Labels: None


 Description   

現在のConstraintBundleは分かりにくく扱いにくい。そこで、Pageが持つ@ConstraintBundleのついたメソッドに付与されている制約チェックを行なうような仕組みを追加し、従来のConstraintBundleはdeprecatedにする。

通常@ConstraintBundleをつけるメソッドはPageの共通の親クラスにつける。つけられたメソッドの返り値がtrueの場合は制約チェックを行なう。falseの場合は行なわない。これで複数Pageに同じ制約をまとめてつけることができる。



 Comments   
Comment by skirnir [ 2009-05-18 ]

対処しました。

  • ConstraintHolderアノテーションを追加しました。(ConstraintBundleはアノテーションではなかったため)
  • ConstraintHolderがついたメソッドの返り値型がvoid型か、boolean型で実行結果がtrueの場合だけ、そのメソッドに付与された制約が有効になります。
Comment by skirnir [ 2009-05-16 ]

メソッドの返り値のtrue/falseではなく、@SuppressConstraintアノテーションでチェックする・しないを決定するようにする。

Generated at Fri Apr 19 22:21:59 JST 2024 using Jira 9.15.0#9150000-sha1:9ead8528714127d8cfabf2446010d7e62c0a195c.