| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>ValidateOnExecution</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ValidateOnExecution"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/validation/executable/ExecutableValidator.html" title="interface in javax.validation.executable"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/validation/executable/ValidateOnExecution.html" target="_top">Frames</a></li> |
| <li><a href="ValidateOnExecution.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Field | </li> |
| <li>Required | </li> |
| <li><a href="#annotation.type.optional.element.summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#annotation.type.element.detail">Element</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">javax.validation.executable</div> |
| <h2 title="Annotation Type ValidateOnExecution" class="title">Annotation Type ValidateOnExecution</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@Target(value={CONSTRUCTOR,METHOD,TYPE,PACKAGE}) |
| @Retention(value=RUNTIME) |
| @Documented |
| public @interface <span class="memberNameLabel">ValidateOnExecution</span></pre> |
| <div class="block">Expresses which executables (methods or constructors) should have their parameters |
| and return value validated upon execution. Can be on executable (method, constructor) |
| or type level (with the former taking precedence). |
| <p> |
| If not present for a given executable, the default configuration from |
| <code>META-INF/validation.xml</code> and finally the implicit default |
| validated executable types (constructors and non-getters) are taken into account to |
| determine whether a given executable is validated upon execution or not. |
| <p> |
| The following describes the formal rules for deciding whether an executable is validated. |
| They are applied in decreasing order: |
| <ul> |
| <li>the executable is validated if it is annotated with <code>@ValidateOnExecution</code> |
| and the <code>type</code> attribute contains the executable type or |
| <a href="../../../javax/validation/executable/ExecutableType.html#IMPLICIT"><code>ExecutableType.IMPLICIT</code></a>. If the <code>type</code> attribute does neither contain |
| the executable type nor <code>IMPLICIT</code>, the executable is not validated.</li> |
| <li>otherwise the executable is validated if the type (class, interface) on which it |
| is declared is annotated with <code>@ValidateOnExecution</code> and the <code>type</code> |
| attribute contains the executable type. If the <code>type</code> attribute contains |
| <code>IMPLICIT</code>, then this rule is ignored and the behavior is equivalent to |
| <code>ValidateOnExecution</code> not being present. If the <code>type</code> attribute does not |
| contain the executable type, the executable is not validated.</li> |
| <li>otherwise the executable is validated if the global executable validation setting |
| contains the executable type. If the global setting does not contain the executable |
| type, the executable is not validated.</li> |
| <li>The rules above do not apply to methods overriding a superclass method or |
| implementing an interface method. In this case, the method inherits the behavior |
| of the method it overrides or implements. Out of the box, a conforming implementation |
| raises a <a href="../../../javax/validation/ValidationException.html" title="class in javax.validation"><code>ValidationException</code></a> if the overriding / implementing method hosts |
| the <code>ValidateOnExecution</code> annotation.</li> |
| </ul> |
| <p> |
| Note that you can exclude an executable from validation by making sure the rules above do |
| not match or by annotating the executable with <code>@ValidateOnExecution(NONE)</code>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.1</dd> |
| <dt><span class="simpleTagLabel">Examples (en):</span></dt> |
| <dd><a href="../../../../../../tomee-8.0/examples/mvc-cxf.html">mvc-cxf</a>, <a href="../../../../../../tomee-8.0/examples/mvc-cxf-hibernate.html">mvc-cxf-hibernate</a></dd> |
| <dt><span class="simpleTagLabel">Examples (pt):</span></dt> |
| <dd><a href="../../../../../../tomee-8.0/pt/examples/mvc-cxf-hibernate.html">mvc-cxf-hibernate</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.optional.element.summary"> |
| <!-- --> |
| </a> |
| <h3>Optional Element Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> |
| <caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Optional Element and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../javax/validation/executable/ExecutableType.html" title="enum in javax.validation.executable">ExecutableType</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/validation/executable/ValidateOnExecution.html#type--">type</a></span></code> |
| <div class="block">List of executable types to be validated when called.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.element.detail"> |
| <!-- --> |
| </a> |
| <h3>Element Detail</h3> |
| <a name="type--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>type</h4> |
| <pre>public abstract <a href="../../../javax/validation/executable/ExecutableType.html" title="enum in javax.validation.executable">ExecutableType</a>[] type</pre> |
| <div class="block">List of executable types to be validated when called. |
| Defaults to the types discovered implicitly (see <a href="../../../javax/validation/executable/ExecutableType.html#IMPLICIT"><code>ExecutableType.IMPLICIT</code></a>).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>array of <code>ExecutableType</code>s to be validated</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>javax.validation.executable.ExecutableType.IMPLICIT</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/validation/executable/ExecutableValidator.html" title="interface in javax.validation.executable"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/validation/executable/ValidateOnExecution.html" target="_top">Frames</a></li> |
| <li><a href="ValidateOnExecution.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Field | </li> |
| <li>Required | </li> |
| <li><a href="#annotation.type.optional.element.summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#annotation.type.element.detail">Element</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |