01 /*
02 * Copyright 2008-2014 the original author or authors.
03 *
04 * Licensed under the Apache License, Version 2.0 (the "License");
05 * you may not use this file except in compliance with the License.
06 * You may obtain a copy of the License at
07 *
08 * http://www.apache.org/licenses/LICENSE-2.0
09 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package griffon.transform;
17
18 import java.lang.annotation.*;
19
20 /**
21 * <p>Annotates a class.</p>
22 * <p/>
23 * <p>When annotating a class it indicates that it will be able to
24 * handle MVC groups, that is, instantiate them. The class will have
25 * the ability to create new instances of MVC groups, including short-lived
26 * ones.</p>
27 * <p/>
28 * The following methods will be added to classes annotated with @MVCAware
29 * <ul>
30 * <p/>
31 * <li><code>public MVCGroup buildMVCGroup(String mvcType)</code></li>
32 * <li><code>public MVCGroup buildMVCGroup(String mvcType, String mvcId)</code></li>
33 * <li><code>public MVCGroup buildMVCGroup(Map<String, Object> args, String mvcType)</code></li>
34 * <li><code>public MVCGroup buildMVCGroup(String mvcType, Map<String, Object> args)</code></li>
35 * <li><code>public MVCGroup buildMVCGroup(Map<String, Object> args, String mvcType, String mvcId)</code></li>
36 * <li><code>public MVCGroup buildMVCGroup(String mvcType, String mvcId, Map<String, Object> args)</code></li>
37 * <li><code>public List<? extends GriffonMvcArtifact> createMVCGroup(String mvcType)</code></li>
38 * <li><code>public List<? extends GriffonMvcArtifact> createMVCGroup(Map<String, Object> args, String mvcType)</code></li>
39 * <li><code>public List<? extends GriffonMvcArtifact> createMVCGroup(String mvcType, Map<String, Object> args)</code></li>
40 * <li><code>public List<? extends GriffonMvcArtifact> createMVCGroup(String mvcType, String mvcId)</code></li>
41 * <li><code>public List<? extends GriffonMvcArtifact> createMVCGroup(Map<String, Object> args, String mvcType, String mvcId)</code></li>
42 * <li><code>public List<? extends GriffonMvcArtifact> createMVCGroup(String mvcType, String mvcId, Map<String, Object> args)</code></li>
43 * <li><code>public void destroyMVCGroup(String mvcId)</code></li>
44 * <li><code>public void withMVCGroup(String mvcType, Closure handler)</code></li>
45 * <li><code>public void withMVCGroup(String mvcType, String mvcId, Closure handler)</code></li>
46 * <li><code>public void withMVCGroup(String mvcType, String mvcId, Map<String, Object> args, Closure handler)</code></li>
47 * <li><code>public void withMVCGroup(Map<String, Object> args, String mvcType, String mvcId, Closure handler)</code></li>
48 * <li><code>public void withMVCGroup(String mvcType, Map<String, Object> args, Closure handler)</code></li>
49 * <li><code>public void withMVCGroup( Object> args, String mvcType, Map<String,Closure handler)</code></li>
50 * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVCGroup(String mvcType, MVCClosure<M, V, C> handler)</code></li>
51 * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVCGroup(String mvcType, String mvcId, MVCClosure<M, V, C> handler)</code></li>
52 * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVCGroup(String mvcType, String mvcId, Map<String, Object> args, MVCClosure<M, V, C> handler)</code></li>
53 * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVCGroup(Map<String, Object> args, String mvcType, String mvcId, MVCClosure<M, V, C> handler)</code></li>
54 * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVCGroup(String mvcType, Map<String, Object> args, MVCClosure<M, V, C> handler)</code></li>
55 * <p/>
56 * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVCGroup(Map<String, Object> args, String mvcType, MVCClosure<M, V, C> handler)</code></li>
57 * <p/>
58 * </ul>
59 *
60 * @author Andres Almiray
61 * @see griffon.core.mvc.MVCHandler
62 * @since 2.0.0
63 */
64 @Documented
65 @Retention(RetentionPolicy.SOURCE)
66 @Target({ElementType.TYPE})
67 public @interface MVCAware {
68 }
|