+++ /dev/null
-/*
- * Copyright
- * 2008 axYus - www.axyus.com
- * 2008 L.Meckert - laurent.meckert.com
- *
- * This file is part of XEMELIOS.
- *
- * XEMELIOS is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * XEMELIOS 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with XEMELIOS; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package fr.gouv.finances.cp.xemelios.plugin.generatorPesPjs;
-
-import java.io.File;
-
-import javax.swing.JFrame;
-
-import org.apache.log4j.Logger;
-
-import fr.gouv.finances.cp.utils.PropertiesExpansion;
-import fr.gouv.finances.dgfip.xemelios.common.Constants;
-import fr.gouv.finances.dgfip.xemelios.tools.AbstractTool;
-import fr.gouv.finances.dgfip.xemelios.tools.MenuTitle;
-
-/**
- * Cette classe sert a impleenter la signature de fichier PES comme un plugin Xemelios
- * @author laurent.meckert
- */
-@MenuTitle(value = "Génération de fichier PES PJ")
- public class PesPjPlugin extends AbstractTool {
- private JFrame parentWindow = null;
- private static final Logger logger = Logger.getLogger(PesPjPlugin.class);
-
- /** Creates a new instance of SignerFichierPlugin */
- public PesPjPlugin() {
- super();
- }
-
- /**
- * Donne le parent au plugin
- * @param parentWindow
- */
- public void setParentWindow(JFrame parentWindow) {
- this.parentWindow = parentWindow;
- }
-
- public void run() {
- Runnable mainTask = new Runnable() {
- public void run() {
- try {
-
- // CustomFactory.essaie();
- File jardirectory = null;
- // Essaie de determiner d'ou vient le jar du plugin
- // On
- PropertiesExpansion pe = new PropertiesExpansion();
-
- pe.putAll(System.getProperties());
- String sDir = pe.getProperty(Constants.SYS_PROP_XEMELIOS_TOOLS_DIR);
- if(sDir!=null) {
- String[] directories = sDir.split(",");
- for(String currentDirectory:directories) {
- // replacing ${....} variables
- currentDirectory=pe.replace(currentDirectory);
- logger.debug("looking for tool into "+currentDirectory);
- File dir = new File(currentDirectory);
- if(dir.exists() && dir.isDirectory()) {
- File myjar = new File(dir, "plugin-generator-pes-pjs") ;
- if(myjar.exists()) {
- jardirectory = dir;
- break;
- }
- }
- }
- }
-
- // DlgSignerfichier dialog = new DlgSignerfichier(parentWindow, true);
- WizardPesPj dialog = new WizardPesPj(parentWindow, false);
- dialog.run();
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
- };
-
- System.gc();
- Thread t = new Thread(mainTask);
- t.setPriority(Thread.NORM_PRIORITY);
- java.awt.EventQueue.invokeLater(t);
-
- }
-
-
- /**
- *
- * @param args ligne de commande
- */
- public static void main(String args[]) {
- PesPjPlugin plugin = new PesPjPlugin();
- plugin.run();
- }
- }
-