Fabio Dalle Ave 2 ماه پیش
والد
کامیت
b185df216c

+ 0 - 18
src/main/java/commons/constant/Constant.java

@@ -1,18 +0,0 @@
-package commons.constant;
-
-public class Constant
-{
-	public static final String SEARCH_TYPE = "tipRic";
-	
-	public static final String ORDINAMENTO_RICERCA = "orderSels";
-	public static final String DIREZIONE_RICERCA = "dirs";
-	public static final String MAX_ROWS = "maxRows";
-	
-	public static final String SOURCE = "src";
-	
-	public static final String BR_HTML = "<br/>";
-	public static final int MAX_ROWS_VALUE = 25;
-
-
-}
-

+ 0 - 44
src/main/java/commons/constant/ConstantMVC.java

@@ -1,44 +0,0 @@
-package commons.constant;
-
-public class ConstantMVC {
-
-	public static final String IS_SUBMIT = "isSubmit";
-	//	Gestione generica form
-    public static final String PARAM_ACTION = "act";
-    
-	/**	I dati devono essere cancellati (ci sar? l'id della cosa da cancellare)
-     * Comment for <code>ACTION_DELETE</code>
-     */
-    public static final String ACTION_DELETE = "DEL";
-    
-	/**	I dati devo essere salvati (crea/aggiorna) (ci sar? l'id della cosa da aggiornare)
-     * Comment for <code>ACTION_SAVE</code>
-     */
-    public static final String ACTION_SAVE = "SAVE";
-    
-	/**	I dati devono essere caricati (ci sar? l'id della cosa di cui mostrare i dati)
-     * Comment for <code>ACTION_LOAD</code>
-     */
-    public static final String ACTION_LOAD = "LOAD";
-    
-	/**	I dati devo essere inseriti (crea) (ci sar? l'id della cosa da aggiornare)
-     * Comment for <code>ACTION_SAVE</code>
-     */
-    public static final String JSESSIONID = "JSESSIONID";
-    public static final String NO_SESSION = "NO_SESSION";
-    
-    
-    public static final String ACTION_INSERT = "INS";
-	public static final String AUTH_STRING = "auth";
-	public static final String AUTH_RESULT = "auth_result";
-
-	//	Gestione generica ricerca	
-	public static final String PARAM_AUTO_SEARCH = "auto";
-	public static final String PARAM_ORDER_DESCENDING = "desc";
-	public static final String PARAM_OPEN_SEARCH = "open";
-	public static final String PARAM_WRITE_FUNCTION = "write";
-
-	public static final String PARAM_SEARCH_TYPE = "tipRic";
-	public static final String PARAM_ORDINAMENTO_RICERCA = "orderSel";
-	public static final String PARAM_DIREZIONE_RICERCA = "dir";
-}

+ 0 - 64
src/main/java/commons/enumerate/AllineamentoCampoSpool_e.java

@@ -1,64 +0,0 @@
-/*
- * Creato il 15-nov-04
- */
-package commons.enumerate;
-
-
-public class AllineamentoCampoSpool_e extends Enumerate
-{
-	/**
-     * Comment for <code>serialVersionUID</code>
-     */
-    private static final long serialVersionUID = 1L;
-    
-    public final static class Values
-	{
-		public static final byte NULLO = 0;
-		public static final byte DESTRA = 1;
-		public static final byte SINISTRA = 2;
-		public static final byte CENTRATO = 3;
-	}
-
-	public final static AllineamentoCampoSpool_e NULLO;
-	public final static AllineamentoCampoSpool_e DESTRA;
-	public final static AllineamentoCampoSpool_e SINISTRA;
-	public final static AllineamentoCampoSpool_e CENTRATO;
-
-	private static final AllineamentoCampoSpool_e[] m_values;
-	static
-	{
-		NULLO = new AllineamentoCampoSpool_e("Nullo", Values.NULLO);
-		DESTRA = new AllineamentoCampoSpool_e("Destra", Values.DESTRA);
-		SINISTRA = new AllineamentoCampoSpool_e("Sinistra", Values.SINISTRA);
-		CENTRATO = new AllineamentoCampoSpool_e("Centrato", Values.CENTRATO);
-				
-		m_values = new AllineamentoCampoSpool_e[]
-		{
-			NULLO,
-			DESTRA,
-			SINISTRA,
-			CENTRATO,
-		};
-	}
-	AllineamentoCampoSpool_e(String name, int value)
-	{
-		super(name, value);
-	}
-	public static AllineamentoCampoSpool_e getValue(int value)
-	{
-		return (AllineamentoCampoSpool_e)Enumerate.getValue(AllineamentoCampoSpool_e.class, value);
-	}
-	public static AllineamentoCampoSpool_e getValue(String value)
-	{
-		return (AllineamentoCampoSpool_e)Enumerate.getValue(AllineamentoCampoSpool_e.class, value);
-	}
-	public static final Enumerate[] values()
-	{
-		Enumerate[] arrayEnum = new Enumerate[m_values.length];
-		for (int i = 0; i < m_values.length; i++)
-		{
-			arrayEnum[i] = m_values[i];
-		}
-		return arrayEnum;
-	}
-}

