1 /* 2 Copyright (C) 2000 - 2007 Grid Systems, S.A. 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License, version 2, as 6 published by the Free Software Foundation. 7 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License 14 along with this program; if not, write to the Free Software 15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 */ 17 18 /* 19 * Project: KernelConfigurator 20 * Created on 26-feb-2004 21 * 22 * Copyright (c)2003 Grid Systems 23 */ 24 package com.gridsystems.config; 25 26 /** 27 * View part of the MVC pattern for Configurators. 28 * 29 * @author <a href="mailto:rruiz@gridsystems.com">Rodrigo Ruiz Aguayo</a> 30 * @version 1.0 31 */ 32 public interface ConfiguratorView { 33 34 /** 35 * Gets the title of this view. It will normally be the same as the configurator 36 * name, but it can change on some implementations. 37 * 38 * @return This view title 39 */ 40 String getTitle(); 41 42 /** 43 * Gets the subtitle of this view. It can contain a short description of the 44 * configurator. 45 * 46 * @return This view subtitle 47 */ 48 String getSubtitle(); 49 50 /** 51 * Copies the model values into this view fields. 52 * 53 * @param srcModel The source model 54 */ 55 void getValues(ConfiguratorModel srcModel); 56 57 /** 58 * Copies this view field values into the destination model. 59 * <p> 60 * This copy should not involve validation or persistence storage, as these actions 61 * will be performed later. 62 * 63 * @param destModel The destination model 64 */ 65 void setValues(ConfiguratorModel destModel); 66 67 /** 68 * Gets the configurator this view is associated to. 69 * 70 * @return The configurator 71 */ 72 Configurator getConfigurator(); 73 74 /** 75 * Gets if the view contains any error. 76 * 77 * @return <code>true</code> if there is any error in the view 78 */ 79 boolean hasErrors(); 80 }