Author: bleny Date: 2014-07-08 11:31:46 +0200 (Tue, 08 Jul 2014) New Revision: 2133 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2133 Log: make wao compatible with jdk6 and tomcat6 in branch Modified: branches/wao-4.0-jdk6/pom.xml branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatDetails.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/Synthesis.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateContactCommand.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactStateMotivesImportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/FishingZoneImportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialLocationImportModel.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictNamesFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/I18nAbleParserFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/LocationTypeParserFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/MammalsObservationEmail.java branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/FakeWaoApplicationContext.java branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/CacheInvalidationTopiaEntityListener.java branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/EditContactAction.java branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/authentication/LoginAction.java branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/converter/BooleanSetConverter.java branches/wao-4.0-jdk6/wao-web/src/main/webapp/WEB-INF/web.xml Modified: branches/wao-4.0-jdk6/pom.xml =================================================================== --- branches/wao-4.0-jdk6/pom.xml 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/pom.xml 2014-07-08 09:31:46 UTC (rev 2133) @@ -133,7 +133,7 @@ <i18n.bundleOutputName>wao</i18n.bundleOutputName> <!-- Using Java 7 --> - <javaVersion>1.7</javaVersion> + <javaVersion>1.6</javaVersion> <!--TODO remove this when IDEA won't ask to change jdk level at each pom modification--> <maven.compiler.source>${javaVersion}</maven.compiler.source> <!--TODO remove this when IDEA won't ask to change jdk level at each pom modification--> Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/WaoUtils.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -137,7 +137,7 @@ } public static <T extends Enum> Collection<Integer> toOrdinals(Collection<T> enums) { - List<Integer> ordinals = new LinkedList<>(); + List<Integer> ordinals = new LinkedList<Integer>(); for (Enum anEnum : enums) { ordinals.add(anEnum.ordinal()); } Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -175,7 +175,7 @@ @Override public List<WaoUser> getAllObservers() { - List<WaoUser> allObservers = new LinkedList<>(); + List<WaoUser> allObservers = new LinkedList<WaoUser>(); if (getMainObserver() != null) { allObservers.add(getMainObserver()); } Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -134,7 +134,7 @@ } public static List<ContactState> getAllowedStates(ObsProgram obsProgram) { - List<ContactState> allowedStates = new ArrayList<>(); + List<ContactState> allowedStates = new ArrayList<ContactState>(); for (ContactState contactState : values()) { if (contactState.isAllowed(obsProgram)) { allowedStates.add(contactState); Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -219,7 +219,7 @@ query.addEquals(Contact.PROPERTY_STATE, ContactState.OBSERVATION_DONE.ordinal()); List<Contact> contacts = findAll(query.getHql(), query.getHqlParameters()); - SortedMap<Date, Integer> actualObservationsMyMonths = new TreeMap<>(); + SortedMap<Date, Integer> actualObservationsMyMonths = new TreeMap<Date, Integer>(); Range<Date> range = Range.between(periodFromMonth, periodToMonth); for (Contact contact : contacts) { @@ -271,7 +271,7 @@ // [ARC EN CIEL, 2009_0200, 2010-01-17 00:00:00.0] // [ARC EN CIEL, 2009_0200, 2010-02-13 00:00:00.0] - Map<Boat, LinkedHashMap<String, List<Date>>> data = new HashMap<>(); + Map<Boat, LinkedHashMap<String, List<Date>>> data = new HashMap<Boat, LinkedHashMap<String, List<Date>>>(); for (Object[] row : boardingsByBoat) { Boat boat = (Boat) row[0]; @@ -280,7 +280,7 @@ LinkedHashMap<String, List<Date>> value = data.get(boat); if (value == null) { - value = new LinkedHashMap<>(); + value = new LinkedHashMap<String, List<Date>>(); data.put(boat, value); } @@ -307,9 +307,9 @@ List<Object[]> findAll = findAll(hql, hqlAndParametersBuilder.getHqlParameters()); - Map<String, Long> countByCompany = new LinkedHashMap<>(); + Map<String, Long> countByCompany = new LinkedHashMap<String, Long>(); for (Object[] row : findAll) { - countByCompany.put((String) row[0], (long) row[1]); + countByCompany.put((String) row[0], (Long) row[1]); } return countByCompany; @@ -333,7 +333,7 @@ Map<String, Long> countContactsWithComplianceByCompany = countByCompany(hqlAndParametersBuilder); - Map<String, Double> complianceBoardingIndicator = new LinkedHashMap<>(); + Map<String, Double> complianceBoardingIndicator = new LinkedHashMap<String, Double>(); for (Map.Entry<String, Long> entry : countContactsByCompany.entrySet()) { String companyId = entry.getKey(); @@ -361,17 +361,17 @@ List<Object[]> rows = findAll(hql, hqlAndParametersBuilder.getHqlParameters()); - Map<String, Map<ContactState, Long>> contactStatesStatistics = new LinkedHashMap<>(); + Map<String, Map<ContactState, Long>> contactStatesStatistics = new LinkedHashMap<String, Map<ContactState, Long>>(); for (Object[] row : rows) { String companyId = (String) row[0]; - int contactStateOrdinal = (int) row[1]; + int contactStateOrdinal = (Integer) row[1]; Long count = (Long) row[2]; Map<ContactState, Long> companyStatistics = contactStatesStatistics.get(companyId); if (companyStatistics == null) { - companyStatistics = new TreeMap<>(); + companyStatistics = new TreeMap<ContactState, Long>(); for (ContactState aContactState : ContactState.getAllowedStates(filter.getSampleRowFilter().getObsProgram())) { companyStatistics.put(aContactState, 0L); } @@ -402,7 +402,7 @@ new Supplier<List<Pair<Date, Date>>>() { @Override public List<Pair<Date, Date>> get() { - return new LinkedList<>(); + return new LinkedList<Pair<Date, Date>>(); } } ); Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -87,7 +87,7 @@ */ @Override public String getSectors() { - Set<String> sectorNames = new LinkedHashSet<>(); + Set<String> sectorNames = new LinkedHashSet<String>(); for (FishingZone fishingZone : getFishingZone()) { sectorNames.add(fishingZone.getSectorName()); } @@ -177,7 +177,7 @@ setdCF5Code(null); } else { String[] splitCodes = codes.split(separatorRegex); - Set<DCF5Code> dcfFives = new HashSet<>(splitCodes.length); + Set<DCF5Code> dcfFives = new HashSet<DCF5Code>(splitCodes.length); for (String code : splitCodes) { String[] codeParts = code.split("_"); DCF5Code dcfFive = new DCF5CodeImpl(); Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -114,9 +114,9 @@ Collection<TerrestrialLocation> newTerrestrialLocations = newRow.getTerrestrialLocations(); // Lists for boats by status - List<String> removedTerrestrialLocations = new ArrayList<>(); - List<String> keptTerrestrialLocations = new ArrayList<>(); - List<String> addedTerrestrialLocations = new ArrayList<>(); + List<String> removedTerrestrialLocations = new ArrayList<String>(); + List<String> keptTerrestrialLocations = new ArrayList<String>(); + List<String> addedTerrestrialLocations = new ArrayList<String>(); // filling the three lists for (TerrestrialLocation oldTerrestrialLocation : oldTerrestrialLocations) { @@ -157,9 +157,9 @@ Collection<TerrestrialLocation> newTerrestrialLocations = newRow.getTerrestrialLocations(); // Lists for boats by status - List<String> removedTerrestrialLocations = new ArrayList<>(); - List<String> keptTerrestrialLocations = new ArrayList<>(); - List<String> addedTerrestrialLocations = new ArrayList<>(); + List<String> removedTerrestrialLocations = new ArrayList<String>(); + List<String> keptTerrestrialLocations = new ArrayList<String>(); + List<String> addedTerrestrialLocations = new ArrayList<String>(); // filling the three lists for (TerrestrialLocation oldTerrestrialLocation : oldTerrestrialLocations) { @@ -316,9 +316,9 @@ Collection<ElligibleBoat> newEligibleBoats = newRow.getElligibleBoat(); // Lists for boats by status - List<String> noLongerEligibleBoats = new ArrayList<>(); - List<String> stillEligibleBoats = new ArrayList<>(); - List<String> newlyEligibleBoats = new ArrayList<>(); + List<String> noLongerEligibleBoats = new ArrayList<String>(); + List<String> stillEligibleBoats = new ArrayList<String>(); + List<String> newlyEligibleBoats = new ArrayList<String>(); // filling the three lists for (ElligibleBoat eligibleBoat : newEligibleBoats) { @@ -366,9 +366,9 @@ Collection<FishingZone> newFishingZones = newRow.getFishingZone(); // Lists for boats by status - List<String> removedZones = new ArrayList<>(); - List<String> keptZones = new ArrayList<>(); - List<String> addedZones = new ArrayList<>(); + List<String> removedZones = new ArrayList<String>(); + List<String> keptZones = new ArrayList<String>(); + List<String> addedZones = new ArrayList<String>(); // filling the three lists for (FishingZone oldFishingZone : oldFishingZones) { @@ -424,8 +424,8 @@ newObservers = Collections.emptyList(); } - List<String> removedObservers = new LinkedList<>(); - List<String> addedObservers = new LinkedList<>(); + List<String> removedObservers = new LinkedList<String>(); + List<String> addedObservers = new LinkedList<String>(); for (WaoUser oldObserver : oldObservers) { if ( ! newObservers.contains(oldObserver)) { Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -177,7 +177,7 @@ + "group by sm.periodDate " + "order by sm.periodDate"; - Map<String, Object> hqlParameters = new HashMap<>(sampleRowsQuery.getHqlParameters()); + Map<String, Object> hqlParameters = new HashMap<String, Object>(sampleRowsQuery.getHqlParameters()); hqlParameters.put("periodFromMonth2", periodFromMonth); hqlParameters.put("periodToMonth2", periodToMonth); @@ -187,7 +187,7 @@ List<Object[]> result = findAll(hql, hqlParameters); - SortedMap<Date, Integer> expectedObservationsByMonths = new TreeMap<>(); + SortedMap<Date, Integer> expectedObservationsByMonths = new TreeMap<Date, Integer>(); for (Object[] line : result) { Date month = (Date)line[0]; int expectedValue = ((Long) line[1]).intValue(); Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -79,7 +79,7 @@ * @return roles that the user can affect */ public static List<UserRole> getAllowedRoles(ObsProgram obsProgram, UserRole userRole) { - List<UserRole> allowedRoles = new ArrayList<>(); + List<UserRole> allowedRoles = new ArrayList<UserRole>(); allowedRoles.add(UserRole.COORDINATOR); allowedRoles.add(UserRole.OBSERVER); if (userRole.equals(UserRole.ADMIN)) { Modified: branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java =================================================================== --- branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -74,7 +74,7 @@ @Override public List<UserProfile> getUserProfile(ObsProgram obsProgram) { - List<UserProfile> userProfiles = new ArrayList<>(); + List<UserProfile> userProfiles = new ArrayList<UserProfile>(); if (getUserProfile() != null) { for (UserProfile userProfile : getUserProfile()) { if (userProfile.getObsProgram().equals(obsProgram)) { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -50,11 +50,11 @@ protected WaoServiceContext serviceContext; - protected Map<String, Company> companies = new HashMap<>(); + protected Map<String, Company> companies = new HashMap<String, Company>(); - protected Map<String, WaoUser> waoUsers = new HashMap<>(); + protected Map<String, WaoUser> waoUsers = new HashMap<String, WaoUser>(); - protected Map<String, UserProfile> userProfiles = new HashMap<>(); + protected Map<String, UserProfile> userProfiles = new HashMap<String, UserProfile>(); public ObsMerFixtures(WaoServiceContext serviceContext) { this.serviceContext = serviceContext; @@ -76,21 +76,18 @@ protected UserProfile getUserProfile(String userRole) { UserProfile userProfile = userProfiles.get(userRole); if (userProfile == null) { - switch (userRole) { - case "admin": - userProfile = new UserProfileImpl(); - userProfile.setUserRole(UserRole.ADMIN); - userProfile.setObsProgram(ObsProgram.OBSMER); - userProfile.setCanWrite(true); - break; - case "jmichmuche": - userProfile = new UserProfileImpl(); - userProfile.setUserRole(UserRole.COORDINATOR); - userProfile.setObsProgram(ObsProgram.OBSMER); - userProfile.setCanWrite(true); - break; - default: - throw new IllegalArgumentException("Don't know userRole: " + userRole); + if ("admin".equals(userRole)) { + userProfile = new UserProfileImpl(); + userProfile.setUserRole(UserRole.ADMIN); + userProfile.setObsProgram(ObsProgram.OBSMER); + userProfile.setCanWrite(true); + } else if ("jmichmuche".equals(userRole)) { + userProfile = new UserProfileImpl(); + userProfile.setUserRole(UserRole.COORDINATOR); + userProfile.setObsProgram(ObsProgram.OBSMER); + userProfile.setCanWrite(true); + } else { + throw new IllegalArgumentException("Don't know userRole: " + userRole); } UserProfileTopiaDao userProfileDao = serviceContext.getPersistenceContext().getUserProfileDao(); userProfileDao.create(userProfile); @@ -103,26 +100,21 @@ protected WaoUser getWaoUser(String login) { WaoUser waoUser = waoUsers.get(login); if (waoUser == null) { - - switch (login) { - case "admin": - waoUser = new WaoUserImpl(); - waoUser.setCompany(ifremer()); - waoUser.setLogin(login); - waoUser.setActive(true); - waoUser.addUserProfile(getUserProfile("admin")); - break; - case "jmichmuche": - waoUser = new WaoUserImpl(); - waoUser.setCompany(ifremer()); - waoUser.setLogin(login); - waoUser.setActive(true); - waoUser.addUserProfile(getUserProfile("jmichmuche")); - break; - default: - throw new IllegalArgumentException("Don't know user: " + login); + if ("admin".equals(login)) { + waoUser = new WaoUserImpl(); + waoUser.setCompany(ifremer()); + waoUser.setLogin(login); + waoUser.setActive(true); + waoUser.addUserProfile(getUserProfile("admin")); + } else if ("jmichmuche".equals(login)) { + waoUser = new WaoUserImpl(); + waoUser.setCompany(ifremer()); + waoUser.setLogin(login); + waoUser.setActive(true); + waoUser.addUserProfile(getUserProfile("jmichmuche")); + } else { + throw new IllegalArgumentException("Don't know user: " + login); } - WaoUserTopiaDao waoUserDao = serviceContext.getPersistenceContext().getWaoUserDao(); waoUserDao.create(waoUser); serviceContext.getPersistenceContext().commit(); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatDetails.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatDetails.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatDetails.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -71,7 +71,7 @@ } public List<SampleRow> getElligibleForSampleRows() { - List<SampleRow> elligibleForSampleRows = new LinkedList<>(); + List<SampleRow> elligibleForSampleRows = new LinkedList<SampleRow>(); for (ElligibleBoat elligibleBoat : boatInfos.getBoat().getElligibleBoat()) { SampleRow sampleRow = elligibleBoat.getSampleRow(); if (boatInfos.getCompany().equals(sampleRow.getCompany()) && sampleRow.getObsProgram().equals(obsProgram)) { @@ -84,7 +84,7 @@ } public Set<String> getExpiredSampleRowIds() { - Set<String> expiredSampleRowIds = new HashSet<>(); + Set<String> expiredSampleRowIds = new HashSet<String>(); for (SampleRow sampleRow : getElligibleForSampleRows()) { if (sampleRow.isExpired(now)) { expiredSampleRowIds.add(sampleRow.getTopiaId()); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsFilterValues.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -50,17 +50,17 @@ protected SampleRowsFilterValues elligibleForSampleRowsFilterValues; - protected SortedSet<FilterOption> shipOwners = new TreeSet<>(); + protected SortedSet<FilterOption> shipOwners = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> districts = new TreeSet<>(); + protected SortedSet<FilterOption> districts = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> portsOfRegistry = new TreeSet<>(); + protected SortedSet<FilterOption> portsOfRegistry = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> fleets = new TreeSet<>(); + protected SortedSet<FilterOption> fleets = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> boats = new TreeSet<>(); + protected SortedSet<FilterOption> boats = new TreeSet<FilterOption>(); - protected Set<String> boatIds = new HashSet<>(); + protected Set<String> boatIds = new HashSet<String>(); public BoatsFilterValues(Locale locale, ObsProgram obsProgram, Optional<String> optionalCompanyId) { super(locale); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -135,7 +135,7 @@ // Pour le profesionnel, on restreint d'office à la liste des bateaux qu'il peut voir Collection<String> canReadBoatsTopiaIds = authenticatedWaoUser.getWaoUser().getCanReadBoatsTopiaIds(); if (CollectionUtils.isNotEmpty(canReadBoatsTopiaIds)) { - boatsFilter.setBoatIds(new HashSet<>(canReadBoatsTopiaIds)); + boatsFilter.setBoatIds(new HashSet<String>(canReadBoatsTopiaIds)); } } Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsFilterValues.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -58,29 +58,29 @@ protected SampleRowsFilterValues sampleRowsFilterValues; - protected SortedSet<FilterOption> boatRegistrationCodes = new TreeSet<>(); + protected SortedSet<FilterOption> boatRegistrationCodes = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> contactStates = new TreeSet<>(); + protected SortedSet<FilterOption> contactStates = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> dataReliabilities = new TreeSet<>(); + protected SortedSet<FilterOption> dataReliabilities = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> actualSamplingStrategies = new TreeSet<>(); + protected SortedSet<FilterOption> actualSamplingStrategies = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> observationTypes = new TreeSet<>(); + protected SortedSet<FilterOption> observationTypes = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> observedDataControls = new TreeSet<>(); + protected SortedSet<FilterOption> observedDataControls = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> observers = new TreeSet<>(); + protected SortedSet<FilterOption> observers = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> terrestrialLocations = new TreeSet<>(); + protected SortedSet<FilterOption> terrestrialLocations = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> contactStateMotives = new TreeSet<>(); + protected SortedSet<FilterOption> contactStateMotives = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> companyAcceptations = new TreeSet<>(); + protected SortedSet<FilterOption> companyAcceptations = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> programAcceptations = new TreeSet<>(); + protected SortedSet<FilterOption> programAcceptations = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> completeSamplings = new TreeSet<>(); + protected SortedSet<FilterOption> completeSamplings = new TreeSet<FilterOption>(); public ContactsFilterValues(Locale locale, ObsProgram obsProgram, Optional<String> optionalCompanyId) { super(locale); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -125,7 +125,7 @@ // Pour le profesionnel, on restreint d'office à la liste des contacts portant sur les bateaux qu'il peut voir Collection<String> canReadBoatsTopiaIds = authenticatedWaoUser.getWaoUser().getCanReadBoatsTopiaIds(); if (CollectionUtils.isNotEmpty(canReadBoatsTopiaIds)) { - newContactsFilter.getBoatFilter().setBoatIds(new HashSet<>(canReadBoatsTopiaIds)); + newContactsFilter.getBoatFilter().setBoatIds(new HashSet<String>(canReadBoatsTopiaIds)); } } @@ -480,7 +480,7 @@ updateContactCommand.getContact().setMainObserver(mainObserver); List<WaoUser> secondaryObservers = getWaoUserDao().forTopiaIdIn(updateContactCommand.getSecondaryObserverIds()).findAll(); - updateContactCommand.getContact().setSecondaryObservers(new HashSet<>(secondaryObservers)); + updateContactCommand.getContact().setSecondaryObservers(new HashSet<WaoUser>(secondaryObservers)); String terrestrialLocationId = updateContactCommand.getTerrestrialLocationId(); if (StringUtils.isBlank(terrestrialLocationId)) { @@ -1042,7 +1042,7 @@ // try to pre-fill some field for user-experience // let's try to find a recent similar contact - Map<String, Object> properties = new HashMap<>(); + Map<String, Object> properties = new HashMap<String, Object>(); properties.put(Contact.PROPERTY_OBS_PROGRAM_ORDINAL, newContact.getObsProgram().ordinal()); properties.put(Contact.PROPERTY_SAMPLE_ROW, sampleRow); properties.put(Contact.PROPERTY_MAIN_OBSERVER, observer); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -147,14 +147,14 @@ SampleRowsFilter sampleRowsFilter) { this.sampleRowsFilter = sampleRowsFilter; this.sampleRowsFilterValues = new SampleRowsFilterValues(locale, ObsProgram.OBSMER, optionalCompanyId); - this.sampleRowIds = new HashSet<>(); - this.facadeMap = new TreeMap<>(); + this.sampleRowIds = new HashSet<String>(); + this.facadeMap = new TreeMap<String, FacadeContext>(); this.observationTimesInDaysTotalExpected = new MutableDouble(); this.observationTimesInDaysTotalReal = new MutableLong(); this.observationTimesInDaysTotalEstimated = new MutableLong(); - this.totalExpectedForMonths = new TreeMap<>(); - this.totalRealForMonths = new TreeMap<>(); - this.totalEstimatedForMonths = new TreeMap<>(); + this.totalExpectedForMonths = new TreeMap<Date, MutableInt>(); + this.totalRealForMonths = new TreeMap<Date, MutableInt>(); + this.totalEstimatedForMonths = new TreeMap<Date, MutableInt>(); PeriodDates periodDates = new PeriodDates(sampleRowsFilter.getPeriodFrom(), sampleRowsFilter.getPeriodTo()); @@ -209,7 +209,7 @@ public ObsMerSamplingPlan toPlan() { // Get facade parts - Collection<SamplingPlan.SamplingPlanFacadePart> facadeParts = new ArrayList<>(); + Collection<SamplingPlan.SamplingPlanFacadePart> facadeParts = new ArrayList<SamplingPlan.SamplingPlanFacadePart>(); for (FacadeContext facadeContext : facadeMap.values()) { SamplingPlan.SamplingPlanFacadePart facadePart = facadeContext.toBean(); facadeParts.add(facadePart); @@ -223,7 +223,7 @@ }).immutableSortedCopy(facadeParts); // Get statistics - Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> statisticsMap = new TreeMap<>(); + Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> statisticsMap = new TreeMap<Date, ObsMerSamplingPlan.SamplingPlanStatistics>(); for (Date month : months) { MutableInt totalExpected = totalExpectedForMonths.get(month); @@ -251,7 +251,7 @@ } protected Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> computeNbTidesPerMonth(SampleRow sampleRow) { - Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> result = new TreeMap<>(); + Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> result = new TreeMap<Date, ObsMerSamplingPlan.SamplingPlanStatistics>(); for (Date month : months) { Integer expectedTidesValue = SampleRows.getExpectedTidesValue(sampleRow, month); if (expectedTidesValue != null) { @@ -297,7 +297,7 @@ protected FacadeContext(String facade) { this.facade = facade; - this.sectorMap = new TreeMap<>(); + this.sectorMap = new TreeMap<String, SectorContext>(); } protected SectorContext getOrAddSectorContext(String sectors) { @@ -314,7 +314,7 @@ protected SamplingPlan.SamplingPlanFacadePart toBean() { // get sector parts - Collection<SamplingPlan.SamplingPlanSectorPart> sectorParts = new ArrayList<>(); + Collection<SamplingPlan.SamplingPlanSectorPart> sectorParts = new ArrayList<SamplingPlan.SamplingPlanSectorPart>(); for (SectorContext sectorContext : sectorMap.values()) { SamplingPlan.SamplingPlanSectorPart sectorPart = sectorContext.toBean(); sectorParts.add(sectorPart); @@ -339,7 +339,7 @@ protected SectorContext(String sectors) { this.sectors = sectors; - this.rows = new ArrayList<>(); + this.rows = new ArrayList<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart>(); } protected ObsMerSamplingPlan.SamplingPlanSampleRowPart addSampleRow(Locale locale, Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -228,7 +228,7 @@ ObsMerSamplingPlan samplingPlan = getSamplingPlan(authenticatedWaoUser, filter); Collection<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart> sampleRows = - new LinkedHashSet<>(); + new LinkedHashSet<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart>(); for (SamplingPlan.SamplingPlanFacadePart facade : samplingPlan) { for (SamplingPlan.SamplingPlanSectorPart<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart> sector : facade) { for (ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart obsMerSampleRowPart : sector) { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlan.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -50,7 +50,7 @@ public ObsVenteSamplingPlanSampleRowPart(Locale locale, Map<Date, SamplingPlanStatistics> nbTidesPerMonth, SampleRow sampleRow, long sampleRowContactCounts) { super(locale, nbTidesPerMonth, sampleRow, sampleRowContactCounts); terrestrialLocationInfos = sampleRow.getTerrestrialLocationInfos(); - terrestrialLocationNamesAndDescriptions = new LinkedHashMap<>(); + terrestrialLocationNamesAndDescriptions = new LinkedHashMap<String, String>(); if (CollectionUtils.isNotEmpty(sampleRow.getTerrestrialLocations())) { for (TerrestrialLocation terrestrialLocation : sampleRow.getTerrestrialLocations()) { String key = terrestrialLocation.getDistrictName(); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsVenteSamplingPlanBuilder.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -118,11 +118,11 @@ SampleRowsFilter sampleRowsFilter) { this.sampleRowsFilter = sampleRowsFilter; this.sampleRowsFilterValues = new SampleRowsFilterValues(locale, ObsProgram.OBSVENTE, optionalCompanyId); - this.sampleRowIds = new HashSet<>(); - this.facadeMap = new TreeMap<>(); - this.totalExpectedForMonths = new TreeMap<>(); - this.totalRealForMonths = new TreeMap<>(); - this.totalEstimatedForMonths = new TreeMap<>(); + this.sampleRowIds = new HashSet<String>(); + this.facadeMap = new TreeMap<String, FacadeContext>(); + this.totalExpectedForMonths = new TreeMap<Date, MutableInt>(); + this.totalRealForMonths = new TreeMap<Date, MutableInt>(); + this.totalEstimatedForMonths = new TreeMap<Date, MutableInt>(); PeriodDates periodDates = new PeriodDates(sampleRowsFilter.getPeriodFrom(), sampleRowsFilter.getPeriodTo()); @@ -165,7 +165,7 @@ public ObsVenteSamplingPlan toPlan() { // Get facade parts - Collection<SamplingPlan.SamplingPlanFacadePart> facadeParts = new ArrayList<>(); + Collection<SamplingPlan.SamplingPlanFacadePart> facadeParts = new ArrayList<SamplingPlan.SamplingPlanFacadePart>(); for (FacadeContext facadeContext : facadeMap.values()) { SamplingPlan.SamplingPlanFacadePart facadePart = facadeContext.toBean(); facadeParts.add(facadePart); @@ -179,7 +179,7 @@ }).immutableSortedCopy(facadeParts); // Get statistics - Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> statisticsMap = new TreeMap<>(); + Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> statisticsMap = new TreeMap<Date, ObsMerSamplingPlan.SamplingPlanStatistics>(); for (Date month : months) { MutableInt totalExpected = totalExpectedForMonths.get(month); @@ -204,7 +204,7 @@ } protected Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> computeNbTidesPerMonth(SampleRow sampleRow) { - Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> result = new TreeMap<>(); + Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> result = new TreeMap<Date, ObsMerSamplingPlan.SamplingPlanStatistics>(); for (Date month : months) { Integer expectedTidesValue = SampleRows.getExpectedTidesValue(sampleRow, month); if (expectedTidesValue != null) { @@ -250,7 +250,7 @@ protected FacadeContext(String facade) { this.facade = facade; - this.sectorMap = new TreeMap<>(); + this.sectorMap = new TreeMap<String, SectorContext>(); } protected SectorContext getOrAddSectorContext(String sectors) { @@ -267,7 +267,7 @@ protected SamplingPlan.SamplingPlanFacadePart toBean() { // get sector parts - Collection<SamplingPlan.SamplingPlanSectorPart> sectorParts = new ArrayList<>(); + Collection<SamplingPlan.SamplingPlanSectorPart> sectorParts = new ArrayList<SamplingPlan.SamplingPlanSectorPart>(); for (SectorContext sectorContext : sectorMap.values()) { SamplingPlan.SamplingPlanSectorPart sectorPart = sectorContext.toBean(); sectorParts.add(sectorPart); @@ -292,7 +292,7 @@ protected SectorContext(String sectors) { this.sectors = sectors; - this.rows = new ArrayList<>(); + this.rows = new ArrayList<ObsVenteSamplingPlan.ObsVenteSamplingPlanSampleRowPart>(); } protected ObsMerSamplingPlan.SamplingPlanSampleRowPart addSampleRow(Locale locale, Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -48,25 +48,25 @@ protected Optional<String> optionalCompanyId; - protected SortedSet<FilterOption> fishingZoneFacadeNames = new TreeSet<>(); + protected SortedSet<FilterOption> fishingZoneFacadeNames = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> fishingZoneSectorNames = new TreeSet<>(); + protected SortedSet<FilterOption> fishingZoneSectorNames = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> sampleRowCodes = new TreeSet<>(); + protected SortedSet<FilterOption> sampleRowCodes = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> programNames = new TreeSet<>(); + protected SortedSet<FilterOption> programNames = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> companies = new TreeSet<>(); + protected SortedSet<FilterOption> companies = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> samplingStrategies = new TreeSet<>(); + protected SortedSet<FilterOption> samplingStrategies = new TreeSet<FilterOption>(); - protected SortedSet<FilterOption> terrestrialDistricts = new TreeSet<>(); + protected SortedSet<FilterOption> terrestrialDistricts = new TreeSet<FilterOption>(); /** Values are the code and the label i18n key. */ - protected SortedSet<FilterOption> fishingGearDcfs = new TreeSet<>(); + protected SortedSet<FilterOption> fishingGearDcfs = new TreeSet<FilterOption>(); /** Values are the code and the label i18n key. */ - protected SortedSet<FilterOption> targetSpeciesDcfs = new TreeSet<>(); + protected SortedSet<FilterOption> targetSpeciesDcfs = new TreeSet<FilterOption>(); public SampleRowsFilterValues(Locale locale, ObsProgram obsProgram, Optional<String> optionalCompanyId) { super(locale); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -407,7 +407,7 @@ professionOther = sampleRow.getProfession().getOther(); professionLibelle = sampleRow.getProfession().getLibelle(); professionSpecies = sampleRow.getProfession().getSpecies(); - dcf5CodesAndDescriptions = new LinkedHashMap<>(); + dcf5CodesAndDescriptions = new LinkedHashMap<String, String>(); for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) { String key = dcf5Code.getCode(); String description = dcf5Code.getFishingGearCode() + " - " + WaoUtils.l(locale, dcf5Code.getFishingGearDCF()); @@ -434,7 +434,7 @@ // compute sampleRowPeriod // TODO brendan 15/04/14 use treeset - List<SampleMonth> sampleMonth = new ArrayList<>(sampleRow.getSampleMonth()); + List<SampleMonth> sampleMonth = new ArrayList<SampleMonth>(sampleRow.getSampleMonth()); firstSampleMonthDate = sampleMonth.get(0).getPeriodDate(); lastSampleMonthDate = sampleMonth.get(sampleMonth.size() - 1).getPeriodDate(); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -300,7 +300,7 @@ updateSampleRowCommand.setCreation(false); - Set<Boat> elligibleBoats = new HashSet<>(); + Set<Boat> elligibleBoats = new HashSet<Boat>(); for (ElligibleBoat elligibleBoat : sampleRow.getElligibleBoat()) { boolean boatIsElligibleForUser = authenticatedWaoUser.isAdmin() && elligibleBoat.isGlobalActive() || @@ -406,7 +406,7 @@ SampleMonthTopiaDao sampleMonthDao = getSampleMonthDao(); - Set<SampleMonth> sampleMonthsToRemove = new HashSet<>(sampleRow.getSampleMonth()); + Set<SampleMonth> sampleMonthsToRemove = new HashSet<SampleMonth>(sampleRow.getSampleMonth()); Map<String, Integer> expectedObservationsByMonths = updateSampleRowCommand.getExpectedObservationsByMonths(); for (Map.Entry<String, Integer> entry : expectedObservationsByMonths.entrySet()) { Date month; Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/Synthesis.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/Synthesis.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/Synthesis.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -46,7 +46,7 @@ protected int validBoardingsCount; - protected Map<String, CompanySynthesis> companySyntheses = new HashMap<>(); + protected Map<String, CompanySynthesis> companySyntheses = new HashMap<String, CompanySynthesis>(); protected Set<String> sampleRowIds; @@ -145,7 +145,7 @@ companySynthesis.getCompanyName(), companySynthesis); } - return new LinkedHashSet<>(companySynthesesOrderedByName.values()); + return new LinkedHashSet<CompanySynthesis>(companySynthesesOrderedByName.values()); } public boolean isEmpty() { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/SynthesisService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -89,7 +89,7 @@ synthesis = new Synthesis(); - Set<String> sampleRowIds = new HashSet<>(); + Set<String> sampleRowIds = new HashSet<String>(); filter.setFilterOnObservationBeginDate(true); setExpectedVsActualObservationsByMonthsBarChartData(synthesis, filter); @@ -287,7 +287,7 @@ Map<Boat, LinkedHashMap<String, List<Date>>> data = dao.getBoardingBoats(filter); - Map<Integer, Integer> mapBoarding = new TreeMap<>(); + Map<Integer, Integer> mapBoarding = new TreeMap<Integer, Integer>(); // Prepare map which contains for each entry the number of boardings // for the key and the number of boats for the value. Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateContactCommand.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateContactCommand.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateContactCommand.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -55,7 +55,7 @@ protected String mainObserverId; - protected Set<String> secondaryObserverIds = new HashSet<>(); + protected Set<String> secondaryObserverIds = new HashSet<String>(); protected String terrestrialLocationId; Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -73,7 +73,7 @@ public Map<String, Integer> getExpectedObservationsByMonths() { if (expectedObservationsByMonths == null) { - expectedObservationsByMonths = new LinkedHashMap<>(); + expectedObservationsByMonths = new LinkedHashMap<String, Integer>(); Date periodBegin = sampleRow.getPeriodBegin(); Date periodEnd = sampleRow.getPeriodEnd(); for (Date month : new PeriodDates(periodBegin, periodEnd).getMonths()) { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -121,7 +121,7 @@ protected static final Map<ObsProgram, List<String>> PER_PROGRAM_REFERENTIAL; static { - Map<ObsProgram, List<String>> perProgramReferential = new HashMap<>(); + Map<ObsProgram, List<String>> perProgramReferential = new HashMap<ObsProgram, List<String>>(); perProgramReferential.put(ObsProgram.OBSMER, Arrays.asList( FishingZone.class.getName(), @@ -577,13 +577,15 @@ TerrestrialLocationTopiaDao dao = getPersistenceContext().getTerrestrialLocationDao(); - Map<String, Object> properties = new HashMap<>(); + Map<String, Object> properties = new HashMap<String, Object>(); // we are looking for ports only properties.put(TerrestrialLocation.PROPERTY_LOCATION_TYPE_ORDINAL, LocationType.PORT.ordinal()); // ports in a specific region - properties.put(TerrestrialLocation.PROPERTY_REGION_IFREMER_CODE, region.getRegionIfremerCode()); + if (region != null) { + properties.put(TerrestrialLocation.PROPERTY_REGION_IFREMER_CODE, region.getRegionIfremerCode()); + } // run query List<TerrestrialLocation> ports = dao.forProperties(properties).findAll(); @@ -752,7 +754,7 @@ List<FishingGearDCF> fishingGearDCFs = fishingGearDCFDao.findAll(); List<TargetSpeciesDCF> targetSpeciesDCFs = targetSpeciesDCFDao.findAll(); - Set<Pair<FishingGearDCF, TargetSpeciesDCF>> pairs = new HashSet<>(); + Set<Pair<FishingGearDCF, TargetSpeciesDCF>> pairs = new HashSet<Pair<FishingGearDCF, TargetSpeciesDCF>>(); for (FishingGearDCF fishingGearDCF : fishingGearDCFs) { for (TargetSpeciesDCF targetSpeciesDCF : targetSpeciesDCFs) { @@ -766,7 +768,7 @@ FishingGearDCF fishingGearDCF = pair.getLeft(); TargetSpeciesDCF targetSpeciesDCF = pair.getRight(); - Map<String, Object> properties = new HashMap<>(); + Map<String, Object> properties = new HashMap<String, Object>(); properties.put(DCF5Code.PROPERTY_FISHING_GEAR_DCF, fishingGearDCF); properties.put(DCF5Code.PROPERTY_TARGET_SPECIES_DCF, targetSpeciesDCF); @@ -836,7 +838,7 @@ */ public List<ReferentialState> getReferentialStates(ObsProgram obsProgram) { - List<ReferentialState> referentialStates = new LinkedList<>(); + List<ReferentialState> referentialStates = new LinkedList<ReferentialState>(); for (String entityClassFqn : PER_PROGRAM_REFERENTIAL.get(obsProgram)) { @@ -917,11 +919,11 @@ FleetTopiaDao fleetDao = getPersistenceContext().getFleetDao(); // load data that will be linked to the boat - Map<String, ShipOwner> shipOwners = new HashMap<>(); + Map<String, ShipOwner> shipOwners = new HashMap<String, ShipOwner>(); for (ShipOwner shipOwner : shipOwnerDao.findAll()) { shipOwners.put(shipOwner.getCode(), shipOwner); } - Map<String, Fleet> fleets = new HashMap<>(); + Map<String, Fleet> fleets = new HashMap<String, Fleet>(); for (Fleet fleet : fleetDao.findAll()) { fleets.put(fleet.getCode(), fleet); } @@ -995,7 +997,7 @@ BoatTopiaDao boatDao = getPersistenceContext().getBoatDao(); BoatGroupTopiaDao boatGroupDao = getPersistenceContext().getBoatGroupDao(); - Map<String, BoatGroup> boatGroups = new HashMap<>(); + Map<String, BoatGroup> boatGroups = new HashMap<String, BoatGroup>(); for (BoatGroup boatGroup : boatGroupDao.findAll()) { boatGroups.put(boatGroup.getCode(), boatGroup); } @@ -1044,7 +1046,7 @@ Iterable<String> splitImmatriculations = BOAT_IMMATRICULATIONS_SPLITTER.split(joinedImmatriculations); - Set<Integer> immatriculations = new HashSet<>(); + Set<Integer> immatriculations = new HashSet<Integer>(); for (String splitImmatriculation : splitImmatriculations) { if (StringUtils.isNotBlank(splitImmatriculation)) { immatriculations.add(Integer.parseInt(splitImmatriculation)); @@ -1057,7 +1059,7 @@ for (Boat boat : boats) { immatriculations.remove(boat.getImmatriculation()); } - Set<String> immatriculationStrings = new HashSet<>(); + Set<String> immatriculationStrings = new HashSet<String>(); for (Integer immatriculation : immatriculations) { immatriculationStrings.add(String.valueOf(immatriculation)); } @@ -1075,7 +1077,7 @@ */ public Set<DCF5Code> getDcf5Codes(String joinedDcf5Codes) throws UnknownFishingGearDcfCodeException, UnknownTargetSpeciesDcfCodeException { - Set<DCF5Code> dcf5Codes = new HashSet<>(); + Set<DCF5Code> dcf5Codes = new HashSet<DCF5Code>(); DCF5CodeTopiaDao dao = getDCF5CodeDao(); @@ -1103,7 +1105,7 @@ } } - Map<String, Object> properties = new HashMap<>(); + Map<String, Object> properties = new HashMap<String, Object>(); properties.put(DCF5Code.PROPERTY_FISHING_GEAR_DCF, fishingGearDCF); properties.put(DCF5Code.PROPERTY_TARGET_SPECIES_DCF, targetSpeciesDCF); @@ -1134,7 +1136,7 @@ public List<TerrestrialLocation> getTerrestrialLocationInDistricts(Collection<TerrestrialLocation> terrestrialDistricts) { - Set districtCodes = new HashSet(); + Set<String> districtCodes = new HashSet(); for (TerrestrialLocation terrestrialDistrict : terrestrialDistricts) { Preconditions.checkArgument(terrestrialDistrict.isDistrict()); districtCodes.add(terrestrialDistrict.getDistrictCode()); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/WaoUsersService.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -163,7 +163,7 @@ waoUser.clearCanReadBoats(); if (waoUser.hasUserRole(UserRole.PROFESSIONAL, obsProgram)) { - Set<Boat> boatsFromImmatriculations = new HashSet<>(getReferentialService().getBoatsFromImmatriculations(updateWaoUserCommand.getCanReadBoats())); + Set<Boat> boatsFromImmatriculations = new HashSet<Boat>(getReferentialService().getBoatsFromImmatriculations(updateWaoUserCommand.getCanReadBoats())); waoUser.setCanReadBoats(boatsFromImmatriculations); } Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatGroupImportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -47,7 +47,7 @@ } protected void buildModel() { - modelBuilder = new ModelBuilder<>(); + modelBuilder = new ModelBuilder<Boat>(); modelBuilder.newColumnForImportExport( "NAVIRE_IMMATRICULATION", Boat.PROPERTY_IMMATRICULATION, Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/BoatImportExportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -78,7 +78,7 @@ } protected void buildModel() { - modelBuilder = new ModelBuilder<>(); + modelBuilder = new ModelBuilder<Boat>(); modelBuilder.newColumnForImportExport( "NAVIRE_IMMATRICULATION", Boat.PROPERTY_IMMATRICULATION, Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactImportExportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -138,7 +138,7 @@ } protected ModelBuilder<Contact> getModel() { - ModelBuilder<Contact> modelBuilder = new ModelBuilder<>(); + ModelBuilder<Contact> modelBuilder = new ModelBuilder<Contact>(); modelBuilder.newColumnForImportExport("CONTACT_ID", Contact.PROPERTY_TOPIA_ID); modelBuilder.newColumnForImportExport("CONTACT_DATE_CREATION", Contact.PROPERTY_CREATION_DATE, Common.DAY_TIME); modelBuilder.newColumnForImportExport("CONTACT_OBSERVATEUR_PRINCIPAL", Contact.PROPERTY_MAIN_OBSERVER, new UserParserFormatter(locale, waoUsers)); @@ -151,7 +151,7 @@ new ValueFormatter<List<WaoUser>>() { @Override public String format(List<WaoUser> value) { - List<String> fullNames = new LinkedList<>(); + List<String> fullNames = new LinkedList<String>(); for (WaoUser waoUser : value) { fullNames.add(waoUser.getFullName()); } @@ -170,7 +170,7 @@ }, new CompanyParserFormatter(locale, null) ); - modelBuilder.newColumnForImportExport("CONTACT_ETAT", "contactState", new I18nAbleParserFormatter<>(locale, ContactState.getAllowedStates(obsProgram))); + modelBuilder.newColumnForImportExport("CONTACT_ETAT", "contactState", new I18nAbleParserFormatter<ContactState>(locale, ContactState.getAllowedStates(obsProgram))); modelBuilder.newColumnForImportExport("CONTACT_DEBUT_OBSERVATION", Contact.PROPERTY_OBSERVATION_BEGIN_DATE, Common.DAY_TIME); modelBuilder.newColumnForImportExport("CONTACT_FIN_OBSERVATION", Contact.PROPERTY_OBSERVATION_END_DATE, Common.DAY_TIME); modelBuilder.newColumnForImportExport("CONTACT_SAISIE_DONNEES", Contact.PROPERTY_DATA_INPUT_DATE, Common.DAY); @@ -193,7 +193,7 @@ if (obsProgram.isObsMer()) { modelBuilder.newColumnForImportExport("CONTACT_QUALITE_DONNEE", "dataReliability", - new I18nAbleParserFormatter<>(locale, DataReliability.values())); + new I18nAbleParserFormatter<DataReliability>(locale, DataReliability.values())); modelBuilder.newColumnForImportExport("CONTACT_OBSERVATION_MAMMIFERE", Contact.PROPERTY_MAMMALS_OBSERVATION, Common.BOOLEAN); modelBuilder.newColumnForImportExport("CONTACT_CAPTURE_ACCIDENTELLE", Contact.PROPERTY_MAMMALS_CAPTURE, Common.BOOLEAN); modelBuilder.newIgnoredColumn("CONTACT_CAPTURE_ACCIDENTELLE_DETAILS"); @@ -213,10 +213,10 @@ }); modelBuilder.newColumnForImportExport("CONTACT_TRANSMISSION_RESTITUTION", Contact.PROPERTY_RESTITUTION, Common.DAY); - Set<ObservedDataControl> observedDataControlsValues = new HashSet<>(); + Set<ObservedDataControl> observedDataControlsValues = new HashSet<ObservedDataControl>(); Collections.addAll(observedDataControlsValues, ObservedDataControl.values()); observedDataControlsValues.add(null); - I18nAbleParserFormatter<ObservedDataControl> valueParserFormatter = new I18nAbleParserFormatter<>(locale, observedDataControlsValues); + I18nAbleParserFormatter<ObservedDataControl> valueParserFormatter = new I18nAbleParserFormatter<ObservedDataControl>(locale, observedDataControlsValues); valueParserFormatter.setAcceptNullValues(true); modelBuilder.newColumnForImportExport("CONTACT_DONNEES_ALLEGRO_VALIDEES", Contact.PROPERTY_OBSERVED_DATA_CONTROL, valueParserFormatter); @@ -228,14 +228,14 @@ modelBuilder.newColumnForImportExport("CONTACT_ECHANTILLONNAGE_COMPLET", Contact.PROPERTY_COMPLETE_SAMPLING, Common.BOOLEAN); // terrestrial location - Set<LocationType> locationTypes = new HashSet<>(); + Set<LocationType> locationTypes = new HashSet<LocationType>(); locationTypes.add(LocationType.PORT); locationTypes.add(LocationType.AUCTION); locationTypes.add(null); I18nAbleParserFormatter<LocationType> locationTypeParserFormatter = - new I18nAbleParserFormatter<>(locale, locationTypes); + new I18nAbleParserFormatter<LocationType>(locale, locationTypes); locationTypeParserFormatter.setAcceptNullValues(true); - ValueGetterSetter<Contact, LocationType> locationTypeGetter = new Common.ValueSaver<>(); + ValueGetterSetter<Contact, LocationType> locationTypeGetter = new Common.ValueSaver<Contact, LocationType>(); modelBuilder.newMandatoryColumn( "CONTACT_LIEU_TYPE", locationTypeParserFormatter, @@ -318,12 +318,12 @@ @Override public TerrestrialLocation parse(String code) throws ParseException { if (indexedLocations == null) { - indexedLocations = new HashMap<>(); + indexedLocations = new HashMap<LocationType, Map<String, TerrestrialLocation>>(); for (TerrestrialLocation terrestrialLocation : terrestrialLocations) { LocationType locationType = terrestrialLocation.getLocationType(); Map<String, TerrestrialLocation> locationsForType = indexedLocations.get(locationType); if (locationsForType == null) { - locationsForType = new HashMap<>(); + locationsForType = new HashMap<String, TerrestrialLocation>(); } locationsForType.put(terrestrialLocation.getCode(), terrestrialLocation); indexedLocations.put(locationType, locationsForType); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactStateMotivesImportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactStateMotivesImportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ContactStateMotivesImportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -64,7 +64,7 @@ } protected void buildModel() { - modelBuilder = new ModelBuilder<>(); + modelBuilder = new ModelBuilder<ContactStateMotif>(); modelBuilder.newMandatoryColumn( "MOTIF_CODE", ContactStateMotif.PROPERTY_CODE); modelBuilder.newMandatoryColumn( Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/FishingZoneImportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/FishingZoneImportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/FishingZoneImportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -62,7 +62,7 @@ @Override public Iterable<ImportableColumn<FishingZone, Object>> getColumnsForImport() { - ModelBuilder<FishingZone> modelBuilder = new ModelBuilder<>(); + ModelBuilder<FishingZone> modelBuilder = new ModelBuilder<FishingZone>(); modelBuilder.newMandatoryColumn("PECHE_DIVISION", FishingZone.PROPERTY_DISTRICT_CODE); modelBuilder.newMandatoryColumn("PECHE_ZONE", FishingZone.PROPERTY_SECTOR_NAME); modelBuilder.newMandatoryColumn("PECHE_FACADE", FishingZone.PROPERTY_FACADE_NAME); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -191,7 +191,7 @@ protected void buildModel() { - modelBuilder = new ModelBuilder<>(); + modelBuilder = new ModelBuilder<SampleRow>(); modelBuilder.newColumnForImportExport("PLAN_CODE", SampleRow.PROPERTY_CODE, new SampleRowCodeParserFormatter(locale, obsProgram)); modelBuilder.newColumnForImportExport("SOCIETE_NOM", SampleRow.PROPERTY_COMPANY, new CompanyParserFormatter(locale, companies)); @@ -228,7 +228,7 @@ } if (obsProgram == ObsProgram.OBSVENTE) { - modelBuilder.newColumnForImportExport("PLAN_STRATEGIE", "samplingStrategy", new I18nAbleParserFormatter<>(locale, SamplingStrategy.values())); + modelBuilder.newColumnForImportExport("PLAN_STRATEGIE", "samplingStrategy", new I18nAbleParserFormatter<SamplingStrategy>(locale, SamplingStrategy.values())); modelBuilder.newColumnForImportExport("PLAN_LIEU_CODE", SampleRow.PROPERTY_TERRESTRIAL_LOCATIONS, new DistrictsParserFormatter(locale, terrestrialDistricts)); modelBuilder.newColumnForExport("PLAN_LIEU_NOM", SampleRow.PROPERTY_TERRESTRIAL_LOCATIONS, new DistrictNamesFormatter()); modelBuilder.newIgnoredColumn("PLAN_LIEU_NOM"); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/RawObsDebCodesImportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -63,7 +63,7 @@ } protected void buildModel() { - modelBuilder = new ModelBuilder<>(); + modelBuilder = new ModelBuilder<RawObsDebCode>(); modelBuilder.newMandatoryColumn("CODE", RawObsDebCode.PROPERTY_CODE); modelBuilder.newMandatoryColumn("NOM", RawObsDebCode.PROPERTY_LABEL); modelBuilder.newMandatoryColumn("REGION_IFREMER", Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialDivisionImportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -72,7 +72,7 @@ @Override public Iterable<ImportableColumn<TerrestrialDivision, Object>> getColumnsForImport() { - ModelBuilder<TerrestrialDivision> modelBuilder = new ModelBuilder<>(); + ModelBuilder<TerrestrialDivision> modelBuilder = new ModelBuilder<TerrestrialDivision>(); modelBuilder.newMandatoryColumn( "ID_STRATE", Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialLocationImportModel.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialLocationImportModel.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/TerrestrialLocationImportModel.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -80,7 +80,7 @@ @Override public Iterable<ImportableColumn<TerrestrialLocation, Object>> getColumnsForImport() { - ModelBuilder<TerrestrialLocation> modelBuilder = new ModelBuilder<>(); + ModelBuilder<TerrestrialLocation> modelBuilder = new ModelBuilder<TerrestrialLocation>(); modelBuilder.newMandatoryColumn("TLIEU_COD", new ValueParser<LocationType>() { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictNamesFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictNamesFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictNamesFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -35,7 +35,7 @@ @Override public String format(Collection<TerrestrialLocation> terrestrialLocations) { - List<String> districtNames = new LinkedList<>(); + List<String> districtNames = new LinkedList<String>(); if (terrestrialLocations != null) { for (TerrestrialLocation terrestrialLocation : terrestrialLocations) { districtNames.add(terrestrialLocation.getDistrictName()); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -44,7 +44,7 @@ public DistrictParserFormatter(Locale locale, List<TerrestrialLocation> districts) { this.locale = locale; if (districts != null) { - indexedDistricts = new HashMap<>(); + indexedDistricts = new HashMap<String, TerrestrialLocation>(); for (TerrestrialLocation district : districts) { if ( ! district.isDistrict()) { throw new IllegalArgumentException(); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -51,7 +51,7 @@ @Override public String format(Collection<TerrestrialLocation> districts) { - List<String> districtCodes = new LinkedList<>(); + List<String> districtCodes = new LinkedList<String>(); if (districts != null) { for (TerrestrialLocation district : districts) { districtCodes.add(district.getDistrictCode()); @@ -64,7 +64,7 @@ @Override public Collection<TerrestrialLocation> parse(String value) throws ParseException { if (indexedDistricts == null) { - indexedDistricts = new HashMap<>(); + indexedDistricts = new HashMap<String, TerrestrialLocation>(); for (TerrestrialLocation district : districts) { // XXX brendan 28/02/14 on utilise pas Maps.uniqueIndex car la clé peut être null (quartier maritime « Hors France ») if (!district.isDistrict()) { @@ -77,7 +77,7 @@ throw new IllegalArgumentException(I18n.l(locale, "wao.import.contact.failure.districtMissing")); } String[] districtCodes = StringUtils.split(value, ','); - Collection<TerrestrialLocation> districts = new LinkedList<>(); + Collection<TerrestrialLocation> districts = new LinkedList<TerrestrialLocation>(); for (String districtCode : districtCodes) { TerrestrialLocation district = indexedDistricts.get(districtCode.trim()); if (district == null) { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -56,7 +56,7 @@ @Override public String format(Set<FishingZone> fishingZones) { - List<String> districtCodes = new LinkedList<>(); + List<String> districtCodes = new LinkedList<String>(); for (FishingZone fishingZone : fishingZones) { districtCodes.add(fishingZone.getDistrictCode()); } @@ -68,7 +68,7 @@ if (indexedFishingZones == null) { indexedFishingZones = Maps.uniqueIndex(fishingZones, FishingZones.getDistrictCode()); } - Set<FishingZone> fishingZones = new HashSet<>(); + Set<FishingZone> fishingZones = new HashSet<FishingZone>(); if (StringUtils.isBlank(districtCodes)) { throw new IllegalArgumentException(I18n.l(locale, "wao.import.sampleRow.failure.fishingZoneMissing")); } else { Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/I18nAbleParserFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/I18nAbleParserFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/I18nAbleParserFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -42,9 +42,9 @@ */ public class I18nAbleParserFormatter<E extends I18nAble> implements ValueParserFormatter<E> { - protected Map<E, String> toStrings = new HashMap<>(); + protected Map<E, String> toStrings = new HashMap<E, String>(); - protected Map<String, E> fromString = new HashMap<>(); + protected Map<String, E> fromString = new HashMap<String, E>(); protected final Locale locale; Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/LocationTypeParserFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/LocationTypeParserFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/LocationTypeParserFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -56,7 +56,7 @@ @Override public LocationType parse(String value) throws ParseException { if (fromStrings == null) { - fromStrings = new HashMap<>(); + fromStrings = new HashMap<String, LocationType>(); fromStrings.put(LocationType.PORT.toString(), LocationType.PORT); fromStrings.put(LocationType.AUCTION.toString(), LocationType.AUCTION); } Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -56,7 +56,7 @@ } String[] regionCodes = value.split(","); - List<TerrestrialLocation> regions = new LinkedList<>(); + List<TerrestrialLocation> regions = new LinkedList<TerrestrialLocation>(); for (String regionCode : regionCodes) { if ( ! regionCode.isEmpty()) { TerrestrialLocation region = Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -64,7 +64,7 @@ @Override public Set<WaoUser> parse(String value) throws ParseException { String[] logins = StringUtils.split(value, SEPARATOR); - Set<WaoUser> users = new HashSet<>(); + Set<WaoUser> users = new HashSet<WaoUser>(); for (String login : logins) { String trimmedLogin = login.trim(); WaoUser user = indexedWaoUsers.get(trimmedLogin); Modified: branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/MammalsObservationEmail.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/MammalsObservationEmail.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/main/java/fr/ifremer/wao/services/service/mail/MammalsObservationEmail.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -78,7 +78,7 @@ public String getFacadeNames() { - List<String> facadesNames = new ArrayList<>(); + List<String> facadesNames = new ArrayList<String>(); for (FishingZone fishingZone : getSampleRow().getFishingZone()) { facadesNames.add(fishingZone.getSectorName() + " (" + fishingZone.getFacadeName() + ")"); } Modified: branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/FakeWaoApplicationContext.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/FakeWaoApplicationContext.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/FakeWaoApplicationContext.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -175,7 +175,7 @@ protected WaoTopiaApplicationContext newWaoTopiaApplicationContext(String context) { - Map<String, String> hibernateH2Config = new HashMap<>(); + Map<String, String> hibernateH2Config = new HashMap<String, String>(); hibernateH2Config.putAll(getApplicationConfig().getTopiaProperties()); Modified: branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java =================================================================== --- branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -169,7 +169,7 @@ SampleRow sampleRow = serviceContext.getPersistenceContext().getSampleRowDao().forCodeEquals("2010_M0011").findUnique(); - Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> oldStats = new HashMap<>(); + Map<Date, ObsMerSamplingPlan.SamplingPlanStatistics> oldStats = new HashMap<Date, ObsMerSamplingPlan.SamplingPlanStatistics>(); for (SampleMonth sampleMonth : sampleRow.getSampleMonth()) { ObsMerSamplingPlan.SamplingPlanStatistics stats = new ObsMerSamplingPlan.SamplingPlanStatistics( Modified: branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/CacheInvalidationTopiaEntityListener.java =================================================================== --- branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/CacheInvalidationTopiaEntityListener.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/CacheInvalidationTopiaEntityListener.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -59,11 +59,11 @@ protected Cache<ContactsFilter, Synthesis> synthesesCache; - protected Set<String> dirtySampleRowIds = new HashSet<>(); + protected Set<String> dirtySampleRowIds = new HashSet<String>(); - protected Set<String> dirtyBoatIds = new HashSet<>(); + protected Set<String> dirtyBoatIds = new HashSet<String>(); - protected Set<String> dirtyContactIds = new HashSet<>(); + protected Set<String> dirtyContactIds = new HashSet<String>(); protected boolean invalidateAllSampleRows = false; @@ -143,14 +143,14 @@ samplingPlansCache.invalidateAll(); synthesesCache.invalidateAll(); } else { - Set<SamplingPlanCacheKey> samplingPlansCacheKeysToInvalidate = new HashSet<>(); + Set<SamplingPlanCacheKey> samplingPlansCacheKeysToInvalidate = new HashSet<SamplingPlanCacheKey>(); for (Map.Entry<SamplingPlanCacheKey, SamplingPlan> entry : samplingPlansCache.asMap().entrySet()) { if (CollectionUtils.containsAny(entry.getValue().getSampleRowIds(), dirtySampleRowIds)) { samplingPlansCacheKeysToInvalidate.add(entry.getKey()); } } samplingPlansCache.invalidateAll(samplingPlansCacheKeysToInvalidate); - Set<ContactsFilter> synthesesCacheKeysToInvalidate = new HashSet<>(); + Set<ContactsFilter> synthesesCacheKeysToInvalidate = new HashSet<ContactsFilter>(); for (Map.Entry<ContactsFilter, Synthesis> entry : synthesesCache.asMap().entrySet()) { if (CollectionUtils.containsAny(entry.getValue().getSampleRowIds(), dirtySampleRowIds)) { synthesesCacheKeysToInvalidate.add(entry.getKey()); @@ -161,7 +161,7 @@ if (invalidateAllBoats || dirtyBoatIds.size() > 20) { boatsFilterValuesCache.invalidateAll(); } else { - Set<BoatsFilterValuesCacheKey> boatsFilterValuesCacheKeysToInvalidate = new HashSet<>(); + Set<BoatsFilterValuesCacheKey> boatsFilterValuesCacheKeysToInvalidate = new HashSet<BoatsFilterValuesCacheKey>(); for (Map.Entry<BoatsFilterValuesCacheKey, BoatsFilterValues> entry : boatsFilterValuesCache.asMap().entrySet()) { if (CollectionUtils.containsAny(entry.getValue().getBoatIds(), dirtyBoatIds)) { boatsFilterValuesCacheKeysToInvalidate.add(entry.getKey()); Modified: branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java =================================================================== --- branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -208,7 +208,7 @@ } public Map<String, String> getDcf5CodesAndDescriptions(SampleRow sampleRow) { - Map<String, String> dcf5CodesAndDescriptions = new LinkedHashMap<>(); + Map<String, String> dcf5CodesAndDescriptions = new LinkedHashMap<String, String>(); for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) { String key = dcf5Code.getCode(); String description = dcf5Code.getFishingGearCode() + " - " + WaoUtils.l(getLocale(), dcf5Code.getFishingGearDCF()); Modified: branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/EditContactAction.java =================================================================== --- branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/EditContactAction.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/EditContactAction.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -214,38 +214,38 @@ List<WaoUser> waoUsers = waoUsersService.getActiveWaoUsers(Optional.of(updateContactCommand.getContact().getSampleRow().getCompany().getTopiaId())); Set<WaoUser> sortedWaoUsers = Sets.newTreeSet(WaoUsers.fullNameComparator()); sortedWaoUsers.addAll(waoUsers); - observers = new LinkedHashMap<>(); + observers = new LinkedHashMap<String, String>(); for (WaoUser waoUser : sortedWaoUsers) { observers.put(waoUser.getTopiaId(), waoUser.getFullName()); } - contactStates = new EnumMap<>(ContactState.class); + contactStates = new EnumMap<ContactState, String>(ContactState.class); for (ContactState contactState : ContactState.getAllowedStates(getAuthenticatedWaoUser().getObsProgram())) { contactStates.put(contactState, WaoUtils.l(getLocale(), contactState)); } - contactStateMotives = new TreeMap<>(); + contactStateMotives = new TreeMap<String, String>(); for (ContactStateMotif contactStateMotif : referentialService.getAllContactStateMotifs(null)) { contactStateMotives.put(contactStateMotif.getTopiaId(), contactStateMotif.getName()); } - observedDataControls = new EnumMap<>(ObservedDataControl.class); + observedDataControls = new EnumMap<ObservedDataControl, String>(ObservedDataControl.class); for (ObservedDataControl observedDataControl : ObservedDataControl.values()) { observedDataControls.put(observedDataControl, WaoUtils.l(getLocale(), observedDataControl)); } - dataReliabilities = new EnumMap<>(DataReliability.class); + dataReliabilities = new EnumMap<DataReliability, String>(DataReliability.class); for (DataReliability dataReliability : DataReliability.values()) { dataReliabilities.put(dataReliability, WaoUtils.l(getLocale(), dataReliability)); } - samplingStrategies = new EnumMap<>(SamplingStrategy.class); + samplingStrategies = new EnumMap<SamplingStrategy, String>(SamplingStrategy.class); for (SamplingStrategy samplingStrategy : SamplingStrategy.values()) { samplingStrategies.put(samplingStrategy, WaoUtils.l(getLocale(), samplingStrategy)); } - terrestrialLocations = new LinkedHashMap<>(); + terrestrialLocations = new LinkedHashMap<String, String>(); List<TerrestrialLocation> terrestrialLocationInDistricts = referentialService.getTerrestrialLocationInDistricts(updateContactCommand.getContact().getSampleRow().getTerrestrialLocations()); - Set<TerrestrialLocation> sortedTerrestrialLocations = new TreeSet<>(TerrestrialLocations.nameComparator()); + Set<TerrestrialLocation> sortedTerrestrialLocations = new TreeSet<TerrestrialLocation>(TerrestrialLocations.nameComparator()); sortedTerrestrialLocations.addAll(terrestrialLocationInDistricts); for (TerrestrialLocation terrestrialLocation : sortedTerrestrialLocations) { terrestrialLocations.put(terrestrialLocation.getTopiaId(), terrestrialLocation.getDescription()); Modified: branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/authentication/LoginAction.java =================================================================== --- branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/authentication/LoginAction.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/action/authentication/LoginAction.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -110,7 +110,7 @@ userProfileId = Iterables.getOnlyElement(waoUser.getUserProfile()).getTopiaId(); } else { userProfileAsked = true; - userProfiles = new HashMap<>(); + userProfiles = new HashMap<String, String>(); for (UserProfile userProfile : waoUser.getUserProfile()) { String label = t(userProfile.getUserRole().getI18nKey()); label += " " + t(userProfile.getObsProgram().getI18nKey()); Modified: branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/converter/BooleanSetConverter.java =================================================================== --- branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/converter/BooleanSetConverter.java 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-web/src/main/java/fr/ifremer/wao/web/converter/BooleanSetConverter.java 2014-07-08 09:31:46 UTC (rev 2133) @@ -42,7 +42,7 @@ @Override public Set<Boolean> convertFromString(Map map, String[] strings, Class aClass) { - Set<Boolean> result = new HashSet<>(); + Set<Boolean> result = new HashSet<Boolean>(); if (strings.length > 0) { @@ -74,7 +74,7 @@ if (o instanceof Set) { Set<Boolean> booleans = (Set<Boolean>) o; - Set<String> strings = new HashSet<>(); + Set<String> strings = new HashSet<String>(); for (Boolean aBoolean : booleans) { String string; if (aBoolean == null) { Modified: branches/wao-4.0-jdk6/wao-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- branches/wao-4.0-jdk6/wao-web/src/main/webapp/WEB-INF/web.xml 2014-07-08 09:29:24 UTC (rev 2132) +++ branches/wao-4.0-jdk6/wao-web/src/main/webapp/WEB-INF/web.xml 2014-07-08 09:31:46 UTC (rev 2133) @@ -32,23 +32,24 @@ <session-timeout>600</session-timeout> </session-config> + <!-- TODO enable --> <!-- prevent excessive caching of js files --> - <filter> - <filter-name>ExpiresFilter</filter-name> - <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class> - <init-param> - <param-name>ExpiresByType image</param-name> - <param-value>access plus 10 minutes</param-value> - </init-param> - <init-param> - <param-name>ExpiresByType text/css</param-name> - <param-value>access plus 10 minutes</param-value> - </init-param> - <init-param> - <param-name>ExpiresByType application/javascript</param-name> - <param-value>access plus 10 minutes</param-value> - </init-param> - </filter> + <!--<filter>--> + <!--<filter-name>ExpiresFilter</filter-name>--> + <!--<filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>--> + <!--<init-param>--> + <!--<param-name>ExpiresByType image</param-name>--> + <!--<param-value>access plus 10 minutes</param-value>--> + <!--</init-param>--> + <!--<init-param>--> + <!--<param-name>ExpiresByType text/css</param-name>--> + <!--<param-value>access plus 10 minutes</param-value>--> + <!--</init-param>--> + <!--<init-param>--> + <!--<param-name>ExpiresByType application/javascript</param-name>--> + <!--<param-value>access plus 10 minutes</param-value>--> + <!--</init-param>--> + <!--</filter>--> <filter> <filter-name>struts-prepare</filter-name> @@ -85,10 +86,12 @@ <listener-class>fr.ifremer.wao.web.WaoApplicationListener</listener-class> </listener> - <filter-mapping> - <filter-name>ExpiresFilter</filter-name> - <url-pattern>/*</url-pattern> - <dispatcher>REQUEST</dispatcher> - </filter-mapping> + <!-- TODO enable --> + <!--<filter-mapping>--> + <!--<filter-name>ExpiresFilter</filter-name>--> + <!--<url-pattern>/*</url-pattern>--> + <!--<dispatcher>REQUEST</dispatcher>--> + <!--</filter-mapping>--> + </web-app>