+ 0 - 47
src/main/java/commons/enumerate/Mese_e.java

@@ -1,47 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum Mese_e
-{
-	NULLO(""),
-	GENNAIO("Gennaio"),
-	FEBBRAIO("Febbraio"),
-	MARZO("Marzo"),
-	APRILE("Aprile"),
-	MAGGIO("Maggio"),
-	GIUGNO("Giugno"),
-	LUGLIO("Luglio"),
-	AGOSTO("Agosto"),
-	SETTEMBRE("Settembre"),
-	OTTOBRE("Ottobre"),
-	NOVEMBRE("Novembre"),
-	DICEMBRE("Dicembre");
-	
-	public static EnumMap<Mese_e, String> descriptions = new 
-	EnumMap<Mese_e, String>(
-			Mese_e.class);
-
-	static
-	{
-		for(Mese_e e : Mese_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private Mese_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private Mese_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-}

+ 0 - 46
src/main/java/commons/enumerate/OrdinamentoRicercaComuni_e.java

@@ -1,46 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum OrdinamentoRicercaComuni_e {
-	
-	NULLO(""),
-	DESCRIZIONE("Descrizione");
-	
-	public static EnumMap<OrdinamentoRicercaComuni_e, String> descriptions = new 
-	EnumMap<OrdinamentoRicercaComuni_e, String>(
-			OrdinamentoRicercaComuni_e.class);
-
-	static
-	{
-		for(OrdinamentoRicercaComuni_e e : OrdinamentoRicercaComuni_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private OrdinamentoRicercaComuni_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private OrdinamentoRicercaComuni_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	public static final OrdinamentoRicercaComuni_e getValue(int ordinal)
-	{
-		for (OrdinamentoRicercaComuni_e stato : OrdinamentoRicercaComuni_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return OrdinamentoRicercaComuni_e.DESCRIZIONE;
-	}
-
-}

+ 0 - 39
src/main/java/commons/enumerate/OrdinamentoRicercaFrazione_e.java

@@ -1,39 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum OrdinamentoRicercaFrazione_e {
-
-    NULLO(""),
-	DESCRIZIONE("Descrizione"),
-	CAP("Cap");
-	
-	public static EnumMap<OrdinamentoRicercaFrazione_e, String> descriptions = new 
-	EnumMap<OrdinamentoRicercaFrazione_e, String>(
-			OrdinamentoRicercaFrazione_e.class);
-
-	static
-	{
-		for(OrdinamentoRicercaFrazione_e e : OrdinamentoRicercaFrazione_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private OrdinamentoRicercaFrazione_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private OrdinamentoRicercaFrazione_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	
-}

+ 0 - 46
src/main/java/commons/enumerate/OrdinamentoRicercaProvince_e.java

@@ -1,46 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum OrdinamentoRicercaProvince_e {
-	
-	CODICE("Codice"),
-	DESCRIZIONE("Descrizione");
-	
-	public static EnumMap<OrdinamentoRicercaProvince_e, String> descriptions = new 
-	EnumMap<OrdinamentoRicercaProvince_e, String>(
-			OrdinamentoRicercaProvince_e.class);
-
-	static
-	{
-		for(OrdinamentoRicercaProvince_e e : OrdinamentoRicercaProvince_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private OrdinamentoRicercaProvince_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private OrdinamentoRicercaProvince_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	public static final OrdinamentoRicercaProvince_e getValue(int ordinal)
-	{
-		for (OrdinamentoRicercaProvince_e stato : OrdinamentoRicercaProvince_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return OrdinamentoRicercaProvince_e.CODICE;
-	}
-
-}

+ 0 - 46
src/main/java/commons/enumerate/OrdinamentoRicercaRegioni_e.java

@@ -1,46 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum OrdinamentoRicercaRegioni_e {
-	
-	CODICE("Codice"),
-	DESCRIZIONE("Descrizione");
-	
-	public static EnumMap<OrdinamentoRicercaRegioni_e, String> descriptions = new 
-	EnumMap<OrdinamentoRicercaRegioni_e, String>(
-			OrdinamentoRicercaRegioni_e.class);
-
-	static
-	{
-		for(OrdinamentoRicercaRegioni_e e : OrdinamentoRicercaRegioni_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private OrdinamentoRicercaRegioni_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private OrdinamentoRicercaRegioni_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	public static final OrdinamentoRicercaRegioni_e getValue(int ordinal)
-	{
-		for (OrdinamentoRicercaRegioni_e stato : OrdinamentoRicercaRegioni_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return OrdinamentoRicercaRegioni_e.CODICE;
-	}
-
-}

+ 0 - 40
src/main/java/commons/enumerate/OrdinamentoRicercaStradario_e.java

@@ -1,40 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum OrdinamentoRicercaStradario_e {
-	
-	NOME_STRADA("nomeStrada"),
-    CAP("CAP"),
-    TIPOLOGIA("Tipologia"),
-    QUARTIERE("Quartiere");
-	
-	public static EnumMap<OrdinamentoRicercaStradario_e, String> descriptions = new 
-	EnumMap<OrdinamentoRicercaStradario_e, String>(
-			OrdinamentoRicercaStradario_e.class);
-
-	static
-	{
-		for(OrdinamentoRicercaStradario_e e : OrdinamentoRicercaStradario_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private OrdinamentoRicercaStradario_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private OrdinamentoRicercaStradario_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-
-}

+ 0 - 48
src/main/java/commons/enumerate/OrdinamentoRicercaTipologiaIndirizzo_e.java

@@ -1,48 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum OrdinamentoRicercaTipologiaIndirizzo_e {
-	
-	CODICE_CATASTALE("Codice catastale"),
-	DESCRIZIONE("Descrizione"),
-	PROVINCIA("Provincia"),
-	CAP("Cap");
-	
-	public static EnumMap<OrdinamentoRicercaTipologiaIndirizzo_e, String> descriptions = new 
-	EnumMap<OrdinamentoRicercaTipologiaIndirizzo_e, String>(
-			OrdinamentoRicercaTipologiaIndirizzo_e.class);
-
-	static
-	{
-		for(OrdinamentoRicercaTipologiaIndirizzo_e e : OrdinamentoRicercaTipologiaIndirizzo_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private OrdinamentoRicercaTipologiaIndirizzo_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private OrdinamentoRicercaTipologiaIndirizzo_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	public static final OrdinamentoRicercaTipologiaIndirizzo_e getValue(int ordinal)
-	{
-		for (OrdinamentoRicercaTipologiaIndirizzo_e stato : OrdinamentoRicercaTipologiaIndirizzo_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return OrdinamentoRicercaTipologiaIndirizzo_e.DESCRIZIONE;
-	}
-
-}

+ 0 - 38
src/main/java/commons/enumerate/Sesso_e.java

@@ -1,38 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum Sesso_e {
-	
-	NULLO(""),
-	MASCHIO("Maschio"),
-	FEMMINA("Femmina");
-	
-	public static EnumMap<Sesso_e, String> descriptions = new 
-	EnumMap<Sesso_e, String>(
-			Sesso_e.class);
-
-	static
-	{
-		for(Sesso_e e : Sesso_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private Sesso_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private Sesso_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-
-}

+ 0 - 47
src/main/java/commons/enumerate/TipoOrdinamentoRicerca_e.java

@@ -1,47 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum TipoOrdinamentoRicerca_e {
-	
-	NULLO(""),
-	ASC("ASC"),
-	DESC("DESC");
-	
-	public static EnumMap<TipoOrdinamentoRicerca_e, String> descriptions = new 
-	EnumMap<TipoOrdinamentoRicerca_e, String>(
-			TipoOrdinamentoRicerca_e.class);
-
-	static
-	{
-		for(TipoOrdinamentoRicerca_e e : TipoOrdinamentoRicerca_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private TipoOrdinamentoRicerca_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private TipoOrdinamentoRicerca_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	public static final TipoOrdinamentoRicerca_e getValue(int ordinal)
-	{
-		for (TipoOrdinamentoRicerca_e stato : TipoOrdinamentoRicerca_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return TipoOrdinamentoRicerca_e.NULLO;
-	}
-
-}

+ 0 - 39
src/main/java/commons/enumerate/TipoPeriodoAbbonamento_e.java

@@ -1,39 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum TipoPeriodoAbbonamento_e {
-	
-	NULLO(""),
-	GIORNI("Giorni"),
-	MESI("Mesi"),
-	ANNI("Anni");
-	
-	public static EnumMap<TipoPeriodoAbbonamento_e, String> descriptions = new 
-	EnumMap<TipoPeriodoAbbonamento_e, String>(
-			TipoPeriodoAbbonamento_e.class);
-
-	static
-	{
-		for(TipoPeriodoAbbonamento_e e : TipoPeriodoAbbonamento_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private TipoPeriodoAbbonamento_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private TipoPeriodoAbbonamento_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-
-}

+ 0 - 47
src/main/java/commons/enumerate/TipoResponseAJAX_e.java

@@ -1,47 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum TipoResponseAJAX_e {
-	
-	NULLO(""),
-	XML("XML"),
-	JSON("JSON"),
-	TEXT("Text");
-	
-	public static EnumMap<TipoResponseAJAX_e, String> descriptions = new 
-	EnumMap<TipoResponseAJAX_e, String>(
-			TipoResponseAJAX_e.class);
-
-	static
-	{
-		for(TipoResponseAJAX_e e : TipoResponseAJAX_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private TipoResponseAJAX_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private TipoResponseAJAX_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	public static final TipoResponseAJAX_e getValue(int ordinal)
-	{
-		for (TipoResponseAJAX_e stato : TipoResponseAJAX_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return TipoResponseAJAX_e.NULLO;
-	}
-}

+ 0 - 49
src/main/java/commons/enumerate/TipoRichiestaAJAX_e.java

@@ -1,49 +0,0 @@
-package commons.enumerate;
-
-import java.util.EnumMap;
-
-public enum TipoRichiestaAJAX_e {
-	
-	NULLO(""),
-	LOGIN("Login"),
-	REGISTRAZIONE("Registrazione");
-	
-	public static EnumMap<TipoRichiestaAJAX_e, String> descriptions = new 
-	EnumMap<TipoRichiestaAJAX_e, String>(
-			TipoRichiestaAJAX_e.class);
-
-	static
-	{
-		for(TipoRichiestaAJAX_e e : TipoRichiestaAJAX_e.values())
-			descriptions.put(e,e.description);
-	}
-	
-	private String description;
-	private Integer drOrdinal;
-	
-	private TipoRichiestaAJAX_e(String dsc)
-	{
-		this(dsc,null);
-	}
-	
-	private TipoRichiestaAJAX_e(String dsc,Integer drOrdinal)
-	{
-		this.description = dsc;
-		this.drOrdinal = drOrdinal;
-	}
-	
-	public final String getDescription()	{	return description;	}
-	public final int getDrOrdinal()		{	return null == drOrdinal ? ordinal() : drOrdinal;	}
-	
-	
-	public static final TipoRichiestaAJAX_e getValue(int ordinal)
-	{
-		for (TipoRichiestaAJAX_e stato : TipoRichiestaAJAX_e.values()) {
-			if (stato.ordinal() == ordinal)
-				return stato;
-		} 
-		return TipoRichiestaAJAX_e.NULLO;
-	}
-
-
-}

+ 0 - 121
src/main/java/commons/utility/Mail.java

@@ -1,121 +0,0 @@
-package commons.utility;
-
-// import the JavaMail packages
-import java.io.File;
-import java.util.Properties;
-
-import jakarta.activation.DataHandler;
-import jakarta.activation.FileDataSource;
-import jakarta.mail.Message;
-import jakarta.mail.MessagingException;
-import jakarta.mail.Part;
-import jakarta.mail.Session;
-import jakarta.mail.Transport;
-import jakarta.mail.internet.AddressException;
-import jakarta.mail.internet.InternetAddress;
-import jakarta.mail.internet.MimeBodyPart;
-import jakarta.mail.internet.MimeMessage;
-import jakarta.mail.internet.MimeMultipart;
-
-import commons.exception.ZMailException;
-
-public class Mail
-{
-	private String smtpServer;
-	private int port;
-	
-	public Mail(String smtp)
-	{
-		this.port = -1;
-		int portPos = smtp.lastIndexOf(":");
-		if (portPos >= 0) {
-			if ((portPos < (smtp.length()-1))) {
-				try {
-					this.port = Integer.parseInt(smtp.substring(portPos+1));
-				} catch (Exception e) {				
-				}
-			}
-			smtp = smtp.substring(0, portPos);
-		}
-		this.smtpServer = smtp;		
-	}
-
-	public Mail(String smtp, int port)
-	{
-		this.smtpServer = smtp;
-		this.port = port;
-	}
-
-	public boolean Send(String from, String[] to, String subject, String text, String[] attachments, String MIME_TYPE) throws ZMailException
-	{
-		// create some properties and get the default Session
-		try
-		{
-			Properties properties = new Properties();
-			properties.put("mail.smtp.host", this.smtpServer);
-			if (port > 0) properties.put("mail.smtp.port", Integer.toString(this.port));
-			Session session = Session.getInstance(properties, null);
-			// create a message
-			MimeMessage msg = new MimeMessage(session);
-			msg.setFrom(new InternetAddress(from));
-			
-			InternetAddress[] address = new InternetAddress[to.length]; 
-        	for (int i = 0; i < to.length; i++)
-            {
-				address[i] = new InternetAddress(to[i]);
-            }
-        
-			//InternetAddress[] address = { new InternetAddress(to)};
-			msg.setRecipients(Message.RecipientType.TO, address);
-			msg.setSubject(subject);
-			// create and fill the first message part
-			MimeMultipart mp = new MimeMultipart();
-			MimeBodyPart message = new MimeBodyPart();
-			message.setDisposition(Part.INLINE);
-			message.setContent(text, MIME_TYPE);
-			mp.addBodyPart(message);
-			if (attachments != null)
-			{
-				for (int i = 0; i < attachments.length; i++)
-				{
-				    if (attachments[i] != null) {
-					    MimeBodyPart file_part = new MimeBodyPart();
-						File file = new File(attachments[i]);
-						FileDataSource fds = new FileDataSource(file);
-						DataHandler dh = new DataHandler(fds);
-						file_part.setFileName(file.getName());
-						file_part.setDisposition(Part.ATTACHMENT);
-						file_part.setDescription("Attached file: " + file.getName());
-						file_part.setDataHandler(dh);
-						mp.addBodyPart(file_part);
-				    }
-				}
-			}
-			// add the Multipart to the message
-			msg.setContent(mp);
-			// send the message
-			Transport.send(msg);
-			return true;
-		}
-		catch (AddressException e)
-		{
-			throw new ZMailException(e);
-		}
-		catch (MessagingException e)
-		{
-			throw new ZMailException(e);
-		}
-	}
-	public boolean Send(String from, String[] to, String subject, String text, String[] attachments) throws ZMailException
-	{
-		return Send(from, to, subject, text, attachments, "text/plain; charset=iso-8859-1");
-	}
-	public boolean Send(String from, String to, String subject, String text, String[] attachments, String MIME_TYPE) throws ZMailException
-	{
-		return Send(from, new String[]{to}, subject, text, attachments, MIME_TYPE);
-	}
-	public boolean Send(String from, String to, String subject, String text, String[] attachments) throws ZMailException
-	{
-		return Send(from, to, subject, text, attachments, "text/plain; charset=iso-8859-1");
-	}
-}

+ 0 - 203
src/main/java/commons/utility/NumberUtility.java

@@ -1,203 +0,0 @@
-package commons.utility;
-
-import java.math.BigDecimal;
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
-
-
-public class NumberUtility {
-
-	public static boolean isNumeric(String str)
-	{
-	  return str.matches("-?\\d+(\\.\\d+)?");  
-	}
-
-	
-	public static int arrotonda(double valore)
-	{
-		//valore = Math.round(valore);
-		//int ritorno = new Double(valore).intValue();
-		return arrotonda(valore,2);
-	}
-	public static int arrotonda(double valore,int precision)
-	{
-		BigDecimal value = new BigDecimal(valore);
-		if(valore > (double)0) {
-			value = value.setScale(2,BigDecimal.ROUND_HALF_UP);
-		}
-		else {
-			value = value.setScale(2,BigDecimal.ROUND_HALF_DOWN);
-		}
-		return new Double(Math.round(value.doubleValue())).intValue();
-	}
-
-	public static Double arrotondaDouble(double valore,int precision)
-	{
-		BigDecimal value = new BigDecimal(valore);
-		if(valore > (double)0)
-		{
-			value = value.setScale(precision,BigDecimal.ROUND_HALF_UP);
-		}
-		else
-		{
-			value = value.setScale(precision,BigDecimal.ROUND_HALF_DOWN);
-		}
-		return new Double(value.doubleValue());
-	}
-
-	public static double calcolaPercentuale(double importo, double percentuale)
-	{
-		return importo * percentuale / 100.0;
-	}
-
-	public static double dividi(double dividendo, double divisore)
-	{
-		if (divisore != 0)
-		{
-			return dividendo / divisore;
-		}
-		return 0;
-	}
-
-	/**
-	 * Tentativi falliti
-	 *  public static double truncateNumber(double value, int precision)
-		{
-			double x = 0;
-
-			try
-			{
-				BigDecimal b1 = new BigDecimal(value);
-				return b1.setScale(precision, BigDecimal.ROUND_DOWN).doubleValue();
-			}
-			catch (Exception e) {
-				System.out.println("Modifica truncate:");
-				e.printStackTrace();
-			}
-			return x;
-		}
-
-		public static double truncateNumber(double value,int precision)
-		{
-			double mult = Math.pow(10.0,precision);
-			double x = value > 0 ? Math.floor(value * mult) / mult : Math.ceil(value * mult) / mult;
-
-			return new Double(x).doubleValue();
-		}
-
-		public static double truncateNumber(double value, int precision)
-		{
-			double x = 0;
-
-			try
-			{
-				int parteIntera = (int) (value * Math.pow(10.0,precision));
-				return parteIntera / Math.pow(10.0, precision);
-			}
-			catch (Exception e) {
-				System.out.println("Modifica truncate:");
-				e.printStackTrace();
-			}
-			return x;
-		}
-
-	public static double truncateNumber(double value, int precision)
-	{
-		double x = arrotondaDouble(value, precision + 3);
-		String pattern = "0.0";
-
-		for(int i = 0 ; i < precision; i++)
-		{
-			pattern += "#";
-		}
-		DecimalFormatSymbols dfs = new DecimalFormatSymbols();
-		dfs.setDecimalSeparator('.');
-
-		String format = new DecimalFormat(pattern,dfs).format(value);
-		if(format.substring(format.indexOf(".") +1 ,format.length()).length() > precision)
-		{
-			format = format.substring(0,format.length() - 1);
-		}
-		return Double.parseDouble(format);
-	}
-	*/
-	/***
-	 * Da usare solo in liquidazione
-	 */
-//	public static double truncateNumber(double value, int precision)
-//	{
-//		String valore = Integer.toString((int)value) + ".";
-//		value -= (int)value;
-//		for(int i = 0; i < precision; i++)
-//		{
-//			value *= 10;
-//			valore += Integer.toString((int)value);
-//			value -= (int)value;
-//		}
-//
-//		return Double.parseDouble(valore);
-//	}
-
-	public static double truncateNumber(double value, int precision)
-	{
-		double valore = arrotondaDouble(value, precision + 3);
-		String pattern = "0.0";
-
-		for(int i = 0 ; i < precision + 3; i++)
-		{
-			pattern += "#";
-		}
-		DecimalFormatSymbols dfs = new DecimalFormatSymbols();
-		dfs.setDecimalSeparator('.');
-
-		String format = new DecimalFormat(pattern,dfs).format(valore);
-		if(format.substring(format.indexOf(".")+1 ,format.length()).length() > precision)
-		{
-			int lunghezza = format.indexOf(".") + precision + 1;
-			format = format.substring(0,Math.min(lunghezza,format.length()));
-		}
-		return Double.parseDouble(format);
-	}
-
-
-	public static int valoreAssoluto(int parziale)
-	{
-		return Math.abs(parziale);
-	}
-
-	/**
-	 * Arrotonda per eccesso un valore decimale.
-	 * @param value
-	 * @return valore intero arrotondato per eccesso
-	 */
-	public static int arrotondaPerEccesso(double value)
-	{
-		BigDecimal valRet = new BigDecimal(value);
-		//approssimo per eccesso
-		valRet = valRet.setScale(0, BigDecimal.ROUND_UP);
-		return valRet.intValue();
-	}
-	
-	/**
-	 * Arrotonda per difetto un valore decimale.
-	 * @param value
-	 * @return valore intero arrotondato per difetto
-	 */	
-	public static int arrotondaPerDifetto(double value)
-	{
-		BigDecimal valRet = new BigDecimal(value);
-		//approssimo per eccesso
-		valRet = valRet.setScale(0, BigDecimal.ROUND_DOWN);
-		return valRet.intValue();
-	}
-
-	public static double rapportaAiGiorni(double importo, int giorni)
-	{
-		return importo * giorni / 365;
-	}
-
-	public static double rapportaAiMesi(double importo, int mesi)
-	{
-		return importo * mesi / 12;
-	}
-}

+ 0 - 180
src/main/java/commons/utility/router/QueryString.java

@@ -1,180 +0,0 @@
-package commons.utility.router;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import commons.type.NotNullModificator;
-
-/**
- * 	Classe di utilit? per la gestione della query string
- */
-public final class QueryString
-{
-	public static final String ENCODE_SET = "UTF-8";
-	public final static String start = "?";
-	public final static String separator_pairs = "&";
-	public final static String separator_values = "=";
-
-	Properties props;
-	
-	public QueryString()
-	{
-		super();
-		props = new Properties();
-	}
-
-	public QueryString(String queryString)
-	{
-		this(queryString,false);
-	}
-
-	public QueryString(String queryString,boolean URLEncode)
-	{
-		this();
-		setQueryString(queryString,URLEncode);
-	}
-
-	public void setProperty(String name)
-	{
-		setProperty(name,null);
-	}
-	
-	public void setProperty(String name,String value)
-	{
-		try
-		{
-			setProperty(name,value,false);
-		}
-		catch (UnsupportedEncodingException e)
-		{
-		}
-	}
-
-	public void setProperty(String name,String value,boolean encode) throws UnsupportedEncodingException
-	{
-		String v = value;
-		if(null != v)
-		{
-			if(encode)
-				v = URLEncoder.encode(v,ENCODE_SET);
-			props.setProperty(name,v);
-		}
-		else
-		{
-			//	Una propriet? con valore nullo viene rimossa...
-			if(hasProperty(name))
-				removeProperty(name);
-		}
-	}
-	
-	public String getProperty(String name)
-	{
-		try
-		{
-			return getProperty(name,false);
-		}
-		catch (UnsupportedEncodingException e)
-		{
-		}
-		return null;
-	}
-
-	public String getProperty(String name,boolean decode) throws UnsupportedEncodingException
-	{
-		String v = props.getProperty(name);
-		if(decode)
-			v = URLDecoder.decode(v,ENCODE_SET);
-		return v;
-		
-	}
-	
-	public boolean hasProperty(String name)
-	{
-		return props.containsKey(name);
-	}
-	
-	public String removeProperty(String name)
-	{
-		return (String)props.remove(name);
-	}
-	
-	public void clear()
-	{
-		props.clear();
-	}
-	
-	public String getQueryString(boolean URLDecode)
-	{
-		StringBuffer qs = new StringBuffer();
-		for(Enumeration keys = props.keys();keys.hasMoreElements();)
-		{
-			final String k = (String)keys.nextElement();
-			String v = props.getProperty(k);
-			if(URLDecode)
-			{
-				try
-				{
-					v = URLDecoder.decode(v,ENCODE_SET);
-				}
-				catch (UnsupportedEncodingException e)
-				{
-				}
-			}
-			qs.append(k).append(separator_values).append(v);
-			if(keys.hasMoreElements())	qs.append(separator_pairs);
-		}
-		return qs.length() > 0 ? start + qs.toString() : qs.toString();
-	}
-
-	public void setQueryString(String query,boolean URLEncode)
-	{
-		String qs = new NotNullModificator().modify(query);
-
-		props.clear();
-		if(qs.length() > 0)
-		{
-			int startIndex = qs.indexOf(start);
-			if(-1 != startIndex)
-				qs = qs.substring(startIndex+1);
-	
-			String[] parts = qs.split(separator_pairs);
-	
-			for (int i = 0; i < parts.length; i++)
-			{
-				String p = parts[i];
-				String[] subpart = p.split(separator_values);
-				//	Nel caso vengano passati dei parametri senza valore...
-				if(subpart.length == 2)
-				{
-					if(!URLEncode)
-						props.setProperty(subpart[0],subpart[1]);
-					else
-					{
-						try
-						{
-							props.setProperty(subpart[0],URLEncoder.encode(subpart[1],ENCODE_SET));
-						}
-						catch (UnsupportedEncodingException e)
-						{
-							props.setProperty(subpart[0],subpart[1]);
-						}
-					}
-				}
-			}
-		}
-	}
-	
-	public Enumeration getPropertyNames()
-	{
-		return props.keys();
-	}
-	
-	@Override
-	public String toString()
-	{
-		return getQueryString(false);
-	}	
-}

+ 0 - 114
src/main/java/commons/utility/router/SimpleURLBuilder.java

@@ -1,114 +0,0 @@
-package commons.utility.router;
-
-import java.io.UnsupportedEncodingException;
-
-import commons.utility.database.NullValue;
-
-
-/**
- * 	Classe di utilit? per la gestione degli URL (solo costruzione)
- */
-public class SimpleURLBuilder
-{
-	public static class Factory
-	{
-		//	Implementazione vuota
-		public final static SimpleURLBuilder create()
-		{
-			return new SimpleURLBuilder();
-		}
-	
-		//	Implementazione con path e quesry string impostati
-		public final static SimpleURLBuilder create(final String path,boolean URLDecode)
-		{
-			final SimpleURLBuilder url = new SimpleURLBuilder();
-			if(null != path)
-			{
-				int separator = path.indexOf(QueryString.start);
-				if(-1 != separator)
-				{
-					url.setPath(path.substring(0,separator));
-					url.setQueryString(path.substring(separator));
-				}
-				else
-					url.setPath(path);
-			}
-			return url;		
-		}
-	}
-		
-	/**	La lista dei parametri
-	 */
-	QueryString queryString;
-	/**	Il percorso SENZA query string della pagina (azione di arrivo)
-	 */
-	String path = NullValue.STRING;
-	
-	public SimpleURLBuilder()
-	{
-		super();
-		queryString = new QueryString();
-	}
-	public SimpleURLBuilder(String path)
-	{
-		this();
-		setPath(path);
-	}
-
-	/**	Costruzione completa dell'URL di ritorno
-	 * @return L'url completo di path e query string
-	 */
-	public String getURL()
-	{
-		return new StringBuffer(path).append(queryString.getQueryString(false)).toString();
-	}
-		
-	public void setQueryString(String query)
-	{
-		queryString.setQueryString(query,false);
-	}
-	
-	public void setProperty(String name)
-	{
-		queryString.setProperty(name);
-	}
-	public void setProperty(String name, String value)
-	{
-		queryString.setProperty(name, value);
-	}
-	public void setPropertyEncoded(String name, String value) throws UnsupportedEncodingException
-	{
-		queryString.setProperty(name, value, true);
-	}
-	public void setProperty(String name, int value)
-	{
-		queryString.setProperty(name, Integer.toString(value));
-	}
-	public void setProperty(String name, boolean value)
-	{
-		queryString.setProperty(name, value ? "1" : "0");
-	}
-	@Override
-	public String toString()
-	{
-		return getURL();
-	}
-	
-	//	Accessors
-	public QueryString getQueryString()
-	{
-		return queryString;
-	}
-	public void setQueryString(QueryString string)
-	{
-		queryString = string;
-	}
-	public void setPath(String string)
-	{
-		path = string;
-	}
-	public String getPath()
-	{
-		return path;
-	}
-}