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
December 2009
- 2 participants
- 60 discussions
[Suiviobsmer-commits] r161 - in trunk: suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl suiviobsmer-ui/src/main/resources
by fdesbois@users.labs.libre-entreprise.org 29 Dec '09
by fdesbois@users.labs.libre-entreprise.org 29 Dec '09
29 Dec '09
Author: fdesbois
Date: 2009-12-29 12:17:31 +0000 (Tue, 29 Dec 2009)
New Revision: 161
Removed:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
trunk/suiviobsmer-ui/src/main/resources/log4j.properties
Log:
- Move TopiaQuery to ToPIA
- Improve activityCalendar import and boat import
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -21,12 +21,18 @@
package fr.ifremer.suiviobsmer;
-import fr.ifremer.suiviobsmer.TopiaQuery.Op;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaQuery.Op;
import fr.ifremer.suiviobsmer.bean.ContactState;
import fr.ifremer.suiviobsmer.entity.Boat;
+import fr.ifremer.suiviobsmer.entity.BoatImpl;
import fr.ifremer.suiviobsmer.entity.Company;
import fr.ifremer.suiviobsmer.entity.Contact;
import java.util.Date;
+import org.hibernate.SQLQuery;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.framework.TopiaQuery;
/**
* QueryBuilder
@@ -88,4 +94,12 @@
return query;
}
+// public static Boat getBoatByImmatriculation(TopiaContext transaction, int immatriculation) throws TopiaException {
+// TopiaContextImplementor topia = (TopiaContextImplementor)transaction;
+// SQLQuery query = topia.getHibernate().createSQLQuery(
+// "SELECT * FROM boat WHERE immatriculation = " + immatriculation);
+//
+// return (Boat)query.addEntity(BoatImpl.class).uniqueResult();
+// }
+
}
Deleted: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -1,583 +0,0 @@
-/*
- * *##%
- * SuiviObsmer :: Business
- * Copyright (C) 2009 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 Lesser 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>.
- * ##%*
- */
-
-package fr.ifremer.suiviobsmer;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang.StringUtils;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * TopiaQuery
- *
- * Created: 21 déc. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class TopiaQuery {
-
- private static final Logger log = LoggerFactory.getLogger(TopiaQuery.class);
-
- /** Params for HQL query **/
- protected List<Object> params;
-
- /** Select part of the query **/
- protected String select;
-
- /** From part of the query **/
- protected String from;
-
- /** Where part of the query **/
- protected String where;
-
- /** Order By part of the query **/
- protected String orderBy;
-
- /** Group By part of the query **/
- protected String groupBy;
-
- /** Used to determine if parentheses are needed for Where input **/
- protected boolean parentheses;
-
- protected List<String> propertiesToLoad;
-
- /**
- * Enum to simmplify using operation in query
- */
- public static enum Op {
- /** EQUALS **/
- EQ("="),
- /** GREATER THAN **/
- GT(">"),
- /** GREATER OR EQUALS **/
- GE(">="),
- /** LIKE for String manipulation **/
- LIKE("LIKE"),
- /** LESS THAN **/
- LT("<"),
- /** LESS OR EQUALS **/
- LE("<="),
- /** IS NOT NULL **/
- NOT_NULL("IS NOT NULL");
-
- protected String value;
-
- /**
- * Constructor of the Op Enum.
- *
- * @param value corresponding to the String for the query
- */
- Op(String value) {
- this.value = value;
- }
-
- @Override
- public String toString() {
- return this.value;
- }
- }
-
- /**
- * Constructor of TopiaQuery with entityClass initialization.
- *
- * @param entityClass Class for an entity Query
- */
- public TopiaQuery(Class<? extends TopiaEntity> entityClass) {
- this(entityClass.getName());
- }
-
- /**
- * Constructor of TopiaQuery with String form initialization.
- *
- * @param from From part for the Query
- */
- public TopiaQuery(String from) {
- this.from = " FROM " + from;
- parentheses = true;
- }
-
- @Override
- public String toString() {
- return fullQuery();
- }
-
- /**
- * Get the full query.
- *
- * @return a String corresponding to the full query.
- */
- public String fullQuery() {
- String result = "";
- if (select != null) {
- result = select;
- }
- result += from;
- if (where != null) {
- result += where;
- }
- if (groupBy != null) {
- result += groupBy;
- }
- if (orderBy != null) {
- result += orderBy;
- }
- return result.trim();
- }
-
- /**
- * Add a HQL parameter to the Query.
- *
- * @param id identification of the param in the query
- * @param e value of the param
- * @return the TopiaQuery
- */
- public TopiaQuery addParam(String id, Object e) {
- if (params == null) {
- params = new ArrayList<Object>();
- }
- params.add(id);
- params.add(e);
- return this;
- }
-
- /**
- * Add a property to load when query is executed.
- * Used to avoid LazyInitializationException for property needed after closing context.
- * The property is a string like those in HQL query.
- * <pre>
- * Exemples :
- * - "person.company" (Property TopiaEntity person linked to the result entity in query and company linked to person)
- * --> calling myEntity.getPerson().getCompany();
- * - "partyRoles" (Property Collection partyRoles linked to the result entity in query)
- * --> calling myEntity.getPartyRoles().size();
- * </pre>
- *
- * @param properties
- * @return
- */
- public TopiaQuery addLoad(String... properties) {
- getPropertiesToLoad().addAll(Arrays.asList(properties));
- return this;
- }
-
- protected List<String> getPropertiesToLoad() {
- if (propertiesToLoad == null) {
- propertiesToLoad = new ArrayList<String>();
- }
- return propertiesToLoad;
- }
-
- /**
- * Add a where element to the Query. Could be anything.
- * Parentheses are added automatically (even if there are not needed).
- *
- * @param where element to add
- * @return the TopiaQuery
- */
- public TopiaQuery add(String where) {
- if (this.where == null) {
- this.where = " WHERE ";
- } else {
- this.where += " AND ";
- }
- if (parentheses) {
- this.where += "(";
- }
- this.where += where;
- if (parentheses) {
- this.where += ")";
- }
- parentheses = true;
- return this;
- }
-
- /**
- * Add an element to the query. The parameter will be automatically added.
- * The constraint is needed to determine what type of operation it is.
- *
- * @param paramName the name of the parameter in the query (attribute of the entity)
- * @param constraint the operation concerned
- * @param paramValue the value of the parameter (an other entity, a String, ...)
- * @return the TopiaQuery
- */
- public TopiaQuery add(String paramName, Op constraint, Object paramValue) {
- int dot = paramName.lastIndexOf(".");
- String valueName = paramName;
- if (dot != -1) {
- valueName = paramName.substring(dot+1);
- }
- parentheses = false;
- return add(paramName + " " + constraint + " :" + valueName).addParam(valueName, paramValue);
- }
-
- /**
- * Add an element to the query with the constraint Not null.
- *
- * @param paramName name of the parameter in the query
- * @return the TopiaQuery
- */
- public TopiaQuery addNotNull(String paramName) {
- return add(paramName + " " + Op.NOT_NULL);
- }
-
- /**
- * Add an element to the query. The parameter will be automatically added.
- * The default constrainst operation is Op.EQ for EQUALS.
- * Ex : add("boat", boat) means -> boat = :boat.
- *
- * @param paramName name of the parameter in the query
- * @param paramValue value of the parameter
- * @return the TopiaQuery
- * @see #add(java.lang.String, fr.ifremer.suiviobsmer.TopiaQuery.Op, java.lang.Object)
- */
- public TopiaQuery add(String paramName, Object paramValue) {
- return add(paramName, Op.EQ, paramValue);
- }
-
- /**
- * Add an element to the from in the query. Used to add some other data in the query or for join.
- *
- * @param str the element to add
- * @return the TopiaQuery
- */
- public TopiaQuery addFrom(String str) {
- from += ", " + str;
- return this;
- }
-
- /**
- * Add an element to the select in the query. Used to add some parameters for the return of query.
- *
- * @param select element to add
- * @return the TopiaQuery
- */
- public TopiaQuery addSelect(String select) {
- if (this.select == null) {
- this.select = "SELECT ";
- } else {
- this.select += ", ";
- }
- this.select += select;
- return this;
- }
-
- /**
- * Add an element to the order in the query. Used to add some parameters to order by.
- *
- * @param order element to add
- * @return the TopiaQuery
- */
- public TopiaQuery addOrder(String order) {
- if (orderBy == null) {
- orderBy = " ORDER BY ";
- } else {
- orderBy += ", ";
- }
- orderBy += order;
- return this;
- }
-
- public TopiaQuery addOrderDesc(String order) {
- return addOrder(order + " DESC");
- }
-
- /**
- * Add an element to the group of the query. Used to add some paramters to group by.
- *
- * @param group element to add
- * @return the TopiaQuery
- */
- public TopiaQuery addGroup(String group) {
- if (groupBy == null) {
- groupBy = " GROUP BY ";
- } else {
- groupBy += ", ";
- }
- groupBy += group;
- return this;
- }
-
- /**
- * Simple execution of the query. This method use directly the find method in TopiaContext interface.
- *
- * @param transaction the TopiaContext to use for execution
- * @return a List of results
- * @throws TopiaException
- * @see org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[])
- */
- public List execute(TopiaContext transaction) throws TopiaException {
- if (log.isTraceEnabled()) {
- log.trace("# QUERY : " + fullQuery());
- if (params != null) {
- log.trace("# PARAMS : " + Arrays.toString(params.toArray()));
- }
- }
- if (params == null) {
- return transaction.find(fullQuery());
- }
- return transaction.find(fullQuery(), params.toArray());
- }
-
- /**
- * Execute the query and get a List of entity. Some properties will be loaded if they are
- * prealably set using ${@link #addLoad(java.lang.String[]) }.
- *
- * @param <T> the type of TopiaEntity to return
- * @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return type
- * @return a List of TopiaEntity corresponding to the entityClass in argument
- * @throws TopiaException
- * @throws ClassCastException
- */
- public <T extends TopiaEntity> List<T> executeToEntityList(TopiaContext transaction, Class<T> entityClass)
- throws TopiaException, ClassCastException {
- List res = execute(transaction);
- if (log.isTraceEnabled()) {
- log.trace("Properties to load : " + getPropertiesToLoad());
- }
- List<T> results = new ArrayList<T>();
- for (Object o : res) {
- if (o != null && !entityClass.isAssignableFrom(o.getClass())) {
- throw new ClassCastException("Invalid cast for " + entityClass.getName());
- }
- T entity = (T)o;
- if (!getPropertiesToLoad().isEmpty()) {
- loadProperties(entity);
- }
- results.add(entity);
- }
- return results;
- }
-
- /**
- * Load all properties for the entity.
- *
- * @param <T> type of the entity extends TopiaEntity
- * @param entity used to load properties
- * @throws TopiaException
- */
- protected <T extends TopiaEntity> void loadProperties(T entity) throws TopiaException {
- for (String prop : getPropertiesToLoad()) {
- if (log.isTraceEnabled()) {
- log.trace("load property " + prop + " ...");
- }
- List<String> str = Arrays.asList(prop.split("\\."));
- Iterator<String> it = str.iterator();
- TopiaEntity currEntity = entity;
- while (it.hasNext()) {
- String s = it.next();
- if (log.isTraceEnabled()) {
- log.trace("Current entity : " + currEntity.getClass().getSimpleName());
- log.trace("Current loading : " + s);
- }
- if (it.hasNext()) {
- currEntity = loadEntityProperty(currEntity, s);
- } else {
- loadProperty(currEntity, s);
- }
- }
- }
- }
-
- /**
- * Load a property of type TopiaEntity from an other entity.
- *
- * @param <T> type of the entity extends TopiaEntity
- * @param entity used to load the property
- * @param property name of the property in the entity
- * @return a TopiaEntity corresponding to the property loaded
- * @throws TopiaException
- */
- protected <T extends TopiaEntity> TopiaEntity loadEntityProperty(T entity, String property) throws TopiaException {
- return (TopiaEntity)loadProperty(entity, property);
- }
-
- /**
- * Load a property from an entity.
- *
- * @param <T> type of the entity extends TopiaEntity
- * @param entity used to load the property
- * @param property name of the property in the entity
- * @return an Object corresponding to the property loaded
- * @throws TopiaException
- */
- protected <T extends TopiaEntity> Object loadProperty(T entity, String property) throws TopiaException {
- try {
- Object res = PropertyUtils.getProperty(entity, property);
- if (log.isTraceEnabled()) {
- log.trace("load property '" + property + "' for '" + entity.getClass().getSimpleName() + "'");
- }
- if (Collection.class.isAssignableFrom(res.getClass())) {
- Collection list = (Collection) res;
- list.size();
- }
- return res;
- } catch (IllegalAccessException eee) {
- throw new TopiaException("Illegal access on property " + property + " from entity " + entity.getClass().getName(), eee);
- } catch (InvocationTargetException eee) {
- throw new TopiaException("Invocation error on entity " + entity.getClass().getName() + " for property " + property, eee);
- } catch (NoSuchMethodException eee) {
- throw new TopiaException("Getter method does not exist for property " + property + " from entity " + entity.getClass().getName(), eee);
- }
- }
-
- /**
- * Execute the query and get a Map of entity with key type in argument. Some properties will be loaded if they are
- * prealably set using ${@link #addLoad(java.lang.String[]) }.
- *
- * @param <K> the type of the map key
- * @param <T> the type of entity, value of the map
- * @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return
- * @param keyName the property name of the key in the entity
- * @param keyClass the key class for the result map
- * @return a Map with the key type defined and the entity in value
- * @throws TopiaException
- * @throws ClassCastException
- */
- public <K, T extends TopiaEntity> Map<K, T> executeToEntityMap(TopiaContext transaction, Class<T> entityClass, String keyName, Class<K> keyClass)
- throws TopiaException, ClassCastException {
-
- Map<K, T> results = new HashMap<K, T>();
- //for (PropertyDescriptor)
- for (T elmt : executeToEntityList(transaction, entityClass)) {
- Object value = loadProperty(elmt, keyName);
- if (value != null && !keyClass.isAssignableFrom(value.getClass())) {
- throw new ClassCastException("Invalid cast for " + keyClass.getName());
- }
- results.put((K)value, elmt);
- }
- return results;
- }
-
- /**
- * Execute the query and get a Map of entity with topiaId in key. Some properties will be loaded if they are
- * prealably set using ${@link #addLoad(java.lang.String[]) }.
- *
- * @param <T> the type of entity, value of the map
- * @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return
- * @return a Map with the key type defined and the entity in value
- * @throws TopiaException
- * @throws ClassCastException
- */
- public <T extends TopiaEntity> Map<String, T> executeToEntityMap(TopiaContext transaction, Class<T> entityClass)
- throws TopiaException, ClassCastException {
- return executeToEntityMap(transaction, entityClass, TopiaEntity.TOPIA_ID, String.class);
- }
-
- /**
- * Execute the query and get the first result entity. Some properties will be loaded if they are
- * prealably set using ${@link #addLoad(java.lang.String[]) }.
- *
- * @param <T> the type of TopiaEntity to return
- * @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return type
- * @return a TopiaEntity corresponding to the entityClass in argument
- * @throws TopiaException
- * @throws ClassCastException
- */
- public <T extends TopiaEntity> T executeToEntity(TopiaContext transaction, Class<T> entityClass)
- throws TopiaException, ClassCastException {
- List<T> results = executeToEntityList(transaction, entityClass);
- return !results.isEmpty() ? results.get(0) : null;
- }
-
- /**
- * Execute the query and get an Integer for result. Used for query with COUNT or SUM, ...
- * The select is overriden to get only the right value for return.
- *
- * @param transaction the TopiaContext to use for execution
- * @param select the Select overriden (ex : SUM(myParam))
- * @return an Integer
- * @throws TopiaException
- */
- public int executeToInteger(TopiaContext transaction, String select) throws TopiaException {
- Long res = (Long)executeToObject(transaction, select);
- return res != null ? res.intValue() : 0;
- }
-
- /**
- * Execute the query and get a String for result. Used for query with MAX, ...
- * The select is overriden to get only the right value for return.
- *
- * @param transaction the TopiaContext to use for execution
- * @param select the Select overriden (ex : MAX(myParam))
- * @return a String
- * @throws TopiaException
- */
- public String executeToString(TopiaContext transaction, String select) throws TopiaException {
- Object res = executeToObject(transaction, select);
- return res != null ? (String)res : "";
- }
-
- /**
- * Execute the query and get an Object for result.
- * The select is overriden to get only the right value for return.
- *
- * @param transaction the TopiaContext to use for execution
- * @param select the Select overriden
- * @return an Object
- * @throws TopiaException
- */
- public Object executeToObject(TopiaContext transaction, String select) throws TopiaException {
- String oldValue = this.select;
- if (!StringUtils.isEmpty(select)) {
- this.select = "SELECT " + select;
- }
- Object result = null;
- List results = execute(transaction);
- if (!results.isEmpty()) {
- result = results.get(0);
- }
- this.select = oldValue;
- return result;
- }
-
- /**
- * Execute a simple count on the query, i.e. the number of results get from the query.
- *
- * @param transaction the TopiaContext to use for execution
- * @return an int corresponding to the number of result in the query
- * @throws TopiaException
- */
- public int executeCount(TopiaContext transaction) throws TopiaException {
- return executeToInteger(transaction, "COUNT(*)");
- }
-
-}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -24,7 +24,7 @@
import fr.ifremer.suiviobsmer.QueryBuilder;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
-import fr.ifremer.suiviobsmer.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery;
import fr.ifremer.suiviobsmer.bean.ContactState;
import java.io.Serializable;
import org.nuiton.topia.TopiaContext;
@@ -63,18 +63,6 @@
try {
transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
-// String contactClassName = Contact.class.getName();
-// // Return the last contact for this boat and company
-// List results = transaction.find(
-// "FROM " + contactClassName + " C1" +
-// " WHERE C1.user.company = :company" +
-// " AND C1.boat = :boat" +
-// " AND C1.topiaCreateDate = " +
-// " (SELECT MAX(C2.topiaCreateDate) FROM " + contactClassName + " C2" +
-// " WHERE C2.user.company = :company AND C2.boat = C1.boat)",
-// "company", company,
-// "boat", this);
-
TopiaQuery query = QueryBuilder.createQueryLastContactForBoat(this, company);
Contact contact = query.executeToEntity(transaction, Contact.class);
if (contact != null) {
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -24,7 +24,7 @@
import fr.ifremer.suiviobsmer.QueryBuilder;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery;
import java.io.Serializable;
import org.nuiton.topia.TopiaContext;
import java.util.Date;
@@ -109,53 +109,4 @@
}
return result;
}
-
- /**
- * Execute the HQL query for counting contact with BoardingDone state since the fromDate.
- * This query is used to get all boarding dones on this boat for all companies or only for the
- * current one. Only the validate contacts by company will be count. The param fromDate can be null,
- * in this case, all contacts will be counted (not matter which date then started).
- *
- * @param transaction TopiaContext to execute the query
- * @param fromDate the date to start calcul
- * @param companyOnly boolean used to filter by the current company or not
- * @return the number of boarding done since fromDate
- * @throws TopiaException
- */
-// protected int countDoneContactsFromDate(TopiaContext transaction, Date fromDate, boolean companyOnly) throws TopiaException {
-// int result = 0;
-//
-// List<Object> params = new ArrayList<Object>();
-// String contactClassName = Contact.class.getName();
-// String query = "SELECT COUNT(*)" +
-// " FROM " + contactClassName +
-// " WHERE boat = :boat AND state = :boardingDone" +
-// " AND validationCompany = :booleanTrue" +
-// " AND (validationProgram IS NULL OR validationProgram = :booleanTrue)";
-//
-// params.add("boat"); params.add(getBoat());
-// params.add("boardingDone"); params.add(ContactState.BOARDING_DONE.toString());
-// params.add("booleanTrue"); params.add(Boolean.TRUE);
-//
-// if (fromDate != null) {
-// query += " AND tideBeginDate >= :fromDate";
-// params.add("fromDate");
-// params.add(fromDate);
-// }
-//
-// if (companyOnly) {
-// query+= " AND user.company = :company";
-// params.add("company");
-// params.add(getCompany());
-// }
-//
-// List results = transaction.find(query, params.toArray());
-//
-// if (!results.isEmpty()) {
-// Long tmp = (Long) results.get(0);
-// result += tmp.intValue();
-// }
-//
-// return result;
-// }
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -23,8 +23,8 @@
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.TopiaQuery;
-import fr.ifremer.suiviobsmer.TopiaQuery.Op;
+import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery.Op;
import java.io.Serializable;
import java.text.NumberFormat;
import java.util.Calendar;
@@ -91,19 +91,11 @@
Calendar refBegin = new GregorianCalendar();
refBegin.setTime(begin);
refBegin.set(Calendar.DAY_OF_MONTH, 1);
- /*refBegin.set(Calendar.HOUR, 0);
- refBegin.set(Calendar.MINUTE, 0);
- refBegin.set(Calendar.SECOND, 0);
- refBegin.set(Calendar.MILLISECOND, 0);*/
Calendar refEnd = new GregorianCalendar();
refEnd.setTime(end);
int max = refEnd.getActualMaximum(Calendar.DAY_OF_MONTH);
refEnd.set(Calendar.DAY_OF_MONTH, max);
- /*refBegin.set(Calendar.HOUR, 0);
- refBegin.set(Calendar.MINUTE, 0);
- refBegin.set(Calendar.SECOND, 0);
- refBegin.set(Calendar.MILLISECOND, 0);*/
return ! (refEnd.before(getCalendarBegin()) || refBegin.after(getCalendarEnd()));
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -201,11 +201,4 @@
month.addRealTideTime(-nbDays);
}
-// protected int getDifferenceDays(Contact contact) {
-// int nbDays = DateUtils.getDifferenceInDays(contact.getTideBeginDate(), contact.getTideEndDate());
-// // difference nbDays + 1 for the first day
-// nbDays++;
-// return nbDays;
-// }
-
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -25,6 +25,7 @@
import com.csvreader.CsvReader;
import fr.ifremer.suiviobsmer.entity.ActivityCalendar;
import fr.ifremer.suiviobsmer.entity.ActivityCalendarDAO;
+import fr.ifremer.suiviobsmer.entity.ActivityCalendarImpl;
import fr.ifremer.suiviobsmer.entity.ActivityMonth;
import fr.ifremer.suiviobsmer.entity.ActivityMonthDAO;
import fr.ifremer.suiviobsmer.entity.ActivityProfession;
@@ -32,7 +33,6 @@
import fr.ifremer.suiviobsmer.entity.ActivityZone;
import fr.ifremer.suiviobsmer.entity.ActivityZoneDAO;
import fr.ifremer.suiviobsmer.entity.Boat;
-import fr.ifremer.suiviobsmer.entity.BoatDAO;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
@@ -43,11 +43,16 @@
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Date;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.time.DurationFormatUtils;
+import org.hibernate.SQLQuery;
import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.framework.TopiaQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -70,6 +75,54 @@
private static final Logger log = LoggerFactory.getLogger(ActivityCalendarImport.class);
+ private static final boolean DISABLED = false;
+
+ // CREATE UNIQUE INDEX boat_immatriculation_idx ON BOAT(IMMATRICULATION)
+ // CREATE UNIQUE INDEX activitycalendar_idx ON ACTIVITYCALENDAR (BOAT, YEAR)
+ // CREATE UNIQUE INDEX shipowner_idx ON SHIPOWNER (CODE)
+
+ public class ActivityCalendarKey {
+
+ private Boat _boat;
+ private String _boatId;
+ private int _year;
+
+ public ActivityCalendarKey(Boat boat, int year) {
+ _boatId = boat.getTopiaId();
+ _year = year;
+ _boat = boat;
+ }
+
+ public String boatId() {
+ return _boatId;
+ }
+
+ public Boat boat() {
+ return _boat;
+ }
+
+ public int year() {
+ return _year;
+ }
+
+ @Override
+ public boolean equals(Object key) {
+ if (!ActivityCalendarKey.class.isAssignableFrom(key.getClass())) {
+ throw new ClassCastException("Unable to cast object " + key.getClass() + " to " + this.getClass().getName());
+ }
+ ActivityCalendarKey calendarKey = (ActivityCalendarKey)key;
+ return _year == calendarKey.year() && _boatId.equals(calendarKey.boatId());
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 61 * hash + (this._boatId != null ? this._boatId.hashCode() : 0);
+ hash = 61 * hash + this._year;
+ return hash;
+ }
+ }
+
public ActivityCalendarImport(InputStream input) throws IOException {
super();
this.input = input;
@@ -100,67 +153,105 @@
int result = 0;
+ long firstTic = startTime;
+
+ long tic1, tic2;
+
+ Map<ActivityCalendarKey, ActivityCalendar> availableCalendars = new HashMap<ActivityCalendarKey, ActivityCalendar>();
+
+ //BoatDAO boatDAO = SuiviObsmerModelDAOHelper.getBoatDAO(transaction);
+ ActivityCalendarDAO calendarDAO = SuiviObsmerModelDAOHelper.getActivityCalendarDAO(transaction);
+ ActivityMonthDAO monthDAO = SuiviObsmerModelDAOHelper.getActivityMonthDAO(transaction);
+ ActivityProfessionDAO professionDAO = SuiviObsmerModelDAOHelper.getActivityProfessionDAO(transaction);
+ ActivityZoneDAO zoneDAO = SuiviObsmerModelDAOHelper.getActivityZoneDAO(transaction);
+
while(reader.readRecord()) {
currRow++;
- String timeLog = "";
- long firstTic = System.currentTimeMillis();
- //result[0]++;
-
-// if (log.isTraceEnabled()) {
-// log.trace(" " + Arrays.asList(reader.getValues()));
-// }
+ //long firstTic = System.currentTimeMillis();
int boatImmatriculation = Integer.parseInt(reader.get("NAVS_COD").trim());
- BoatDAO boatDAO = SuiviObsmerModelDAOHelper.getBoatDAO(transaction);
+// long tic1 = System.currentTimeMillis();
- Boat boat = boatDAO.findByImmatriculation(boatImmatriculation);
+ //Boat boat = boatDAO.findByImmatriculation(boatImmatriculation);
+// TopiaContextImplementor topia = (TopiaContextImplementor)transaction;
+// SQLQuery query = topia.getHibernate().createSQLQuery(
+// "SELECT * FROM boat WHERE immatriculation = " + boatImmatriculation);
+//
+// Boat boat = (Boat)query.addEntity(BoatImpl.class).uniqueResult();
+ Boat boat = new TopiaQuery(Boat.class).add(Boat.IMMATRICULATION, boatImmatriculation).executeToEntity(transaction);
+
+// long tic2 = System.currentTimeMillis();
+// log.info("findByImmatriculation : " + (tic2 - tic1));
if (boat != null) {
+
+ int year = Integer.parseInt(reader.get("SYNA_AN").trim());
- ActivityCalendarDAO dao = SuiviObsmerModelDAOHelper.getActivityCalendarDAO(transaction);
+ ActivityCalendarKey key = new ActivityCalendarKey(boat, year);
+ ActivityCalendar calendar = availableCalendars.get(key);
- int year = Integer.parseInt(reader.get("SYNA_AN").trim());
+// tic1 = System.currentTimeMillis();
- ActivityCalendar calendar = dao.findByProperties(
- ActivityCalendar.BOAT, boat,
- ActivityCalendar.YEAR, year);
-
+ // If not available select it from Database
if (calendar == null) {
- int fiability = Integer.parseInt(reader.get("INDQ_COD").trim());
+// TopiaContextImplementor topia = (TopiaContextImplementor)transaction;
+// SQLQuery query = topia.getHibernate().createSQLQuery(
+// "SELECT * FROM activityCalendar WHERE boat = '" + key.boatId() + "' AND year = " + key.year());
+//
+// calendar = (ActivityCalendar)query.addEntity(ActivityCalendarImpl.class).uniqueResult();
- calendar = dao.create(
- ActivityCalendar.BOAT, boat,
- ActivityCalendar.YEAR, year,
- ActivityCalendar.FIABILITY, fiability);
+ calendar = new TopiaQuery(ActivityCalendar.class).
+ add(ActivityCalendar.BOAT, boat).
+ add(ActivityCalendar.YEAR, year).
+ executeToEntity(transaction);
- calendar.setActivityMonth(new ArrayList<ActivityMonth>());
+ // Create it if not exist in Database
+ if (calendar == null) {
+ int fiability = Integer.parseInt(reader.get("INDQ_COD").trim());
- if (log.isDebugEnabled()) {
- info("Création d'un calendrier " + year +
- " pour le navire immatriculé " + boatImmatriculation, currRow);
+ calendar = calendarDAO.create(
+ ActivityCalendar.BOAT, key.boat(),
+ ActivityCalendar.YEAR, key.year(),
+ ActivityCalendar.FIABILITY, fiability);
+
+ calendar.setActivityMonth(new ArrayList<ActivityMonth>());
+
+ if (log.isDebugEnabled()) {
+ info("Création d'un calendrier " + year +
+ " pour le navire immatriculé " + boatImmatriculation, currRow);
+ }
}
+ availableCalendars.put(key, calendar);
}
+
+// ActivityCalendar calendar = calendarDAO.findByProperties(
+// ActivityCalendar.BOAT, boat,
+// ActivityCalendar.YEAR, year);
+
+// tic2 = System.currentTimeMillis();
+// log.info("calendar.findByProperties : " + (tic2 - tic1));
+
+
String calendarCode = "[ calendrier " + year + ", navire " + boatImmatriculation + " ]";
int monthNum = Integer.parseInt(reader.get("SYNA_MOI").trim());
String harbourCode = reader.get("SYNA_POR_COD").trim();
boolean active = !harbourCode.equals("INA");
+
ActivityMonth month = calendar.getActivityMonth(monthNum);
if (month == null) {
-
- ActivityMonthDAO monthDAO = SuiviObsmerModelDAOHelper.getActivityMonthDAO(transaction);
month = monthDAO.create(
ActivityMonth.ACTIVITY_CALENDAR, calendar,
ActivityMonth.MONTH, monthNum);
month.setActivityProfession(new ArrayList<ActivityProfession>());
- if (log.isDebugEnabled()) {
- info("Création du mois " + monthNum + " actif(" + active + ") " + calendarCode, currRow);
- }
+// if (log.isDebugEnabled()) {
+// info("Création du mois " + monthNum + " actif(" + active + ") " + calendarCode, currRow);
+// }
calendar.addActivityMonth(month);
}
@@ -180,9 +271,11 @@
Integer nbBoardingPersons = !nbBoardingPersonsString.equals("NA") ?
Integer.valueOf(nbBoardingPersonsString) : null;
- int harbourId = Integer.parseInt(reader.get("SYNA_TPOR_COD").trim());
+ String harbourIdString = reader.get("SYNA_TPOR_COD").trim();
+ int harbourId = !harbourIdString.equals("NA") ? Integer.parseInt(harbourIdString) : -1;
String harbourLibelle = reader.get("SYNA_POR_LIB").trim();
- //String harbourCode = reader.get("SYNA_POR_COD").trim();
+ harbourLibelle = !harbourLibelle.equals("NA") ? harbourLibelle : null;
+ harbourCode = !harbourCode.equals("NA") ? harbourCode : null;
month.setHarbourId(harbourId);
month.setHarbourCode(harbourCode);
@@ -195,24 +288,21 @@
String professionCode = reader.get("MET_COD").trim();
int professionId = Integer.parseInt(reader.get("MET_ID").trim());
String professionLibelle = reader.get("MET_LIB").trim();
-
ActivityProfession profession = month.getActivityProfession(professionOrder);
if (profession == null) {
- ActivityProfessionDAO professionDAO =
- SuiviObsmerModelDAOHelper.getActivityProfessionDAO(transaction);
profession = professionDAO.create(
ActivityProfession.ACTIVITY_MONTH, month,
ActivityProfession.PROFESSION_ORDER, professionOrder);
profession.setActivityZone(new ArrayList<ActivityZone>());
- if (log.isDebugEnabled()) {
- info("Création du métier " + professionOrder + " code(" + professionCode + ") " +
- "[ mois " + monthNum + " ] " +
- calendarCode, currRow);
- }
+// if (log.isDebugEnabled()) {
+// info("Création du métier " + professionOrder + " code(" + professionCode + ") " +
+// "[ mois " + monthNum + " ] " +
+// calendarCode, currRow);
+// }
month.addActivityProfession(profession);
}
@@ -226,29 +316,26 @@
String gradiantLibelle = reader.get("GRA_LIB").trim();
int zoneId = Integer.parseInt(reader.get("TSECT_COD").trim());
String zoneLibelle = reader.get("SECT_LIB").trim();
+
ActivityZone zone = profession.getActivityZone(zoneCode);
if (zone == null) {
-
- ActivityZoneDAO zoneDAO =
- SuiviObsmerModelDAOHelper.getActivityZoneDAO(transaction);
-
zone = zoneDAO.create(
ActivityZone.ZONE_CODE, zoneCode,
ActivityZone.ACTIVITY_PROFESSION, profession);
- if (log.isDebugEnabled()) {
- info("Création de la zone " + zoneCode + " [ mois " + monthNum + " ] " +
- calendarCode, currRow);
- }
+// if (log.isDebugEnabled()) {
+// info("Création de la zone " + zoneCode + " [ mois " + monthNum + " ] " +
+// calendarCode, currRow);
+// }
profession.addActivityZone(zone);
} else {
- if (log.isDebugEnabled()) {
- info("Ecrasement de la zone " + zoneCode + " [ mois " + monthNum + " ] " +
- calendarCode, currRow);
- }
+// if (log.isDebugEnabled()) {
+// info("Ecrasement de la zone " + zoneCode + " [ mois " + monthNum + " ] " +
+// calendarCode, currRow);
+// }
//warn("Zone déjà existante [" + zoneCode + "] ! :: " + Arrays.toString(reader.getValues()), currRow);
}
@@ -264,18 +351,37 @@
warn("Navire inexistant dans le référentiel : " + boatImmatriculation, currRow);
}
- if (log.isDebugEnabled()) {
- long tic = System.currentTimeMillis();
- log.debug("Time : " + DurationFormatUtils.formatDurationHMS(tic - firstTic));
- }
+// if (log.isDebugEnabled()) {
+// long tic = System.currentTimeMillis();
+// log.debug("Time : " + DurationFormatUtils.formatDurationHMS(tic - firstTic));
+// }
- if (result%500 == 0 && log.isInfoEnabled()) {
- log.info("RUNNING... Import calendrier d'activité ligne " + currRow);
+ if (result % 1000 == 0) {
+ tic1 = System.currentTimeMillis();
+
+ transaction.commitTransaction();
+ availableCalendars.clear();
+
+ tic2 = System.currentTimeMillis();
+ if (log.isDebugEnabled()) {
+ log.debug("commit : " + (tic2 - tic1));
+ }
+ if (log.isInfoEnabled()) {
+ log.info("RUNNING... Import calendrier d'activité ligne " + currRow);
+ Runtime runtime = Runtime.getRuntime();
+ long mem = runtime.totalMemory() - runtime.freeMemory();
+ long memMega = mem / 1024 / 1024;
+ log.info("Memory : " + memMega + " Mo");
+ long tic = System.currentTimeMillis();
+ log.info("Time : " + DurationFormatUtils.formatDurationHMS(tic - firstTic));
+ firstTic = System.currentTimeMillis();
+ }
}
-
- transaction.commitTransaction();
}
+ // For the last rows
+ transaction.commitTransaction();
+
long stopTime = System.currentTimeMillis();
String execTime = DurationFormatUtils.formatDurationHMS(stopTime - startTime);
@@ -314,8 +420,11 @@
}
protected void log(String message, int numRow) throws IOException {
+ if (DISABLED) {
+ return;
+ }
Date date = new Date();
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
+ DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.FRENCH);
String dateString = dateFormat.format(date);
String ligne = numRow != -1 ? "Ligne (" + numRow + ") : " : "";
String msg = "[" + dateString + "] " + ligne + message;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -28,8 +28,8 @@
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
-import fr.ifremer.suiviobsmer.TopiaQuery;
-import fr.ifremer.suiviobsmer.TopiaQuery.Op;
+import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery.Op;
import fr.ifremer.suiviobsmer.bean.BoatFilter;
import fr.ifremer.suiviobsmer.bean.CompanyBoatInfos;
import fr.ifremer.suiviobsmer.bean.CompanyBoatInfosImpl;
@@ -50,6 +50,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.time.DurationFormatUtils;
import org.nuiton.topia.TopiaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,8 +72,6 @@
protected TopiaContext rootContext;
- // CREATE UNIQUE INDEX boat_immatriculation_idx ON BOAT(IMMATRICULATION)
-
public ServiceBoatImpl() throws SuiviObsmerException {
rootContext = SuiviObsmerContext.getTopiaRootContext();
}
@@ -344,13 +343,23 @@
CsvReader reader = new CsvReader(input, Charset.forName("UTF-8"));
reader.readHeaders();
+ long startTime = System.currentTimeMillis();
+ long tic1, tic2;
+
+ BoatDAO boatDAO = SuiviObsmerModelDAOHelper.getBoatDAO(transaction);
+ ShipOwnerDAO shipOwnerDAO = SuiviObsmerModelDAOHelper.getShipOwnerDAO(transaction);
+
+ Map<String, ShipOwner> availableShipOwners = new HashMap<String, ShipOwner>();
+
+ tic1 = System.currentTimeMillis();
while(reader.readRecord()) {
result[0]++;
- if (log.isTraceEnabled()) {
- log.trace(" " + Arrays.asList(reader.getValues()));
- }
+// if (log.isTraceEnabled()) {
+// log.trace(" " + Arrays.asList(reader.getValues()));
+// }
+
int immatriculation = Integer.parseInt(reader.get("NAVS_COD").trim());
String boatName = reader.get("CARN_NOM").trim();
int boatLength = Integer.parseInt(reader.get("CARN_LONGUEUR_HT").trim());
@@ -362,10 +371,32 @@
String activeStr = reader.get("NAVS_ACTIVE").trim();
boolean active = !activeStr.equals("I");
- BoatDAO boatDAO = SuiviObsmerModelDAOHelper.getBoatDAO(transaction);
+
// Find existing boat with immatriculation
- Boat boat = boatDAO.findByImmatriculation(immatriculation);
+ //
+
+// long tic1 = System.currentTimeMillis();
+// boatDAO.findByImmatriculation(immatriculation);
+// long tic2 = System.currentTimeMillis();
+// if (log.isDebugEnabled()) {
+// log.debug("findByImmatriculation : " + (tic2 - tic1));
+// }
+//
+// tic1 = System.currentTimeMillis();
+// Boat boat = QueryBuilder.getBoatByImmatriculation(transaction, immatriculation);
+// tic2 = System.currentTimeMillis();
+// if (log.isDebugEnabled()) {
+// log.debug("findByImmatriculation SQL : " + (tic2 - tic1));
+// }
+
+// tic1 = System.currentTimeMillis();
+ Boat boat = new TopiaQuery(Boat.class).add(Boat.IMMATRICULATION, immatriculation).executeToEntity(transaction);
+// tic2 = System.currentTimeMillis();
+// if (log.isDebugEnabled()) {
+// log.debug("findByImmatriculation TopiaQuery : " + (tic2 - tic1));
+// }
+
if (boat == null) {
boat = boatDAO.create(Boat.IMMATRICULATION, immatriculation);
result[1]++;
@@ -376,19 +407,56 @@
boat.setBoatLength(boatLength);
boat.setActive(active);
- ShipOwnerDAO shipOwnerDAO = SuiviObsmerModelDAOHelper.getShipOwnerDAO(transaction);
// Find existing shipOwner with code
- ShipOwner shipOwner = shipOwnerDAO.findByCode(shipOwnerCode);
+ //ShipOwner shipOwner = shipOwnerDAO.findByCode(shipOwnerCode);
+
+ ShipOwner shipOwner = availableShipOwners.get(shipOwnerCode);
+
+ // If not available, select it from database
if (shipOwner == null) {
- shipOwner = shipOwnerDAO.create(ShipOwner.CODE, shipOwnerCode);
+ shipOwner = new TopiaQuery(ShipOwner.class).add(ShipOwner.CODE, shipOwnerCode).executeToEntity(transaction);
+
+ // If not exist yet, create it
+ if (shipOwner == null) {
+ shipOwner = shipOwnerDAO.create(ShipOwner.CODE, shipOwnerCode);
+ }
+
+ availableShipOwners.put(shipOwnerCode, shipOwner);
}
shipOwner.setFirstName(shipOwnerFirstName);
shipOwner.setLastName(shipOwnerLastName);
boat.setShipOwner(shipOwner);
- transaction.commitTransaction();
+ //transaction.commitTransaction();
+
+ if (result[0] % 1000 == 0) {
+ availableShipOwners.clear();
+
+ transaction.commitTransaction();
+ if (log.isInfoEnabled()) {
+ log.info("RUNNING... Import navires ligne " + result[0]);
+ Runtime runtime = Runtime.getRuntime();
+ long mem = (runtime.totalMemory() - runtime.freeMemory()) / 1048576;
+ //long memMega = mem / 1024 / 1024;
+ log.info("Memory : " + mem + " Mo");
+ tic2 = System.currentTimeMillis();
+ log.info("Time : " + DurationFormatUtils.formatDurationHMS(tic2 - tic1));
+ tic1 = System.currentTimeMillis();
+ }
+ }
}
+ // For the last rows
+ transaction.commitTransaction();
+
+ long stopTime = System.currentTimeMillis();
+
+ String execTime = DurationFormatUtils.formatDurationHMS(stopTime - startTime);
+
+ if (log.isInfoEnabled()) {
+ log.info("Durée de l'import : " + execTime);
+ }
+
transaction.closeContext();
} catch (Exception eee) {
SuiviObsmerContext.serviceException(transaction,
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -24,7 +24,7 @@
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
-import fr.ifremer.suiviobsmer.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery;
import fr.ifremer.suiviobsmer.bean.states.ContactStateEnum;
import fr.ifremer.suiviobsmer.entity.Boat;
import fr.ifremer.suiviobsmer.entity.Company;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -41,12 +41,13 @@
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.topia.framework.TopiaQuery.Op;
import org.nuiton.topia.persistence.util.EntityLoador;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -233,31 +234,42 @@
List<SampleRow> results = new ArrayList<SampleRow>();
try {
transaction = rootContext.beginTransaction();
-
- SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
+ Date current = SuiviObsmerContext.getCurrentDate();
+
+ // Only rows which are not finished will be kept
+ TopiaQuery query = new TopiaQuery(SampleRow.class).add("program.periodEnd", Op.GE, current);
+
if (!user.getAdmin()) {
- if (log.isDebugEnabled()) {
- log.debug("User company : " + user.getCompany().getName());
- }
- results = dao.findAllByCompany(user.getCompany());
- } else {
- results = dao.findAll();
+ query.add(SampleRow.COMPANY, user.getCompany());
}
- Iterator<SampleRow> it = results.iterator();
- while (it.hasNext()) {
- SampleRow row = it.next();
- // Only rows which are not finished will be kept
- if (row.getProgram().isFinished()) {
- it.remove();
- }/* else {
- // load data
- row.getProgram();
- row.getCompany();
- row.getProfession();
- }*/
- }
+ results = query.executeToEntityList(transaction, SampleRow.class);
+
+// SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
+//
+// if (!user.getAdmin()) {
+// if (log.isDebugEnabled()) {
+// log.debug("User company : " + user.getCompany().getName());
+// }
+// results = dao.findAllByCompany(user.getCompany());
+// } else {
+// results = dao.findAll();
+// }
+//
+// Iterator<SampleRow> it = results.iterator();
+// while (it.hasNext()) {
+// SampleRow row = it.next();
+// // Only rows which are not finished will be kept
+// if (row.getProgram().isFinished()) {
+// it.remove();
+// }/* else {
+// // load data
+// row.getProgram();
+// row.getCompany();
+// row.getProfession();
+// }*/
+// }
transaction.closeContext();
} catch (Exception eee) {
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-29 12:17:31 UTC (rev 161)
@@ -148,13 +148,6 @@
CompanyDAO dao = SuiviObsmerModelDAOHelper.getCompanyDAO(transaction);
- /*for (Company company : dao.findAll()) {
- results.add(company);
- // load users collection and call size() method to avoid LazyInitializationException from Hibernate
- List<User> users = (List<User>)company.getUser();
- users.size();
- }*/
-
if (activeOnly) {
results = dao.findAllByActive(activeOnly);
} else {
Modified: trunk/suiviobsmer-ui/src/main/resources/log4j.properties
===================================================================
--- trunk/suiviobsmer-ui/src/main/resources/log4j.properties 2009-12-24 15:57:38 UTC (rev 160)
+++ trunk/suiviobsmer-ui/src/main/resources/log4j.properties 2009-12-29 12:17:31 UTC (rev 161)
@@ -8,7 +8,7 @@
log4j.appender.console.Threshold=INFO
log4j.appender.globalfile=org.apache.log4j.RollingFileAppender
-log4j.appender.globalfile.File=${user.home}/.local/suiviobsmer/log/suiviobsmer.log
+log4j.appender.globalfile.File=/var/log/suiviobsmer/suiviobsmer.log
log4j.appender.globalfile.MaxFileSize=500KB
log4j.appender.globalfile.Append=true
log4j.appender.globalfile.MaxBackupIndex=10
1
0
[Suiviobsmer-commits] r160 - in trunk: . suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl suiviobsmer-business/src/main/xmi suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl
by fdesbois@users.labs.libre-entreprise.org 24 Dec '09
by fdesbois@users.labs.libre-entreprise.org 24 Dec '09
24 Dec '09
Author: fdesbois
Date: 2009-12-24 15:57:38 +0000 (Thu, 24 Dec 2009)
New Revision: 160
Removed:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
Log:
- Use topia SNAPSHOT for on topiaCreateDate type
- Improve queries + add property loading managment
- Use EntityLoador for getNewProfession
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/pom.xml 2009-12-24 15:57:38 UTC (rev 160)
@@ -239,7 +239,7 @@
<!-- libraries version -->
<nuitonutils.version>1.1.2</nuitonutils.version>
- <topia.version>2.3.0-beta-2</topia.version>
+ <topia.version>2.3.0-beta-3-SNAPSHOT</topia.version>
<license.version>2.0.0</license.version>
<helper.version>1.1.0</helper.version>
<eugene.version>2.0.0-beta-2</eugene.version>
Deleted: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -1,76 +0,0 @@
-/*
- * *##%
- * SuiviObsmer :: Business
- * Copyright (C) 2009 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 Lesser 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>.
- * ##%*
- */
-
-package fr.ifremer.suiviobsmer;
-
-import fr.ifremer.suiviobsmer.entity.ActivityCalendar;
-import fr.ifremer.suiviobsmer.entity.ActivityMonth;
-import fr.ifremer.suiviobsmer.entity.ActivityProfession;
-import fr.ifremer.suiviobsmer.entity.ActivityZone;
-import fr.ifremer.suiviobsmer.entity.Contact;
-import fr.ifremer.suiviobsmer.entity.SampleRow;
-import java.util.List;
-
-/**
- * DataLoader
- *
- * Created: 3 déc. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Used to load data to avoid LazyInitializationException
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class DataLoader {
-
- public static void loadContactForFindByFilters(Contact contact) {
- // load data
- contact.getUser().getCompany();
- SampleRow row = contact.getSampleRow();
- row.getProgram();
- row.getProfession();
- row.getCompany();
- //row.getFishingZone().size(); lazy=false
- }
-
- public static void loadActivityCalendar(ActivityCalendar calendar) {
- calendar.getBoat();
- List<ActivityMonth> months = calendar.getActivityMonth();
- for (ActivityMonth month : months) {
- if (month.getActive()) {
- List<ActivityProfession> professions = month.getActivityProfession();
- for (ActivityProfession profession : professions) {
- List<ActivityZone> zones = profession.getActivityZone();
- zones.size();
- }
- }
- }
- }
-
- public static void loadContactForBoatInfos(Contact contact) {
- contact.getSampleRow();
- contact.getUser();
- }
-
-}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -50,17 +50,17 @@
*/
public static TopiaQuery createQueryLastContactForBoat(Boat boat, Company company) {
String contactClassName = Contact.class.getName();
+ TopiaQuery query = new TopiaQuery(contactClassName + " C1").
+ add("C1.boat", boat).
+ add("C1.user.company = :company").
+ addParam("company", company);
+
TopiaQuery subquery = new TopiaQuery(contactClassName + " C2").
addSelect("MAX(C2.topiaCreateDate)").
add("C2.boat = C1.boat").
add("C2.user.company = :company");
- TopiaQuery query = new TopiaQuery(contactClassName + " C1").
- add("C1.boat", boat).
- add("C1.user.company = :company").
- addParam("company", company).
- add("C1.topiaCreateDate = (" + subquery.fullQuery() + ")");
-
+ query.add("C1.topiaCreateDate = (" + subquery.fullQuery() + ")");
return query;
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -21,9 +21,16 @@
package fr.ifremer.suiviobsmer;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.StringUtils;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
@@ -67,6 +74,8 @@
/** Used to determine if parentheses are needed for Where input **/
protected boolean parentheses;
+ protected List<String> propertiesToLoad;
+
/**
* Enum to simmplify using operation in query
*/
@@ -167,6 +176,33 @@
}
/**
+ * Add a property to load when query is executed.
+ * Used to avoid LazyInitializationException for property needed after closing context.
+ * The property is a string like those in HQL query.
+ * <pre>
+ * Exemples :
+ * - "person.company" (Property TopiaEntity person linked to the result entity in query and company linked to person)
+ * --> calling myEntity.getPerson().getCompany();
+ * - "partyRoles" (Property Collection partyRoles linked to the result entity in query)
+ * --> calling myEntity.getPartyRoles().size();
+ * </pre>
+ *
+ * @param properties
+ * @return
+ */
+ public TopiaQuery addLoad(String... properties) {
+ getPropertiesToLoad().addAll(Arrays.asList(properties));
+ return this;
+ }
+
+ protected List<String> getPropertiesToLoad() {
+ if (propertiesToLoad == null) {
+ propertiesToLoad = new ArrayList<String>();
+ }
+ return propertiesToLoad;
+ }
+
+ /**
* Add a where element to the Query. Could be anything.
* Parentheses are added automatically (even if there are not needed).
*
@@ -276,6 +312,10 @@
return this;
}
+ public TopiaQuery addOrderDesc(String order) {
+ return addOrder(order + " DESC");
+ }
+
/**
* Add an element to the group of the query. Used to add some paramters to group by.
*
@@ -314,34 +354,166 @@
}
/**
- * Execute the query and get a List of entity.
+ * Execute the query and get a List of entity. Some properties will be loaded if they are
+ * prealably set using ${@link #addLoad(java.lang.String[]) }.
*
* @param <T> the type of TopiaEntity to return
* @param transaction the TopiaContext to use for execution
* @param entityClass the class of the TopiaEntity used for return type
* @return a List of TopiaEntity corresponding to the entityClass in argument
* @throws TopiaException
+ * @throws ClassCastException
*/
- public <T extends TopiaEntity> List<T> executeToEntityList(TopiaContext transaction, Class<T> entityClass) throws TopiaException {
+ public <T extends TopiaEntity> List<T> executeToEntityList(TopiaContext transaction, Class<T> entityClass)
+ throws TopiaException, ClassCastException {
List res = execute(transaction);
-// List<T> results = new ArrayList<T>();
-// for (Object o : res) {
-// T entity = (T)o;
-// results.add(entity);
-// }
- return (List<T>)res;
+ if (log.isTraceEnabled()) {
+ log.trace("Properties to load : " + getPropertiesToLoad());
+ }
+ List<T> results = new ArrayList<T>();
+ for (Object o : res) {
+ if (o != null && !entityClass.isAssignableFrom(o.getClass())) {
+ throw new ClassCastException("Invalid cast for " + entityClass.getName());
+ }
+ T entity = (T)o;
+ if (!getPropertiesToLoad().isEmpty()) {
+ loadProperties(entity);
+ }
+ results.add(entity);
+ }
+ return results;
}
/**
- * Execute the query and get the first result entity.
+ * Load all properties for the entity.
*
+ * @param <T> type of the entity extends TopiaEntity
+ * @param entity used to load properties
+ * @throws TopiaException
+ */
+ protected <T extends TopiaEntity> void loadProperties(T entity) throws TopiaException {
+ for (String prop : getPropertiesToLoad()) {
+ if (log.isTraceEnabled()) {
+ log.trace("load property " + prop + " ...");
+ }
+ List<String> str = Arrays.asList(prop.split("\\."));
+ Iterator<String> it = str.iterator();
+ TopiaEntity currEntity = entity;
+ while (it.hasNext()) {
+ String s = it.next();
+ if (log.isTraceEnabled()) {
+ log.trace("Current entity : " + currEntity.getClass().getSimpleName());
+ log.trace("Current loading : " + s);
+ }
+ if (it.hasNext()) {
+ currEntity = loadEntityProperty(currEntity, s);
+ } else {
+ loadProperty(currEntity, s);
+ }
+ }
+ }
+ }
+
+ /**
+ * Load a property of type TopiaEntity from an other entity.
+ *
+ * @param <T> type of the entity extends TopiaEntity
+ * @param entity used to load the property
+ * @param property name of the property in the entity
+ * @return a TopiaEntity corresponding to the property loaded
+ * @throws TopiaException
+ */
+ protected <T extends TopiaEntity> TopiaEntity loadEntityProperty(T entity, String property) throws TopiaException {
+ return (TopiaEntity)loadProperty(entity, property);
+ }
+
+ /**
+ * Load a property from an entity.
+ *
+ * @param <T> type of the entity extends TopiaEntity
+ * @param entity used to load the property
+ * @param property name of the property in the entity
+ * @return an Object corresponding to the property loaded
+ * @throws TopiaException
+ */
+ protected <T extends TopiaEntity> Object loadProperty(T entity, String property) throws TopiaException {
+ try {
+ Object res = PropertyUtils.getProperty(entity, property);
+ if (log.isTraceEnabled()) {
+ log.trace("load property '" + property + "' for '" + entity.getClass().getSimpleName() + "'");
+ }
+ if (Collection.class.isAssignableFrom(res.getClass())) {
+ Collection list = (Collection) res;
+ list.size();
+ }
+ return res;
+ } catch (IllegalAccessException eee) {
+ throw new TopiaException("Illegal access on property " + property + " from entity " + entity.getClass().getName(), eee);
+ } catch (InvocationTargetException eee) {
+ throw new TopiaException("Invocation error on entity " + entity.getClass().getName() + " for property " + property, eee);
+ } catch (NoSuchMethodException eee) {
+ throw new TopiaException("Getter method does not exist for property " + property + " from entity " + entity.getClass().getName(), eee);
+ }
+ }
+
+ /**
+ * Execute the query and get a Map of entity with key type in argument. Some properties will be loaded if they are
+ * prealably set using ${@link #addLoad(java.lang.String[]) }.
+ *
+ * @param <K> the type of the map key
+ * @param <T> the type of entity, value of the map
+ * @param transaction the TopiaContext to use for execution
+ * @param entityClass the class of the TopiaEntity used for return
+ * @param keyName the property name of the key in the entity
+ * @param keyClass the key class for the result map
+ * @return a Map with the key type defined and the entity in value
+ * @throws TopiaException
+ * @throws ClassCastException
+ */
+ public <K, T extends TopiaEntity> Map<K, T> executeToEntityMap(TopiaContext transaction, Class<T> entityClass, String keyName, Class<K> keyClass)
+ throws TopiaException, ClassCastException {
+
+ Map<K, T> results = new HashMap<K, T>();
+ //for (PropertyDescriptor)
+ for (T elmt : executeToEntityList(transaction, entityClass)) {
+ Object value = loadProperty(elmt, keyName);
+ if (value != null && !keyClass.isAssignableFrom(value.getClass())) {
+ throw new ClassCastException("Invalid cast for " + keyClass.getName());
+ }
+ results.put((K)value, elmt);
+ }
+ return results;
+ }
+
+ /**
+ * Execute the query and get a Map of entity with topiaId in key. Some properties will be loaded if they are
+ * prealably set using ${@link #addLoad(java.lang.String[]) }.
+ *
+ * @param <T> the type of entity, value of the map
+ * @param transaction the TopiaContext to use for execution
+ * @param entityClass the class of the TopiaEntity used for return
+ * @return a Map with the key type defined and the entity in value
+ * @throws TopiaException
+ * @throws ClassCastException
+ */
+ public <T extends TopiaEntity> Map<String, T> executeToEntityMap(TopiaContext transaction, Class<T> entityClass)
+ throws TopiaException, ClassCastException {
+ return executeToEntityMap(transaction, entityClass, TopiaEntity.TOPIA_ID, String.class);
+ }
+
+ /**
+ * Execute the query and get the first result entity. Some properties will be loaded if they are
+ * prealably set using ${@link #addLoad(java.lang.String[]) }.
+ *
* @param <T> the type of TopiaEntity to return
* @param transaction the TopiaContext to use for execution
* @param entityClass the class of the TopiaEntity used for return type
* @return a TopiaEntity corresponding to the entityClass in argument
* @throws TopiaException
+ * @throws ClassCastException
*/
- public <T extends TopiaEntity> T executeToEntity(TopiaContext transaction, Class<T> entityClass) throws TopiaException {
+ public <T extends TopiaEntity> T executeToEntity(TopiaContext transaction, Class<T> entityClass)
+ throws TopiaException, ClassCastException {
List<T> results = executeToEntityList(transaction, entityClass);
return !results.isEmpty() ? results.get(0) : null;
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -22,7 +22,6 @@
package fr.ifremer.suiviobsmer.impl;
import com.csvreader.CsvReader;
-import fr.ifremer.suiviobsmer.DataLoader;
import fr.ifremer.suiviobsmer.QueryBuilder;
import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException;
import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException.Type;
@@ -72,6 +71,8 @@
protected TopiaContext rootContext;
+ // CREATE UNIQUE INDEX boat_immatriculation_idx ON BOAT(IMMATRICULATION)
+
public ServiceBoatImpl() throws SuiviObsmerException {
rootContext = SuiviObsmerContext.getTopiaRootContext();
}
@@ -128,10 +129,7 @@
addParam("booleanTrue", Boolean.TRUE);
}
- List<Boat> boats = query.executeToEntityList(transaction, Boat.class);
- for (Boat boat : boats) {
- results.put(boat.getImmatriculation(), boat);
- }
+ results = query.executeToEntityMap(transaction, Boat.class, Boat.IMMATRICULATION, Integer.class);
transaction.closeContext();
} catch (Exception eee) {
@@ -200,11 +198,11 @@
}
// Last contact
- TopiaQuery query = QueryBuilder.createQueryLastContactForBoat(boat, company);
+ TopiaQuery query = QueryBuilder.createQueryLastContactForBoat(boat, company).
+ addLoad(Contact.SAMPLE_ROW, Contact.USER);
Contact contact = query.executeToEntity(transaction, Contact.class);
if (contact != null) {
- DataLoader.loadContactForBoatInfos(contact);
result.setLastContact(contact);
}
@@ -422,15 +420,6 @@
try {
transaction = rootContext.beginTransaction();
-// String activityCalendarClassName = ActivityCalendar.class.getName();
-// List results = transaction.find(
-// "FROM " + activityCalendarClassName + " A WHERE A.boat = :boat AND A.year = " +
-// "(SELECT MAX(B.year) FROM " + activityCalendarClassName + " B " +
-// " WHERE B.boat = A.boat GROUP BY B.boat)",
-// "boat", boat);
-//
-// result = (ActivityCalendar) results.get(0);
-
String activityCalendarClassName = ActivityCalendar.class.getName();
TopiaQuery query = new TopiaQuery(activityCalendarClassName + " A").
add("A.boat", boat);
@@ -442,9 +431,21 @@
query.add("A.year = (" + subquery.fullQuery() + ")");
+ query.addLoad(ActivityCalendar.BOAT);
result = query.executeToEntity(transaction, ActivityCalendar.class);
- DataLoader.loadActivityCalendar(result);
+ // load other complex data from collections
+ List<ActivityMonth> months = result.getActivityMonth();
+ for (ActivityMonth month : months) {
+ if (month.getActive()) {
+ List<ActivityProfession> professions = month.getActivityProfession();
+ for (ActivityProfession profession : professions) {
+ List<ActivityZone> zones = profession.getActivityZone();
+ zones.size();
+ }
+ }
+ }
+
transaction.closeContext();
} catch (Exception eee) {
SuiviObsmerContext.serviceException(transaction,
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -21,10 +21,10 @@
package fr.ifremer.suiviobsmer.impl;
-import fr.ifremer.suiviobsmer.DataLoader;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
+import fr.ifremer.suiviobsmer.TopiaQuery;
import fr.ifremer.suiviobsmer.bean.states.ContactStateEnum;
import fr.ifremer.suiviobsmer.entity.Boat;
import fr.ifremer.suiviobsmer.entity.Company;
@@ -38,6 +38,7 @@
import java.util.List;
import java.util.Map;
import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.persistence.TopiaEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -69,23 +70,15 @@
try {
transaction = rootContext.beginTransaction();
- ContactDAO dao = SuiviObsmerModelDAOHelper.getContactDAO(transaction);
+ TopiaQuery query = new TopiaQuery(Contact.class).addOrderDesc(TopiaEntity.TOPIA_CREATE_DATE);
- if (company == null) {
- for (Contact contact : dao.findAll()) {
- DataLoader.loadContactForFindByFilters(contact);
- results.put(contact.getTopiaId(), contact);
- }
- } else {
- List list = transaction.find("FROM ContactImpl WHERE user.company = :company",
- "company", company);
- for (Object o : list) {
- Contact contact = (Contact)o;
- DataLoader.loadContactForFindByFilters(contact);
- results.put(contact.getTopiaId(), contact);
- }
+ if (company != null) {
+ query.add("user.company", company);
}
+ query.addLoad("user.company", "sampleRow.program", "sampleRow.profession", "sampleRow.company");
+ results = query.executeToEntityMap(transaction, Contact.class);
+
transaction.closeContext();
} catch (Exception eee) {
SuiviObsmerContext.serviceException(transaction,
@@ -122,6 +115,10 @@
ContactDAO dao = SuiviObsmerModelDAOHelper.getContactDAO(transaction);
+ if (log.isDebugEnabled()) {
+ log.debug("Create date : " + contact.getTopiaCreateDate());
+ }
+
SuiviObsmerContext.prepareTopiaId(Contact.class, contact);
if (delete) {
dao.delete(contact);
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -44,11 +44,10 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.util.EntityLoador;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -348,12 +347,9 @@
@Override
public Profession getNewProfession(Profession profession) {
Profession newProfession = new ProfessionImpl();
- newProfession.setCodeDCF5(profession.getCodeDCF5());
- newProfession.setLibelle(profession.getLibelle());
- newProfession.setOther(profession.getOther());
- newProfession.setMeshSize(profession.getMeshSize());
- newProfession.setSize(profession.getSize());
- newProfession.setSpecies(profession.getSpecies());
+ EntityLoador<Profession> loador = EntityLoador.newEntityLoador(Profession.class,
+ Profession.CODE_DCF5, Profession.LIBELLE, Profession.MESH_SIZE, Profession.OTHER, Profession.SIZE, Profession.SPECIES);
+ loador.load(profession, newProfession, false);
return newProfession;
}
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -51,6 +51,7 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.junit.After;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-23 17:52:56 UTC (rev 159)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-24 15:57:38 UTC (rev 160)
@@ -54,6 +54,7 @@
import java.util.List;
import org.junit.After;
import org.junit.AfterClass;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -359,6 +360,37 @@
}
@Test
+ public void testGetNewProfession() throws Exception {
+ log.info("getNewProfession");
+
+ /** PREPARE DATA **/
+
+ TopiaContext transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
+
+ ProfessionDAO dao = SuiviObsmerModelDAOHelper.getProfessionDAO(transaction);
+
+ Profession profession = dao.create(
+ Profession.CODE_DCF5, "OBR",
+ Profession.LIBELLE, "Fileyage en barre",
+ Profession.MESH_SIZE, "< 80",
+ Profession.OTHER, "90mm",
+ Profession.SPECIES, "barre, lieu noir, saumon des plages");
+
+ transaction.commitTransaction();
+ transaction.closeContext();
+
+ /** EXEC METHOD **/
+ Profession newProfession = service.getNewProfession(profession);
+ Assert.assertNotSame(profession, newProfession);
+ Assert.assertEquals("OBR", newProfession.getCodeDCF5());
+ Assert.assertEquals("Fileyage en barre", newProfession.getLibelle());
+ Assert.assertEquals("< 80", newProfession.getMeshSize());
+ Assert.assertEquals("90mm", newProfession.getOther());
+ Assert.assertEquals("barre, lieu noir, saumon des plages", newProfession.getSpecies());
+
+ }
+
+ @Test
public void testDeleteSampleRow() throws Exception {
log.info("deleteSampleRow");
1
0
[Suiviobsmer-commits] r159 - in trunk: . suiviobsmer-business suiviobsmer-ui
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 17:52:56 +0000 (Wed, 23 Dec 2009)
New Revision: 159
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/pom.xml
trunk/suiviobsmer-ui/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-23 17:52:53 UTC (rev 158)
+++ trunk/pom.xml 2009-12-23 17:52:56 UTC (rev 159)
@@ -15,7 +15,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2</version>
+ <version>0.0.1-alpha-3-SNAPSHOT</version>
<modules>
<module>suiviobsmer-ui</module>
@@ -256,9 +256,9 @@
<scm>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-2</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-2</developerConnection>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/?root=suiviobsmer</url>
</scm>
<build>
Modified: trunk/suiviobsmer-business/pom.xml
===================================================================
--- trunk/suiviobsmer-business/pom.xml 2009-12-23 17:52:53 UTC (rev 158)
+++ trunk/suiviobsmer-business/pom.xml 2009-12-23 17:52:56 UTC (rev 159)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2</version>
+ <version>0.0.1-alpha-3-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -120,9 +120,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-business/…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</developerConnection>
</scm>
</project>
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2009-12-23 17:52:53 UTC (rev 158)
+++ trunk/suiviobsmer-ui/pom.xml 2009-12-23 17:52:56 UTC (rev 159)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2</version>
+ <version>0.0.1-alpha-3-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -122,9 +122,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</developerConnection>
</scm>
</project>
1
0
Author: fdesbois
Date: 2009-12-23 17:52:53 +0000 (Wed, 23 Dec 2009)
New Revision: 158
Added:
tags/suiviobsmer-0.0.1-alpha-2/
Log:
[maven-scm] copy for tag suiviobsmer-0.0.1-alpha-2
1
0
[Suiviobsmer-commits] r157 - in trunk: . suiviobsmer-business suiviobsmer-ui
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 17:52:50 +0000 (Wed, 23 Dec 2009)
New Revision: 157
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/pom.xml
trunk/suiviobsmer-ui/pom.xml
Log:
[maven-release-plugin] prepare release suiviobsmer-0.0.1-alpha-2
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-23 17:31:44 UTC (rev 156)
+++ trunk/pom.xml 2009-12-23 17:52:50 UTC (rev 157)
@@ -15,7 +15,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2-SNAPSHOT</version>
+ <version>0.0.1-alpha-2</version>
<modules>
<module>suiviobsmer-ui</module>
@@ -256,9 +256,9 @@
<scm>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</developerConnection>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/?root=suiviobsmer</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-2</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-2</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
</scm>
<build>
Modified: trunk/suiviobsmer-business/pom.xml
===================================================================
--- trunk/suiviobsmer-business/pom.xml 2009-12-23 17:31:44 UTC (rev 156)
+++ trunk/suiviobsmer-business/pom.xml 2009-12-23 17:52:50 UTC (rev 157)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2-SNAPSHOT</version>
+ <version>0.0.1-alpha-2</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -120,9 +120,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-business/…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</developerConnection>
</scm>
</project>
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2009-12-23 17:31:44 UTC (rev 156)
+++ trunk/suiviobsmer-ui/pom.xml 2009-12-23 17:52:50 UTC (rev 157)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2-SNAPSHOT</version>
+ <version>0.0.1-alpha-2</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -122,9 +122,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</developerConnection>
</scm>
</project>
1
0
[Suiviobsmer-commits] r156 - in trunk: suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity suiviobsmer-business/src/main/xmi suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages suiviobsmer-ui/src/main/webapp
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 17:31:44 +0000 (Wed, 23 Dec 2009)
New Revision: 156
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties
trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
Log:
Add getReferenceDate for contact
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 15:51:25 UTC (rev 155)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 17:31:44 UTC (rev 156)
@@ -72,4 +72,20 @@
}
}
+ /**
+ * Get the reference date for the contact. It depends on existence of tideBeginDate.
+ *
+ * @return the tideBeginDate if exists or the topiaCreateDate if not
+ */
+ @Override
+ public Date getReferenceDate() {
+ if (log.isDebugEnabled()) {
+ log.debug("topia " + getTopiaCreateDate());
+ }
+ if (getTideBeginDate() != null) {
+ return getTideBeginDate();
+ }
+ return getTopiaCreateDate();
+ }
+
}
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties
===================================================================
--- trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties 2009-12-23 15:51:25 UTC (rev 155)
+++ trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties 2009-12-23 17:31:44 UTC (rev 156)
@@ -17,7 +17,7 @@
boatLength-label: Longueur
# BOAT INFOS
-topiaCreateDate-label: Date
+referenceDate-label: Date
state-label: Etat
createdBy-label: Observateur
sampleRowCode-label: Code plan
Modified: trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-23 15:51:25 UTC (rev 155)
+++ trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-23 17:31:44 UTC (rev 156)
@@ -190,18 +190,13 @@
</div>
</t:unless>
- <!-- BODY - armateur, contact -->
-<!-- <fieldset id="so-boats-boat-infos-shipowner">
- <legend>Armateur</legend>
- <div t:type="beandisplay" t:id="boatInfosShipOwner" t:object="boatInfos.boat.shipOwner"
- t:include="firstName, lastName" />
- </fieldset>-->
+ <!-- BODY - lastContact -->
<t:if t:test="companyBoatInfos.lastContact">
<fieldset id="so-boats-boat-infos-lastcontact">
<legend>Dernier contact avec le navire pour votre société</legend>
<div class="${lastContactClass}">
<dl t:type="beandisplay" t:id="boatInfosLastContact" t:object="companyBoatInfos.lastContact"
- t:include="topiaCreateDate, state" t:add="createdBy, sampleRowCode">
+ t:include="referenceDate, state" t:add="createdBy, sampleRowCode">
<p:createdBy>
${companyBoatInfos.lastContact.user.fullName}
</p:createdBy>
@@ -212,6 +207,7 @@
</div>
</fieldset>
</t:if>
+ <!-- BODY - contact (person to contact) -->
<fieldset id="so-boats-boat-infos-contact">
<legend>Contact</legend>
<div t:type="beandisplay" t:id="boatInfosContact" t:object="boatInfos"
1
0
[Suiviobsmer-commits] r153 - trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 14:47:12 +0000 (Wed, 23 Dec 2009)
New Revision: 153
Modified:
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
Log:
Add condition for tideEndDate
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 14:45:03 UTC (rev 152)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 14:47:12 UTC (rev 153)
@@ -21,6 +21,7 @@
package fr.ifremer.suiviobsmer.ui.pages;
+import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.bean.ContactState;
import fr.ifremer.suiviobsmer.entity.Boat;
@@ -360,9 +361,15 @@
}
if (begin != null && end != null && end.before(begin)) {
- contactsForm.recordError(endDate, "La date de fin de la marée ne peut être antérieure à celle de début");
+ contactsForm.recordError(endDate, "La date de fin de la marée ne peut pas être antérieure à celle de début");
}
+ Date current = SuiviObsmerContext.getCurrentDate();
+
+ if (end != null && end.after(current)) {
+ contactsForm.recordError(endDate, "La date de fin de la marée ne peut pas être postérieure à la date du jour");
+ }
+
// Non abouti, Refus ou Refus Définitif
if (contactState.isUnfinishedState()) {
if (!StringUtils.isEmpty(contact.getComment())) {
1
0
23 Dec '09
Author: fdesbois
Date: 2009-12-23 14:45:03 +0000 (Wed, 23 Dec 2009)
New Revision: 152
Added:
trunk/suiviobsmer-ui/src/main/webapp/favicon.png
trunk/suiviobsmer-ui/src/main/webapp/img/logo-wao-48px.png
Removed:
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/war/
Modified:
trunk/README.txt
trunk/pom.xml
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
trunk/suiviobsmer-ui/pom.xml
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java
Log:
- Use WinstoneLauncher from nuiton-utils 1.1.2
- Update license-header
Modified: trunk/README.txt
===================================================================
--- trunk/README.txt 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/README.txt 2009-12-23 14:45:03 UTC (rev 152)
@@ -3,6 +3,8 @@
java -jar suiviobsmer-XXX.war
+Note : chargement un peu long...
+
Default admin user
------------------
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/pom.xml 2009-12-23 14:45:03 UTC (rev 152)
@@ -238,7 +238,7 @@
<labs.id>154</labs.id>
<!-- libraries version -->
- <nuitonutils.version>1.1.2-SNAPSHOT</nuitonutils.version>
+ <nuitonutils.version>1.1.2</nuitonutils.version>
<topia.version>2.3.0-beta-2</topia.version>
<license.version>2.0.0</license.version>
<helper.version>1.1.0</helper.version>
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/**
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
import java.io.Serializable;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.impl;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -102,4 +102,4 @@
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -136,4 +136,4 @@
log.debug("topiaId for Company : " + company.getTopiaId());
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -206,4 +206,4 @@
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -190,4 +190,4 @@
assertEquals(5, result.getRealTidesValue());
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.impl;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -404,4 +404,4 @@
Assert.assertEquals(2009, result.getYear());
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -116,4 +116,4 @@
assertEquals(6, result);
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -466,4 +466,4 @@
transaction.closeContext();
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/pom.xml 2009-12-23 14:45:03 UTC (rev 152)
@@ -86,41 +86,40 @@
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <build>
+ <build>
<!-- call result war : suiviobsmer-xxx.war -->
- <finalName>suiviobsmer-${project.version}</finalName>
+ <finalName>suiviobsmer-${project.version}</finalName>
<!-- Add main class into war to make it executable -->
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1-beta-1</version>
- <configuration>
- <webResources>
- <resource>
- <directory>${basedir}/target/classes</directory>
- <includes>
- <include>**/war/*</include>
- </includes>
- </resource>
- </webResources>
- <!-- for putting Main-Class into war -->
- <archive>
- <manifest>
- <mainClass>fr.ifremer.suiviobsmer.ui.war.SuiviObsmerWarLauncher</mainClass>
- </manifest>
- </archive>
- <overlays>
- <overlay>
- <groupId>org.jvnet.hudson.winstone</groupId>
- <artifactId>winstone</artifactId>
- <type>jar</type>
- </overlay>
- </overlays>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-beta-1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.nuiton.util.war.WinstoneLauncher</mainClass>
+ </manifest>
+ </archive>
+ <overlays>
+ <overlay>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <type>jar</type>
+ <includes>
+ <include>**/war/Winstone*</include>
+ </includes>
+ </overlay>
+ <overlay>
+ <groupId>org.jvnet.hudson.winstone</groupId>
+ <artifactId>winstone</artifactId>
+ <type>jar</type>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<scm>
<url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/**
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,63 +18,63 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.components;
-
-import org.apache.tapestry5.BindingConstants;
-import org.apache.tapestry5.annotations.Log;
-import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.slf4j.Logger;
-
-/**
- * BooleanImage
- *
- * Created: 18 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class BooleanImage {
-
- @Inject
- private Logger log;
-
- @Parameter(required = true)
- private Boolean value;
-
- @Parameter
- private boolean empty;
-
- @Parameter(defaultPrefix = BindingConstants.LITERAL)
- private String trueTitle;
-
- @Parameter(defaultPrefix = BindingConstants.LITERAL)
- private String falseTitle;
-
- @Parameter(defaultPrefix = BindingConstants.LITERAL)
- private String emptyTitle;
-
- public Boolean getValue() {
- return value;
- }
-
- public boolean isEmpty() {
- return empty;
- }
-
- public String getTrueTitle() {
- return trueTitle == null ? "yes" : trueTitle;
- }
-
- public String getFalseTitle() {
- return falseTitle == null ? "no" : falseTitle;
- }
-
- public String getEmptyTitle() {
- return emptyTitle == null ? "empty" : emptyTitle;
- }
-}
+
+package fr.ifremer.suiviobsmer.ui.components;
+
+import org.apache.tapestry5.BindingConstants;
+import org.apache.tapestry5.annotations.Log;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.slf4j.Logger;
+
+/**
+ * BooleanImage
+ *
+ * Created: 18 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class BooleanImage {
+
+ @Inject
+ private Logger log;
+
+ @Parameter(required = true)
+ private Boolean value;
+
+ @Parameter
+ private boolean empty;
+
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String trueTitle;
+
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String falseTitle;
+
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String emptyTitle;
+
+ public Boolean getValue() {
+ return value;
+ }
+
+ public boolean isEmpty() {
+ return empty;
+ }
+
+ public String getTrueTitle() {
+ return trueTitle == null ? "yes" : trueTitle;
+ }
+
+ public String getFalseTitle() {
+ return falseTitle == null ? "no" : falseTitle;
+ }
+
+ public String getEmptyTitle() {
+ return emptyTitle == null ? "empty" : emptyTitle;
+ }
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,5 +1,5 @@
/* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,7 @@
/**
- * *##% Ca$h Web Interface
- * Copyright (C) 2009 CodeLutin
+ * *##%
+ * SuiviObsmer :: Web Interface
+ * Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@@ -14,7 +15,8 @@
*
* 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>. ##%*
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * ##%*
*/
package fr.ifremer.suiviobsmer.ui.mixins;
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Web Interface
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.ui.pages;
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,74 +18,74 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.dto.News;
-import fr.ifremer.suiviobsmer.services.ServiceNews;
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.List;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-import org.apache.tapestry5.annotations.Log;
-import org.apache.tapestry5.annotations.Persist;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.ioc.annotations.Inject;
-
-/**
- * Index
- *
- * Created: 9 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/news.css")
-public class Index implements SuiviObsmerPage {
-
- @Override
- public boolean isOnlyForAdmin() {
- return false;
- }
-
- @Inject
- private ServiceNews serviceNews;
-
- @Persist
- private List<News> newsList;
-
- @Property
- private News news;
-
- private DateFormat dateFormat;
-
- @Log
- void setupRender() {
- newsList = null;
- getNewsList();
- }
-
- public List<News> getNewsList() {
- if (newsList == null) {
- try {
- newsList = serviceNews.getNews();
- } catch (SuiviObsmerException eee) {
- // error db, ...
- }
- }
- return newsList;
- }
-
- public DateFormat getDateFormat() {
- if (dateFormat == null) {
- dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- }
- return dateFormat;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.dto.News;
+import fr.ifremer.suiviobsmer.services.ServiceNews;
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.apache.tapestry5.annotations.Log;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+/**
+ * Index
+ *
+ * Created: 9 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/news.css")
+public class Index implements SuiviObsmerPage {
+
+ @Override
+ public boolean isOnlyForAdmin() {
+ return false;
+ }
+
+ @Inject
+ private ServiceNews serviceNews;
+
+ @Persist
+ private List<News> newsList;
+
+ @Property
+ private News news;
+
+ private DateFormat dateFormat;
+
+ @Log
+ void setupRender() {
+ newsList = null;
+ getNewsList();
+ }
+
+ public List<News> getNewsList() {
+ if (newsList == null) {
+ try {
+ newsList = serviceNews.getNews();
+ } catch (SuiviObsmerException eee) {
+ // error db, ...
+ }
+ }
+ return newsList;
+ }
+
+ public DateFormat getDateFormat() {
+ if (dateFormat == null) {
+ dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ }
+ return dateFormat;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,59 +18,59 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.dto.SamplingHistoricRow;
-import fr.ifremer.suiviobsmer.services.ServiceSampling;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.List;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.ioc.annotations.Inject;
-
-/**
- * SamplingHistoric
- *
- * Created: 13 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/sampling.css")
-public class SamplingHistoric {
-
- @Inject
- private ServiceSampling serviceSampling;
-
- private List<SamplingHistoricRow> historic;
-
- @Property
- private SamplingHistoricRow historicRow;
-
- private DateFormat dateFormat;
-
- public List<SamplingHistoricRow> getHistoric() {
- if (historic == null) {
- try {
- historic = serviceSampling.getHistoric();
- } catch (SuiviObsmerException eee) {
- // errors
- }
- }
- return historic;
- }
-
- public DateFormat getDateFormat() {
- if (dateFormat == null) {
- dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- }
- return dateFormat;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.dto.SamplingHistoricRow;
+import fr.ifremer.suiviobsmer.services.ServiceSampling;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+/**
+ * SamplingHistoric
+ *
+ * Created: 13 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/sampling.css")
+public class SamplingHistoric {
+
+ @Inject
+ private ServiceSampling serviceSampling;
+
+ private List<SamplingHistoricRow> historic;
+
+ @Property
+ private SamplingHistoricRow historicRow;
+
+ private DateFormat dateFormat;
+
+ public List<SamplingHistoricRow> getHistoric() {
+ if (historic == null) {
+ try {
+ historic = serviceSampling.getHistoric();
+ } catch (SuiviObsmerException eee) {
+ // errors
+ }
+ }
+ return historic;
+ }
+
+ public DateFormat getDateFormat() {
+ if (dateFormat == null) {
+ dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ }
+ return dateFormat;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,29 +18,29 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-
-/**
- * Synthesis
- *
- * Created: 9 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/synthesis.css")
-public class Synthesis implements SuiviObsmerPage {
-
- @Override
- public boolean isOnlyForAdmin() {
- return false;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+
+/**
+ * Synthesis
+ *
+ * Created: 9 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/synthesis.css")
+public class Synthesis implements SuiviObsmerPage {
+
+ @Override
+ public boolean isOnlyForAdmin() {
+ return false;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,92 +18,92 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.entity.User;
-import fr.ifremer.suiviobsmer.services.ServiceUser;
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import fr.ifremer.suiviobsmer.ui.components.Layout;
-import org.apache.commons.lang.StringUtils;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-import org.apache.tapestry5.annotations.InjectComponent;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.annotations.SessionState;
-import org.apache.tapestry5.corelib.components.BeanEditForm;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.slf4j.Logger;
-
-/**
- * UserProfile
- *
- * Created: 10 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/userProfile.css")
-public class UserProfile implements SuiviObsmerPage {
-
- @Override
- public boolean isOnlyForAdmin() {
- return false;
- }
-
- @Inject
- private Logger log;
-
- @Inject
- private ServiceUser serviceUser;
-
- @InjectComponent
- private Layout layout;
-
- @SessionState
- private User user;
-
- private User userEditable;
-
- @InjectComponent
- private BeanEditForm userForm;
-
- @Property
- private String password;
-
- @Property
- private String password2;
-
- public User getUserEditable() {
- if (userEditable == null) {
- userEditable = user;
- }
- return userEditable;
- }
-
- void onSuccessFromUserForm() {
-
- if (password != null && !password.equals(password2)) {
- userForm.recordError("Les deux password ne sont pas identiques, vérifiez la saisie !");
- } else {
- try {
- if (!StringUtils.isEmpty(password)) {
- userEditable.setPassword(password);
- }
- serviceUser.createUpdateUser(userEditable, false);
- layout.getFeedBack().addInfo("Modifications enregistrées avec succès !");
- } catch (SuiviObsmerException eee) {
- userForm.recordError(eee.getMessage());
- if (log.isErrorEnabled()) {
- log.error("Error during user save", eee);
- }
- }
- }
- }
-
-
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.entity.User;
+import fr.ifremer.suiviobsmer.services.ServiceUser;
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import fr.ifremer.suiviobsmer.ui.components.Layout;
+import org.apache.commons.lang.StringUtils;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.apache.tapestry5.annotations.InjectComponent;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.annotations.SessionState;
+import org.apache.tapestry5.corelib.components.BeanEditForm;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.slf4j.Logger;
+
+/**
+ * UserProfile
+ *
+ * Created: 10 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/userProfile.css")
+public class UserProfile implements SuiviObsmerPage {
+
+ @Override
+ public boolean isOnlyForAdmin() {
+ return false;
+ }
+
+ @Inject
+ private Logger log;
+
+ @Inject
+ private ServiceUser serviceUser;
+
+ @InjectComponent
+ private Layout layout;
+
+ @SessionState
+ private User user;
+
+ private User userEditable;
+
+ @InjectComponent
+ private BeanEditForm userForm;
+
+ @Property
+ private String password;
+
+ @Property
+ private String password2;
+
+ public User getUserEditable() {
+ if (userEditable == null) {
+ userEditable = user;
+ }
+ return userEditable;
+ }
+
+ void onSuccessFromUserForm() {
+
+ if (password != null && !password.equals(password2)) {
+ userForm.recordError("Les deux password ne sont pas identiques, vérifiez la saisie !");
+ } else {
+ try {
+ if (!StringUtils.isEmpty(password)) {
+ userEditable.setPassword(password);
+ }
+ serviceUser.createUpdateUser(userEditable, false);
+ layout.getFeedBack().addInfo("Modifications enregistrées avec succès !");
+ } catch (SuiviObsmerException eee) {
+ userForm.recordError(eee.getMessage());
+ if (log.isErrorEnabled()) {
+ log.error("Error during user save", eee);
+ }
+ }
+ }
+ }
+
+
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,5 +1,5 @@
/* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Added: trunk/suiviobsmer-ui/src/main/webapp/favicon.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/favicon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/suiviobsmer-ui/src/main/webapp/img/logo-wao-48px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/logo-wao-48px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
[Suiviobsmer-commits] r151 - trunk/suiviobsmer-business/src/main/xmi
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 11:08:07 +0000 (Wed, 23 Dec 2009)
New Revision: 151
Modified:
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
Log:
Improve query
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
1
0
[Suiviobsmer-commits] r150 - in trunk/suiviobsmer-business/src: main/java/fr/ifremer/suiviobsmer/entity test/resources
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 11:07:53 +0000 (Wed, 23 Dec 2009)
New Revision: 150
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
trunk/suiviobsmer-business/src/test/resources/log4j.properties
Log:
Improve query
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 11:05:36 UTC (rev 149)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 11:07:53 UTC (rev 150)
@@ -94,8 +94,9 @@
try {
transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
- TopiaQuery query = QueryBuilder.createQueryDoneContactsFromDate(getBoat(), fromDate);
- query.add("user.company = :company").addParam("company", getCompany());
+ TopiaQuery query = QueryBuilder.
+ createQueryDoneContactsFromDate(getBoat(), fromDate).
+ add("user.company", getCompany());
result = query.executeCount(transaction);
Modified: trunk/suiviobsmer-business/src/test/resources/log4j.properties
===================================================================
--- trunk/suiviobsmer-business/src/test/resources/log4j.properties 2009-12-23 11:05:36 UTC (rev 149)
+++ trunk/suiviobsmer-business/src/test/resources/log4j.properties 2009-12-23 11:07:53 UTC (rev 150)
@@ -8,5 +8,5 @@
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%p] %c{2} %m%n
-log4j.logger.fr.ifremer.suiviobsmer=TRACE
+log4j.logger.fr.ifremer.suiviobsmer=INFO
log4j.logger.org.nuiton.util=INFO
1
0