On Wed, 5 Dec 2012 14:26:03 +0100 (CET) mble@users.chorem.org wrote: J'ai pas souvent vu de commut de mickael, dommage :( J'ai mis quelques commentaires sur des choses qu'il aurait fallu revoir avec lui.
Author: mble Date: 2012-12-05 14:26:03 +0100 (Wed, 05 Dec 2012) New Revision: 282
Url: http://chorem.org/projects/chorem/repository/revisions/282
Log: Updates for VacationRequest
Added: trunk/chorem-entities/src/main/java/org/chorem/entities/EmployeeMigration.java trunk/chorem-entities/src/main/java/org/chorem/entities/InvoiceMigration.java trunk/chorem-entities/src/main/java/org/chorem/entities/QuotationMigration.java trunk/chorem-entities/src/main/java/org/chorem/entities/VacationMigration.java trunk/chorem-entities/src/main/xmi/vacations.rst trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/ChoremDateUtil.java trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardHRAction.java trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/HrAction.java trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardVacationRequest.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/editMulti.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/editRelated.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/editVacationRequest.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/vacationDiv.jsp trunk/chorem-webmotion/src/main/webapp/css/vacationRequest.css trunk/chorem-webmotion/src/main/webapp/js/jquery.ui.datepicker-fr.js Modified: trunk/chorem-entities/src/main/xmi/chorem-model.zargo trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/GenericAction.java trunk/chorem-webmotion/src/main/resources/mapping trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/dashboardRequestVacation.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp
Added: trunk/chorem-entities/src/main/java/org/chorem/entities/EmployeeMigration.java =================================================================== --- trunk/chorem-entities/src/main/java/org/chorem/entities/EmployeeMigration.java (rev 0) +++ trunk/chorem-entities/src/main/java/org/chorem/entities/EmployeeMigration.java 2012-12-05 13:26:03 UTC (rev 282) @@ -0,0 +1,85 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.chorem.entities; + + +import java.beans.PropertyChangeListener; +import java.math.BigDecimal; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.ChoremClient; +import org.nuiton.util.VersionUtil; +import org.nuiton.wikitty.WikittyService; +import org.nuiton.wikitty.WikittyUtil; +import org.nuiton.wikitty.entities.FieldType; +import org.nuiton.wikitty.entities.Wikitty; +import org.nuiton.wikitty.entities.WikittyExtension; +import org.nuiton.wikitty.services.WikittyExtensionMigrationRename; + +/** + * + * @author mble + */ +public class EmployeeMigration extends WikittyExtensionMigrationRename { +
Il eut été bien de montrer à Mickael comment configurer son IDE et aussi de lui donner les bonnes pratiques de codage : - mettre un @authord cohérent un @since, des entêtes de licenses,... Dommage de s'en rendre compte deux jours avant la fin de son stage.
+ static private Log log = LogFactory.getLog(EmployeeMigration.class);
Je comprends pas le coup d'un logger static et non final ? Ca apporte quoi ? Ou bien c'est du static final ou final mais pas entre les deux ?...
Added: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/ChoremDateUtil.java =================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/ChoremDateUtil.java (rev 0) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/ChoremDateUtil.java 2012-12-05 13:26:03 UTC (rev 282) @@ -0,0 +1,42 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.chorem.webmotion; + +import java.util.Date; +import java.util.GregorianCalendar; + +/** + * + * @author ble + */ +public class ChoremDateUtil extends GregorianCalendar { + + + // -- Constructor ---------------------------------------------------------- + + public ChoremDateUtil() { + super(); + } + + public ChoremDateUtil(Date d) { + this.setTime(d); + } + + public ChoremDateUtil(int jj, int mm, int aaaa) { + this.set(aaaa, (mm-1), jj); + } + + public ChoremDateUtil(String jour, String mois, String annee) { + this.set(Integer.parseInt(jour),(Integer.parseInt(mois)-1),Integer.parseInt(annee)); + } + + + // -- Methods -------------------------------------------------------------- + + public Integer dayOfWeek() { // retourne le numero de jour de la date... + return this.get(DAY_OF_WEEK); + } + +}
euh avoir une telle classe c'est réinventée la roue je pense, pas une bonne idée. En plus un Util qui étend un Calendar drôle de design :(
Added: trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardHRAction.java
Il me semblait qu'on a proscrit l'utilisation d'acronyme dans les noms de classes et champs, alors pourquoi un HR ?
=================================================================== --- trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardHRAction.java (rev 0) +++ trunk/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/DashboardHRAction.java 2012-12-05 13:26:03 UTC (rev 282) @@ -0,0 +1,188 @@ +public class DashboardHRAction extends WebMotionController { + + /** to use log facility, just put in your code: log.info(\"...\"); */ + static private Log log = LogFactory.getLog(DashboardHRAction.class); + A proscrire des format de date figée donc cela veut dire qu'on interdit le changement de locale ? :( + static final public String budgetDateFormat = "MM/yyyy"; + static final public String summaryDateFormat = "dd/MM/yyyy hh:mm"; +
-- Tony Chemit -------------------- tél: +33 (0) 2 40 50 29 28 email: chemit@codelutin.com http://www.codelutin.com