Author: bleny Date: 2014-07-29 18:05:17 +0200 (Tue, 29 Jul 2014) New Revision: 2182 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2182 Log: refs #4481 change Boat#immatriculation to registrationCode, and change type from int to String Added: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatRegistrationCodesException.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatRegistrationCodeParserFormatter.java Removed: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatImmatriculationsException.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatImmatriculationParserFormatter.java Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatImpl.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatTopiaDao.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Boats.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql trunk/wao-persistence/src/main/xmi/wao-model.zargo trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/AddBoatToUserAllegroWalletEmail.java trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_en.mustache trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_fr.mustache trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/boats.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/edit-contact-input.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/edit-sample-row-input.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatImpl.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatImpl.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -46,12 +46,12 @@ @Override public String getDescription() { - return getImmatriculation() + " - " + getName(); + return getRegistrationCode() + " - " + getName(); } @Override public String toString() { - return getName() + " (" + getImmatriculation() + ")"; + return getName() + " (" + getRegistrationCode() + ")"; } @Override Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatTopiaDao.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatTopiaDao.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/BoatTopiaDao.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -91,12 +91,12 @@ } if (StringUtils.isNotEmpty(filter.getRegistrationCode())) { - query.addWhereClause("str(b." + Boat.PROPERTY_IMMATRICULATION + ") like :registrationCode", ImmutableMap.of("registrationCode", (Object) (filter.getRegistrationCode() + "%"))); + query.addWhereClause("str(b." + Boat.PROPERTY_REGISTRATION_CODE + ") like :registrationCode", ImmutableMap.of("registrationCode", (Object) (filter.getRegistrationCode() + "%"))); } if (StringUtils.isNotEmpty(filter.getBoatNameOrRegistrationCode())) { query.addWhereClause( - "lower(b." + Boat.PROPERTY_NAME + ") like :boatNameOrRegistrationCode or str(b." + Boat.PROPERTY_IMMATRICULATION + ") like :boatNameOrRegistrationCode", + "lower(b." + Boat.PROPERTY_NAME + ") like :boatNameOrRegistrationCode or str(b." + Boat.PROPERTY_REGISTRATION_CODE + ") like :boatNameOrRegistrationCode", ImmutableMap.of("boatNameOrRegistrationCode", (Object) (filter.getBoatNameOrRegistrationCode().toLowerCase() + "%"))); } Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Boats.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Boats.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Boats.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -27,22 +27,22 @@ public class Boats { - public static Function<Boat, Integer> getImmatriculation() { - return new GetImmatriculation(); + public static Function<Boat, String> getRegistrationCode() { + return new GetRegistrationCode(); } - public static String toImmatriculations(Iterable<Boat> boats) { + public static String toRegistrationCodes(Iterable<Boat> boats) { return StringUtils.join( - Iterables.transform(boats, getImmatriculation()), + Iterables.transform(boats, getRegistrationCode()), ' '); } - protected static class GetImmatriculation implements Function<Boat, Integer> { + protected static class GetRegistrationCode implements Function<Boat, String> { @Override - public Integer apply(Boat input) { - Integer immatriculation = input.getImmatriculation(); - return immatriculation; + public String apply(Boat input) { + String registrationCode = input.getRegistrationCode(); + return registrationCode; } } } Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -111,9 +111,9 @@ } /** - * Used to get a list of boat's immatriculations linked with the sampleRow. + * Used to get a list of boat's registrationCodes linked with the sampleRow. * - * @return a simple String which contains immatriculations separate by + * @return a simple String which contains registrationCodes separate by * a space */ @Override @@ -122,7 +122,7 @@ for (ElligibleBoat elligible : getElligibleBoat()) { if (elligible.isGlobalActive()) { Boat boat = elligible.getBoat(); - result += boat.getImmatriculation() + " "; + result += boat.getRegistrationCode() + " "; } } return result; Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -323,7 +323,7 @@ boolean boatIsElligible = eligibleBoat.isGlobalActive(); boolean boatWasElligible = oldRow != null && oldRow.getElligibleBoatByBoat(eligibleBoat.getBoat()).isGlobalActive(); - String registrationCode = String.valueOf(eligibleBoat.getBoat().getImmatriculation()); + String registrationCode = eligibleBoat.getBoat().getRegistrationCode(); if (boatWasElligible) { if (boatIsElligible) { stillEligibleBoats.add(registrationCode); Modified: trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql =================================================================== --- trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-persistence/src/main/resources/db/migration/V4_1__clean_database.sql 2014-07-29 16:05:17 UTC (rev 2182) @@ -138,3 +138,5 @@ END; ALTER TABLE ContactStateMotif RENAME COLUMN contactStateOrdinal TO contactState; +ALTER TABLE Boat ALTER COLUMN immatriculation TYPE TEXT; +ALTER TABLE Boat RENAME COLUMN immatriculation TO registrationCode; Modified: trunk/wao-persistence/src/main/xmi/wao-model.zargo =================================================================== (Binary files differ) Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -90,7 +90,7 @@ Boat boat = contact.getBoat(); boatsFilterValues.addBoatFromContacts(boat); - boatRegistrationCodes.add(FilterOption.forValueAndLabel(String.valueOf(boat.getImmatriculation()), boat.getDescription())); + boatRegistrationCodes.add(FilterOption.forValueAndLabel(String.valueOf(boat.getRegistrationCode()), boat.getDescription())); SampleRow sampleRow = contact.getSampleRow(); sampleRowsFilterValues.addSampleRow(sampleRow); Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -63,7 +63,7 @@ import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao; import fr.ifremer.wao.services.AuthenticatedWaoUser; import fr.ifremer.wao.services.service.administration.ReferentialService; -import fr.ifremer.wao.services.service.administration.UnknownBoatImmatriculationsException; +import fr.ifremer.wao.services.service.administration.UnknownBoatRegistrationCodesException; import fr.ifremer.wao.services.service.csv.ObsMerObsVenteSamplingPlanImportExportModel; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.IOUtils; @@ -308,8 +308,8 @@ elligibleBoats.add(elligibleBoat.getBoat()); } } - String elligibleBoatImmatriculations = Boats.toImmatriculations(elligibleBoats); - updateSampleRowCommand.setElligibleBoatImmatriculations(elligibleBoatImmatriculations); + String elligibleBoatRegistrationCodes = Boats.toRegistrationCodes(elligibleBoats); + updateSampleRowCommand.setElligibleBoatRegistrationCodes(elligibleBoatRegistrationCodes); } else { @@ -361,13 +361,13 @@ } public void preValidate(AuthenticatedWaoUser authenticatedWaoUser, UpdateSampleRowCommand updateSampleRowCommand) - throws UnknownBoatImmatriculationsException { + throws UnknownBoatRegistrationCodesException { SampleRow sampleRow = updateSampleRowCommand.getSampleRow(); - String elligibleBoatImmatriculations = updateSampleRowCommand.getElligibleBoatImmatriculations(); + String elligibleBoatRegistrationCodes = updateSampleRowCommand.getElligibleBoatRegistrationCodes(); - List<Boat> elligibleBoats = getReferentialService().getBoatsFromImmatriculations(elligibleBoatImmatriculations); + List<Boat> elligibleBoats = getReferentialService().getBoatsFromRegistrationCodes(elligibleBoatRegistrationCodes); ElligibleBoatTopiaDao elligibleBoatDao = getElligibleBoatDao(); for (Boat boat : elligibleBoats) { Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -64,7 +64,7 @@ protected ImmutableMap<String, DCF5Code> allDcf5Codes; - protected String elligibleBoatImmatriculations; + protected String elligibleBoatRegistrationCodes; /** * La clé est un mois au format YYYY-MM @@ -202,12 +202,12 @@ this.allDcf5Codes = allDcf5Codes; } - public String getElligibleBoatImmatriculations() { - return elligibleBoatImmatriculations; + public String getElligibleBoatRegistrationCodes() { + return elligibleBoatRegistrationCodes; } - public void setElligibleBoatImmatriculations(String elligibleBoatImmatriculations) { - this.elligibleBoatImmatriculations = elligibleBoatImmatriculations; + public void setElligibleBoatRegistrationCodes(String elligibleBoatRegistrationCodes) { + this.elligibleBoatRegistrationCodes = elligibleBoatRegistrationCodes; } public boolean isObservationAlreadyStarted() { Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -28,6 +28,7 @@ import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; import fr.ifremer.wao.WaoTechnicalException; import fr.ifremer.wao.entity.Boat; import fr.ifremer.wao.entity.BoatTopiaDao; @@ -97,8 +98,8 @@ private static final Log log = LogFactory.getLog(ReferentialService.class); - /** Splitter qui permet de détecter toutes les immatriculations dans une chaîne (que le séparateur soit ' ', ',' ou autre). */ - protected static final Splitter BOAT_IMMATRICULATIONS_SPLITTER = Splitter.on(Pattern.compile("[^0-9]+")); + /** Splitter qui permet de détecter toutes les registrationCodes dans une chaîne (que le séparateur soit ' ', ',' ou autre). */ + protected static final Splitter BOAT_REGISTRATION_CODES_SPLITTER = Splitter.on(Pattern.compile("[^0-9]+")).omitEmptyStrings(); /** Pour chaque programme, les référentiels utilisés par ce programme. */ protected static final Map<ObsProgram, List<String>> PER_PROGRAM_REFERENTIAL; @@ -746,7 +747,7 @@ boat.setShipOwner(shipOwner); // now boat object is ready - Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull(); + Boat existingBoat = boatDao.forRegistrationCodeEquals(boat.getRegistrationCode()).findUniqueOrNull(); if (existingBoat == null) { boatDao.create(boat); } else { @@ -774,28 +775,19 @@ } - public List<Boat> getBoatsFromImmatriculations(String joinedImmatriculations) throws UnknownBoatImmatriculationsException { + public List<Boat> getBoatsFromRegistrationCodes(String joinedRegistrationCodes) throws UnknownBoatRegistrationCodesException { - Iterable<String> splitImmatriculations = BOAT_IMMATRICULATIONS_SPLITTER.split(joinedImmatriculations); + Iterable<String> splitRegistrationCodes = BOAT_REGISTRATION_CODES_SPLITTER.split(joinedRegistrationCodes); - Set<Integer> immatriculations = new HashSet<>(); - for (String splitImmatriculation : splitImmatriculations) { - if (StringUtils.isNotBlank(splitImmatriculation)) { - immatriculations.add(Integer.parseInt(splitImmatriculation)); - } - } + Set<String> registrationCodes = Sets.newHashSet(splitRegistrationCodes); - List<Boat> boats = getBoatDao().forImmatriculationIn(immatriculations).findAll(); + List<Boat> boats = getBoatDao().forRegistrationCodeIn(registrationCodes).findAll(); - if (boats.size() < immatriculations.size()) { + if (boats.size() < registrationCodes.size()) { for (Boat boat : boats) { - immatriculations.remove(boat.getImmatriculation()); + registrationCodes.remove(boat.getRegistrationCode()); } - Set<String> immatriculationStrings = new HashSet<>(); - for (Integer immatriculation : immatriculations) { - immatriculationStrings.add(String.valueOf(immatriculation)); - } - throw new UnknownBoatImmatriculationsException(immatriculationStrings); + throw new UnknownBoatRegistrationCodesException(registrationCodes); } return boats; Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatImmatriculationsException.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatImmatriculationsException.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatImmatriculationsException.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -1,42 +0,0 @@ -package fr.ifremer.wao.services.service.administration; - -/* - * #%L - * Wao :: Services - * %% - * Copyright (C) 2009 - 2014 Ifremer - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero 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 Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -import fr.ifremer.wao.WaoException; - -import java.util.Set; - -public class UnknownBoatImmatriculationsException extends WaoException { - - private static final long serialVersionUID = 1L; - - protected Set<String> immatriculations; - - public UnknownBoatImmatriculationsException(Set<String> immatriculations) { - this.immatriculations = immatriculations; - } - - public Set<String> getImmatriculations() { - return immatriculations; - } - -} Copied: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatRegistrationCodesException.java (from rev 2168, trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatImmatriculationsException.java) =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatRegistrationCodesException.java (rev 0) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UnknownBoatRegistrationCodesException.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -0,0 +1,42 @@ +package fr.ifremer.wao.services.service.administration; + +/* + * #%L + * Wao :: Services + * %% + * Copyright (C) 2009 - 2014 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +import fr.ifremer.wao.WaoException; + +import java.util.Set; + +public class UnknownBoatRegistrationCodesException extends WaoException { + + private static final long serialVersionUID = 1L; + + protected Set<String> registrationCodes; + + public UnknownBoatRegistrationCodesException(Set<String> registrationCodes) { + this.registrationCodes = registrationCodes; + } + + public Set<String> getRegistrationCodes() { + return registrationCodes; + } + +} Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -144,7 +144,7 @@ if (waoUser.isCanReadBoatsNotEmpty()) { - String canReadBoats = Boats.toImmatriculations(waoUser.getCanReadBoats()); + String canReadBoats = Boats.toRegistrationCodes(waoUser.getCanReadBoats()); updateWaoUserCommand.setCanReadBoats(canReadBoats); @@ -164,15 +164,15 @@ } - public void preValidate(UpdateWaoUserCommand updateWaoUserCommand) throws UnknownBoatImmatriculationsException, LoginMustBeUniqueException { + public void preValidate(UpdateWaoUserCommand updateWaoUserCommand) throws UnknownBoatRegistrationCodesException, LoginMustBeUniqueException { ObsProgram obsProgram = updateWaoUserCommand.getObsProgram(); WaoUser waoUser = updateWaoUserCommand.getWaoUser(); waoUser.clearCanReadBoats(); if (waoUser.hasUserRole(UserRole.PROFESSIONAL, obsProgram)) { - Set<Boat> boatsFromImmatriculations = new HashSet<>(getReferentialService().getBoatsFromImmatriculations(updateWaoUserCommand.getCanReadBoats())); - waoUser.setCanReadBoats(boatsFromImmatriculations); + Set<Boat> boatsFromRegistrationCodes = new HashSet<>(getReferentialService().getBoatsFromRegistrationCodes(updateWaoUserCommand.getCanReadBoats())); + waoUser.setCanReadBoats(boatsFromRegistrationCodes); } WaoUserTopiaDao dao = getWaoUserDao(); Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -27,7 +27,7 @@ import fr.ifremer.wao.entity.BoatImpl; import fr.ifremer.wao.entity.ShipOwnerImpl; import fr.ifremer.wao.entity.TerrestrialLocation; -import fr.ifremer.wao.services.service.csv.operations.BoatImmatriculationParserFormatter; +import fr.ifremer.wao.services.service.csv.operations.BoatRegistrationCodeParserFormatter; import fr.ifremer.wao.services.service.csv.operations.DistrictParserFormatter; import fr.ifremer.wao.services.service.csv.operations.PortParserFormatter; import org.nuiton.csv.Common; @@ -79,8 +79,8 @@ modelBuilder = new ModelBuilder<>(); modelBuilder.newColumnForImportExport( "NAVIRE_IMMATRICULATION", - Boat.PROPERTY_IMMATRICULATION, - new BoatImmatriculationParserFormatter(locale)); + Boat.PROPERTY_REGISTRATION_CODE, + new BoatRegistrationCodeParserFormatter(locale)); modelBuilder.newColumnForImportExport( "NAVIRE_NOM", Boat.PROPERTY_NAME); Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatImmatriculationParserFormatter.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatImmatriculationParserFormatter.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatImmatriculationParserFormatter.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -1,75 +0,0 @@ -/* - * #%L - * Wao :: Business - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2009 - 2011 Ifremer - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero 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 Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.wao.services.service.csv.operations; - -import org.nuiton.csv.ValueParserFormatter; -import org.nuiton.i18n.I18n; - -import java.text.ParseException; -import java.util.Locale; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** Used to parse and format boat immatriculation. - * The parser is in charge of validating the 6-digits form of imported - * lines. - * - * This parser/formatter should be used when importing/exporting information - * on boats. - * - * For finding boats associated with an entity when importing contact, see - * {@link BoatParserFormatter} - */ -public class BoatImmatriculationParserFormatter implements ValueParserFormatter<Integer> { - - protected final Locale locale; - - /** Exactly 6 digits */ - protected Pattern pattern = Pattern.compile("\\d{6}"); - - public BoatImmatriculationParserFormatter(Locale locale) { - this.locale = locale; - } - - @Override - public String format(Integer immatriculation) { - return String.valueOf(immatriculation); - } - - /** Parse immatriculation and validate its pattern - * @param imma immatriculation read in file - * @return the immatriculation if it has the good format - * @throws IllegalArgumentException if immatriculation does not follow - * expected pattern - */ - @Override - public Integer parse(String imma) throws ParseException { - Matcher matcher = pattern.matcher(imma); - if (!matcher.find()) { - throw new IllegalArgumentException(I18n.l(locale, "wao.business.boat.validation.immatriculation.wrongFormat")); - } - Integer immatriculation = Integer.parseInt(imma); - return immatriculation; - } -} Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -34,23 +34,23 @@ import java.util.List; import java.util.Locale; -/** Parse a boat (identification based on the immatriculation) */ +/** Parse a boat (identification based on the registrationCode) */ public class BoatParserFormatter implements ValueParserFormatter<Boat> { protected final Locale locale; - protected ImmutableMap<Integer, Boat> indexedBoats; + protected ImmutableMap<String, Boat> indexedBoats; public BoatParserFormatter(List<Boat> boats, Locale locale) { this.locale = locale; if (boats != null) { - indexedBoats = Maps.uniqueIndex(boats, Boats.getImmatriculation()); + indexedBoats = Maps.uniqueIndex(boats, Boats.getRegistrationCode()); } } @Override public String format(Boat boat) { - return String.valueOf(boat.getImmatriculation()); + return String.valueOf(boat.getRegistrationCode()); } @Override @@ -59,8 +59,7 @@ if (trimmedValue.isEmpty()) { throw new IllegalArgumentException(I18n.l(locale, "wao.import.contact.failure.boatMissing")); } - Integer key = Integer.valueOf(trimmedValue); - Boat boat = indexedBoats.get(key); + Boat boat = indexedBoats.get(trimmedValue); if (boat == null) { throw new IllegalArgumentException(I18n.l(locale, "wao.import.contact.failure.wrongBoat", value)); } Copied: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatRegistrationCodeParserFormatter.java (from rev 2168, trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatImmatriculationParserFormatter.java) =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatRegistrationCodeParserFormatter.java (rev 0) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatRegistrationCodeParserFormatter.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -0,0 +1,74 @@ +/* + * #%L + * Wao :: Business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2011 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero 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 Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.wao.services.service.csv.operations; + +import org.nuiton.csv.ValueParserFormatter; +import org.nuiton.i18n.I18n; + +import java.text.ParseException; +import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** Used to parse and format boat registrationCode. + * The parser is in charge of validating the 6-digits form of imported + * lines. + * + * This parser/formatter should be used when importing/exporting information + * on boats. + * + * For finding boats associated with an entity when importing contact, see + * {@link BoatParserFormatter} + */ +public class BoatRegistrationCodeParserFormatter implements ValueParserFormatter<String> { + + protected final Locale locale; + + /** Exactly 6 digits */ + protected Pattern pattern = Pattern.compile("\\d{6}"); + + public BoatRegistrationCodeParserFormatter(Locale locale) { + this.locale = locale; + } + + @Override + public String format(String registrationCode) { + return registrationCode; + } + + /** Parse registrationCode and validate its pattern + * @param registrationCode registrationCode read in file + * @return the registrationCode if it has the good format + * @throws IllegalArgumentException if registrationCode does not follow + * expected pattern + */ + @Override + public String parse(String registrationCode) throws ParseException { + Matcher matcher = pattern.matcher(registrationCode); + if (!matcher.find()) { + throw new IllegalArgumentException(I18n.l(locale, "wao.business.boat.validation.registrationCode.wrongFormat")); + } + return registrationCode; + } +} Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/AddBoatToUserAllegroWalletEmail.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/AddBoatToUserAllegroWalletEmail.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/AddBoatToUserAllegroWalletEmail.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -48,7 +48,7 @@ getLocale(), "wao.email.addBoatToUserAllegroWallet.subject", I18n.l(getLocale(), obsProgram.getI18nKey()), - boat.getImmatriculation(), + boat.getRegistrationCode(), observer.getLogin() ); return subject; Modified: trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_en.mustache =================================================================== --- trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_en.mustache 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_en.mustache 2014-07-29 16:05:17 UTC (rev 2182) @@ -1,6 +1,6 @@ Hello, -Please, add boat {{boat.immatriculation}} to the ALLEGRO wallet of the observer +Please, add boat {{boat.registrationCode}} to the ALLEGRO wallet of the observer {{observer.fullName}} {{observer.company.name}} ({{observer.login}}). {{info}} Modified: trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_fr.mustache =================================================================== --- trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_fr.mustache 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/resources/email/AddBoatToUserAllegroWalletEmail_fr.mustache 2014-07-29 16:05:17 UTC (rev 2182) @@ -1,6 +1,6 @@ Bonjour, -Merci d'ajouter le navire {{boat.immatriculation}} au portefeuille ALLEGRO de l'observateur +Merci d'ajouter le navire {{boat.registrationCode}} au portefeuille ALLEGRO de l'observateur {{observer.fullName}} {{observer.company.name}} ({{observer.login}}). {{info}} Modified: trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties =================================================================== --- trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/resources/i18n/wao-services_en_GB.properties 2014-07-29 16:05:17 UTC (rev 2182) @@ -13,7 +13,7 @@ wao.action.delete.failure.attachedNews=Object is attached to some news. wao.action.delete.failure.attachedSampleRows=Object is attached to some sample rows. wao.action.delete.failure.attachedWaoUsers=Object is attached to some users. -wao.business.boat.validation.immatriculation.wrongFormat=The boat registry number must be composed of 6 digits +wao.business.boat.validation.registrationCode.wrongFormat=The boat registry number must be composed of 6 digits wao.business.completeSampling.false=No wao.business.completeSampling.true=Yes wao.business.completeSampling.undefined=Undefined Modified: trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties =================================================================== --- trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/main/resources/i18n/wao-services_fr_FR.properties 2014-07-29 16:05:17 UTC (rev 2182) @@ -13,7 +13,7 @@ wao.action.delete.failure.attachedNews=L'objet est lié à des actualités. wao.action.delete.failure.attachedSampleRows=L'objet est lié à des lignes du plan. wao.action.delete.failure.attachedWaoUsers=L'objet est lié à des utilisateurs. -wao.business.boat.validation.immatriculation.wrongFormat=L'immatriculation du navire doit être formée de 6 chiffres +wao.business.boat.validation.registrationCode.wrongFormat=L'immatriculation du navire doit être formée de 6 chiffres wao.business.completeSampling.false=Non wao.business.completeSampling.true=Oui wao.business.completeSampling.undefined=Non défini Modified: trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java =================================================================== --- trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -113,14 +113,14 @@ } @Test - public void testGetBoatsByImmatriculations() { + public void testGetBoatsByRegistrationCodes() { testImportBoats(); try { - Collection<Boat> boats = service.getBoatsFromImmatriculations("174258, 284595 978419"); + Collection<Boat> boats = service.getBoatsFromRegistrationCodes("174258, 284595 978419"); Assert.assertEquals(3, boats.size()); - boats = service.getBoatsFromImmatriculations(" "); + boats = service.getBoatsFromRegistrationCodes(" "); Assert.assertTrue(boats.isEmpty()); - } catch (UnknownBoatImmatriculationsException e) { + } catch (UnknownBoatRegistrationCodesException e) { if (log.isDebugEnabled()) { log.debug("unexpected exception raised", e); } Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -40,7 +40,7 @@ import fr.ifremer.wao.services.service.SamplingPlanService; import fr.ifremer.wao.services.service.UpdateSampleRowCommand; import fr.ifremer.wao.services.service.WrongSampleRowCodeFormatException; -import fr.ifremer.wao.services.service.administration.UnknownBoatImmatriculationsException; +import fr.ifremer.wao.services.service.administration.UnknownBoatRegistrationCodesException; import fr.ifremer.wao.web.WaoJspActionSupport; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.logging.Log; @@ -99,8 +99,8 @@ addFieldError("updateSampleRowCommand.dcf5Codes", t("wao.ui.form.SampleRow.error.missingDcf5Codes")); } - } catch (UnknownBoatImmatriculationsException e) { - addFieldError("updateSampleRowCommand.elligibleBoatImmatriculations", t("wao.ui.unknownBoatImmatriculations", Joiner.on(", ").join(e.getImmatriculations()))); + } catch (UnknownBoatRegistrationCodesException e) { + addFieldError("updateSampleRowCommand.elligibleBoatRegistrationCodes", t("wao.ui.unknownBoatRegistrationCodes", Joiner.on(", ").join(e.getRegistrationCodes()))); } catch (SampleRowCodeMustBeUniqueException e) { addFieldError("updateSampleRowCommand.code", t("wao.ui.form.SampleRow.error.codeMustBeUnique")); } catch (MissingPeriodEndException e) { Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java 2014-07-29 16:05:17 UTC (rev 2182) @@ -27,7 +27,7 @@ import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.Preparable; import fr.ifremer.wao.services.service.administration.LoginMustBeUniqueException; -import fr.ifremer.wao.services.service.administration.UnknownBoatImmatriculationsException; +import fr.ifremer.wao.services.service.administration.UnknownBoatRegistrationCodesException; import fr.ifremer.wao.services.service.administration.UpdateWaoUserCommand; import fr.ifremer.wao.services.service.administration.WaoUsersService; import fr.ifremer.wao.web.WaoJspActionSupport; @@ -76,8 +76,8 @@ try { service.preValidate(updateWaoUserCommand); - } catch (UnknownBoatImmatriculationsException unknownBoatImmatriculations) { - addFieldError("updateWaoUserCommand.canReadBoats", t("wao.ui.unknownBoatImmatriculations", Joiner.on(", ").join(unknownBoatImmatriculations.getImmatriculations()))); + } catch (UnknownBoatRegistrationCodesException unknownBoatRegistrationCodes) { + addFieldError("updateWaoUserCommand.canReadBoats", t("wao.ui.unknownBoatRegistrationCodes", Joiner.on(", ").join(unknownBoatRegistrationCodes.getRegistrationCodes()))); } catch (LoginMustBeUniqueException e) { addFieldError("updateWaoUserCommand.waoUser.login", t("wao.ui.form.updateWaoUserCommand.error.loginMustBeUnique")); } Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties =================================================================== --- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-07-29 16:05:17 UTC (rev 2182) @@ -137,7 +137,7 @@ wao.ui.contacts.createFromBoatAndSelectedSampleRow=Create a contact for this boat and sample row %s (%s) wao.ui.contacts.district=Boat District Code wao.ui.contacts.division=Fishing Zone Division -wao.ui.contacts.immatriculation=Boat Immatriculation +wao.ui.contacts.registrationCode=Boat registration code wao.ui.contacts.observations=Mammals wao.ui.contacts.observers=Main observer wao.ui.contacts.title=%s contacts found @@ -169,7 +169,7 @@ wao.ui.field.Boat.district.long=Boat district for boat wao.ui.field.Boat.districtCode=District oode wao.ui.field.Boat.fleet=Fleet -wao.ui.field.Boat.immatriculation=Registration number +wao.ui.field.Boat.registrationCode=Registration number wao.ui.field.Boat.name=Name wao.ui.field.Boat.portOfRegistry=Port of registry wao.ui.field.Boat.shipOwner=Shipowner @@ -559,7 +559,7 @@ wao.ui.unit.days=day(s) wao.ui.unit.observations=observations wao.ui.unit.observers=observer(s) -wao.ui.unknownBoatImmatriculations=Unknown boats\: %s +wao.ui.unknownBoatRegistrationCodes=Unknown boats\: %s wao.ui.userList=Users list wao.ui.userMustAcceptCgu=You must accept the terms of use wao.ui.validLogin=Valid identifier Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties =================================================================== --- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-07-29 16:05:17 UTC (rev 2182) @@ -138,7 +138,7 @@ wao.ui.contacts.createFromBoatAndSelectedSampleRow=Créer un nouveau contact avec ce navire pour la ligne %s (%s) wao.ui.contacts.district=CQ wao.ui.contacts.division=Division -wao.ui.contacts.immatriculation=N° +wao.ui.contacts.registrationCode=N° wao.ui.contacts.observations=Observations et captures accidentelles wao.ui.contacts.observers=Observateurs wao.ui.contacts.title=%s contacts trouvés @@ -170,7 +170,7 @@ wao.ui.field.Boat.district.long=Quartier maritime du navire wao.ui.field.Boat.districtCode=Code quartier wao.ui.field.Boat.fleet=Flotille -wao.ui.field.Boat.immatriculation=Immatriculation +wao.ui.field.Boat.registrationCode=Immatriculation wao.ui.field.Boat.name=Nom wao.ui.field.Boat.portOfRegistry=Port d'attache wao.ui.field.Boat.shipOwner=Armateur @@ -560,7 +560,7 @@ wao.ui.unit.days=jour(s) wao.ui.unit.observations=observations wao.ui.unit.observers=observateur(s) -wao.ui.unknownBoatImmatriculations=Les navires ayant pour immatriculations %s sont inconnus du référentiel +wao.ui.unknownBoatRegistrationCodes=Les navires ayant pour immatriculations %s sont inconnus du référentiel wao.ui.userList=Liste des utilisateurs wao.ui.userMustAcceptCgu=Vous devez accepter les conditions d'utilisation pour utiliser Wao wao.ui.validLogin=Identifiant valide Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/boat-details.jsp 2014-07-29 16:05:17 UTC (rev 2182) @@ -170,7 +170,7 @@ </table> <s:url action="contacts!applyFilter" id="viewAssociatedContactsForBoatUrl"> - <s:param name="filter.boatFilter.registrationCode" value="boatDetails.boatInfos.boat.immatriculation"/> + <s:param name="filter.boatFilter.registrationCode" value="boatDetails.boatInfos.boat.registrationCode"/> <s:param name="filter.sampleRowFilter.companyIds" value="boatDetails.boatInfos.company.topiaId"/> <s:param name="filter.periodFrom"/> <s:param name="filter.periodTo"/> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/boats.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/boats.jsp 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/boats.jsp 2014-07-29 16:05:17 UTC (rev 2182) @@ -222,11 +222,11 @@ <s:param name="boatId" value="topiaId" /> </s:url> <s:a href="%{boatDetailsUrl}" cssClass="boat-details-action"> - <s:property value="%{'' + immatriculation}"/> + <s:property value="registrationCode"/> </s:a> </s:if> <s:else> - <s:property value="%{'' + immatriculation}"/> + <s:property value="registrationCode"/> </s:else> </td> <td<s:if test="!active"> class="inactive"</s:if>> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp 2014-07-29 16:05:17 UTC (rev 2182) @@ -395,7 +395,7 @@ </td> <td> <s:set name="boatTooltip"> - <s:text name="wao.ui.boats.registrationCode"/> <s:property value="%{'' + boat.immatriculation}" escapeHtml="false"/> + <s:text name="wao.ui.boats.registrationCode"/> <s:property value="boat.registrationCode" escapeHtml="false"/> <s:text name="wao.ui.boats.boatLength"/> <s:property value="boat.boatLength" escapeHtml="false"/> cm <s:text name="wao.ui.boats.buildYear"/> <s:property value="%{'' + boat.buildYear}" escapeHtml="false"/> <s:text name="wao.ui.boats.district"/> <s:property value="boat.district.districtName" escapeHtml="false"/> (<s:property value="boat.district.districtCode" escapeHtml="false"/>) Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/edit-contact-input.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/edit-contact-input.jsp 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/edit-contact-input.jsp 2014-07-29 16:05:17 UTC (rev 2182) @@ -136,10 +136,10 @@ </tr> <tr> <th> - <s:text name="wao.ui.field.Boat.immatriculation"/> + <s:text name="wao.ui.field.Boat.registrationCode"/> </th> <td> - <s:property value="updateContactCommand.contact.boat.immatriculation"/> + <s:property value="updateContactCommand.contact.boat.registrationCode"/> </td> </tr> <tr> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/edit-sample-row-input.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/edit-sample-row-input.jsp 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/edit-sample-row-input.jsp 2014-07-29 16:05:17 UTC (rev 2182) @@ -244,7 +244,7 @@ </s:if> - <s:textarea name="updateSampleRowCommand.elligibleBoatImmatriculations" label="%{getText('wao.ui.field.SampleRow.elligibleBoat')}" /> + <s:textarea name="updateSampleRowCommand.elligibleBoatRegistrationCodes" label="%{getText('wao.ui.field.SampleRow.elligibleBoat')}" /> <s:textarea name="updateSampleRowCommand.sampleRow.comment" label="%{getText('wao.ui.field.SampleRow.comment')}" /> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp 2014-07-29 15:12:53 UTC (rev 2181) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp 2014-07-29 16:05:17 UTC (rev 2182) @@ -216,7 +216,7 @@ <s:text name="wao.ui.synthesis.boarding.mostUsedBoat"> <s:param value="%{synthesis.maxBoardingValue}"/> <s:param value="%{synthesis.maxBoardingBoat.name}"/> - <s:param value="%{synthesis.maxBoardingBoat.immatriculation}"/> + <s:param value="%{synthesis.maxBoardingBoat.registrationCode}"/> </s:text> </p>