001package votorola.a.web.gwt; // Copyright 2012, Michael Allan.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE.
002
003import java.lang.annotation.*;
004
005
006/** Marks a callback method for purposes of GWT configuration.  See the complete <a
007  * href='../../../../votorola/a/web/gwt/class-use/GWTConfigCallback.html'>list of
008  * configuration callbacks</a> and the usage instructions for each.  Each is callback
009  * method exposed as a global JavaScript function for callback from the configuration
010  * script <code>gwt.js</code> (a), which may optionally be placed in the vote-server's
011  * <code>publicConfig</code> directory.  An empty template (b) of <code>gwt.js</code> is
012  * provided for reference, along with a working example (c) from the development
013  * vote-server.  Unlike an {@linkplain GWTInitCallback initialization callback}, a
014  * configuration callback is invoked immediately on {@linkplain
015  * EntryPointS#onModuleLoad() module load}.
016  *
017  * <ol type='a'>
018  *     <li>/home/<a href='../../../../../../s/manual.xht#vote-server-file' target='_top'>VOTE-SERVER</a>/votorola/web/publicConfig/gwt.js</li>
019  *     <li><a href='../../../../../../a/web/gwt/gwt.js' target='_top'>votorola/a/web/gwt/gwt.js</a></li>
020  *     <li><a href='../../../../../../s/_/example/full/home/vdev/votorola/web/publicConfig/gwt.js' target='_top'>votorola/s/_/example/full/home/vdev/votorola/web/publicConfig/gwt.js</a></li>
021  *     </ol>
022  */
023  @Documented @Retention(RetentionPolicy.SOURCE) @Target(ElementType.METHOD)
024public @interface GWTConfigCallback {}
025
026
027  // Although each callback method is accessible to native "handwritten" script [1], and
028  // although the method could return a compiled Java object (non-JavaScriptObject), there
029  // would be no way for the script to access its members.  The JSNI naming and access
030  // mechanism [2] works only for JavaScript *within* GWT compiled native methods.
031  //
032  // The callback methods are wrapped in $entry and must therefore be static, per grep
033  // ENTRY_MACRO.
034  //
035  // [1] http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#calling
036  // [2] http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#methods-fields