/* * Copyright 2008-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package griffon.transform; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * <p>Annotates a class.</p> * <p/> * <p>When annotating a class it indicates that it will be able to * handle MVC groups, that is, instantiate them. The class will have * the ability to create new instances of MVC groups, including short-lived * ones.</p> * <p/> * The following methods will be added to classes annotated with @MVCAware * <ul> * <p/> * <li><code>public MVCGroup createMVCGroup(String mvcType)</code></li> * <li><code>public MVCGroup createMVCGroup(String mvcType, String mvcId)</code></li> * <li><code>public MVCGroup createMVCGroup(Map<String, Object> args, String mvcType)</code></li> * <li><code>public MVCGroup createMVCGroup(String mvcType, Map<String, Object> args)</code></li> * <li><code>public MVCGroup createMVCGroup(Map<String, Object> args, String mvcType, String mvcId)</code></li> * <li><code>public MVCGroup createMVCGroup(String mvcType, String mvcId, Map<String, Object> args)</code></li> * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType)</code></li> * <li><code>public List<? extends GriffonMvcArtifact> createMVC(Map<String, Object> args, String mvcType)</code></li> * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType, Map<String, Object> args)</code></li> * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType, String mvcId)</code></li> * <li><code>public List<? extends GriffonMvcArtifact> createMVC(Map<String, Object> args, String mvcType, String mvcId)</code></li> * <li><code>public List<? extends GriffonMvcArtifact> createMVC(String mvcType, String mvcId, Map<String, Object> args)</code></li> * <li><code>public void destroyMVCGroup(String mvcId)</code></li> * <li><code>public <M extends GriffonModel, V extends GriffonView, C extends GriffonController> void withMVC(String mvcType, MVCCallable<M, V, C> handler)</code></li> * <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> * <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> * <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> * <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> * <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> * <li><code>public void withMVCGroup(String mvcType, MVCGroupCallable handler)</code></li> * <li><code>public void withMVCGroup(String mvcType, String mvcId, MVCGroupCallable handler)</code></li> * <li><code>public void withMVCGroup(String mvcType, String mvcId, Map<String, Object> args, MVCGroupCallable handler)</code></li> * <li><code>public void withMVCGroup(Map<String, Object> args, String mvcType, String mvcId, MVCGroupCallable handler)</code></li> * <li><code>public void withMVCGroup(String mvcType, Map<String, Object> args, MVCGroupCallable handler)</code></li> * <li><code>public void withMVCGroup(Map<String, Object> args, String mvcType, MVCGroupCallable handler)</code></li> * </ul> * * @author Andres Almiray * @see griffon.core.mvc.MVCHandler * @since 2.0.0 */ @Documented @Retention(RetentionPolicy.SOURCE) @Target({ElementType.TYPE}) public @interface MVCAware { }