griffon/core/GriffonMvcArtifact.java

`GriffonMvcArtifact.java`
`01 /* 02 * Copyright 2010-2012 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.core; 17 18 import java.util.Map; 19 20 /** 21 * Identifies an artifact that belongs to an MVC group.<p> 22 * The main difference between {@code buildMVCGroup} and {@code createMVCGroup} methods is that 23 * the formers will return a Map of instances where there could be more than strict MVC members 24 * (like actions or charts), the latters will always return the canonical MVC members of a group 25 * and nothing more. 26 * 27 * @author Andres Almiray 28 * @since 0.9.1 29 */ 30 public interface GriffonMvcArtifact extends GriffonArtifact { 31 /** 32 * Post initialization callback.<p> 33 * This callback is called for all artifacts that belong to the 34 * same MVC group right after each instance has been created. 35 * Each entry on the <tt>args</tt> Map points either to an MVC 36 * member or a variable that was defined using any of the {@code buildMVCGroup} 37 * and/or {@code createMVCGroup} methods that can take a Map as parameter. 38 * 39 * @param args a Map of MVC instances or variables keyed by type. 40 */ 41 void mvcGroupInit(Map<String, Object> args); 42 43 /** 44 * Callback for when the group is destroyed and disposed from the application.<p> 45 * Once an artifact has been "destroyed" it should not be used anymore. The application 46 * will remove any references to the group on its cache. 47 */ 48 void mvcGroupDestroy(); 49 }`