| 
01 /*02  * Copyright 2008-2015 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.Documented;
 19 import java.lang.annotation.ElementType;
 20 import java.lang.annotation.Retention;
 21 import java.lang.annotation.RetentionPolicy;
 22 import java.lang.annotation.Target;
 23
 24 /**
 25  * <p>Annotates a class.</p>
 26  * <p/>
 27  * <p>When annotating a class it indicates that it will be able to
 28  * handle MVC groups, that is, instantiate them. The class will have
 29  * the ability to create new instances of MVC groups, including short-lived
 30  * ones.</p>
 31  * <p/>
 32  * The following methods will be added to classes annotated with @MVCAware
 33  * <ul>
 34  * <p/>
 35  * <li><code>public MVCGroup createMVCGroup(String mvcType)</code></li>
 36  * <li><code>public MVCGroup createMVCGroup(String mvcType, String mvcId)</code></li>
 37  * <li><code>public MVCGroup createMVCGroup(Map<String, Object> args, String mvcType)</code></li>
 38  * <li><code>public MVCGroup createMVCGroup(String mvcType, Map<String, Object> args)</code></li>
 39  * <li><code>public MVCGroup createMVCGroup(Map<String, Object> args, String mvcType, String mvcId)</code></li>
 40  * <li><code>public MVCGroup createMVCGroup(String mvcType, String mvcId, Map<String, Object> args)</code></li>
 41  * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType)</code></li>
 42  * <li><code>public List<? extends GriffonMvcArtifact> createMVC(Map<String, Object> args, String mvcType)</code></li>
 43  * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType, Map<String, Object> args)</code></li>
 44  * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType, String mvcId)</code></li>
 45  * <li><code>public List<? extends GriffonMvcArtifact> createMVC(Map<String, Object> args, String mvcType, String mvcId)</code></li>
 46  * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType, String mvcId, Map<String, Object> args)</code></li>
 47  * <li><code>public void destroyMVCGroup(String mvcId)</code></li>
 48  * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(String mvcType, MVCCallable<M, V, C> handler)</code></li>
 49  * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(String mvcType, String mvcId, MVCCallable<M, V, C> handler)</code></li>
 50  * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(String mvcType, String mvcId, Map<String, Object> args, MVCCallable<M, V, C> handler)</code></li>
 51  * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(Map<String, Object> args, String mvcType, String mvcId, MVCCallable<M, V, C> handler)</code></li>
 52  * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(String mvcType, Map<String, Object> args, MVCCallable<M, V, C> handler)</code></li>
 53  * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(Map<String, Object> args, String mvcType, MVCCallable<M, V, C> handler)</code></li>
 54  * <li><code>public void withMVCGroup(String mvcType, MVCGroupCallable handler)</code></li>
 55  * <li><code>public void withMVCGroup(String mvcType, String mvcId, MVCGroupCallable handler)</code></li>
 56  * <li><code>public void withMVCGroup(String mvcType, String mvcId, Map<String, Object> args, MVCGroupCallable handler)</code></li>
 57  * <li><code>public void withMVCGroup(Map<String, Object> args, String mvcType, String mvcId, MVCGroupCallable handler)</code></li>
 58  * <li><code>public void withMVCGroup(String mvcType, Map<String, Object> args, MVCGroupCallable handler)</code></li>
 59  * <li><code>public void withMVCGroup(Map<String, Object> args, String mvcType, MVCGroupCallable handler)</code></li>
 60  * </ul>
 61  *
 62  * @author Andres Almiray
 63  * @see griffon.core.mvc.MVCHandler
 64  * @since 2.0.0
 65  */
 66 @Documented
 67 @Retention(RetentionPolicy.SOURCE)
 68 @Target({ElementType.TYPE})
 69 public @interface MVCAware {
 70 }
 |