Author: chatellier Date: 2010-12-15 16:18:22 +0000 (Wed, 15 Dec 2010) New Revision: 419 Log: Ajout d'une classe abstraite commune aux erreur portant sur une categorie et une ligne en particulier Added: trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java Added: trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java (rev 0) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java 2010-12-15 16:18:22 UTC (rev 419) @@ -0,0 +1,63 @@ +/* + * #%L + * + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +package fr.ifremer.coser.command; + +import fr.ifremer.coser.CoserConstants.Category; + +/** + * Commande faite une une category de fichier a une ligne specifique. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public abstract class CategoryLineCommand extends Command { + + /** Category de données sur lequel porte l'action. */ + protected Category category; + + /** Line index of object to do command to. */ + protected String lineNumber; + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public String getLineNumber() { + return lineNumber; + } + + public void setLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + } + +} Property changes on: trunk/coser-business/src/main/java/fr/ifremer/coser/command/CategoryLineCommand.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java 2010-12-15 15:55:26 UTC (rev 418) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/command/DeleteLineCommand.java 2010-12-15 16:18:22 UTC (rev 419) @@ -46,30 +46,8 @@ * Last update : $Date$ * By : $Author$ */ -public class DeleteLineCommand extends Command { +public class DeleteLineCommand extends CategoryLineCommand { - /** Category de données sur lequel porte l'action. */ - protected Category category; - - /** Line index of object to do command to. */ - protected String lineNumber; - - public Category getCategory() { - return category; - } - - public void setCategory(Category category) { - this.category = category; - } - - public String getLineNumber() { - return lineNumber; - } - - public void setLineNumber(String lineNumber) { - this.lineNumber = lineNumber; - } - @Override public void doCommand(Project project, AbstractDataContainer container) throws CoserBusinessException { Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java 2010-12-15 15:55:26 UTC (rev 418) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/command/ModifyFieldCommand.java 2010-12-15 16:18:22 UTC (rev 419) @@ -55,14 +55,8 @@ * Last update : $Date$ * By : $Author$ */ -public class ModifyFieldCommand extends Command { +public class ModifyFieldCommand extends CategoryLineCommand { - /** Category de données sur lequel porte l'action. */ - protected Category category; - - /** Line index of object to do command to. */ - protected String lineNumber; - /** Field index to to command. */ protected String fieldName; @@ -72,22 +66,6 @@ /** Field new value. */ protected String newValue; - public Category getCategory() { - return category; - } - - public void setCategory(Category category) { - this.category = category; - } - - public String getLineNumber() { - return lineNumber; - } - - public void setLineNumber(String lineNumber) { - this.lineNumber = lineNumber; - } - public String getFieldName() { return fieldName; }