Wao-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
June 2010
- 3 participants
- 97 discussions
[Suiviobsmer-commits] r494 - trunk/wao-business/src/main/java/fr/ifremer/wao/bean
by fdesbois@users.labs.libre-entreprise.org 07 Jun '10
by fdesbois@users.labs.libre-entreprise.org 07 Jun '10
07 Jun '10
Author: fdesbois
Date: 2010-06-07 19:43:01 +0000 (Mon, 07 Jun 2010)
New Revision: 494
Log:
Ano #2327 : Don't manage contact fromDate in prepareQueryForSampling, Only use it for contact createDate property (not even tideBeginDate).
Modified:
trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java 2010-06-07 19:02:26 UTC (rev 493)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java 2010-06-07 19:43:01 UTC (rev 494)
@@ -27,6 +27,7 @@
import fr.ifremer.wao.entity.Contact;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import org.nuiton.topia.framework.TopiaQuery;
import org.nuiton.topia.persistence.TopiaEntity;
@@ -43,35 +44,36 @@
@Override
public TopiaQuery prepareQueryForContact(TopiaQuery query) {
- String contact = query.getMainAlias();
+ String contactAlias = query.getMainAlias();
// OBSERVER
if (getObserver() != null) {
String observerProperty =
- TopiaQuery.getProperty(contact, Contact.OBSERVER);
+ TopiaQuery.getProperty(contactAlias, Contact.OBSERVER);
query.add(observerProperty, getObserver());
}
// Company filter is managed by SamplingFilter because the company is
// linked with the sampleRow instead of contact user
-
- // FIXME-fdesbois-2010-06-07 ANO #2327 : problem on filtering fromDate for contacts : need to be filtered on topiaCreateDate of Contact
- if (isSamplingFiltered() || getFromDate() != null || getCompany() != null) {
+ Date fromDate = getFromDate();
+ // Ano #2327 : Reset fromDate, don't manage it in prepareQueryForSampling
+ this.fromDate = null;
+ if (isSamplingFiltered() || getCompany() != null) {
String sampleRowProperty =
- TopiaQuery.getProperty(contact, Contact.SAMPLE_ROW);
+ TopiaQuery.getProperty(contactAlias, Contact.SAMPLE_ROW);
query = prepareQueryForSampling(query, sampleRowProperty);
}
- String boatProperty = TopiaQuery.getProperty(contact, Contact.BOAT);
+ String boatProperty = TopiaQuery.getProperty(contactAlias, Contact.BOAT);
query = prepareQueryForBoat(query, boatProperty);
// MAMMALS_OBSERVATION and MAMMALS_CAPTURE
String mammalsObsProperty =
- TopiaQuery.getProperty(contact, Contact.MAMMALS_OBSERVATION);
+ TopiaQuery.getProperty(contactAlias, Contact.MAMMALS_OBSERVATION);
String mammalsCaptProperty =
- TopiaQuery.getProperty(contact, Contact.MAMMALS_CAPTURE);
+ TopiaQuery.getProperty(contactAlias, Contact.MAMMALS_CAPTURE);
if (getMammalsObservation() && getMammalsCapture()) {
query.add(mammalsObsProperty + " = :mammals OR "
@@ -95,7 +97,7 @@
programValidValues.add(null);
}
String programValidProperty =
- TopiaQuery.getProperty(contact, Contact.VALIDATION_PROGRAM);
+ TopiaQuery.getProperty(contactAlias, Contact.VALIDATION_PROGRAM);
query.add(programValidProperty, programValidValues.toArray());
// VALIDATION_COMPANY
@@ -110,29 +112,34 @@
companyValidValues.add(null);
}
String companyValidProperty =
- TopiaQuery.getProperty(contact, Contact.VALIDATION_COMPANY);
+ TopiaQuery.getProperty(contactAlias, Contact.VALIDATION_COMPANY);
query.add(companyValidProperty, companyValidValues.toArray());
// STATE
if (getState() != null) {
String stateProperty =
- TopiaQuery.getProperty(contact, Contact.STATE);
+ TopiaQuery.getProperty(contactAlias, Contact.STATE);
query.add(stateProperty, getState().ordinal());
}
// FROM_DATE
- if (getFromDate() != null) {
+ if (fromDate != null) {
String tideBeginDateProperty =
- TopiaQuery.getProperty(contact, Contact.TIDE_BEGIN_DATE);
+ TopiaQuery.getProperty(contactAlias, Contact.TIDE_BEGIN_DATE);
String createDateProperty =
- TopiaQuery.getProperty(contact, TopiaEntity.TOPIA_CREATE_DATE);
- query.add("(" + tideBeginDateProperty + " IS NOT NULL AND "
- + tideBeginDateProperty + " >= :fromDate)" +
- " OR (" + tideBeginDateProperty + " IS NULL AND "
- + createDateProperty + " >= :fromDate)");
- query.addParam("fromDate", getFromDate());
+ TopiaQuery.getProperty(contactAlias, TopiaEntity.TOPIA_CREATE_DATE);
+// query.add("(" + tideBeginDateProperty + " IS NOT NULL AND "
+// + tideBeginDateProperty + " >= :fromDate)" +
+// " OR (" + tideBeginDateProperty + " IS NULL AND "
+// + createDateProperty + " >= :fromDate)");
+// query.addParam("fromDate", getFromDate());
+
+ query.add(createDateProperty, TopiaQuery.Op.GE, fromDate);
}
+ // Reinitialize fromDate of the filter, don't know if it's really needed
+ this.fromDate = fromDate;
+
return query;
}
1
0
[Suiviobsmer-commits] r493 - in trunk: wao-business/src/main/java/fr/ifremer/wao/bean wao-business/src/main/java/fr/ifremer/wao/service wao-business/src/main/xmi wao-ui/src/main/java/fr/ifremer/wao/ui/pages
by fdesbois@users.labs.libre-entreprise.org 07 Jun '10
by fdesbois@users.labs.libre-entreprise.org 07 Jun '10
07 Jun '10
Author: fdesbois
Date: 2010-06-07 19:02:26 +0000 (Mon, 07 Jun 2010)
New Revision: 493
Log:
Use filter for exportSamplingPlan
Modified:
trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java
trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java
trunk/wao-business/src/main/xmi/wao.zargo
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java 2010-06-07 18:36:10 UTC (rev 492)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/ContactFilterImpl.java 2010-06-07 19:02:26 UTC (rev 493)
@@ -54,6 +54,9 @@
// Company filter is managed by SamplingFilter because the company is
// linked with the sampleRow instead of contact user
+
+
+ // FIXME-fdesbois-2010-06-07 ANO #2327 : problem on filtering fromDate for contacts : need to be filtered on topiaCreateDate of Contact
if (isSamplingFiltered() || getFromDate() != null || getCompany() != null) {
String sampleRowProperty =
TopiaQuery.getProperty(contact, Contact.SAMPLE_ROW);
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java 2010-06-07 18:36:10 UTC (rev 492)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java 2010-06-07 19:02:26 UTC (rev 493)
@@ -561,14 +561,14 @@
@Override
public InputStream executeExportSamplingPlanCsv(TopiaContext transaction,
- List<Object> errorArgs, WaoUser user, PeriodDates period)
+ List<Object> errorArgs, WaoUser user, SamplingFilter filter)
throws Exception {
CsvWriter writer = null;
try {
DateFormat dateFormat = SAMPLING.getDateFormat();
- errorArgs.add(dateFormat.format(period.getFromDate()));
- errorArgs.add(dateFormat.format(period.getThruDate()));
+// errorArgs.add(dateFormat.format(period.getFromDate()));
+// errorArgs.add(dateFormat.format(period.getThruDate()));
File file = File.createTempFile("wao-samplingPlan-", ".csv");
file.deleteOnExit();
@@ -581,6 +581,8 @@
// Date max = (Date)query.executeToObject("MAX(S." + SampleRow.PERIOD_END + ")");
// PeriodDates periodMax = new PeriodDates(min, max);
+
+ PeriodDates period = filter.getPeriod();
period.setPattern(SAMPLING.defaultDatePattern());
List<String> monthHeaders = period.getFormatedMonths();
@@ -592,19 +594,24 @@
// Get sampleRows from database filtered by company if needed
// (only for user) and period
SampleRowDAO dao = WaoDAOHelper.getSampleRowDAO(transaction);
- TopiaQuery query = dao.createQuery("S");
+ String sampleRowAlias = "S";
+ String sampleRowCodeProperty =
+ TopiaQuery.getProperty(sampleRowAlias, SampleRow.CODE);
+ TopiaQuery query = dao.createQuery(sampleRowAlias);
- // Evo #2227 : No filter on company for GUEST users, all samplingPlan can be exported
- if (!user.isAdmin() && !user.isGuest()) {
- query.add("S." + SampleRow.COMPANY, user.getCompany());
- }
+// // Evo #2227 : No filter on company for GUEST users, all samplingPlan can be exported
+// if (!user.isAdmin() && !user.isGuest()) {
+// query.add("S." + SampleRow.COMPANY, user.getCompany());
+// }
+//
+// // Prepare period dates
+// period.initDayOfMonthExtremities();
+// query.add("S." + SampleRow.PERIOD_BEGIN, Op.LT, period.getThruDate()).
+// add("S." + SampleRow.PERIOD_END, Op.GT, period.getFromDate());
- // Prepare period dates
- period.initDayOfMonthExtremities();
- query.add("S." + SampleRow.PERIOD_BEGIN, Op.LT, period.getThruDate()).
- add("S." + SampleRow.PERIOD_END, Op.GT, period.getFromDate());
+ filter.prepareQueryForSampling(query, sampleRowAlias);
- query.addOrder("S." + SampleRow.CODE);
+ query.addOrder(sampleRowCodeProperty);
List<SampleRow> rows = dao.findAllByQuery(query);
Modified: trunk/wao-business/src/main/xmi/wao.zargo
===================================================================
(Binary files differ)
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java 2010-06-07 18:36:10 UTC (rev 492)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java 2010-06-07 19:02:26 UTC (rev 493)
@@ -153,7 +153,7 @@
InputStream result = null;
try {
result = serviceSampling.exportSamplingPlanCsv(
- user, getPeriod());
+ user, getFilter());
} catch (WaoException eee) {
throw new IOException(eee);
}
1
0
07 Jun '10
Author: fdesbois
Date: 2010-06-07 18:36:10 +0000 (Mon, 07 Jun 2010)
New Revision: 492
Log:
Evo #2227 : Add Guest profile.
Added:
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/GenericSelectModel.java
Removed:
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/GenericSelectModel.java
Modified:
trunk/pom.xml
trunk/wao-business/src/main/java/fr/ifremer/wao/bean/UserRole.java
trunk/wao-business/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java
trunk/wao-business/src/main/java/fr/ifremer/wao/io/ExportHelper.java
trunk/wao-business/src/main/java/fr/ifremer/wao/io/SamplingExport.java
trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java
trunk/wao-business/src/main/xmi/wao.zargo
trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceSamplingImplTest.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/AbstractFilteredPage.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/RequiresAuthentication.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Index.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SampleRowForm.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java
trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/components/Layout.tml
trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Administration.properties
trunk/wao-ui/src/main/webapp/SamplingPlan.tml
trunk/wao-ui/src/main/webapp/css/common.css
trunk/wao-ui/src/main/webapp/css/main.css
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/pom.xml 2010-06-07 18:36:10 UTC (rev 492)
@@ -235,8 +235,10 @@
<!-- libraries version -->
<i18n.version>1.2.2</i18n.version>
<nuitonutils.version>1.2.2</nuitonutils.version>
- <topia.version>2.4-SNAPSHOT</topia.version>
- <eugene.version>2.0.2-SNAPSHOT</eugene.version>
+ <topia.version>2.3.3</topia.version>
+ <eugene.version>2.0.1</eugene.version>
+ <!--<topia.version>2.4-SNAPSHOT</topia.version>-->
+ <!--<eugene.version>2.0.2-SNAPSHOT</eugene.version>-->
<tapestry.version>5.1.0.5</tapestry.version>
</properties>
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/bean/UserRole.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/bean/UserRole.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/bean/UserRole.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -38,7 +38,9 @@
/** User/observer role **/
OBSERVER("Observateur"),
/** Coordinator role **/
- COORDINATOR("Coordinateur");
+ COORDINATOR("Coordinateur"),
+ /** Guest role **/
+ GUEST("Invité");
private String libelle;
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -83,6 +83,11 @@
}
@Override
+ public boolean isGuest() {
+ return getUserRole().equals(UserRole.GUEST);
+ }
+
+ @Override
public UserRole getUserRole() {
return UserRole.valueOf(getRole());
}
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/io/ExportHelper.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/io/ExportHelper.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/io/ExportHelper.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -27,6 +27,9 @@
import com.csvreader.CsvWriter;
import fr.ifremer.wao.io.WaoCsvHeader.IOHeader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.IOException;
/**
@@ -58,6 +61,8 @@
*/
public abstract class ExportHelper<H extends IOHeader> {
+ private static final Logger logger = LoggerFactory.getLogger(ExportHelper.class);
+
/** Writer used to record data **/
protected CsvWriter writer;
@@ -82,7 +87,7 @@
/**
* Record a value for a header corresponding to the H generic type from
- * {@link WaoCsvReader } class.
+ * {@link IOHeader} class.
*
* @param header IOHeader used to record the value (column in the file)
* @param value the value to record
@@ -91,7 +96,7 @@
/**
* Return the header String value based on index. All matching integers for
- * headers are defined in {@link WaoCsvReader } class.
+ * headers are defined in {@link IOHeader} class.
*
* @param index of the header
* @return the String value of the header
@@ -108,7 +113,25 @@
*/
public void writeHeaders() throws IOException {
for (int i = 0; i < nbHeaders; i++) {
+ // Always use "" for headers
+// String header = null;
+//
+// if (i == 0) {
+// header = new StringBuilder("\"").
+// append(getHeaderValue(i)).
+// append("\"").
+// toString();
+// } else {
+// header = getHeaderValue(i);
+// }
+//
+// if (logger.isDebugEnabled()) {
+// logger.debug("Header " + i + " : " + getHeaderValue(i));
+// logger.debug("Header " + i + " with StringBuilder : " + header);
+// }
+
String header = getHeaderValue(i);
+
writer.write(header);
}
writer.endRecord();
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/io/SamplingExport.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/io/SamplingExport.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/io/SamplingExport.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -110,9 +110,10 @@
String real = String.valueOf(sampleMonth.getRealTidesValue());
// The admin as only expected value (to be the same as
// in import)
- if (user.isAdmin()) {
- record(index, expected); //record[index] = expected;
- // The user as both expected and real values
+ // Evo #2227 : Guest users have only access to expected values
+ if (user.isAdmin() || user.isGuest()) {
+ record(index, expected);
+ // Other users have both expected and real values
} else {
record(index, expected + " (" + real + ")");
}
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceSamplingImpl.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -315,8 +315,7 @@
@Override
public FacadeRow executeGetSampleRowsOrderedByFishingZone(
- TopiaContext transaction,
- SamplingFilter filter, Company company)
+ TopiaContext transaction, SamplingFilter filter)
throws TopiaException {
FacadeRow result = new FacadeRowImpl();
result.setEstimatedTides(filter.getEstimatedTides());
@@ -324,23 +323,46 @@
SampleRowDAO dao = WaoDAOHelper.getSampleRowDAO(transaction);
- TopiaQuery query = dao.createQuery("S").addDistinct().
- addFrom(FishingZone.class, "Z").
- add("S IN elements(Z." + FishingZone.SAMPLE_ROW + ")");
+ // FishingZone properties
+ String fishingZoneAlias = "Z";
+ String fishingZoneFacadeProperty =
+ TopiaQuery.getProperty(fishingZoneAlias, FishingZone.FACADE_NAME);
+ String fishingZoneSectorProperty =
+ TopiaQuery.getProperty(fishingZoneAlias, FishingZone.SECTOR_NAME);
+ String fishingZoneDistrictProperty =
+ TopiaQuery.getProperty(fishingZoneAlias, FishingZone.DISTRICT_CODE);
+ String fishingZoneSampleRowProperty =
+ TopiaQuery.getProperty(fishingZoneAlias, FishingZone.SAMPLE_ROW);
- filter.prepareQueryForSampling(query, "S", "Z");
+ // SampleRow properties
+ String sampleRowAlias = "S";
+ String sampleRowCodeProperty =
+ TopiaQuery.getProperty(sampleRowAlias, SampleRow.CODE);
- if (company != null) {
- query.add("S." + SampleRow.COMPANY, company);
- }
+ // Query
+ TopiaQuery query = dao.createQuery(sampleRowAlias).addDistinct().
+ addFrom(FishingZone.class, fishingZoneAlias).
+ // TODO-fdesbois-2010-06-07 for ToPIA 2.4 : replace this statement by addInElements
+ add(sampleRowAlias + " IN elements(" + fishingZoneSampleRowProperty + ")");
+ filter.prepareQueryForSampling(query, sampleRowAlias, fishingZoneAlias);
+
+ // Company is now a part of filter and will be set in previous method
+// if (company != null) {
+// query.add("S." + SampleRow.COMPANY, company);
+// }
+
// Order By facade, sector, districtCode, sampleRowCode
- String zoneOrder = "Z." + FishingZone.FACADE_NAME + " , " +
- "Z." + FishingZone.SECTOR_NAME + ", " +
- "Z." + FishingZone.DISTRICT_CODE;
- query.addOrder(zoneOrder, "S." + SampleRow.CODE).
- addSelect(zoneOrder);
+ query.addOrder(fishingZoneFacadeProperty,
+ fishingZoneSectorProperty,
+ fishingZoneDistrictProperty,
+ sampleRowCodeProperty).
+ // Need fishingZone properties in Select to use them in orderBy
+ addSelect(fishingZoneFacadeProperty,
+ fishingZoneSectorProperty,
+ fishingZoneDistrictProperty);
+
if (log.isDebugEnabled()) {
log.debug("Query : " + query);
}
@@ -572,7 +594,8 @@
SampleRowDAO dao = WaoDAOHelper.getSampleRowDAO(transaction);
TopiaQuery query = dao.createQuery("S");
- if (!user.isAdmin()) {
+ // Evo #2227 : No filter on company for GUEST users, all samplingPlan can be exported
+ if (!user.isAdmin() && !user.isGuest()) {
query.add("S." + SampleRow.COMPANY, user.getCompany());
}
@@ -596,7 +619,9 @@
export.record(SAMPLING.PLAN_CODE, row.getCode());
Company company = row.getCompany();
- if (company != null) {
+
+ // Evo #2227 : Guest users don't have access to companyName
+ if (company != null && !user.isGuest()) {
export.record(SAMPLING.SOCIETE_NOM, company.getName());
}
@@ -632,28 +657,6 @@
export.recordMonths(row);
-// for (int i = 0; i < monthHeaders.size(); i++) {
-// // Get date from monthHeaders list
-// Date month = dateFormat.parse(monthHeaders.get(i));
-// // Retrieve sampleMonth corresponding
-// SampleMonth sampleMonth = row.getSampleMonth(month);
-// // Add it to the file if it exists
-// if (sampleMonth != null) {
-// // Prepare index for record
-// int index = SAMPLING.getStartIndexForMonths() + i;
-// String expected = String.valueOf(sampleMonth.getExpectedTidesValue());
-// String real = String.valueOf(sampleMonth.getRealTidesValue());
-// // The admin as only expected value (to be the same as
-// // in import)
-// if (user.getAdmin()) {
-// export.record(index, expected); //record[index] = expected;
-// // The user as both expected and real values
-// } else {
-// export.record(index, expected + " (" + real + ")");
-// }
-// }
-// }
-
export.writeRecord();
}
@@ -857,7 +860,6 @@
* @throws IOException for CsvReader errors
* @throws TopiaException for SampleMonthDAO errors
* @throws ParseException for format errors
- * @see #getMonthAndYear(java.lang.String)
*/
protected void updateRow(TopiaContext transaction, SampleRow sampleRow, CsvReader reader)
throws IOException, TopiaException, ParseException {
Modified: trunk/wao-business/src/main/xmi/wao.zargo
===================================================================
(Binary files differ)
Modified: trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceSamplingImplTest.java
===================================================================
--- trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceSamplingImplTest.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-business/src/test/java/fr/ifremer/wao/service/ServiceSamplingImplTest.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -263,7 +263,7 @@
SamplingFilter filter = new SamplingFilterImpl();
filter.setPeriod(new PeriodDates(begin, end));
// RESULT : [2010_0002, 2010_0004, 2010_0001, 2010_0003]
- FacadeRow facade = serviceSampling.getSampleRowsOrderedByFishingZone(filter, null);
+ FacadeRow facade = serviceSampling.getSampleRowsOrderedByFishingZone(filter);
List<SampleRow> rows = facade.getValues();
assertEquals(4, rows.size());
SampleRow resultRow0 = rows.get(0);
@@ -293,7 +293,7 @@
end = new GregorianCalendar(2020, 11, 31, 0, 0, 0);
filter.setPeriod(new PeriodDates(begin, end));
// RESULT : [2010_0002, 2010_0004, 2010_0001]
- facade = serviceSampling.getSampleRowsOrderedByFishingZone(filter, null);
+ facade = serviceSampling.getSampleRowsOrderedByFishingZone(filter);
rows = facade.getValues();
assertEquals(3, rows.size());
resultRow0 = rows.get(0);
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/AbstractFilteredPage.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/AbstractFilteredPage.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/AbstractFilteredPage.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -36,6 +36,8 @@
import fr.ifremer.wao.service.ServiceUser;
import java.util.ArrayList;
import java.util.List;
+
+import fr.ifremer.wao.ui.data.GenericSelectModel;
import org.apache.tapestry5.OptionModel;
import org.apache.tapestry5.SelectModel;
import org.apache.tapestry5.annotations.Persist;
@@ -142,7 +144,8 @@
*/
public void initCompanyFilter() {
// Very very important to do that at beginning
- if (!user.isAdmin()) {
+ // Evo #2227 : Guest user has no default company filter
+ if (!user.isAdmin() && !user.isGuest()) {
if (log.isDebugEnabled()) {
log.debug("Company filtered : " + user.getCompany().getName());
}
Deleted: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/GenericSelectModel.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/GenericSelectModel.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/GenericSelectModel.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -1,163 +0,0 @@
-/*
- * #%L
- * Wao :: Web Interface
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2010 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-package fr.ifremer.wao.ui.base;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import java.util.Map;
-import org.apache.tapestry5.OptionGroupModel;
-import org.apache.tapestry5.OptionModel;
-import org.apache.tapestry5.internal.OptionGroupModelImpl;
-import org.apache.tapestry5.internal.OptionModelImpl;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.ioc.services.PropertyAccess;
-import org.apache.tapestry5.ioc.services.PropertyAdapter;
-import org.apache.tapestry5.util.AbstractSelectModel;
-import org.slf4j.Logger;
-
-/**
- * GenericSelectModel.java
- *
- * Based on IdSelectModel from <http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/select/easyid>
- * A generic selection model whose value is the id of the chosen object, not the object itself.
- *
- * @param <T>
- * @author fdesbois <fdesbois at codelutin.com>
- */
-public class GenericSelectModel<T> extends AbstractSelectModel {
-
- private List<T> list;
- private Map<String, List<T>> map;
- private PropertyAdapter labelFieldAdapter;
- private PropertyAdapter idFieldAdapter;
-
- @Inject
- private Logger log;
-
- /**
- * @param list the list of objects you want modeled in a Select component. These objects MUST implement
- * equals(Object obj) and hashCode(). If the objects are JPA entities, ensure their implementations of
- * equals(Object obj) and hashCode() return the same thing for different instances of the same detached
- * entity.
- * @param clazz the class of objects in the list.
- * @param labelField the name of the field you want displayed as the label in the selection list, eg. "name".
- * @param idField the name of the field which is the unique identifier of each object in the list, eg. "id". This is
- * used in the value property of the Select component.
- * @param access Declare a PropertyAccess injected into your page (eg. Inject private PropertyAccess _access) then pass it in here.
- *
- */
- public GenericSelectModel(List<T> list, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
- init(clazz, labelField, idField, access);
-
- this.list = list;
- }
-
- public GenericSelectModel(Map<String, List<T>> map, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
- init(clazz, labelField, idField, access);
-
- this.map = map;
- }
-
- private void init(Class<T> clazz, String labelField, String idField, PropertyAccess access) {
- if (clazz == null) {
- throw new IllegalArgumentException("clazz is required.");
- }
- if (idField == null) {
- throw new IllegalArgumentException("idField is required.");
- }
- if (labelField == null) {
- throw new IllegalArgumentException("labelField is required.");
- }
-
- this.idFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(idField);
- this.labelFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(labelField);
-
- if (idFieldAdapter == null) {
- throw new IllegalArgumentException("idField " + idField + " does not exist in class " + clazz + ".");
- }
- if (labelFieldAdapter == null) {
- throw new IllegalArgumentException("labelField " + idField + " does not exist in class " + clazz + ".");
- }
- }
-
- @Override
- public List<OptionGroupModel> getOptionGroups() {
- if (list != null) {
- return null;
- }
- List<OptionGroupModel> optionGroupModelList = new ArrayList<OptionGroupModel>();
- for (String key : map.keySet()) {
- optionGroupModelList.add(new OptionGroupModelImpl(key, false, getOptions(map.get(key))));
- }
- return optionGroupModelList;
- }
-
- @Override
- public List<OptionModel> getOptions() {
- if (map != null) {
- return null;
- }
- return getOptions(list);
- }
-
- private List<OptionModel> getOptions(List<T> list) {
- List<OptionModel> optionModelList = new ArrayList<OptionModel>();
- for (T obj : list) {
- optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), idFieldAdapter.get(obj)));
- }
- return optionModelList;
- }
-
- public List<T> getList() {
- List<T> results;
- if (map != null) {
- results = new ArrayList<T>();
- for (String key : map.keySet()) {
- results.addAll(map.get(key));
- }
- } else {
- results = list;
- }
- return results;
- }
-
- public T findObject(String id) {
- if (id != null) {
- for (T current : getList()) {
- Object currentId = idFieldAdapter.get(current);
- if (currentId.equals(id)) {
- return current;
- }
- }
- }
- return null;
- }
-
- private String nvl(Object o) {
- return o == null ? "" : o.toString();
- }
-}
-
Copied: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/GenericSelectModel.java (from rev 490, trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/base/GenericSelectModel.java)
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/GenericSelectModel.java (rev 0)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/GenericSelectModel.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -0,0 +1,163 @@
+/*
+ * #%L
+ * Wao :: Web Interface
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2010 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+package fr.ifremer.wao.ui.data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import java.util.Map;
+import org.apache.tapestry5.OptionGroupModel;
+import org.apache.tapestry5.OptionModel;
+import org.apache.tapestry5.internal.OptionGroupModelImpl;
+import org.apache.tapestry5.internal.OptionModelImpl;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.ioc.services.PropertyAccess;
+import org.apache.tapestry5.ioc.services.PropertyAdapter;
+import org.apache.tapestry5.util.AbstractSelectModel;
+import org.slf4j.Logger;
+
+/**
+ * GenericSelectModel.java
+ *
+ * Based on IdSelectModel from <http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/select/easyid>
+ * A generic selection model whose value is the id of the chosen object, not the object itself.
+ *
+ * @param <T>
+ * @author fdesbois <fdesbois at codelutin.com>
+ */
+public class GenericSelectModel<T> extends AbstractSelectModel {
+
+ private List<T> list;
+ private Map<String, List<T>> map;
+ private PropertyAdapter labelFieldAdapter;
+ private PropertyAdapter idFieldAdapter;
+
+ @Inject
+ private Logger log;
+
+ /**
+ * @param list the list of objects you want modeled in a Select component. These objects MUST implement
+ * equals(Object obj) and hashCode(). If the objects are JPA entities, ensure their implementations of
+ * equals(Object obj) and hashCode() return the same thing for different instances of the same detached
+ * entity.
+ * @param clazz the class of objects in the list.
+ * @param labelField the name of the field you want displayed as the label in the selection list, eg. "name".
+ * @param idField the name of the field which is the unique identifier of each object in the list, eg. "id". This is
+ * used in the value property of the Select component.
+ * @param access Declare a PropertyAccess injected into your page (eg. Inject private PropertyAccess _access) then pass it in here.
+ *
+ */
+ public GenericSelectModel(List<T> list, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
+ init(clazz, labelField, idField, access);
+
+ this.list = list;
+ }
+
+ public GenericSelectModel(Map<String, List<T>> map, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
+ init(clazz, labelField, idField, access);
+
+ this.map = map;
+ }
+
+ private void init(Class<T> clazz, String labelField, String idField, PropertyAccess access) {
+ if (clazz == null) {
+ throw new IllegalArgumentException("clazz is required.");
+ }
+ if (idField == null) {
+ throw new IllegalArgumentException("idField is required.");
+ }
+ if (labelField == null) {
+ throw new IllegalArgumentException("labelField is required.");
+ }
+
+ this.idFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(idField);
+ this.labelFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(labelField);
+
+ if (idFieldAdapter == null) {
+ throw new IllegalArgumentException("idField " + idField + " does not exist in class " + clazz + ".");
+ }
+ if (labelFieldAdapter == null) {
+ throw new IllegalArgumentException("labelField " + idField + " does not exist in class " + clazz + ".");
+ }
+ }
+
+ @Override
+ public List<OptionGroupModel> getOptionGroups() {
+ if (list != null) {
+ return null;
+ }
+ List<OptionGroupModel> optionGroupModelList = new ArrayList<OptionGroupModel>();
+ for (String key : map.keySet()) {
+ optionGroupModelList.add(new OptionGroupModelImpl(key, false, getOptions(map.get(key))));
+ }
+ return optionGroupModelList;
+ }
+
+ @Override
+ public List<OptionModel> getOptions() {
+ if (map != null) {
+ return null;
+ }
+ return getOptions(list);
+ }
+
+ private List<OptionModel> getOptions(List<T> list) {
+ List<OptionModel> optionModelList = new ArrayList<OptionModel>();
+ for (T obj : list) {
+ optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), idFieldAdapter.get(obj)));
+ }
+ return optionModelList;
+ }
+
+ public List<T> getList() {
+ List<T> results;
+ if (map != null) {
+ results = new ArrayList<T>();
+ for (String key : map.keySet()) {
+ results.addAll(map.get(key));
+ }
+ } else {
+ results = list;
+ }
+ return results;
+ }
+
+ public T findObject(String id) {
+ if (id != null) {
+ for (T current : getList()) {
+ Object currentId = idFieldAdapter.get(current);
+ if (currentId.equals(id)) {
+ return current;
+ }
+ }
+ }
+ return null;
+ }
+
+ private String nvl(Object o) {
+ return o == null ? "" : o.toString();
+ }
+}
+
Property changes on: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/GenericSelectModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/RequiresAuthentication.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/RequiresAuthentication.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/RequiresAuthentication.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -24,7 +24,7 @@
// By default everybody can access
UserRole[] value() default
- {UserRole.OBSERVER, UserRole.ADMIN, UserRole.COORDINATOR};
+ {UserRole.OBSERVER, UserRole.ADMIN, UserRole.COORDINATOR, UserRole.GUEST};
boolean readOnlyAllowed() default true;
}
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -34,7 +34,7 @@
import fr.ifremer.wao.entity.WaoUser;
import fr.ifremer.wao.service.ServiceReferential;
import fr.ifremer.wao.service.ServiceUser;
-import fr.ifremer.wao.ui.base.GenericSelectModel;
+import fr.ifremer.wao.ui.data.GenericSelectModel;
import fr.ifremer.wao.ui.components.Layout;
import fr.ifremer.wao.ui.data.RequiresAuthentication;
import fr.ifremer.wao.ui.services.WaoManager;
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -27,6 +27,7 @@
import fr.ifremer.wao.WaoBusinessException;
import fr.ifremer.wao.WaoException;
+import fr.ifremer.wao.bean.UserRole;
import fr.ifremer.wao.entity.ActivityCalendar;
import fr.ifremer.wao.entity.ActivityMonth;
import fr.ifremer.wao.entity.ActivityProfession;
@@ -55,7 +56,7 @@
*
* @author fdesbois <fdesbois at codelutin.com>
*/
- at RequiresAuthentication
+ at RequiresAuthentication({UserRole.ADMIN, UserRole.COORDINATOR, UserRole.OBSERVER})
@IncludeStylesheet("context:css/boats.css")
public class BoatActivityCalendar {
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -27,11 +27,8 @@
import fr.ifremer.wao.WaoBusinessException;
import fr.ifremer.wao.WaoException;
-import fr.ifremer.wao.bean.BoatFilterImpl;
+import fr.ifremer.wao.bean.*;
import fr.ifremer.wao.entity.Boat;
-import fr.ifremer.wao.bean.BoatFilter;
-import fr.ifremer.wao.bean.CompanyBoatInfos;
-import fr.ifremer.wao.bean.SamplingFilter;
import fr.ifremer.wao.entity.BoatInfos;
import fr.ifremer.wao.entity.Company;
import fr.ifremer.wao.entity.Contact;
@@ -44,13 +41,10 @@
import fr.ifremer.wao.service.ServiceSampling;
import fr.ifremer.wao.service.ServiceUser;
import fr.ifremer.wao.ui.base.AbstractFilteredPage;
-import fr.ifremer.wao.ui.data.BusinessUtils;
-import fr.ifremer.wao.ui.base.GenericSelectModel;
+import fr.ifremer.wao.ui.data.*;
+import fr.ifremer.wao.ui.data.GenericSelectModel;
import fr.ifremer.wao.ui.components.FeedBack;
import fr.ifremer.wao.ui.components.Layout;
-import fr.ifremer.wao.ui.data.BoatDataSource;
-import fr.ifremer.wao.ui.data.ExportStreamResponse;
-import fr.ifremer.wao.ui.data.RequiresAuthentication;
import fr.ifremer.wao.ui.services.WaoManager;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -92,7 +86,7 @@
*
* @author fdesbois <fdesbois at codelutin.com>
*/
- at RequiresAuthentication
+ at RequiresAuthentication({UserRole.ADMIN, UserRole.COORDINATOR, UserRole.OBSERVER})
@IncludeStylesheet("context:css/boats.css")
public class Boats extends AbstractFilteredPage {
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -40,12 +40,9 @@
import fr.ifremer.wao.service.ServiceContact;
import fr.ifremer.wao.service.ServiceUser;
import fr.ifremer.wao.ui.base.AbstractFilteredPage;
-import fr.ifremer.wao.ui.data.ContactDataSource;
-import fr.ifremer.wao.ui.data.BusinessUtils;
-import fr.ifremer.wao.ui.base.GenericSelectModel;
+import fr.ifremer.wao.ui.data.*;
+import fr.ifremer.wao.ui.data.GenericSelectModel;
import fr.ifremer.wao.ui.components.Layout;
-import fr.ifremer.wao.ui.data.ExportStreamResponse;
-import fr.ifremer.wao.ui.data.RequiresAuthentication;
import fr.ifremer.wao.ui.services.ContactModelFactory;
import fr.ifremer.wao.ui.services.WaoManager;
import java.io.IOException;
@@ -84,7 +81,7 @@
*
* @author fdesbois <fdesbois at codelutin.com>
*/
- at RequiresAuthentication
+ at RequiresAuthentication({UserRole.ADMIN, UserRole.COORDINATOR, UserRole.OBSERVER})
@IncludeStylesheet("context:css/contacts.css")
public class Contacts extends AbstractFilteredPage {
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Index.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Index.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Index.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -26,6 +26,7 @@
package fr.ifremer.wao.ui.pages;
import fr.ifremer.wao.WaoException;
+import fr.ifremer.wao.bean.UserRole;
import fr.ifremer.wao.entity.News;
import fr.ifremer.wao.entity.NewsImpl;
import fr.ifremer.wao.entity.WaoUser;
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SampleRowForm.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SampleRowForm.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SampleRowForm.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -41,7 +41,7 @@
import fr.ifremer.wao.service.ServiceReferential;
import fr.ifremer.wao.service.ServiceSampling;
import fr.ifremer.wao.service.ServiceUser;
-import fr.ifremer.wao.ui.base.GenericSelectModel;
+import fr.ifremer.wao.ui.data.GenericSelectModel;
import fr.ifremer.wao.ui.data.RequiresAuthentication;
import fr.ifremer.wao.ui.data.WaoPropertyChangeListener;
import fr.ifremer.wao.ui.services.WaoManager;
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/SamplingPlan.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -27,10 +27,7 @@
import fr.ifremer.wao.WaoBusinessException;
import fr.ifremer.wao.WaoException;
-import fr.ifremer.wao.bean.FacadeRow;
-import fr.ifremer.wao.bean.ImportResults;
-import fr.ifremer.wao.bean.SamplingFilter;
-import fr.ifremer.wao.bean.SamplingFilterImpl;
+import fr.ifremer.wao.bean.*;
import fr.ifremer.wao.entity.Company;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.SampleMonth;
@@ -178,12 +175,6 @@
private boolean reset;
-// @Property
-// private Date periodBegin;
-//
-// @Property
-// private Date periodEnd;
-
public PeriodDates getPeriod() {
return getFilter().getPeriod();
}
@@ -226,15 +217,9 @@
reset = true;
}
-// void onSuccessFromPeriodForm() {
-// // Reset data
-// data = null;
-// }
Object onSuccessFromFiltersForm() {
if (isEdited()) {
- // Reset data
-// data = null;
return filtersZone.getBody();
}
if (reset) {
@@ -303,14 +288,9 @@
* @throws WaoException
*/
public List<SampleRow> getData() throws WaoException {
- if (data == null) {
- Company company = null;
- if (!user.isAdmin()) {
- company = user.getCompany();
- }
+ if (data == null) {
FacadeRow facade =
- serviceSampling.getSampleRowsOrderedByFishingZone(
- getFilter(), company);
+ serviceSampling.getSampleRowsOrderedByFishingZone(getFilter());
data = facade.getValues();
}
return data;
@@ -395,33 +375,11 @@
return validMonth && getNbTidesReal() != null;
}
-// public int getTotalTidesExpected() {
-// long start = System.currentTimeMillis();
-// int total = 0;
-// for (Date currentMonth : getMonths()) {
-// SampleMonth sampleMonth = row.getSampleMonth(currentMonth);
-// if (sampleMonth != null) {
-// total += sampleMonth.getExpectedTidesValue();
-// }
-// }
-// long stop = System.currentTimeMillis();
-// totalTidesExpectedTime += (stop - start);
-// return total;
-// }
-//
-// public int getTotalTidesReal() {
-// long start = System.currentTimeMillis();
-// int total = 0;
-// for (Date currentMonth : getMonths()) {
-// SampleMonth sampleMonth = row.getSampleMonth(currentMonth);
-// if (sampleMonth != null) {
-// total += sampleMonth.getRealTidesValue();
-// }
-// }
-// long stop = System.currentTimeMillis();
-// totalTidesRealTime += (stop - start);
-// return total;
-// }
+ public boolean canDisplayTidesReal() {
+ // Evo #2227 : Guest users can't have access to real tides values
+ boolean result = hasNbTidesReal() && !user.isGuest();
+ return result;
+ }
public String getTotalPercentage() {
double result = 0;
@@ -528,7 +486,7 @@
serviceSampling.deleteSampleRow(row);
}
- public boolean canAccessBoats() {
+ public boolean isRowNotFinished() {
// Test if the row isFinished with a gap of 1 month (today - 1 month)
return !row.isFinished(-1);
}
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Synthesis.java 2010-06-07 18:36:10 UTC (rev 492)
@@ -26,12 +26,7 @@
package fr.ifremer.wao.ui.pages;
import fr.ifremer.wao.WaoException;
-import fr.ifremer.wao.bean.BoardingResult;
-import fr.ifremer.wao.bean.ContactState;
-import fr.ifremer.wao.bean.ContactStateStatistics;
-import fr.ifremer.wao.bean.ContactAverageReactivity;
-import fr.ifremer.wao.bean.SamplingFilter;
-import fr.ifremer.wao.bean.SamplingFilterImpl;
+import fr.ifremer.wao.bean.*;
import fr.ifremer.wao.entity.Company;
import fr.ifremer.wao.entity.WaoUser;
import fr.ifremer.wao.service.ServiceSynthesis;
@@ -73,7 +68,7 @@
*
* @author fdesbois <fdesbois at codelutin.com>
*/
- at RequiresAuthentication
+ at RequiresAuthentication({UserRole.ADMIN, UserRole.COORDINATOR, UserRole.OBSERVER})
@IncludeStylesheet("context:css/synthesis.css")
public class Synthesis extends AbstractFilteredPage {
Modified: trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/components/Layout.tml
===================================================================
--- trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/components/Layout.tml 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/components/Layout.tml 2010-06-07 18:36:10 UTC (rev 492)
@@ -86,17 +86,33 @@
Plan d'Echantillonnage
</li>
<li class="sep"> </li>
- <li class="link${adminClass} ${boatsSelected}" onclick="location.href='${contextPath}/boats'" title="Liste des navires">
- Navires
- </li>
- <li class="sep"> </li>
- <li class="link${adminClass} ${contactsSelected}" onclick="location.href='${contextPath}/contacts'" title="Liste des contacts">
- Contacts
- </li>
- <li class="sep"> </li>
- <li class="link${adminClass} ${synthesisSelected}" onclick="location.href='${contextPath}/synthesis'" title="Synthèses et indicateurs">
- Synthèse
- </li>
+ <t:unless t:test="currentUser.guest">
+ <li class="link${adminClass} ${boatsSelected}" onclick="location.href='${contextPath}/boats'" title="Liste des navires">
+ Navires
+ </li>
+ <li class="sep"> </li>
+ <li class="link${adminClass} ${contactsSelected}" onclick="location.href='${contextPath}/contacts'" title="Liste des contacts">
+ Contacts
+ </li>
+ <li class="sep"> </li>
+ <li class="link${adminClass} ${synthesisSelected}" onclick="location.href='${contextPath}/synthesis'" title="Synthèses et indicateurs">
+ Synthèse
+ </li>
+ <p:else>
+ <!-- Menu disabled for Guest user -->
+ <li class="disabled" title="Liste des navires">
+ Navires
+ </li>
+ <li class="sep"> </li>
+ <li class="disabled" title="Liste des contacts">
+ Contacts
+ </li>
+ <li class="sep"> </li>
+ <li class="disabled" title="Synthèses et indicateurs">
+ Synthèse
+ </li>
+ </p:else>
+ </t:unless>
<t:if t:test="currentUser.admin">
<li class="sep"> </li>
<li class="link${adminClass} ${adminSelected}" onclick="location.href='${contextPath}/administration'" title="Administration">
Modified: trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Administration.properties
===================================================================
--- trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Administration.properties 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Administration.properties 2010-06-07 18:36:10 UTC (rev 492)
@@ -46,3 +46,4 @@
UserRole.ADMIN: Administrateur
UserRole.OBSERVER: Observateur
UserRole.COORDINATOR: Coordinateur
+UserRole.GUEST: Invit\u00e9
Modified: trunk/wao-ui/src/main/webapp/SamplingPlan.tml
===================================================================
--- trunk/wao-ui/src/main/webapp/SamplingPlan.tml 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/webapp/SamplingPlan.tml 2010-06-07 18:36:10 UTC (rev 492)
@@ -54,18 +54,20 @@
title="Exporter le plan d'échantillonnage du ${dateFormat.format(period.fromDate)} au ${dateFormat.format(period.thruDate)}" />
</a>
</span>
- <span>
- <a t:type="actionlink" t:id="changeFilterEstimatedTides">
- <t:if t:test="filter.estimatedTides">
- <img src="${asset:context:img/samplingPlan-real.png}" alt="Effort d'observations réalisé pour contacts validés"
- title="Afficher l'effort d'observations réalisé pour les contacts validés seulement" />
- <p:else>
- <img src="${asset:context:img/samplingPlan-estimated.png}" alt="Effort d'observations estimé pour contacts terminés"
- title="Afficher l'effort d'observations estimé pour les contacts validés ou non par la société" />
- </p:else>
- </t:if>
- </a>
- </span>
+ <t:unless t:test="user.guest">
+ <span>
+ <a t:type="actionlink" t:id="changeFilterEstimatedTides">
+ <t:if t:test="filter.estimatedTides">
+ <img src="${asset:context:img/samplingPlan-real.png}" alt="Effort d'observations réalisé pour contacts validés"
+ title="Afficher l'effort d'observations réalisé pour les contacts validés seulement" />
+ <p:else>
+ <img src="${asset:context:img/samplingPlan-estimated.png}" alt="Effort d'observations estimé pour contacts terminés"
+ title="Afficher l'effort d'observations estimé pour les contacts validés ou non par la société" />
+ </p:else>
+ </t:if>
+ </a>
+ </span>
+ </t:unless>
<t:if t:test="user.admin">
<span>
<a t:type="actionlink" t:id="toggleDisplayMode">
@@ -241,14 +243,17 @@
<t:loop source="months" value="month">
<td class="width50 acenter ${monthCurrentClass}">
${nbTidesExpected}
- <t:if t:test="hasNbTidesReal()">
+ <t:if t:test="canDisplayTidesReal()">
<span class="${realTidesClass}"><em>(${nbTidesReal})</em></span>
</t:if>
</td>
</t:loop>
<td class="width50 acenter bright">
<span t:type="ck/Tooltip" title="Infos" t:value="Total sur la période du ${dateFormat.format(period.fromDate)} au ${dateFormat.format(period.thruDate)}" t:effect="appear">
- ${row.totalTidesExpected} <em>(${row.totalTidesReal})</em><br /><strong>${totalPercentage}</strong>
+ ${row.totalTidesExpected}
+ <t:unless t:test="user.guest">
+ <em>(${row.totalTidesReal})</em><br /><strong>${totalPercentage}</strong>
+ </t:unless>
</span>
</td>
<td class="width60 acenter"><t:output t:value="row.averageTideTime" t:format="numberFormat" /></td>
@@ -262,14 +267,16 @@
</td>
<!-- Actions -->
<td class="${actionsClass} bright">
- <t:if t:test="canAccessBoats()">
- <a t:type="pagelink" t:page="boats" t:context="row.topiaId">
- <img src="${asset:context:}/img/boat.png" alt="Navire" title="Voir les navires éligibles pour cette ligne"/>
- </a>
- <p:else>
- <img src="${asset:context:}/img/boat-unavailable-22px.png" alt="Navire impossible" title="Accès aux navires impossible, ligne terminée"/>
- </p:else>
- </t:if>
+ <t:unless t:test="user.guest">
+ <t:if t:test="rowNotFinished">
+ <a t:type="pagelink" t:page="boats" t:context="row.topiaId">
+ <img src="${asset:context:}/img/boat.png" alt="Navire" title="Voir les navires éligibles pour cette ligne"/>
+ </a>
+ <p:else>
+ <img src="${asset:context:}/img/boat-unavailable-22px.png" alt="Navire impossible" title="Accès aux navires impossible, ligne terminée"/>
+ </p:else>
+ </t:if>
+ </t:unless>
<a t:type="pagelink" t:page="sampleRowHistoric" t:context="row.code">
<img src="${asset:context:}/img/clock-22px.png" alt="Historique" title="Voir historique de la ligne"/>
</a>
Modified: trunk/wao-ui/src/main/webapp/css/common.css
===================================================================
--- trunk/wao-ui/src/main/webapp/css/common.css 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/webapp/css/common.css 2010-06-07 18:36:10 UTC (rev 492)
@@ -122,6 +122,7 @@
input.ico {
border: 0 none;
font-size: 0;
+ color: transparent;
width: 32px;
height: 32px;
cursor: pointer;
@@ -131,6 +132,7 @@
input.ico22px {
border: 0 none;
font-size: 0;
+ color: transparent;
width: 22px;
height: 22px;
cursor: pointer;
@@ -140,6 +142,7 @@
input.ico16px {
border: 0 none;
font-size: 0;
+ color: transparent;
width: 16px;
height: 16px;
cursor: pointer;
@@ -259,6 +262,7 @@
fieldset.user-form div.t-beaneditor input.t-beaneditor-submit {
border: 0 none;
font-size: 0;
+ color: transparent;
width: 32px;
height: 32px;
cursor: pointer;
Modified: trunk/wao-ui/src/main/webapp/css/main.css
===================================================================
--- trunk/wao-ui/src/main/webapp/css/main.css 2010-06-07 13:51:31 UTC (rev 491)
+++ trunk/wao-ui/src/main/webapp/css/main.css 2010-06-07 18:36:10 UTC (rev 492)
@@ -143,6 +143,13 @@
width: 23%;
}
+ul#so-menu li.disabled {
+ background-color: #e5e5e5;
+ color: white;
+ padding: 5px;
+ width: 23%;
+}
+
ul#so-menu li.admin {
width: 18% !important;
}
1
0
[Suiviobsmer-commits] r491 - in trunk/wao-ui/src/main/webapp: . css img
by fdesbois@users.labs.libre-entreprise.org 07 Jun '10
by fdesbois@users.labs.libre-entreprise.org 07 Jun '10
07 Jun '10
Author: fdesbois
Date: 2010-06-07 13:51:31 +0000 (Mon, 07 Jun 2010)
New Revision: 491
Log:
Evo #2326 : Change images for estimate/real calcul on samplingPlan + update css for chromium font-family
Added:
trunk/wao-ui/src/main/webapp/img/samplingPlan-estimated.png
trunk/wao-ui/src/main/webapp/img/samplingPlan-real.png
Modified:
trunk/wao-ui/src/main/webapp/SamplingPlan.tml
trunk/wao-ui/src/main/webapp/css/common.css
trunk/wao-ui/src/main/webapp/css/sampling.css
Modified: trunk/wao-ui/src/main/webapp/SamplingPlan.tml
===================================================================
--- trunk/wao-ui/src/main/webapp/SamplingPlan.tml 2010-06-02 12:07:07 UTC (rev 490)
+++ trunk/wao-ui/src/main/webapp/SamplingPlan.tml 2010-06-07 13:51:31 UTC (rev 491)
@@ -57,10 +57,10 @@
<span>
<a t:type="actionlink" t:id="changeFilterEstimatedTides">
<t:if t:test="filter.estimatedTides">
- <img src="${asset:context:img/true-22px.png}" alt="Effort d'observations réalisé pour contacts validés"
+ <img src="${asset:context:img/samplingPlan-real.png}" alt="Effort d'observations réalisé pour contacts validés"
title="Afficher l'effort d'observations réalisé pour les contacts validés seulement" />
<p:else>
- <img src="${asset:context:img/help-22px.png}" alt="Effort d'observations estimé pour contacts terminés"
+ <img src="${asset:context:img/samplingPlan-estimated.png}" alt="Effort d'observations estimé pour contacts terminés"
title="Afficher l'effort d'observations estimé pour les contacts validés ou non par la société" />
</p:else>
</t:if>
Modified: trunk/wao-ui/src/main/webapp/css/common.css
===================================================================
--- trunk/wao-ui/src/main/webapp/css/common.css 2010-06-02 12:07:07 UTC (rev 490)
+++ trunk/wao-ui/src/main/webapp/css/common.css 2010-06-07 13:51:31 UTC (rev 491)
@@ -33,7 +33,7 @@
* {
margin: 0;
padding: 0;
- font-family: Tahoma, Verdana, Arial, Helvetica, Courier New, Courier, mono;
+ font-family: Tahoma, Verdana, Arial, Helvetica, Courier New, Courier;
}
.fleft {
Modified: trunk/wao-ui/src/main/webapp/css/sampling.css
===================================================================
--- trunk/wao-ui/src/main/webapp/css/sampling.css 2010-06-02 12:07:07 UTC (rev 490)
+++ trunk/wao-ui/src/main/webapp/css/sampling.css 2010-06-07 13:51:31 UTC (rev 491)
@@ -47,6 +47,10 @@
font-size: 0.8em;
}
+div#so-sampling span {
+ margin-left: 5px;
+}
+
div#so-sampling div.admin div.so-import {
margin-left: 0;
margin-right: 0;
Added: trunk/wao-ui/src/main/webapp/img/samplingPlan-estimated.png
===================================================================
(Binary files differ)
Property changes on: trunk/wao-ui/src/main/webapp/img/samplingPlan-estimated.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wao-ui/src/main/webapp/img/samplingPlan-real.png
===================================================================
(Binary files differ)
Property changes on: trunk/wao-ui/src/main/webapp/img/samplingPlan-real.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
[Suiviobsmer-commits] r490 - in trunk: . wao-business/src/main/java/fr/ifremer/wao/service wao-business/src/main/xmi wao-ui/src/main/java/fr/ifremer/wao/ui/pages
by fdesbois@users.labs.libre-entreprise.org 02 Jun '10
by fdesbois@users.labs.libre-entreprise.org 02 Jun '10
02 Jun '10
Author: fdesbois
Date: 2010-06-02 12:07:07 +0000 (Wed, 02 Jun 2010)
New Revision: 490
Log:
- Update changelog
- Ano #2324 : readOnly admin can't access administration page
- Use last topia snapshot
Modified:
trunk/changelog.txt
trunk/pom.xml
trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceBoatImpl.java
trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java
trunk/wao-business/src/main/xmi/wao.properties
trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java
Modified: trunk/changelog.txt
===================================================================
--- trunk/changelog.txt 2010-06-02 11:58:03 UTC (rev 489)
+++ trunk/changelog.txt 2010-06-02 12:07:07 UTC (rev 490)
@@ -6,13 +6,22 @@
1.2.2
-----
+Anomalies
++++++++++
+
+- [fdesbois] Ano #2324 : Un admin en mode lecture peut accéder à la page
+ administration.
+- [fdesbois] Ano #2322 : Erreur sur calendrier d'activité avec navire non chargé.
+
Mise à jour librairies
++++++++++++++++++++++
- **mavenpom4labs** 2.1.3 -> 2.1.5 [http://maven-site.nuiton.org/mavenpom/mavenpom4labs]
-
- **i18n** 1.2.1 -> 1.2.2 [http://maven-site.nuiton.org/i18n]
+1.2.1
+-----
+
Anomalies
+++++++++
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-02 11:58:03 UTC (rev 489)
+++ trunk/pom.xml 2010-06-02 12:07:07 UTC (rev 490)
@@ -235,8 +235,8 @@
<!-- libraries version -->
<i18n.version>1.2.2</i18n.version>
<nuitonutils.version>1.2.2</nuitonutils.version>
- <topia.version>2.3.3</topia.version>
- <eugene.version>2.0.1</eugene.version>
+ <topia.version>2.4-SNAPSHOT</topia.version>
+ <eugene.version>2.0.2-SNAPSHOT</eugene.version>
<tapestry.version>5.1.0.5</tapestry.version>
</properties>
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceBoatImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceBoatImpl.java 2010-06-02 11:58:03 UTC (rev 489)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceBoatImpl.java 2010-06-02 12:07:07 UTC (rev 490)
@@ -572,6 +572,8 @@
TopiaContext transaction, List<Object> errorArgs,
WaoUser user, Boat boat) throws TopiaException, IOException {
+ // TODO-fdesbois-2010-05-31 : long execution more than 3sec, need to check which operation cost
+
errorArgs.add(boat.getName());
errorArgs.add(boat.getImmatriculation());
Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java
===================================================================
--- trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java 2010-06-02 11:58:03 UTC (rev 489)
+++ trunk/wao-business/src/main/java/fr/ifremer/wao/service/ServiceContactImpl.java 2010-06-02 12:07:07 UTC (rev 490)
@@ -460,6 +460,17 @@
Contact.BOAT, contactCsv.getBoat(),
Contact.SAMPLE_ROW, contactCsv.getSampleRow());
+ // Seems to have a problem with companyProperty ?!? using
+ // DAOLegacy (criteria)
+// TopiaQuery query = dao.createQuery().
+// addEquals(TopiaEntity.TOPIA_CREATE_DATE,
+// contactCsv.getTopiaCreateDate()).
+// addEquals(companyProperty, contactCsv.getCompany()).
+// addEquals(Contact.BOAT, contactCsv.getBoat()).
+// addEquals(Contact.SAMPLE_ROW,
+// contactCsv.getSampleRow());
+// Contact contact = dao.findByQuery(query);
+
// Check validation for existing Contact
if (!updateValidation && contact != null &&
contact.getValidationCompany() != null) {
Modified: trunk/wao-business/src/main/xmi/wao.properties
===================================================================
--- trunk/wao-business/src/main/xmi/wao.properties 2010-06-02 11:58:03 UTC (rev 489)
+++ trunk/wao-business/src/main/xmi/wao.properties 2010-06-02 12:07:07 UTC (rev 490)
@@ -1,6 +1,9 @@
model.tagvalue.copyright=/* *##%\n Copyright (C) 2009 Wao\n *##%*/
model.tagvalue.java.lang.String=text
model.tagvalue.exceptionClass=fr.ifremer.wao.WaoException
+
+#model.tagvalue.useLegacyDAO=true
+
#fr.ifremer.wao.entity.Company.attribute.waoUser.tagvalue.lazy=false
#fr.ifremer.wao.entity.Company.attribute.waoUser.tagvalue.orderBy=firstName,lastName
Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java
===================================================================
--- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java 2010-06-02 11:58:03 UTC (rev 489)
+++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java 2010-06-02 12:07:07 UTC (rev 490)
@@ -61,7 +61,7 @@
*
* @author fdesbois <fdesbois at codelutin.com>
*/
- at RequiresAuthentication(value = UserRole.ADMIN, readOnlyAllowed = true)
+ at RequiresAuthentication(value = UserRole.ADMIN, readOnlyAllowed = false)
@IncludeStylesheet("context:css/administration.css")
public class Administration {
1
0
Author: tchemit
Date: 2010-06-02 11:58:03 +0000 (Wed, 02 Jun 2010)
New Revision: 489
Log:
use i18n 1.2.2 (resolve BLOCKING bug)
Modified:
trunk/changelog.txt
trunk/pom.xml
Modified: trunk/changelog.txt
===================================================================
--- trunk/changelog.txt 2010-06-02 10:12:03 UTC (rev 488)
+++ trunk/changelog.txt 2010-06-02 11:58:03 UTC (rev 489)
@@ -3,9 +3,16 @@
Historique des versions
-1.2.1
+1.2.2
-----
+Mise à jour librairies
+++++++++++++++++++++++
+
+- **mavenpom4labs** 2.1.3 -> 2.1.5 [http://maven-site.nuiton.org/mavenpom/mavenpom4labs]
+
+- **i18n** 1.2.1 -> 1.2.2 [http://maven-site.nuiton.org/i18n]
+
Anomalies
+++++++++
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-02 10:12:03 UTC (rev 488)
+++ trunk/pom.xml 2010-06-02 11:58:03 UTC (rev 489)
@@ -233,7 +233,7 @@
<labs.id>154</labs.id>
<!-- libraries version -->
- <i18n.version>1.2.1</i18n.version>
+ <i18n.version>1.2.2</i18n.version>
<nuitonutils.version>1.2.2</nuitonutils.version>
<topia.version>2.3.3</topia.version>
<eugene.version>2.0.1</eugene.version>
1
0
Author: tchemit
Date: 2010-06-02 10:12:03 +0000 (Wed, 02 Jun 2010)
New Revision: 488
Log:
Utilisation de mavenpom4labs 2.1.5
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-05-31 14:54:17 UTC (rev 487)
+++ trunk/pom.xml 2010-06-02 10:12:03 UTC (rev 488)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4labs</artifactId>
- <version>2.1.3</version>
+ <version>2.1.5</version>
</parent>
<groupId>fr.ifremer</groupId>
1
0