7 Commits e61601350f ... b185df216c

Auteur SHA1 Message Date
  Fabio Dalle Ave b185df216c wip cleanup il y a 2 mois
  Fabio Dalle Ave 05cfd6c950 wip cleanup il y a 2 mois
  Fabio Dalle Ave 0b49b5000a wip cleanup il y a 2 mois
  Fabio Dalle Ave 1349e52987 wip cleanup il y a 2 mois
  Fabio Dalle Ave 26a7b44c9c wip cleanup il y a 2 mois
  Fabio Dalle Ave 0d1d1c779d wip cleanup il y a 2 mois
  Fabio Dalle Ave ee56008d61 Cleanup il y a 2 mois
73 fichiers modifiés avec 0 ajouts et 6788 suppressions
  1. 0 18
      src/main/java/commons/constant/Constant.java
  2. 0 44
      src/main/java/commons/constant/ConstantMVC.java
  3. 0 64
      src/main/java/commons/enumerate/AllineamentoCampoSpool_e.java
  4. 0 47
      src/main/java/commons/enumerate/Mese_e.java
  5. 0 46
      src/main/java/commons/enumerate/OrdinamentoRicercaComuni_e.java
  6. 0 39
      src/main/java/commons/enumerate/OrdinamentoRicercaFrazione_e.java
  7. 0 46
      src/main/java/commons/enumerate/OrdinamentoRicercaProvince_e.java
  8. 0 46
      src/main/java/commons/enumerate/OrdinamentoRicercaRegioni_e.java
  9. 0 40
      src/main/java/commons/enumerate/OrdinamentoRicercaStradario_e.java
  10. 0 48
      src/main/java/commons/enumerate/OrdinamentoRicercaTipologiaIndirizzo_e.java
  11. 0 38
      src/main/java/commons/enumerate/Sesso_e.java
  12. 0 47
      src/main/java/commons/enumerate/TipoOrdinamentoRicerca_e.java
  13. 0 39
      src/main/java/commons/enumerate/TipoPeriodoAbbonamento_e.java
  14. 0 47
      src/main/java/commons/enumerate/TipoResponseAJAX_e.java
  15. 0 49
      src/main/java/commons/enumerate/TipoRichiestaAJAX_e.java
  16. 0 51
      src/main/java/commons/exception/WebValidateActionException.java
  17. 0 0
      src/main/java/commons/type/ModifyException.java
  18. 0 136
      src/main/java/commons/utility/BrowserVersion.java
  19. 0 401
      src/main/java/commons/utility/Compression.java
  20. 0 150
      src/main/java/commons/utility/CryptedCookie.java
  21. 0 190
      src/main/java/commons/utility/Crypto.java
  22. 0 180
      src/main/java/commons/utility/FileUtility.java
  23. 0 121
      src/main/java/commons/utility/Mail.java
  24. 0 203
      src/main/java/commons/utility/NumberUtility.java
  25. 0 258
      src/main/java/commons/utility/OutputZipFile.java
  26. 0 205
      src/main/java/commons/utility/SeparatedText.java
  27. 0 290
      src/main/java/commons/utility/WebUtility.java
  28. 0 11
      src/main/java/commons/utility/bean/DatiAbilitazioni.java
  29. 0 164
      src/main/java/commons/utility/dao/AliasToBeanResultTransformerEnanced.java
  30. 0 209
      src/main/java/commons/utility/dao/GenericHibernateDaoSupport.java
  31. 0 48
      src/main/java/commons/utility/dao/IGenericHibernateDaoSupport.java
  32. 0 30
      src/main/java/commons/utility/dao/ZDAOException.java
  33. 0 6
      src/main/java/commons/utility/database/DatabaseFactory.java
  34. 0 110
      src/main/java/commons/utility/database/DbQuery.java
  35. 0 49
      src/main/java/commons/utility/database/DbQuerySQL.java
  36. 0 161
      src/main/java/commons/utility/database/DbUpdate.java
  37. 0 39
      src/main/java/commons/utility/database/DbUpdateSQL.java
  38. 0 35
      src/main/java/commons/utility/database/ObjectRef.java
  39. 0 165
      src/main/java/commons/utility/database/postgressql/PostgresSqResultSet.java
  40. 0 234
      src/main/java/commons/utility/database/postgressql/PostgresSqSqlStatement.java
  41. 0 584
      src/main/java/commons/utility/database/postgressql/PostgresSqStatement.java
  42. 0 50
      src/main/java/commons/utility/database/postgressql/PostgresSqlDatabase.java
  43. 0 31
      src/main/java/commons/utility/enviroment/HibernateFactory.java
  44. 0 13
      src/main/java/commons/utility/formatter/IControllerValidator.java
  45. 0 180
      src/main/java/commons/utility/router/QueryString.java
  46. 0 114
      src/main/java/commons/utility/router/SimpleURLBuilder.java
  47. 0 42
      src/main/java/commons/utility/spool/AttributeImpl.java
  48. 0 75
      src/main/java/commons/utility/spool/AttributeListImpl.java
  49. 0 244
      src/main/java/commons/utility/spool/BoundText.java
  50. 0 63
      src/main/java/commons/utility/spool/Font.java
  51. 0 12
      src/main/java/commons/utility/spool/IAttribute.java
  52. 0 18
      src/main/java/commons/utility/spool/IAttributeList.java
  53. 0 30
      src/main/java/commons/utility/spool/IBound.java
  54. 0 10
      src/main/java/commons/utility/spool/IBoundNode.java
  55. 0 9
      src/main/java/commons/utility/spool/IBoundWrite.java
  56. 0 15
      src/main/java/commons/utility/spool/IFont.java
  57. 0 12
      src/main/java/commons/utility/spool/IPoint.java
  58. 0 13
      src/main/java/commons/utility/spool/ISectionNode.java
  59. 0 75
      src/main/java/commons/utility/spool/MemoryBoundNode.java
  60. 0 74
      src/main/java/commons/utility/spool/MemorySectionNode.java
  61. 0 42
      src/main/java/commons/utility/spool/Point.java
  62. 0 109
      src/main/java/commons/utility/tabelle/TabellaCaptcha.java
  63. 0 36
      src/main/java/commons/web/bean/BaseSessionBean.java
  64. 0 58
      src/main/java/commons/web/bean/BeanAbstractBase.java
  65. 0 284
      src/main/java/commons/web/mvc/BaseFieldForm.java
  66. 0 16
      src/main/java/commons/web/mvc/BeanBase.java
  67. 0 95
      src/main/java/commons/web/mvc/CustomPathMatcher.java
  68. 0 38
      src/main/java/commons/web/mvc/ExpEval.java
  69. 0 28
      src/main/java/commons/web/mvc/IBeanBase.java
  70. 0 209
      src/main/java/commons/web/mvc/SelectEnumJava.java
  71. 0 81
      src/main/java/commons/web/resolver/BaseResolverAJAX.java
  72. 0 10
      src/main/java/commons/web/resolver/IResolverAjax.java
  73. 0 14
      src/main/java/commons/web/resolver/IResponseAjax.java

+ 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 - 51
src/main/java/commons/exception/WebValidateActionException.java

@@ -1,51 +0,0 @@
-package commons.exception;
-
-import commons.utility.exception.WebActionException;
-
-
-
-public class WebValidateActionException extends WebActionException
-{
-
-	/**
-     * Comment for <code>serialVersionUID</code>
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-	 * @param action
-	 */
-	public WebValidateActionException(String action)
-	{
-		super(action);
-	}
-
-	/**
-	 * @param message
-	 * @param action
-	 */
-	public WebValidateActionException(String message, String action)
-	{
-		super(message, action);
-	}
-
-	/**
-	 * @param message
-	 * @param cause
-	 * @param action
-	 */
-	public WebValidateActionException(String message, Throwable cause, String action)
-	{
-		super(message, cause, action);
-	}
-
-	/**
-	 * @param cause
-	 * @param action
-	 */
-	public WebValidateActionException(Throwable cause, String action)
-	{
-		super(cause, action);
-	}
-
-}

+ 0 - 0
src/main/java/commons/type/ModifyException.java


+ 0 - 136
src/main/java/commons/utility/BrowserVersion.java

@@ -1,136 +0,0 @@
-package commons.utility;
-
-import jakarta.servlet.http.HttpServletRequest;
-
-import commons.utility.database.NullValue;
-
-public class BrowserVersion {
-	private boolean dipendente = false;
-
-	private boolean operatore = false;
-
-	private HttpServletRequest req = null;
-
-	public BrowserVersion(HttpServletRequest req) {
-		super();
-		this.req = req;
-	}
-
-	public void check() {
-
-		String agt = NullValue.STRING;
-		String majorS=NullValue.STRING;;
-
-		try {
-			agt = req.getHeader("user-agent");
-			if (agt != null)
-				agt = agt.toLowerCase();
-			else
-				return;
-
-			boolean firefx = (agt.indexOf("firefox") != -1);
-			if (firefx) {
-				operatore = true;
-				dipendente = true;
-			} else {
-				boolean ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
-
-				// int minor = Integer.parseInt(minorS);
-
-				if (ie) {
-					majorS = agt.substring(agt.indexOf("msie") + 5, agt.indexOf("msie") + 5 + 1);
-					int major = Integer.parseInt(majorS);
-					boolean ie3 = (major < 4);
-					boolean ie4 = (major == 4 && (agt.indexOf("msie 4") != -1));
-					boolean ie4up = (major >= 4);
-					boolean ie5 = (major == 5 && (agt.indexOf("msie 5.0") != -1));
-					boolean ie5_5 = (major == 5 && (agt.indexOf("msie 5.5") != -1));
-					boolean ie5up = (major >= 5 && !ie3 && !ie4 && !ie5);
-					boolean ie5_5up = (major >= 5 && !ie3 && !ie4 && !ie5 && !ie5_5);
-					boolean ie6 = (major == 6 && (agt.indexOf("msie 6.0") != -1));
-					boolean ie6up = (major >= 6 && !ie3 && !ie4 && !ie5 && !ie5_5 && !ie6);
-
-					if (ie5_5 || ie5_5up) {
-						dipendente = true;
-					}
-
-					if (ie6 || ie6up) {
-						operatore = true;
-						dipendente = true;
-					}
-				}
-			}
-		} catch (Exception er) {
-			
-			if (agt == null) {
-				System.out.println("*************************************** USER-AGENT ***************************");
-				System.out.println("USER-AGENT NULLO " + er.getMessage());
-				er.printStackTrace();
-				System.out.println("*************************************** USER-AGENT ***************************");
-			}
-			if (req == null) {
-				
-				System.out.println("*************************************** USER-AGENT ***************************");
-				System.out.println("Request NULLA " + er.getMessage());
-				er.printStackTrace();
-				System.out.println("*************************************** USER-AGENT ***************************");
-			}
-
-			if (agt.length() == 0) {
-				
-				System.out.println("*************************************** USER-AGENT ***************************");
-				System.out.println("Agent == blank" + er.getMessage());
-				er.printStackTrace();
-				System.out.println("*************************************** USER-AGENT ***************************");
-			}
-			 if (er instanceof NumberFormatException) {
-					System.out.println("*************************************** USER-AGENT ***************************");
-					System.out.println("NumberFormatException");
-					System.out.println("Valore= "+majorS);
-					System.out.println(er.getMessage());
-					er.printStackTrace();
-					System.out.println("*************************************** USER-AGENT ***************************");
-			}
-			
-			System.out.println("*************************************** USER-AGENT ***************************");
-			System.out.println("GENERAL");
-			System.out.println("agt= " +agt);
-			System.out.println("majorS= "+majorS);
-			System.out.println("");
-			System.out.println(er.getMessage());
-			er.printStackTrace();
-			System.out.println("*************************************** USER-AGENT ***************************");
-			
-			
-			operatore = false;
-			dipendente = true;
-		}
-
-	}
-
-	public boolean isDipendente() {
-		return dipendente;
-	}
-
-	public boolean isOperatore() {
-		return operatore;
-	}
-
-	
-	public String recoverRemoteAddress() {
-		String retVal = req.getRemoteAddr(); 
-		return (!StringUtility.empty(retVal) && retVal.length() > 30)?retVal.substring(0,30):retVal;
-	}
-
-	public String recoverHost() {
-		String retVal = req.getHeader("host"); 
-		return (!StringUtility.empty(retVal) && retVal.length() > 50)?retVal.substring(0,50):retVal;
-	}
-
-	public String recoverUserAgent() {
-		String retVal = req.getHeader("user-agent"); 
-		return (!StringUtility.empty(retVal) && retVal.length() > 100)?retVal.substring(0,100):retVal;
-	}
-
-
-}

+ 0 - 401
src/main/java/commons/utility/Compression.java

@@ -1,401 +0,0 @@
-package commons.utility;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Enumeration;
-import java.util.zip.DataFormatException;
-import java.util.zip.Deflater;
-import java.util.zip.Inflater;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipOutputStream;
-
-import commons.utility.database.NullValue;
-import commons.exception.ZCompressException;
-
-
-public class Compression {
-	
-	/**	Factory per la creazione dei file in uscita
-	 */
-	public final static class OutputZipFileFactory
-	{
-		/**	Crea un file zip aperto in scrittura a partire da un OutputStream
-		 * @param outstream lo stream su cui wrappare lo zip
-		 * @param sizeBuffer se != null && > 0 allora lo stream viene wrappato all'interno di un BufferedOutputStream
-		 * @return Una impl wrappata nel seguente modo:
-		 * 			se outstream instanceof ZipOutputStream wrap diretto su outstream
-		 * 			se outstream instanceof BufferedOutputStream allora wrap di un ZipOutputStream intorno a outstrema
-		 * 			negli altri casi,se sizeBuffer > 0 allora wrapping su un BufferedOutputStream(outstream,sizeBuffer)
-		 * 			altrimenti wrapping diretto su outstream
-		 * @throws ZCompressException
-		 */
-		public final static OutputZipFile create(final OutputStream outstream,final Integer sizeBuffer) throws ZCompressException
-		{
-			OutputZipFile impl = null;
-			//	Se lo stream ? quello di un file zip...
-			if(outstream instanceof ZipOutputStream)
-				//	...aggancialo e basta!
-				impl = new OutputZipFile((ZipOutputStream) outstream);
-			else
-			{
-				OutputStream _outstream = outstream;
-				if(null != sizeBuffer && sizeBuffer.intValue() > 0 && !(outstream instanceof BufferedOutputStream))
-					_outstream = new BufferedOutputStream(outstream,sizeBuffer);
-				impl = new OutputZipFile
-				(
-					new ZipOutputStream(_outstream)
-				);
-			}
-			return impl;
-		}
-		
-		/**	Crea un file zip aperto in scrittura,se il file esiste viene sovrascritto
-		 * @param filename
-		 * @return
-		 * @throws ZCompressException
-		 */
-		public final static OutputZipFile create(String filename) throws ZCompressException
-		{
-			FileOutputStream fos = null;
-			try
-			{
-				fos = new FileOutputStream(filename);
-				return create(fos,10);
-			}
-			catch(IOException e)
-			{
-				if(null != fos)
-				{
-					try
-					{
-						fos.close();
-					}
-					catch (IOException e1)
-					{
-					}
-					fos = null;
-				}
-				throw new ZCompressException(e);
-			}
-			finally
-			{
-			}
-		}
-	}
-	
-	public Compression() {}
-	private static final int BUFFER= 2048;
-
-	/////////////////////////////////////////////////////////////////////////////
-	//Compressione Decompressione FILE
-
-	/**	Comprime un blocco di dati all'interno di un file zip
-	 * @param dataToStore il blocco di dati da comprimere
-	 * @param dataToStoreName il nome che il blocco di dati avr? all'interno del file zip
-	 * @param outputFile il nome del file di uscita
-	 * @throws ZCompressException
-	 */
-	public static void CompressFile(byte[] dataToStore, String dataToStoreName, String outputFile) throws ZCompressException
-	{
-		ZipOutputStream out = null;
-		try
-		{
-			out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
-			ZipEntry entry = new ZipEntry(dataToStoreName);
-			out.putNextEntry(entry);
-			out.write(dataToStore);
-		}
-		catch(IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-		finally
-		{
-			try
-			{
-				if(null != out)		out.close();
-			}
-			catch(IOException e)
-			{
-				throw new ZCompressException(e);
-			}
-		}
-	}
-	
-	public static String CompressFile(String inputFile, String outputFile) throws ZCompressException {
-		try
-		{
-			String err= "OK";
-			BufferedInputStream origin= null;
-			ZipOutputStream out= null;
-			FileInputStream fi= null;
-			try {
-				FileOutputStream dest= new FileOutputStream(outputFile);
-				out= new ZipOutputStream(new BufferedOutputStream(dest));
-				byte data[]= new byte[BUFFER];
-				File f= new File(inputFile);
-				fi= new FileInputStream(f);
-				origin= new BufferedInputStream(fi, BUFFER);
-				ZipEntry entry= new ZipEntry(f.getName());
-				out.putNextEntry(entry);
-				int count;
-				while ((count= origin.read(data, 0, BUFFER)) != -1) {
-					out.write(data, 0, count);
-				}
-			} catch (IOException ex) {
-				err= ex.getMessage();
-			} finally {
-				origin.close();
-				out.close();
-				fi.close();
-			}
-			return err;
-		}
-		catch (IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-	}
-
-	public static String CompressFile(String[] inputFile, String outputFile) throws ZCompressException {
-		try
-		{
-			String err= "OK";
-			BufferedInputStream origin= null;
-			ZipOutputStream out= null;
-			FileInputStream fi= null;
-			try {
-				FileOutputStream dest= new FileOutputStream(outputFile);
-				out= new ZipOutputStream(new BufferedOutputStream(dest));
-				byte data[]= new byte[BUFFER];
-				for (int i= 0; i < inputFile.length; i++) {
-					File f= new File(inputFile[i]);
-					fi= new FileInputStream(f);
-					origin= new BufferedInputStream(fi, BUFFER);
-					ZipEntry entry= new ZipEntry(f.getName());
-					out.putNextEntry(entry);
-					int count;
-					while ((count= origin.read(data, 0, BUFFER)) != -1) {
-						out.write(data, 0, count);
-					}
-					fi.close();
-				}
-			} catch (IOException ex) {
-				err= ex.getMessage();
-			} finally {
-				if (origin != null) {
-					origin.close();
-				}
-				if (out != null) {
-					out.close();
-				}
-				if (fi != null) {
-					fi.close();
-				}
-			}
-			return err;
-		}
-		catch (IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-	}
-
-	public static String DecompressFile(String inputFile, String outputFile) throws ZCompressException {
-		try
-		{
-			String err= "OK";
-			BufferedOutputStream dest= null;
-			BufferedInputStream is= null;
-			FileOutputStream fos= null;
-			ZipFile zipfile= null;
-			try {
-				ZipEntry entry;
-				zipfile= new ZipFile(inputFile);
-				Enumeration e= zipfile.entries();
-				while (e.hasMoreElements()) {
-					entry= (ZipEntry)e.nextElement();
-					is= new BufferedInputStream(zipfile.getInputStream(entry));
-					int count;
-					byte data[]= new byte[BUFFER];
-					if (null == outputFile || NullValue.STRING.equalsIgnoreCase(outputFile))
-					{
-					    String path = inputFile.substring(0, inputFile.lastIndexOf(File.separator));
-					    fos= new FileOutputStream(path + File.separator + entry.getName());
-					}
-					else
-					{
-					    fos= new FileOutputStream(outputFile);
-					}
-					dest= new BufferedOutputStream(fos, BUFFER);
-					while ((count= is.read(data, 0, BUFFER)) != -1) {
-						dest.write(data, 0, count);
-					}
-					if(dest != null)
-				    {
-				        dest.flush();
-						dest.close();
-				    }
-					
-				    if(is != null)
-				    {
-				        is.close();
-				    }
-				    
-				    if(fos != null)
-				    {
-				        fos.flush();
-						fos.close();    
-				    }
-				}
-			} catch (IOException ex) {
-				err= ex.getMessage();
-			} finally {
-			    if(dest != null)
-			    {
-			        dest.flush();
-					dest.close();
-			    }
-				
-			    if(is != null)
-			    {
-			        is.close();
-			    }
-			    
-			    if(fos != null)
-			    {
-			        fos.flush();
-					fos.close();    
-			    }
-			    
-			    if(zipfile != null)
-			    {
-			        zipfile.close();
-			    }
-			}
-			
-			return err;
-		}
-		catch (IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-	}
-	
-	public static String DecompressFile(String inputFile) throws ZCompressException {
-		return DecompressFile(inputFile, null);
-	}
-
-	/////////////////////////////////////////////////////////////////////////////
-	//Compressione Decompressione BYTE[]
-
-	public static byte[] Compress(byte[] input) throws ZCompressException {
-		try
-		{
-			Deflater compressor= new Deflater();
-			compressor.setLevel(Deflater.BEST_COMPRESSION);
-			
-			// Give the compressor the data to compress
-			compressor.setInput(input);
-			compressor.finish();
-			
-			ByteArrayOutputStream bos= new ByteArrayOutputStream(input.length);
-			
-			// Compress the data
-			byte[] buf= new byte[BUFFER];
-			while (!compressor.finished()) {
-				int count= compressor.deflate(buf);
-				bos.write(buf, 0, count);
-			}
-			//try {
-			bos.close();
-			//} catch (IOException e){
-			//}
-			
-			// Get the compressed data
-			byte[] compressedData= bos.toByteArray();
-			return compressedData;
-		}
-		catch (IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-
-	}
-
-	public static byte[] Decompress(byte[] input) throws ZCompressException {
-		try
-		{
-			Inflater decompressor= new Inflater();
-			decompressor.setInput(input);
-			
-			// Create an expandable byte array to hold the decompressed data
-			ByteArrayOutputStream bos= new ByteArrayOutputStream(input.length);
-			
-			// Decompress the data
-			byte[] buf= new byte[BUFFER];
-			while (!decompressor.finished()) {
-				//try {
-				int count= decompressor.inflate(buf);
-				bos.write(buf, 0, count);
-				//} catch (DataFormatException e) {
-				//}
-			}
-			//try {
-			bos.close();
-			//} catch (IOException e) {
-			//}
-			
-			// Get the decompressed data
-			byte[] decompressedData= bos.toByteArray();
-			return decompressedData;
-		}
-		catch (DataFormatException e)
-		{
-			throw new ZCompressException(e);
-		}
-		catch (IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-	}
-	
-	public static void CompressFile(String pathRedix, String pathSingleFile, ZipOutputStream out) throws IOException {
-        BufferedInputStream origin = null;
-        FileInputStream fi = null;
-        try {
-            byte data[] = new byte[BUFFER];
-
-            File f = new File(pathRedix + pathSingleFile);
-            fi = new FileInputStream(f);
-            origin = new BufferedInputStream(fi, BUFFER);
-
-            ZipEntry entry = new ZipEntry(pathSingleFile);
-            out.putNextEntry(entry);
-            int count;
-            while ((count = origin.read(data, 0, BUFFER)) != -1) {
-                out.write(data, 0, count);
-            }
-            fi.close();
-        } catch (IOException ex) {
-            throw ex;
-        } finally {
-            if (origin != null) {
-                origin.close();
-                origin = null;
-            }
-            if (fi != null) {
-                fi.close();
-                fi = null;
-            }
-        }
-    }
-
-}

+ 0 - 150
src/main/java/commons/utility/CryptedCookie.java

@@ -1,150 +0,0 @@
-package commons.utility;
-
-import jakarta.servlet.http.Cookie;
-
-public class CryptedCookie extends Cookie
-{
-
-	private Cookie ck = null;
-	
-	public CryptedCookie(Cookie ck) {
-		super(ck.getName(), "");
-		this.ck = ck;
-	}
-	
-	public CryptedCookie(String name, String value) {
-		this(new Cookie(name, ""));
-		this.setValue(value);
-	}
-
-	public Cookie getCk()
-	{
-		return ck;
-	}
-
-	public void setCk(Cookie ck)
-	{
-		this.ck = ck;
-	}
-
-	public Object clone()
-	{
-		return ck.clone();
-	}
-
-	public boolean equals(Object o)
-	{
-		return ck.equals(o);
-	}
-
-	public String getComment()
-	{
-		return ck.getComment();
-	}
-
-	public String getDomain()
-	{
-		return ck.getDomain();
-	}
-
-	public int getMaxAge()
-	{
-		return ck.getMaxAge();
-	}
-
-	public String getName()
-	{
-		return ck.getName();
-	}
-
-	public String getPath()
-	{
-		return ck.getPath();
-	}
-
-	public boolean getSecure()
-	{
-		return ck.getSecure();
-	}
-
-	public String getValue()
-	{
-		try
-		{
-			return Crypto.decrypt(ck.getValue());
-		}
-		catch(Exception e)
-		{
-			setValue("");
-			return "";
-		}
-	}
-
-	public int getVersion()
-	{
-		return ck.getVersion();
-	}
-
-	public int hashCode()
-	{
-		return ck.hashCode();
-	}
-
-	public void setComment(String arg0)
-	{
-		ck.setComment(arg0);
-		super.setComment(arg0);
-	}
-
-	public void setDomain(String arg0)
-	{
-		ck.setDomain(arg0);
-		super.setDomain(arg0);
-	}
-
-	public void setMaxAge(int arg0)
-	{
-		ck.setMaxAge(arg0);
-		super.setMaxAge(arg0);
-	}
-
-	public void setPath(String arg0)
-	{
-		ck.setPath(arg0);
-		super.setPath(arg0);
-	}
-
-	public void setSecure(boolean arg0)
-	{
-		ck.setSecure(arg0);
-		super.setSecure(arg0);
-	}
-
-	public void setValue(String arg0)
-	{
-		try
-		{
-			ck.setValue(Crypto.encrypt(arg0));
-			super.setValue(ck.getValue());
-		}
-		catch(Exception e)
-		{
-			ck.setValue("");
-			super.setValue("");
-		}
-	}
-
-	public void setVersion(int arg0)
-	{
-		ck.setVersion(arg0);
-		super.setVersion(arg0);
-	}
-
-	public String toString()
-	{
-		return ck.toString();
-	}
-	
-	
-
-}

+ 0 - 190
src/main/java/commons/utility/Crypto.java

@@ -1,190 +0,0 @@
-package commons.utility;
-
-import commons.exception.ZCryptoException;
-
-
-
-public class Crypto {
-  private static String KEY="Zucchetti2004";
-
-  public static String encrypt(String input) throws ZCryptoException{
-      if (input == null || (input != null && input.length() < 3))
-          return input;
-      return encrypt(input, KEY);
-  }
-
-  private static String encrypt(String input,String key) throws ZCryptoException{
-      if (input == null)
-        return input;
-
-      String output = "";
-      int y = 3;
-      int k = 0;
-      int x = 0;
-      char[] chKey = key.toCharArray();
-      char[] tmp = input.toCharArray();
-      long chk = 100;
-      String strChk = "";
-      //Random rdm1 = new Random(((int)new Date().getTime()));
-      //String randomKey = "" + Math.round((rdm1.nextDouble() * 700) + 123);
-	  String randomKey = "" + ((Math.random() * 700) + 123);
-      char[] chRandomKey = randomKey.toCharArray();
-      for (int i = 0; i < 3; i++) {
-        output += ((char)((chRandomKey[i]+chKey[k])-(80+y)));
-        y++;
-        if (y > 7)
-          y = 0;
-        k++;
-        if (k >= chKey.length)
-          k = 0;
-      }
-      for (int i = 0; i < tmp.length; i++)
-        chk += tmp[i];
-      chk = chk * tmp.length;
-      strChk = "000" + chk;
-      strChk = strChk.substring((strChk.length()-3));
-      input = input + strChk;
-      char[] tmp1 = input.toCharArray();
-      int iTmp = 0;
-      for (int i = 0; i < tmp1.length; i++) {
-        iTmp = ((tmp1[i]+chKey[k])-(80+y)+chRandomKey[x]-(35 + x));
-        if (iTmp > 255)
-          iTmp -= 255;
-        else if (iTmp < 0)
-          iTmp += 255;
-        output += ((char)iTmp);
-        y++;
-        if (y > 7)
-          y = 0;
-        k++;
-        if (k >= chKey.length)
-          k = 0;
-        x++;
-        if (x > 2)
-          x = 0;
-      }
-      output = adjustCrypt(output);
-      return output;
-  }
-
-
-  private static String adjustCrypt(String input) throws ZCryptoException{
-    String output = "";
-    String sTmp = "";
-    char[] tmp = input.toCharArray();
-    for (int i=0; i<tmp.length; i++)
-    {
-            sTmp = "" + (tmp[i] + 0);
-            sTmp =  Integer.toHexString(tmp[i]);
-            sTmp = padLeft(sTmp,2,'0');
-            output += sTmp;
-
-    }
-    return output;
-  }
-
-  private static String padLeft(String str, int w, char c) throws ZCryptoException{
-    if (str.length() >= w) return str;
-    StringBuffer sb=new StringBuffer();
-    for (int i = w - str.length(); i > 0; --i) sb.append(c);
-    sb.append(str);
-    return new String(sb);
-  }
-
-
-  private static String adjustDecrypt(String input) throws ZCryptoException{
-    String output = "";
-    String sTmp = "";
-
-    for (int i=0; i<(input.length()); i += 2)
-    {
-            sTmp = input.substring(i,i+2);
-            if(sTmp.startsWith("0"))
-            {
-                    sTmp = sTmp.substring(1);
-                    if(sTmp.startsWith("0"))
-                            sTmp = "0";
-            }
-            output += "" + ((char)(Integer.parseInt(sTmp,16)));
-    }
-    return output;
-  }
-
-  public static String decrypt(String input) throws ZCryptoException{
-      if (input == null || (input != null && input.length() < 3))
-          return input;
-      return decrypt(input,KEY);
-  }
-
-  private static String decrypt(String input,String key) throws ZCryptoException{
-    if (input == null)
-      return input;
-
-    char[] chKey = key.toCharArray();
-    input = adjustDecrypt(input);
-
-    String output = "";
-    int y = 3;
-    int k = 0;
-    int x = 0;
-    char[] tmp = input.toCharArray();
-    long chk = 100;
-    String strChk = "";
-    String strChk1 = "";
-    String randomKey = "";
-    for (int i = 0; i < 3; i++) {
-      randomKey += ((char)((tmp[i]-chKey[k])+(80+y)));
-      y++;
-      if (y > 7)
-        y = 0;
-      k++;
-      if (k >= chKey.length)
-        k = 0;
-    }
-    char[] chRandomKey = randomKey.toCharArray();
-
-    int iTmp = 0;
-    for (int i = 3; i < tmp.length; i++) {
-      iTmp = ( (tmp[i] - chKey[k]) + (80 + y) - chRandomKey[x] + (35 + x));
-      if (iTmp < 0)
-        iTmp += 255;
-      else if (iTmp > 255)
-        iTmp -= 255;
-
-      output += ( (char) iTmp);
-      y++;
-      if (y > 7)
-        y = 0;
-      k++;
-      if (k >= chKey.length)
-        k = 0;
-      x++;
-      if (x > 2)
-        x = 0;
-    }
-    strChk = output.substring( (output.length() - 3));
-    output = output.substring(0, (output.length() - 3));
-    char[] tmp1 = output.toCharArray();
-    for (int i = 0; i < tmp1.length; i++)
-      chk += tmp1[i];
-    chk = chk * tmp1.length;
-    strChk1 = "000" + chk;
-    strChk1 = strChk1.substring( (strChk1.length() - 3));
-    if (!strChk.equals(strChk1)) {
-       throw new ZCryptoException();
-    }
-    return output;
-  }
-}
-
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 180
src/main/java/commons/utility/FileUtility.java

@@ -1,180 +0,0 @@
-package commons.utility;
-
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.channels.FileChannel;
-import java.util.Date;
-
-import javax.imageio.ImageIO;
-
-import commons.utility.database.NullValue;
-
-
-public class FileUtility {
-	
-    public static byte[] fromFileToByte(String pathFile) throws IOException 
-    {
-		File file = new File(pathFile);
-		InputStream is = new FileInputStream(file);
-		long length = file.length();
-		byte[] bytes = new byte[(int)length];
-		// Read in the bytes
-		int offset = 0;
-		int numRead = 0;
-		while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {
-			offset += numRead;
-		}
-		// Ensure all the bytes have been read in
-		if (offset < bytes.length) {
-			is.close();
-			throw new IOException("Impossibile leggere il file " + file.getName());
-		}
-		// Close the input stream and return bytes
-		is.close();
-		return bytes;
-	}
-    
-	public static void fromByteToFile(byte[] bytes,
-	                                  File file)
-	{
-		BufferedOutputStream bos = null;
-
-		try
-		{
-			//create an object of FileOutputStream
-			FileOutputStream fos = new FileOutputStream(file);
-			//create an object of BufferedOutputStream
-			bos = new BufferedOutputStream(fos);
-
-			/*
-			 * To write byte array to file use,
-			 * public void write(byte[] b) method of BufferedOutputStream
-			 * class.
-			 */
-			bos.write(bytes);
-		}
-		catch (FileNotFoundException fnfe)
-		{
-			fnfe.printStackTrace();
-		}
-		catch (IOException ioe)
-		{
-			ioe.printStackTrace();
-		}
-		finally
-		{
-			if (bos != null)
-			{
-				try
-				{
-					//flush the BufferedOutputStream
-					bos.flush();
-					//close the BufferedOutputStream
-					bos.close();
-				}
-				catch (Exception e)
-				{
-				}
-			}
-		}
-	}
-
-    //Elimina una cartella e le sue sottocartelle compresi i file
-    public static boolean deleteDir(File dir) {
-        if (dir.isDirectory()) {
-            String[] children = dir.list();
-            for (int i=0; i<children.length; i++) {
-                boolean success = deleteDir(new File(dir, children[i]));
-                if (!success) {
-                    return false;
-                }
-            }
-        }
-
-        // The directory is now empty so delete it
-        return dir.delete();
-    }
-
-    //Copia file
-    public static void copy(File source, File dest) throws IOException {
-        FileChannel in = null, out = null;
-        try {
-             in = new FileInputStream(source).getChannel();
-             out = new FileOutputStream(dest).getChannel();
-
-             in.transferTo( 0, in.size(), out);
-        } finally {
-             if (in != null)
-                 in.close();
-             if (out != null)
-                 out.close();
-        }
-   }
-    
-    public static String getFileNameFromPath(String path)
-    {
- 	   File file = new File(path);
- 	   return file.getName();
-    }
-    
-    public static String getExtension(String fileName)
-    {
- 	   String ext = NullValue.STRING;
- 	   if(!StringUtility.empty(fileName, true))
- 		   ext = fileName.substring(fileName.lastIndexOf(".") + 1);
- 	   return ext;
-    }
-    
-    public static String getContentType(String tipoFile)
-  	{
-  		if(tipoFile.equals("pdf"))
-  			return "application/pdf";
-  		else if(tipoFile.equals("zip"))
-  			return "application/zip";
-  		else if(tipoFile.equals("rar"))
-  			return "application/rar";
-  		else if(tipoFile.equals("doc"))
-  			return "application/msword";
-  		else if(tipoFile.equals("jpg"))
-  			return "image/jpg";
-  		else if(tipoFile.equals("jpeg"))
-  			return "image/jpeg";
-  		else if(tipoFile.equals("bmp"))
-  			return "imgae/bmp";
-  		else if(tipoFile.equals("tif"))
-  			return "image/tif";
-  		else if(tipoFile.equals("tiff"))
-  			return "imgae/tiff";
-  		else if(tipoFile.equals("gif"))
-  			return "image/gif";
-  		else if(tipoFile.equals("png"))
-  			return "imgae/png";
-  		else
-  			return "application/octet-stream";
-  	}
-    
-    public static byte[] resizeImage(File fileUploaded) throws IOException
-    {
-    	final int IMG_WIDTH = 130;
-    	final int IMG_HEIGHT = 130;
-    	BufferedImage originalImage = ImageIO.read(fileUploaded);
-		int type = originalImage.getType() == 0 ? BufferedImage.TYPE_INT_ARGB : originalImage.getType();
-    	
-		BufferedImage resizedImage = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, type);
-    	Graphics2D g = resizedImage.createGraphics();
-    	g.drawImage(originalImage, 0, 0, IMG_WIDTH, IMG_HEIGHT, null);
-    	g.dispose();
-     
-    	File file = new File(new Date().getTime() + "");
-    	ImageIO.write(resizedImage, "jpg", file); 
-    	
-    	return fromFileToByte(file.getAbsolutePath());
-        }
-}

+ 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 - 258
src/main/java/commons/utility/OutputZipFile.java

@@ -1,258 +0,0 @@
-package commons.utility;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import commons.exception.ZCompressException;
-
-/**	Gestione di un file zip in scrittura
- */
-public class OutputZipFile
-{
-	public static final String ENTRY_SEPARATOR = "/";
-	public static final int BUFFER = 2048;
-	private ZipOutputStream out;
-	private List<String> entries = null;
-	
-	public OutputZipFile(ZipOutputStream outStream)
-	{
-		out = outStream;
-		entries = new ArrayList<String>();
-	}
-	
-	/**	Verifica se una entry esiste
-	 * @param entryName
-	 * @return
-	 */
-	private boolean checkEntry(String entryName)
-	{
-		return Collections.binarySearch(entries,entryName) >= 0;
-	}
-	
-	/**	Aggiunge una entry alla lista
-	 * @param entryName
-	 */
-	private void addEntry(String entryName)
-	{
-		entries.add(entryName);
-		Collections.sort(entries);
-	}
-	
-	/**	Forza la chiusura dell'entry corrente
-	 * @throws ZCompressException
-	 */
-	private void ensureCloseEntry() throws ZCompressException
-	{
-		try
-		{
-			out.closeEntry();
-		}
-		catch(IOException ioE)
-		{
-			throw new ZCompressException(ioE);
-		}		
-	}
-
-	/**	Normalizza il nome di una entry eliminando tutti i / all'inizio e 
-	 * 	rendendo i separatori tutti come /
-	 * @param entryName
-	 * @return
-	 */
-	private String normalizeEntry(String entryName)
-	{
-		String en = entryName.replace('\\',OutputZipFile.ENTRY_SEPARATOR.charAt(0));
-		while(en.length() > 0 && OutputZipFile.ENTRY_SEPARATOR.charAt(0) == en.charAt(0))
-		{
-			en = en.substring(1);
-		}
-		return en;
-	}
-	
-	/**	Forza,se non esiste,il / alla fine dell'entry
-	 * @param entryName
-	 * @return
-	 */
-	private String ensureSlash(String entryName)
-	{
-		String en = entryName;
-		if(!en.endsWith(OutputZipFile.ENTRY_SEPARATOR))
-			en += OutputZipFile.ENTRY_SEPARATOR.charAt(0);	
-		return en;
-	}
-	
-	/**	Aggiunge una dir al file
-	 * @param entryName
-	 * @throws ZCompressException
-	 */
-	private void addDirEntry(String entryName) throws ZCompressException
-	{
-		final String en = ensureSlash(normalizeEntry(entryName));
-		if(checkEntry(en))	return;
-		try
-		{
-			ZipEntry entry = new ZipEntry(en);
-			entry.setMethod(ZipEntry.STORED);
-			entry.setCompressedSize(0L);
-			entry.setSize(0L);
-			entry.setCrc(0L);
-			out.putNextEntry(entry);
-		}
-		catch(IOException ioE)
-		{
-			throw new ZCompressException(ioE);
-		}
-		finally
-		{
-			ensureCloseEntry();
-			addEntry(en);
-		}
-	}
-	
-	/**	Aggiunge un blocco usando come entryID un nome
-	 * @param inputfileName
-	 * @throws ZCompressException
-	 */
-	private void addBlock(byte[] data,String entryName) throws ZCompressException
-	{
-		final String en = normalizeEntry(entryName);
-		if(checkEntry(en))	return;
-		try
-		{
-			if(null == out)
-			{
-				throw new ZCompressException("File not open for write.");
-			}
-			ZipEntry entry = new ZipEntry(en);
-			entry.setMethod(ZipEntry.DEFLATED);
-			out.putNextEntry(entry);
-			out.write(data);
-		}
-		catch(IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-		finally
-		{
-			ensureCloseEntry();
-			addEntry(en);
-		}
-	}
-	
-	private void addFile(File f,String entryName) throws ZCompressException
-	{
-		final String en = normalizeEntry(entryName);
-		if(checkEntry(en))	return;
-		if(null == out)
-		{
-			throw new ZCompressException("File not open for write.");
-		}
-		
-		BufferedInputStream inputfileStream = null;
-		try
-		{
-			inputfileStream = new BufferedInputStream(new FileInputStream(f));
-			ZipEntry entry = new ZipEntry(entryName);
-			entry.setMethod(ZipEntry.DEFLATED);
-			out.putNextEntry(entry);
-			byte[] buffer = new byte[BUFFER];
-			int count = 0;
-			while(-1 != (count = inputfileStream.read(buffer,0,buffer.length)))
-			{
-				out.write(buffer,0,count);
-			}
-		}
-		catch(IOException ioE)
-		{
-			throw new ZCompressException(ioE);
-		}
-		finally
-		{			
-			try
-			{
-				ensureCloseEntry();
-				addEntry(en);
-				if(null != inputfileStream)
-					inputfileStream.close();
-			}
-			catch(IOException ioE)
-			{
-				throw new ZCompressException(ioE);
-			}
-		}
-	}
-	
-	//	Public intf
-	public void addDirectory(String entryName) throws ZCompressException
-	{
-		addDirEntry(entryName);
-	}
-	
-	/**	Aggiunge un file allo zip
-	 * @param file
-	 * @param entryPath
-	 * @param addFullPath true per aggiungere come entry il nome completo dell'entry o solo l'ultima parte
-	 * @throws ZCompressException
-	 */
-	public void addFile(File file,String entryPath,boolean addFullPath) throws ZCompressException
-	{
-		String en = entryPath;
-		if(en.endsWith(OutputZipFile.ENTRY_SEPARATOR))
-			throw new ZCompressException("Entries must end with a /");
-		if(!addFullPath)
-		{
-			//	Check for dir path...
-			int lastSlashIndex = en.lastIndexOf(OutputZipFile.ENTRY_SEPARATOR);
-			if(-1 != lastSlashIndex)
-				en = en.substring(lastSlashIndex+1);
-		}		
-		addFile(file,en);
-	}
-
-	/**	Aggiunge un blocco di dati allo zip
-	 * @param file
-	 * @param entryPath
-	 * @param addFullPath true per aggiungere come entry il nome completo dell'entry o solo l'ultima parte
-	 * @throws ZCompressException
-	 */
-	public void addFile(byte[] data,String entryPath,boolean addFullPath) throws ZCompressException
-	{
-		String en = entryPath;
-		if(en.endsWith(OutputZipFile.ENTRY_SEPARATOR))
-			throw new ZCompressException("Entries must end with a /");
-		if(!addFullPath)
-		{
-			//	Check for dir path...
-			int lastSlashIndex = en.lastIndexOf(OutputZipFile.ENTRY_SEPARATOR);
-			if(-1 != lastSlashIndex)
-				en = en.substring(lastSlashIndex+1);
-		}		
-		
-		addBlock(data,en);		
-	}
-	
-	/**	Chiude il file zip
-	 * @throws ZCompressException
-	 */
-	public void close() throws ZCompressException
-	{
-		try
-		{
-			out.close();
-		}
-		catch (IOException e)
-		{
-			throw new ZCompressException(e);
-		}
-		finally
-		{
-			out = null;
-		}
-	}
-}

+ 0 - 205
src/main/java/commons/utility/SeparatedText.java

@@ -1,205 +0,0 @@
-package commons.utility;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * 	Gestisce una lista di oggetti come testo separato da un
- * 	delimitatore
- */
-public class SeparatedText
-{
-	static public class Factory
-	{
-		static public SeparatedText create(Object[] values,char delimiter)
-		{
-			SeparatedText st = new SeparatedText();
-			st.setDelimiter(delimiter);
-			st.setValues(Arrays.asList(values));
-			return st;
-		}
-
-		static public SeparatedText create(List values,char delimiter)
-		{
-			SeparatedText st = new SeparatedText();
-			st.setDelimiter(delimiter);
-			st.setValues(values);
-			return st;
-		}
-
-		static public SeparatedText create(Object[] values)
-		{
-			return create(values,',');
-		}
-
-		static public SeparatedText create(List values)
-		{
-			return create(values,',');
-		}
-
-		static public SeparatedText create(String textValues,char delimiter)
-		{
-			return new SeparatedText(textValues,delimiter);
-		}
-
-		static public SeparatedText create(String textValues)
-		{
-			return create(textValues,',');
-		}
-	}
-	
-	private String separatedText;
-	private char delimiter;
-	private List values;
-	
-	public SeparatedText()
-	{
-		super();
-		setDelimiter(',');
-	}
-
-	public SeparatedText(String text)
-	{
-		this(text,',');
-	}
-
-	public SeparatedText(String text,char delimiter)
-	{
-		super();
-		setDelimiter(delimiter);
-		setSeparatedText(text);
-	}
-	
-	public char getDelimiter()
-	{
-		return delimiter;
-	}
-
-	public String getSeparatedText()
-	{
-		return separatedText;
-	}
-
-	public void setDelimiter(char c)
-	{
-		delimiter = c;
-	}
-
-	public void setSeparatedText(String text)
-	{
-		separatedText = text;
-		values = split(text,getDelimiter());
-	}
-
-	public List getValues()
-	{
-		return values;
-	}
-
-	public void setValues(List values)
-	{
-		this.values = values;
-		separatedText = join(values,getDelimiter());
-	}
-
-	static public List split(String text,char delimiter)
-	{
-		List l = new ArrayList();
-		boolean inQuotes = false;
-		StringBuffer part = new StringBuffer();
-		
-		for(int i = 0;i < text.length();i++)
-		{
-			char ch = text.charAt(i);
-			
-			if(delimiter == ch || ' ' == ch)
-			{
-				//	Fine della stringa!
-				if(!inQuotes)
-				{
-					l.add(part.toString());
-					part.setLength(0);
-					continue;
-				}
-			}
-			else
-			{
-				if('\"' == ch)
-				{
-					//	Leggi il successivo...
-					if(i+1 < text.length())
-					{
-						//	Se il successivo non ? un " allora deve essere uno
-						//	spazio oppure un separatore
-						if(text.charAt(i+1) != '\"')
-						{
-							inQuotes = !inQuotes;
-							continue;
-						}
-						else
-						{
-							//	Questo " deve essere escluso...
-							++i;
-							//	...ed il prossimo carattere verr? inserito!
-						}
-					}
-					else
-					{
-						assert(inQuotes);
-						inQuotes = !inQuotes;
-						continue;
-					}
-				}
-			}
-			part.append(ch);
-		}
-		assert(inQuotes);
-		//	Aggiungi l'ultima stringa se non ? vuota oppure se ? vuota ma l'ultimo carattere
-		//	? un separatore
-		if(	part.length() > 0 ||
-			(0 == part.length() && text.length() > 0 && delimiter == text.charAt(text.length()-1))
-		)
-			l.add(part.toString());
-			
-		return l;
-	}
-	
-	static public String join(List values,char delimiter)
-	{
-		final StringBuffer ret = new StringBuffer();
-		boolean first = true;
-		for(Iterator i = values.iterator();i.hasNext();)
-		{
-			if(!first)	ret.append(delimiter);
-			first = false;
-			ret.append(createSDFText(i.next().toString(),delimiter));
-		}
-		return ret.toString();
-	}
-	
-	private static String createSDFText(String value,char delimiter)
-	{
-		final StringBuffer ret = new StringBuffer();
-		boolean needQuotes = false;
-		for(int i = 0;i < value.length();i++)
-		{
-			final char ch = value.charAt(i);
-			if(delimiter == ch || ' ' == ch)
-			{
-				needQuotes = true;
-			}
-			else
-			{
-				if('\"' == ch)
-				{
-					ret.append('\"');
-				}
-			}
-			ret.append(ch);
-		}
-		if(needQuotes)	ret.insert(0,'\"').append('\"');
-		return ret.toString();
-	}
-}

+ 0 - 290
src/main/java/commons/utility/WebUtility.java

@@ -1,290 +0,0 @@
-package commons.utility;
-
-import java.io.File;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import jakarta.servlet.ServletContext;
-import jakarta.servlet.http.Cookie;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-import org.hibernate.Hibernate;
-
-import commons.exception.ZSystemException;
-import commons.utility.database.NullValue;
-import commons.exception.ZCryptoException;
-import commons.utility.field.BinaryBooleanWebField;
-
-
-public class WebUtility
-{
-	public static String riceviRealPath(ServletContext context, String percorsoFileSystemCondiviso)
-	{
-		if (percorsoFileSystemCondiviso != null && !percorsoFileSystemCondiviso.equalsIgnoreCase(NullValue.STRING))
-		    return percorsoFileSystemCondiviso;
-
-	    String returnValue = context.getRealPath("/");
-	    if (null == returnValue)
-	    		return NullValue.STRING;
-		if (!String.valueOf(returnValue.charAt(returnValue.length() - 1)).equalsIgnoreCase(File.separator))
-			returnValue += File.separator;
-		return returnValue;
-	}
-
-	public static String riceviRealPathHBM(ServletContext context)
-	{
-	    String returnValue = context.getRealPath("/");
-		if (!String.valueOf(returnValue.charAt(returnValue.length() - 1)).equalsIgnoreCase(File.separator))
-			returnValue += File.separator;
-		return returnValue;
-	}
-
-	public static void clearAuthCookie(HttpServletRequest req, HttpServletResponse res, String cookieName)
-	{
-		//cancellazione eventuale cookie di autenticazione
-		Cookie[] cookies = req.getCookies();
-		if (cookies != null)
-		{
-			for (int i = 0; i < cookies.length; i++)
-			{
-				Cookie thisCookie = cookies[i];
-				if (thisCookie.getName().equals(cookieName))
-				{
-					thisCookie.setValue("");
-					thisCookie.setMaxAge(0);
-					res.addCookie(thisCookie);
-				}
-			}
-		}
-	}
-
-
-	public static void writeAuthCookie(HttpServletResponse res, String cf, String cookieName) throws ZCryptoException
-	{
-		Cookie ck = new Cookie(cookieName, Crypto.encrypt(cf));
-		res.addCookie(ck);
-	}
-
-
-	/**
-	 * Cancella un cookie
-	 * @param res
-	 * @param cf
-	 * @param cookieName - nome del cookie
-	 * @param percoso
-	 * @throws ZCryptoException
-	 */
-	public static void writeAuthCookie(HttpServletResponse res, String cf, String cookieName, String path) throws ZCryptoException
-	{
-		Cookie ck = new Cookie(cookieName, Crypto.encrypt(cf));
-		ck.setPath(path);
-		res.addCookie(ck);
-	}
-
-	
-	/**
-	 * Cancella un cookie
-	 * @param res
-	 * @param cf
-	 * @param cookieName - nome del cookie
-	 * @throws ZCryptoException
-	 */
-	public static void deleteCookie(HttpServletRequest req, HttpServletResponse res, String cookieName)
-	{
-		//cancellazione eventuale cookie di autenticazione
-		Cookie[] cookies = req.getCookies();
-		if (cookies != null)
-		{
-			for (int i = 0; i < cookies.length; i++)
-			{
-				Cookie thisCookie = cookies[i];
-				if (thisCookie.getName().equals(cookieName))
-				{
-					thisCookie.setValue("");
-					thisCookie.setMaxAge(0);
-					res.addCookie(thisCookie);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Legge un cookie con propriet? VALUE CRIPTATA. Il cookie viene ritornato con la propriet? VALUE DECRIPTATO
-	 * @param req
-	 * @param cookieName
-	 * @return
-	 */
-	public static Cookie readCookie(HttpServletRequest req, String cookieName)
-	{
-		try
-        {
-            Cookie[] cookies = req.getCookies();
-    		if (cookies != null)
-    		{
-    			for (int i = 0; i < cookies.length; i++)
-    			{
-    				Cookie thisCookie = cookies[i];
-    				if (thisCookie.getName().equals(cookieName))
-    				{
-    					//thisCookie.setValue(Crypto.decrypt(thisCookie.getValue()));
-    					return new CryptedCookie(thisCookie);
-    				}
-    			}
-    		}
-    		return null;
-        }
-        catch (Exception ex)
-        {
-            return null;
-        }
-	}
-
-	/**
-	 * Scrive un cookie CRIPTANDONE la propriet? value
-	 * @param res
-	 * @param cookieName
-	 * @param testo
-	 * @throws ZCryptoException
-	 */
-	public static void writeCookie(HttpServletResponse res, String cookieName, String testo) throws ZCryptoException
-	{
-		try
-        {
-			CryptedCookie cryptoC = new CryptedCookie(cookieName, testo);
-    		cryptoC.setMaxAge(31536000);
-    		Cookie writeCk = new Cookie(cookieName, cryptoC.getCk().getValue());
-    		writeCk.setMaxAge(cryptoC.getMaxAge());
-    		res.addCookie(writeCk);
-        }
-		catch (Exception ex)
-		{
-		    return;
-		}
-	}
-
-	//	Campo di comodo per le conversioni
-	private static BinaryBooleanWebField booleanConv = new BinaryBooleanWebField(null,false);
-	/**	Converte un valore string nel relativo valore boolean
-	 * @param value Il valore del boolean in formato stringa 0/1
-	 * @return Il valore boolean (false come default)
-	 */
-	public final static boolean convertBinaryBoolean(final String value)
-	{
-		booleanConv.setFormattedText(value);
-		return booleanConv.getBoolean();
-	}
-	
-	
-	/**	Inizializza le properties di una rootEntity mappata con Hibernate
-	 * @param <T>
-	 * @param rootEntity L'entit? connessa alla sessione
-	 * @param properties La lista di property nella forma prop1.prop11.prop111,prop2.prop22... etc
-	 * @return L'oggetto con le property specificate inizializzate!
-	 */
-	public final static <T> T initEntityProperties(final T rootEntity,final String...properties)
-	{
-		if(null != rootEntity)
-		{
-			for(final String property : properties)
-			{
-				Object currentProperty = rootEntity;
-				{
-					final StringTokenizer strtok = new StringTokenizer(property,".");
-					while(strtok.hasMoreTokens())
-					{
-						//	Verifica se la property ? stata inizializzata!
-						final String token = strtok.nextToken();
-						//	L'oggetto corrente va letto!
-						final String getMethodName = "get" + token.substring(0,1).toUpperCase() + token.substring(1);
-						try
-						{
-							final Method getMethod = currentProperty.getClass().getMethod(getMethodName);
-							boolean getMethodAccessible = getMethod.isAccessible();
-							try
-							{
-								getMethod.setAccessible(true);
-								currentProperty = getMethod.invoke(currentProperty);
-							}
-							catch (Throwable e)
-							{
-								throw new ZSystemException(e);
-							}
-							finally
-							{
-								getMethod.setAccessible(getMethodAccessible);
-							}
-						}
-						catch (SecurityException e)
-						{
-							throw new ZSystemException(e);
-						}
-						catch (NoSuchMethodException e)
-						{
-							//	Accesso tramite field!
-							try
-							{
-								Field propertyField = currentProperty.getClass().getDeclaredField(token);
-								boolean propertyFieldAccessible = propertyField.isAccessible();
-								try
-								{
-									propertyField.setAccessible(true);
-									currentProperty = propertyField.get(currentProperty);
-								}
-								catch (Throwable e2)
-								{
-									throw new ZSystemException(e2);
-								}
-								finally
-								{
-									propertyField.setAccessible(propertyFieldAccessible);
-								}
-							}
-							catch (SecurityException e1)
-							{
-								throw new ZSystemException(e);
-							}
-							catch (NoSuchFieldException e1)
-							{
-								break;
-							}
-						}
-						
-						//	Se non ? stata inizializzata...
-						if(!Hibernate.isInitialized(currentProperty))
-						{
-							//	allora ? da fare!
-							Hibernate.getClass(currentProperty);
-						}					
-					}
-				}
-			}
-		}		
-		return rootEntity;
-	}
-	
-	/**	Inizializza le properties di una lista di entity mappate con Hibernate
-	 * @param <T>
-	 * @param rootEntities la lista di oggetto
-	 * @param properties la lista di properties da inizializzare
-	 * @return
-	 */
-	public final static <T> List<T> initEntitiesProperties(final List<T> rootEntities,final String...properties)
-	{
-		if(null != rootEntities)
-		{
-			for(final T rootEntity : rootEntities)
-				initEntityProperties(rootEntity, properties);
-		}
-		
-		return rootEntities;
-	}
-	
-	public static String traduciPathPerJsp(String path)
-	{
-		return path.replaceAll("\\\\", "\\\\\\\\") ;
-	}
-	
-}

+ 0 - 11
src/main/java/commons/utility/bean/DatiAbilitazioni.java

@@ -1,11 +0,0 @@
-package commons.utility.bean;
-
-import java.io.Serializable;
-
-public class DatiAbilitazioni implements Serializable 
-{
-
-	private static final long serialVersionUID = 1L;
-	
-	
-}

+ 0 - 164
src/main/java/commons/utility/dao/AliasToBeanResultTransformerEnanced.java

@@ -1,164 +0,0 @@
-package commons.utility.dao;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.hibernate.query.TupleTransformer;
-
-import commons.exception.ZSystemException;
-
-/**
- * Result transformer che permette di trasformare un resultSet in una
- * classe specifica definita dall'utente popolata via setter.
- * Per popolare la classe vengono utilizzati gli alias. Viene supportata la dotNotation.
- */
-public class AliasToBeanResultTransformerEnanced implements TupleTransformer {
-
-    private static final String THIS = "this";
-
-    private static final long serialVersionUID = 1L;
-
-    private final Class resultClass;
-
-    public AliasToBeanResultTransformerEnanced(Class resultClass) {
-        if(resultClass==null) throw new IllegalArgumentException("resultClass cannot be null");
-        this.resultClass = resultClass;
-    }
-
-    public Object transformTuple(Object[] tuple, String[] aliases) {
-        Map<String,Tuplizer> firstLevelObject = new HashMap<String,Tuplizer>();
-
-        for (int i = 0; i < aliases.length; i++)
-        {
-            if(tuple[i] == null || aliases[i] == null) continue;
-            String alias = aliases[i];
-            String key = THIS;
-            if(alias != null && alias.indexOf(".") != -1) {
-                key = alias.substring(0,alias.indexOf("."));
-                alias = alias.substring(alias.indexOf(".") + 1);
-            }
-
-            Tuplizer myList = null;
-            if(firstLevelObject.containsKey(key)) {
-                myList = firstLevelObject.get(key);
-            } else {
-                myList = new Tuplizer();
-                firstLevelObject.put(key,myList);
-            }
-            myList.addTupla(tuple[i]);
-            myList.addAlias(alias);
-        }
-
-        Tuplizer tuplizer = firstLevelObject.remove(THIS);
-        Object mainObj = buildBean(this.resultClass, tuplizer.getTuple(), tuplizer.getAliases());
-
-        Iterator<String> keys = firstLevelObject.keySet().iterator();
-        while (keys.hasNext())
-        {
-            String property = keys.next();
-            Field declaredField = null;
-            try
-            {
-                try {
-                    declaredField = resultClass.getDeclaredField(property);
-                } catch (NoSuchFieldException e) {
-                    declaredField = resultClass.getSuperclass().getDeclaredField(property);
-                }
-
-                declaredField.setAccessible(true);
-
-                AliasToBeanResultTransformerEnanced beanTransPlus;
-                if (declaredField.getGenericType() instanceof ParameterizedType)
-                {
-                    Type[] tipi = ((ParameterizedType) declaredField.getGenericType()).getActualTypeArguments();
-                    beanTransPlus = new AliasToBeanResultTransformerEnanced((Class<?>) tipi[0]);
-                    Tuplizer t = firstLevelObject.get(property);
-                    Object propertyObj = beanTransPlus.transformTuple(t.getTuple(),t.getAliases());
-                    declaredField.set(mainObj,propertyObj);
-                }
-                else
-                {
-                    beanTransPlus = new AliasToBeanResultTransformerEnanced(declaredField.getType());
-                    Tuplizer t = firstLevelObject.get(property);
-                    Object propertyObj = beanTransPlus.transformTuple(t.getTuple(),t.getAliases());
-                    declaredField.set(mainObj,propertyObj);
-                }
-            }
-            catch (SecurityException e)
-            {
-                throw new ZSystemException(e);
-            }
-            catch (NoSuchFieldException e)
-            {
-                throw new ZSystemException(e);
-            }
-            catch (IllegalArgumentException e)
-            {
-                throw new ZSystemException(e);
-            }
-            catch (IllegalAccessException e)
-            {
-                throw new ZSystemException(e);
-            }
-            finally
-            {
-                declaredField.setAccessible(false);
-            }
-        }
-
-        return mainObj;
-    }
-
-    private Object buildBean(Class clazz, Object[] tuple, String[] aliases) {
-        try {
-            Object bean = clazz.getDeclaredConstructor().newInstance();
-            for (int i = 0; i < aliases.length; i++) {
-                if (tuple[i] == null || aliases[i] == null) continue;
-                try {
-                    Field field = clazz.getDeclaredField(aliases[i]);
-                    field.setAccessible(true);
-                    field.set(bean, tuple[i]);
-                } catch (NoSuchFieldException e) {
-                    // ignore
-                }
-            }
-            return bean;
-        } catch (Exception e) {
-            throw new ZSystemException(e);
-        }
-    }
-
-    class Tuplizer {
-
-        List<Object> tuple = null;
-        List<String> aliases = null;
-
-        public Tuplizer() {
-            tuple = new ArrayList<Object>();
-            aliases = new ArrayList<String>();
-        }
-
-        public void addTupla(Object obj) {
-            tuple.add(obj);
-        }
-
-        public void addAlias(String alias) {
-            aliases.add(alias);
-        }
-
-        public Object[] getTuple() {
-            return tuple.toArray();
-        }
-
-        public String[] getAliases() {
-            return aliases.toArray(new String[aliases.size()]);
-        }
-    }
-
-}

+ 0 - 209
src/main/java/commons/utility/dao/GenericHibernateDaoSupport.java

@@ -1,209 +0,0 @@
-package commons.utility.dao;
-
-import java.io.Serializable;
-import java.lang.reflect.ParameterizedType;
-import java.util.List;
-
-import org.hibernate.HibernateException;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.dao.DataAccessException;
-
-import commons.exception.ZSystemException;
-
-public abstract class GenericHibernateDaoSupport<T, ID extends Serializable> implements IGenericHibernateDaoSupport<T, ID>
-{
-
-	@Autowired
-	private SessionFactory sessionFactory;
-
-	private Class<T> persistentClass;
-
-	@SuppressWarnings("unchecked")
-	public GenericHibernateDaoSupport()
-	{
-		this.persistentClass = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
-	}
-
-	public Session currentSession() {
-		return sessionFactory.getCurrentSession();
-	}
-
-	@SuppressWarnings("unchecked")
-	public T get(ID id) throws ZDAOException
-	{
-		try
-		{
-			return (T) currentSession().get(getPersistentClass(), id);
-		}
-		catch (HibernateException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-	public T save(T entity) throws ZDAOException
-	{
-		try
-		{
-			currentSession().saveOrUpdate(entity);
-			return entity;
-		}
-		catch (HibernateException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-	public void delete(T entity) throws ZDAOException
-	{
-		try
-		{
-			currentSession().delete(entity);
-		}
-		catch (HibernateException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-	public void delete(ID id) throws ZDAOException
-	{
-		try
-		{
-			T entity = get(id);
-			if (entity != null) {
-				currentSession().delete(entity);
-			}
-		}
-		catch (HibernateException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-	public List<T> getElenco() throws ZDAOException
-	{
-		try
-		{
-			String hql = "from " + getPersistentClass().getSimpleName();
-			return currentSession().createQuery(hql, getPersistentClass()).list();
-		}
-		catch (HibernateException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-	protected Class<T> getPersistentClass()
-	{
-		return this.persistentClass;
-	}
-
-	static public interface InternalHibernateCallback
-	{
-		public Object doInHibernate(Session session) throws DataAccessException;
-	}
-
-	protected Object execute(final InternalHibernateCallback internalHibernateCallback) throws ZDAOException
-	{
-		try
-		{
-			return internalHibernateCallback.doInHibernate(currentSession());
-		}catch(DataAccessException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-	protected Object execute(final InternalHibernateCallback internalHibernateCallback, boolean exposeNativeSession) throws ZDAOException
-	{
-		try
-		{
-			return internalHibernateCallback.doInHibernate(currentSession());
-		}catch(DataAccessException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-    @SuppressWarnings("unchecked")
-	protected List executeFind(final InternalHibernateCallback internalHibernateCallback) throws ZDAOException
-    {
-    	try
-		{
-			return (List) internalHibernateCallback.doInHibernate(currentSession());
-		}catch(DataAccessException e)
-		{
-			throw new ZDAOException(e);
-		}
-	}
-
-	static public class ZDAOHibernateException extends RuntimeException
-	{
-		private static final long serialVersionUID = 1L;
-
-		public ZDAOHibernateException()
-		{
-			super("");
-		}
-
-		public ZDAOHibernateException(String message)
-		{
-			super(message);
-		}
-
-		public ZDAOHibernateException(Exception e)
-		{
-			super(e);
-		}
-
-		public ZDAOHibernateException(Throwable e)
-		{
-			super(e);
-		}
-
-	}
-
-	static public class ZDAOHibernateMaxRowLimitException extends ZDAOHibernateException
-	{
-		private static final long serialVersionUID = 1L;
-
-		private Object struct = null;
-
-		public ZDAOHibernateMaxRowLimitException(Object struct)
-		{
-			this.struct = struct;
-		}
-
-		public Object getObject()
-		{
-			return this.struct;
-		}
-	}
-
-	static public class ZDAOHibernateNonUniqueResultException extends ZDAOHibernateException
-	{
-		private static final long serialVersionUID = 1L;
-
-		public ZDAOHibernateNonUniqueResultException()
-		{
-			super("");
-		}
-
-		public ZDAOHibernateNonUniqueResultException(String message)
-		{
-			super(message);
-		}
-
-		public ZDAOHibernateNonUniqueResultException(Exception e)
-		{
-			super(e);
-		}
-
-		public ZDAOHibernateNonUniqueResultException(Throwable e)
-		{
-			super(e);
-		}
-	}
-}

+ 0 - 48
src/main/java/commons/utility/dao/IGenericHibernateDaoSupport.java

@@ -1,48 +0,0 @@
-package commons.utility.dao;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * Interface generica per i DAO. L'implementazione si basa su HibernateDaoSupport
- * Dichiara i metodi comuni a tutti i DAO
- *
- * @param <T>	classe persistente
- * @param <ID>	classe della chiave primaria
- */
-public interface IGenericHibernateDaoSupport<T,ID extends Serializable>
-{
-	/**
-	 * Get generico
-	 * @param id
-	 * @return la struttura o null se non esiste
-	 */
-	public abstract T get(ID id) throws ZDAOException;
-
-	/**
-	 * Lista senza filtro della struttura
-	 * @return
-	 */
-	public abstract List<T> getElenco() throws ZDAOException;
-
-	/**
-	 * Metodo generico per salvare/aggiornare la struttura
-	 * @param entity
-	 * @return
-	 */
-	public abstract T save(T entity) throws ZDAOException;
-
-	/**
-	 * Metodo generico per cancellare una struttura
-	 * @param entity
-	 * @param hd
-	 */
-	public abstract void delete(T entity) throws ZDAOException;
-
-	/**
-	 * Metodo generico per cancellare una struttura dato l'id
-	 * @param id
-	 * @param hd
-	 */
-	public abstract void delete(ID id) throws ZDAOException;
-}

+ 0 - 30
src/main/java/commons/utility/dao/ZDAOException.java

@@ -1,30 +0,0 @@
-package commons.utility.dao;
-
-public class ZDAOException extends Exception {
-	
-	private static final long serialVersionUID = 1L;
-
-	public ZDAOException()
-	{
-		super();
-	}
-	
-	public ZDAOException(String message)
-	{
-		super(message);
-	}
-	
-	public ZDAOException(Exception e)
-	{
-		super(e);
-	}
-	
-	public ZDAOException(Throwable e)
-	{
-		super(e);
-	}
-	public ZDAOException(String message, Throwable e)
-	{
-		super(message, e);
-	}
-}

+ 0 - 6
src/main/java/commons/utility/database/DatabaseFactory.java

@@ -9,7 +9,6 @@ import org.hibernate.jdbc.ReturningWork;
 
 import commons.utility.database.hibernate.HibernateDatabase;
 import commons.utility.database.hibernate.HibernateDatabaseAsGenericDatabase;
-import commons.utility.database.postgressql.PostgresSqlDatabase;
 import commons.exception.ZDataBaseException;
 
 public class DatabaseFactory {
@@ -18,10 +17,6 @@ public class DatabaseFactory {
 	public DatabaseFactory() {
 	}
 
-	public static IDatabase getDatabase(Connection connection) throws ZDataBaseException
-	{
-		return getDatabaseFromConnection(new JndiConnection(connection));
-	}
 
 	/**	Costruzione del database corretto in base al tipo di connessione utilizzato;viene
 	 * 	utilizzato il nome del db server utilizzato
@@ -33,7 +28,6 @@ public class DatabaseFactory {
 	{
 		IDatabase db = null;
 
-		db = new PostgresSqlDatabase(cn);
 
 		return db;
 	}

+ 0 - 110
src/main/java/commons/utility/database/DbQuery.java

@@ -1,110 +0,0 @@
-package commons.utility.database;
-
-import commons.exception.ZSystemException;
-import commons.exception.ZDataBaseException;
-
-abstract public class DbQuery
-{
-	private GenericDatabase db = null;
-	protected ISpStatement spStat = null;
-	protected IResultSet rs = null;
-	protected int counter;
-
-	private String spName = null;
-	private int numPar;
-
-	public DbQuery(final GenericDatabase database,String spName, int numPar) throws ZDataBaseException
-	{
-		this.db = database;
-		this.spName = spName;
-		this.numPar = numPar;
-	}
-
-	public void execute() throws ZDataBaseException, ZSystemException {
-		try {
-			spStat = db.getSpQueryStatment(spName, numPar);
-			initParam();
-			rs = spStat.executeQuery();
-			counter = 1;
-			while (rs.next()) {
-				readRecord();
-				counter++;
-			}
-			DatabaseFactory.closeAll(null, spStat, rs);
-			spStat = null;
-			rs = null;
-			db = null;
-		} catch (ZDataBaseException e) {
-			onError(e);
-			throw e;
-		} finally {
-			try
-			{
-				DatabaseFactory.closeAll(null, spStat, rs);
-			}
-			catch (ZDataBaseException e)
-			{
-				throw e;
-			}
-			db = null;
-			spStat = null;
-			rs = null;
-		}
-	}
-
-	public void executeNoRs() throws ZDataBaseException {
-		try {
-			spStat = db.getSpQueryStatment(spName, numPar);
-			initParam();
-			spStat.execute();
-			DatabaseFactory.closeAll(null, spStat, null);
-			spStat = null;
-			db = null;
-		} catch (ZDataBaseException e) {
-			onError(e);
-			throw e;
-		} finally {
-			try
-			{
-				DatabaseFactory.closeAll(null, spStat, null);
-			}
-			catch (ZDataBaseException e)
-			{
-				throw e;
-			}
-			db = null;
-			spStat = null;
-		}
-	}
-
-	public void executeUpdate() throws ZDataBaseException {
-		try {
-			spStat = db.getSpQueryStatment(spName, numPar);
-			initParam();
-			spStat.executeUpdate();
-			DatabaseFactory.closeAll(null, spStat, null);
-			db = null;
-			spStat = null;
-		} catch (ZDataBaseException e) {
-			onError(e);
-			throw e;
-		} finally {
-			try
-			{
-				DatabaseFactory.closeAll(null, spStat, null);
-			}
-			catch (ZDataBaseException e)
-			{
-				throw e;
-			}
-			db = null;
-			spStat = null;
-		}
-	}
-
-	abstract public void initParam() throws ZDataBaseException;
-
-	abstract public void readRecord() throws ZDataBaseException, ZSystemException;
-
-	abstract public void onError(Throwable ex);
-}

+ 0 - 49
src/main/java/commons/utility/database/DbQuerySQL.java

@@ -1,49 +0,0 @@
-package commons.utility.database;
-
-import commons.exception.ZDataBaseException;
-
-abstract public class DbQuerySQL {
-	private IDatabase db = null;
-	protected ISqlStatement spStat = null;
-	protected IResultSet rs = null;
-	protected int counter;
-
-	private String cmd = null;
-
-	public DbQuerySQL(final GenericDatabase database, String cmd) {
-		this.db = database;
-		this.cmd = cmd;
-	}
-
-	public void execute() throws ZDataBaseException {
-		try {
-			spStat = db.getSpUpdateStatment(cmd);
-			rs = spStat.executeQuery();
-			counter = 1;
-			while (rs.next()) {
-				readRecord();
-				counter++;
-			}
-
-			DatabaseFactory.closeAll(null, spStat, rs);
-			db = null;
-			spStat = null;
-			rs = null;
-		} catch (ZDataBaseException e) {
-			throw e;
-		} finally {
-			try {
-				DatabaseFactory.closeAll(null, spStat, rs);
-			} catch (ZDataBaseException e) {
-				throw e;
-			}
-			db = null;
-			spStat = null;
-			rs = null;
-		}
-	}
-
-	abstract public void onError(Throwable ex);
-
-	abstract public void readRecord() throws ZDataBaseException;
-}

+ 0 - 161
src/main/java/commons/utility/database/DbUpdate.java

@@ -1,161 +0,0 @@
-package commons.utility.database;
-
-import java.lang.reflect.Array;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import commons.exception.ZSystemException;
-import commons.exception.ZDataBaseException;
-import commons.exception.ZDbUpdateException;
-
-abstract public class DbUpdate {
-	private IDatabase db = null;
-	protected ISpStatement spStat = null;
-	protected int counter = 1;
-	protected ZDbUpdateException ex = new ZDbUpdateException();
-
-	private String spName = null;
-	private int numPar;
-
-	private Iterator iter = null;
-
-	public DbUpdate(final GenericDatabase database, String spName, int numPar, Object obj)
-	{
-		db = database;
-		this.spName = spName;
-		this.numPar = numPar;
-		this.iter = createIterator(obj);
-	}
-
-	public DbUpdate(final GenericDatabase database, String spName, int numPar) throws ZDataBaseException
-	{
-		this(database,spName,numPar,null);
-	}
-
-	public void execute() throws ZDbUpdateException, ZSystemException {
-		boolean error = false;
-		try {
-			spStat = db.getSpUpdateStatment(spName, numPar);
-			counter = 1;
-			while (iter.hasNext()) {
-				try {
-					initParam(iter.next());
-					spStat.executeUpdate();
-					getOutputParam();
-				} catch (ZDataBaseException e) {
-					onError(e);
-					ex.addStackTrace(e);
-					error = true;
-				} 
-				counter++;
-			}
-			DatabaseFactory.closeAll(null, spStat, null);
-			db = null;
-			spStat = null;
-		} catch (ZDataBaseException e) {
-			onError(e);
-			ex.addStackTrace(e);
-			error = true;
-		} finally {
-			try {
-				DatabaseFactory.closeAll(null, spStat, null);
-			} catch (ZDataBaseException e) {
-				onError(e);
-				ex.addStackTrace(e);
-				error = true;
-			}
-			db = null;
-			spStat = null;
-		}
-		if (error) {
-			throw ex;
-		}
-	}
-
-	public void executeNoRs() throws ZSystemException {
-		try {
-			spStat = db.getSpUpdateStatment(spName, numPar);
-			initParam(null);
-			spStat.execute();
-			getOutputParam();
-			DatabaseFactory.closeAll(null, spStat, null);
-			db = null;
-			spStat = null;
-		} catch (ZDataBaseException e) {
-			onError(e);
-			throw e;
-		} finally {
-			try {
-				DatabaseFactory.closeAll(null, spStat, null);
-			} catch (ZDataBaseException e) {
-				onError(e);
-				throw e;
-			}
-			db = null;
-			spStat = null;
-		}
-	}
-
-	private Iterator createIterator(final Object obj) {
-		if (null != obj) {
-			if (obj instanceof Iterator) {
-				return (Iterator)obj;
-			}
-
-			if (obj.getClass().isArray()) {
-				if (!obj.getClass().getComponentType().isPrimitive()) {
-					return new Iterator() {
-						int index = 0;
-						public void remove() {
-						}
-
-						public boolean hasNext() {
-							return index < ((Object[])obj).length;
-						}
-
-						public Object next() {
-							return ((Object[])obj)[index++];
-						}
-					};
-				}
-				return new Iterator() {
-					int index = 0;
-					public void remove() {
-					}
-
-					public boolean hasNext() {
-						return index < Array.getLength(obj);
-					}
-
-					public Object next() {
-						return Array.get(obj, index++);
-					}
-				};
-			}
-		}
-
-		return new Iterator() {
-			boolean letto = false;
-			public void remove() {
-			}
-
-			public boolean hasNext() {
-				return !letto;
-			}
-
-			public Object next() {
-				if (letto)
-					throw new NoSuchElementException();
-				letto = true;
-				return obj;
-			}
-		};
-	}
-
-	abstract public void initParam(Object obj) throws ZDataBaseException, ZSystemException;
-
-	abstract public void getOutputParam() throws ZDataBaseException, ZSystemException;
-
-	abstract public void onError(Throwable ex);
-
-}

+ 0 - 39
src/main/java/commons/utility/database/DbUpdateSQL.java

@@ -1,39 +0,0 @@
-package commons.utility.database;
-
-import commons.exception.ZDataBaseException;
-
-abstract public class DbUpdateSQL {
-	private IDatabase db = null;
-	protected ISqlStatement spStat = null;
-
-	private String cmd = null;
-
-	public DbUpdateSQL(final GenericDatabase database, String cmd) {
-		this.db = database;
-		this.cmd = cmd;
-	}
-
-	public void execute() throws ZDataBaseException {
-		try {
-			spStat = db.getSpUpdateStatment(cmd);
-			spStat.executeUpdate();
-
-			DatabaseFactory.closeAll(null, spStat, null);
-			db = null;
-			spStat = null;
-		} catch (ZDataBaseException e) {
-			throw e;
-		} finally {
-			try {
-				DatabaseFactory.closeAll(null, spStat, null);
-			} catch (ZDataBaseException e) {
-				throw e;
-			}
-			db = null;
-			spStat = null;
-		}
-	}
-
-	abstract public void onError(Throwable ex);
-
-}

+ 0 - 35
src/main/java/commons/utility/database/ObjectRef.java

@@ -1,35 +0,0 @@
-package commons.utility.database;
-
-public class ObjectRef<T>
-{
-	public static interface IRef<T>
-	{
-		public T get();
-
-		public void set(T o);
-	}
-
-	public static class ObjRef<T> implements IRef<T>
-	{
-		private T obj = null;
-
-		public ObjRef()
-		{
-		}
-
-		public ObjRef(T value)
-		{
-			set(value);
-		}
-
-		public T get()
-		{
-			return obj;
-		}
-
-		public void set(T o)
-		{
-			obj = o;
-		}
-	}
-}

+ 0 - 165
src/main/java/commons/utility/database/postgressql/PostgresSqResultSet.java

@@ -1,165 +0,0 @@
-package commons.utility.database.postgressql;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Timestamp;
-import java.util.Date;
-
-
-import commons.utility.Compression;
-import commons.utility.database.DatabaseFactory;
-import commons.utility.database.IResultSet;
-import commons.utility.database.NullValue;
-import commons.exception.ZCompressException;
-import commons.exception.ZDataBaseException;
-
-public class PostgresSqResultSet implements IResultSet {
-	ResultSet m_rs = null;
-	public PostgresSqResultSet(ResultSet rs) {
-		m_rs = rs;
-	}
-	public boolean next() throws ZDataBaseException {
-		try
-		{
-			return m_rs.next();
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public byte[] getBlob(int pos, boolean decompress) throws ZDataBaseException, ZCompressException {
-		try
-		{
-			byte[] value = m_rs.getBytes(pos);
-			if (decompress == true && value != null)
-				value = Compression.Decompress(value);
-			return value;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-		catch (ZCompressException e)
-		{
-			throw e;
-		}
-	}
-	public byte getByte(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_rs.getByte(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public Date getDate(int pos) throws ZDataBaseException {
-		try
-		{
-			Timestamp ts = m_rs.getTimestamp(pos);
-			if (ts != null)
-				return new Date(ts.getTime());
-			return null;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public double getDouble(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_rs.getDouble(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public float getFloat(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_rs.getFloat(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public int getInt(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_rs.getInt(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public long getLong(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_rs.getLong(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public short getShort(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_rs.getShort(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public String getString(int pos) throws ZDataBaseException {
-		try
-		{
-			String value = m_rs.getString(pos);
-			if (value != null) {
-				value = value.trim();
-			} else {
-				value = NullValue.STRING;
-			}
-			return value;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public boolean getBit(int pos) throws ZDataBaseException {
-		try
-		{
-			boolean rsl;
-			if (m_rs.getByte(pos) == 1)
-				rsl = true;
-			else
-				rsl = false;
-			return rsl;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void close() throws ZDataBaseException {
-		try
-		{
-			if (m_rs != null)
-				m_rs.close();
-			m_rs = null;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-
-}

+ 0 - 234
src/main/java/commons/utility/database/postgressql/PostgresSqSqlStatement.java

@@ -1,234 +0,0 @@
-package commons.utility.database.postgressql;
-
-import java.io.ByteArrayInputStream;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Timestamp;
-import java.sql.Types;
-import java.util.GregorianCalendar;
-
-import commons.utility.Compression;
-import commons.utility.database.DatabaseFactory;
-import commons.utility.database.IResultSet;
-import commons.utility.database.ISqlStatement;
-import commons.utility.database.NullValue;
-import commons.exception.ZCompressException;
-import commons.exception.ZDataBaseException;
-
-class PostgresSqSqlStatement implements ISqlStatement {
-	PreparedStatement m_ps = null;
-
-	public PostgresSqSqlStatement(PreparedStatement ps) {
-		m_ps = ps;
-	}
-
-	//////////////////////////////////////////////////////////////////////////////
-	//Parametri di INPUT
-	public void setInBlob(int pos, byte[] value, boolean compression) throws ZDataBaseException, ZCompressException {
-		//gestione BLOB
-		try
-		{
-			if (value != null) {
-				if (compression == true)
-					value = Compression.Compress(value);
-				ByteArrayInputStream bais = new ByteArrayInputStream(value);
-				m_ps.setBinaryStream(pos, bais, value.length);
-			} else
-				m_ps.setNull(pos, Types.BINARY);
-		}
-		catch (ZCompressException e)
-		{
-			throw e;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-
-	}
-	public void setInByte(int pos, byte value) throws ZDataBaseException {
-		try
-		{
-			m_ps.setByte(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInDate(int pos, java.util.Date value) throws ZDataBaseException {
-		try
-		{
-			if (value != null) {
-			
-				long ad = value.getTime();
-				long ld = new GregorianCalendar(1850, 1, 1).getTimeInMillis();
-			
-				if (ad > ld)
-					m_ps.setTimestamp(pos, new Timestamp(value.getTime()));
-				else {
-					System.out.println("Data formalmente errata(" + value.toString() + "). Sostituita con 01/02/1850");
-					m_ps.setTimestamp(pos, new Timestamp(ld));
-				}
-			} else
-				m_ps.setNull(pos, Types.DATE);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInDouble(int pos, double value) throws ZDataBaseException {
-		try
-		{
-			m_ps.setDouble(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInFloat(int pos, float value) throws ZDataBaseException {
-		try
-		{
-			m_ps.setFloat(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInInt(int pos, int value) throws ZDataBaseException {
-		try
-		{
-			m_ps.setInt(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInLong(int pos, long value) throws ZDataBaseException {
-		try
-		{
-			m_ps.setLong(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInShort(int pos, short value) throws ZDataBaseException {
-		try
-		{
-			m_ps.setShort(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInString(int pos, String value) throws ZDataBaseException {
-		try
-		{
-			if (value != null)
-				m_ps.setString(pos, value.trim().toUpperCase());
-			else
-				m_ps.setNull(pos, Types.VARCHAR);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	/**
-	 * Utilizzare questa funzione quando passo la mail e la password
-	 */
-	public void setInString(int pos, String value, boolean noUpper) throws ZDataBaseException {
-		try
-		{
-			if (value != null)
-				m_ps.setString(pos, value.trim());
-			else
-				m_ps.setString(pos, NullValue.STRING);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInBit(int pos, boolean value) throws ZDataBaseException {
-		try
-		{
-			byte valore;
-			if (value == true)
-				valore = 1;
-			else
-				valore = 0;
-			m_ps.setByte(pos, valore);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInBit(int pos, String nulla) throws ZDataBaseException {
-		try
-		{
-			if (nulla == null)
-				m_ps.setByte(pos, (byte) 0);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-
-	public IResultSet executeQuery() throws ZDataBaseException {
-		try
-		{
-			ResultSet rs = m_ps.executeQuery();
-			return new PostgresSqResultSet(rs);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public int executeUpdate() throws ZDataBaseException {
-		try
-		{
-			return m_ps.executeUpdate();
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-
-	public boolean execute() throws ZDataBaseException {
-		try
-		{
-			boolean b = m_ps.execute();
-			return b;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void close() throws ZDataBaseException {
-		try
-		{
-			if (m_ps != null)
-				m_ps.close();
-			m_ps = null;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-
-}

+ 0 - 584
src/main/java/commons/utility/database/postgressql/PostgresSqStatement.java

@@ -1,584 +0,0 @@
-/**
- * 	HISTORY
- * 	FIOALE - 27.07.2004
- * 	+	Aggiunta implementazione setInIntFk che permette di inserire NULL nel db 
- * 		per i valori numerici interi. Da usare solo per rispettare le relazioni
- * 	BASLUC - 13.07.2005
- * 	+	Aggiunta funzione come da modifica intf
- * 	BASLUC - 14.07.2005
- * 	~	Corretta l'impl della setInStringFk() per via del != e dell'equals...
- */
-
-package commons.utility.database.postgressql;
-
-import java.io.ByteArrayInputStream;
-import java.sql.Blob;
-import java.sql.CallableStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Timestamp;
-import java.sql.Types;
-import java.util.GregorianCalendar;
-
-import commons.utility.Compression;
-import commons.utility.database.IResultSet;
-import commons.utility.database.ISpStatement;
-import commons.utility.database.NullValue;
-import commons.exception.ZCompressException;
-import commons.exception.ZDataBaseException;
-
-class PostgresSqStatement implements ISpStatement {
-	CallableStatement m_cs = null;
-
-	public PostgresSqStatement(CallableStatement cs) {
-		m_cs = cs;
-	}
-
-	//////////////////////////////////////////////////////////////////////////////
-	//Parametri di INPUT
-	public void setInBlob(int pos, byte[] value, boolean compression) throws ZDataBaseException, ZCompressException {
-		//gestione BLOB
-		try
-		{
-			if (value != null) {
-				if (compression == true)
-					value = Compression.Compress(value);
-				ByteArrayInputStream bais = new ByteArrayInputStream(value);
-				m_cs.setBinaryStream(pos, bais, value.length);
-			} else
-				m_cs.setNull(pos, Types.BINARY);
-		}
-		catch (ZCompressException e)
-		{
-			throw e;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-
-	}
-	public void setInByte(int pos, byte value) throws ZDataBaseException {
-		try
-		{
-			m_cs.setByte(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInDate(int pos, java.util.Date value) throws ZDataBaseException {
-		try
-		{
-			if (value != null) {
-			
-				long ad = value.getTime();
-				long ld = new GregorianCalendar(1850, 1, 1).getTimeInMillis();
-			
-				if (ad > ld)
-					m_cs.setTimestamp(pos, new Timestamp(value.getTime()));
-				else {
-					System.out.println("Data formalmente errata(" + value.toString() + "). Sostituita con 01/02/1850");
-					m_cs.setTimestamp(pos, new Timestamp(ld));
-				}
-			} else
-				m_cs.setNull(pos, Types.DATE);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInDouble(int pos, double value) throws ZDataBaseException {
-		try
-		{
-			m_cs.setDouble(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInFloat(int pos, float value) throws ZDataBaseException {
-		try
-		{
-			m_cs.setFloat(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInInt(int pos, int value) throws ZDataBaseException {
-		try
-		{
-			m_cs.setInt(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInIntFk(int pos, int value) throws ZDataBaseException {
-		try
-		{
-			if (value != 0)
-				m_cs.setInt(pos, value);
-			else
-				m_cs.setNull(pos, Types.INTEGER);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInLong(int pos, long value) throws ZDataBaseException {
-		try
-		{
-			m_cs.setLong(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInShort(int pos, short value) throws ZDataBaseException {
-		try
-		{
-			m_cs.setShort(pos, value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInString(int pos, String value) throws ZDataBaseException {
-		try
-		{
-			if (value != null)
-				m_cs.setString(pos, value.trim().toUpperCase());
-			else
-				m_cs.setString(pos, NullValue.STRING);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-
-	public void setInStringFk(int pos, String value) throws ZDataBaseException
-	{
-		try
-		{
-			if (!NullValue.STRING.equals(value))
-				m_cs.setString(pos, value);
-			else
-				m_cs.setString(pos, null);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	
-	/**
-	 * Utilizzare questa funzione quando passo la mail e la password
-	 */
-	public void setInString(int pos, String value, boolean noUpper) throws ZDataBaseException {
-		try
-		{
-			if (value != null)
-				m_cs.setString(pos, value.trim());
-			else
-				m_cs.setString(pos, NullValue.STRING);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-    
-    public void setInStringCAP(int pos, String value) throws ZDataBaseException {
-        try
-        {
-            if (value != null)
-                value = value.trim();
-            else
-                value = NullValue.STRING;
-            
-            if (value.equals(NullValue.STRING))
-                value = " ";
-            
-            m_cs.setString(pos, value.toUpperCase());
-        }
-        catch (SQLException e)
-        {
-            throw new ZDataBaseException(e);
-        }
-    }
-    
-	public void setInBit(int pos, boolean value) throws ZDataBaseException {
-		byte valore;
-		if (value == true)
-			valore = 1;
-		else
-			valore = 0;
-		try
-		{
-			m_cs.setByte(pos, valore);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setInBit(int pos, String nulla) throws ZDataBaseException {
-		if (nulla == null){
-			try
-			{
-				m_cs.setByte(pos, (byte) 0);
-			}
-			catch (SQLException e)
-			{
-				throw new ZDataBaseException(e);
-			}
-		}
-	}
-	//////////////////////////////////////////////////////////////////////////////
-	//Parametri di OUTPUT
-	public void setOutBlob(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.BLOB);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutByte(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.TINYINT);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutDate(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.TIMESTAMP);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutDouble(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.DOUBLE);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutFloat(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.FLOAT);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutInt(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.INTEGER);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutLong(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.BIGINT);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutShort(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.SMALLINT);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutString(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.VARCHAR);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public void setOutBit(int pos) throws ZDataBaseException {
-		try
-		{
-			m_cs.registerOutParameter(pos, Types.BIT);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	//////////////////////////////////////////////////////////////////////////////
-	//Lettura parametri di OUTPUT
-	public byte[] getOutBlob(int pos, boolean decompress) throws ZDataBaseException, ZCompressException {
-		byte[] value;
-		
-		try
-		{
-			Blob blob = m_cs.getBlob(pos);
-			value = blob.getBytes(1, (int) blob.length());
-			if (decompress == true && value != null)
-				value = Compression.Decompress(value);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-		catch (ZCompressException e)
-		{
-			throw e;
-		}
-		
-		return value;
-	}
-	public byte getOutByte(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_cs.getByte(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public java.util.Date getOutDate(int pos) throws ZDataBaseException {
-		try
-		{
-			return new java.util.Date(m_cs.getTimestamp(pos).getTime());
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public double getOutDouble(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_cs.getDouble(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public float getOutFloat(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_cs.getFloat(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public int getOutInt(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_cs.getInt(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public long getOutLong(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_cs.getLong(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public short getOutShort(int pos) throws ZDataBaseException {
-		try
-		{
-			return m_cs.getShort(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-	public String getOutString(int pos) throws ZDataBaseException {
-		String value;
-		try
-		{
-			value = m_cs.getString(pos);
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-		if (value != null) {
-			value = value.trim();
-		} else {
-			value = NullValue.STRING;
-		}
-
-		return value;
-	}
-	public boolean getOutBit(int pos) throws ZDataBaseException {
-		boolean valore;
-		try
-		{
-			if (m_cs.getByte(pos) == 1)
-				valore = true;
-			else
-				valore = false;
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-		return valore;
-	}
-	public IResultSet executeQuery() throws ZDataBaseException {
-		ResultSet rs = null;
-		try
-		{
-
-//			m_cs.execute();
-//			while(true)
-//			{
-//				if (m_cs.getMoreResults() == false)
-//				{
-//					rs = m_cs.getResultSet();
-//					if (rs != null)
-//						break;
-//				}
-//				else
-//					break;
-//			}
-			
-//			boolean nextResultSet = true;
-//			
-//			try
-//			{
-//				boolean noMoreResults = false;
-//				boolean noMoreCount = false;
-//
-//				while (!(noMoreResults && noMoreCount))
-//				{
-//					if (nextResultSet)
-//					{
-//						nextResultSet = m_cs.getMoreResults();
-//						noMoreResults = (nextResultSet == false);
-//					}
-//					else
-//					{
-//						int updateCount = m_cs.getUpdateCount();
-//						noMoreCount = (updateCount == -1);
-//						if (!noMoreCount)
-//							nextResultSet = m_cs.getMoreResults();
-//					}
-//				}
-//
-//				rs = m_cs.getResultSet();
-//			}
-//			catch (SQLException sqle)
-//			{
-//				throw sqle;
-//			}
-			
-//			boolean results= m_cs.execute();
-//			int rsCount = 0;
-//			
-//		     do {
-//		         if(results) {
-//		            rs = m_cs.getResultSet();
-//		            rsCount++;
-//
-//		            //Show data from the result set.
-//		            System.out.println("RESULT SET #" + rsCount);
-//		         }
-//		         System.out.println();
-//		         results = m_cs.getMoreResults();
-//		         } while(results);
-			
-			rs = m_cs.executeQuery();
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-		return new PostgresSqResultSet(rs);
-	}
-	public int executeUpdate() throws ZDataBaseException {
-		try
-		{
-			return m_cs.executeUpdate();
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-	}
-
-	public boolean execute() throws ZDataBaseException {
-		boolean b;
-		try
-		{
-			b = m_cs.execute();
-		}
-		catch (SQLException e)
-		{
-			throw new ZDataBaseException(e);
-		}
-		return b;
-	}
-	public void close() throws ZDataBaseException {
-		if (m_cs != null){
-			try
-			{
-				m_cs.close();
-			}
-			catch (SQLException e)
-			{
-				throw new ZDataBaseException(e);
-			} 
-		}
-		m_cs = null;
-	}
-
-}

+ 0 - 50
src/main/java/commons/utility/database/postgressql/PostgresSqlDatabase.java

@@ -1,50 +0,0 @@
-package commons.utility.database.postgressql;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-
-import commons.utility.database.GenericDatabase;
-import commons.utility.database.IConnection;
-import commons.utility.database.ISpStatement;
-import commons.utility.database.ISqlStatement;
-import commons.exception.ZDataBaseException;
-
-public class PostgresSqlDatabase extends GenericDatabase {
-	IConnection m_cn = null;
-	CallableStatement m_cs = null;
-	PreparedStatement m_ps = null;
-	String m_par = null;
-
-	public PostgresSqlDatabase(IConnection cn) {
-		super(cn);
-		m_cn = getConnection();
-	}
-
-	public ISpStatement getSpUpdateStatment(String StoredProcedure, int n_Parametri) throws ZDataBaseException {
-		m_par = "";
-		for (short i = 0; i < n_Parametri; ++i)
-			m_par += "?,";
-		if (!m_par.equals(""))
-			m_par = m_par.substring(0, m_par.length() - 1);
-		m_cs = m_cn.prepareCall("{call " + StoredProcedure + " (" + m_par + ")}");
-		
-		//System.out.println(StoredProcedure);
-		
-		return new PostgresSqStatement(m_cs);
-	}
-
-	public ISpStatement getSpQueryStatment(String StoredProcedure, int n_Parametri) throws ZDataBaseException {
-		return getSpUpdateStatment(StoredProcedure, n_Parametri);
-	}
-
-	public ISqlStatement getSpUpdateStatment(String query) throws ZDataBaseException {
-		m_ps = m_cn.prepareStatment(query);
-		return new PostgresSqSqlStatement(m_ps);
-	}
-
-	public ISqlStatement getSpQueryStatment(String query) throws ZDataBaseException {
-		return getSpUpdateStatment(query);
-	}
-
-
-}

+ 0 - 31
src/main/java/commons/utility/enviroment/HibernateFactory.java

@@ -1,31 +0,0 @@
-package commons.utility.enviroment;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Properties;
-
-import org.springframework.beans.factory.FactoryBean;
-
-public class HibernateFactory implements FactoryBean {
-
-	String path = null;
-
-	public HibernateFactory(String path) {
-		this.path = path;
-	}
-
-	public Object getObject() throws Exception {
-		Properties p = new Properties();
-		p.load(new FileInputStream(new File(path)));
-		return p;
-	}
-
-	public Class getObjectType() {
-		return Properties.class;
-	}
-
-	public boolean isSingleton() {
-		return true;
-	}
-
-}

+ 0 - 13
src/main/java/commons/utility/formatter/IControllerValidator.java

@@ -1,13 +0,0 @@
-package commons.utility.formatter;
-
-import commons.exception.WebValidateActionException;
-
-
-public interface IControllerValidator {
-
-	/**
-	 * Verifica che il controllo del'autenticazione nel controller di spring 
-	 * sia stato superato con successo
-	 */
-	public abstract void validate() throws WebValidateActionException;
-}

+ 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;
-	}
-}

+ 0 - 42
src/main/java/commons/utility/spool/AttributeImpl.java

@@ -1,42 +0,0 @@
-package commons.utility.spool;
-
-
-
-/**
- * Implementazione base di un attributo
-*/
-public class AttributeImpl implements IAttribute
-{
-	String name;
-	String value;
-	
-	public AttributeImpl(String name)
-	{
-		setName(name);
-	}
-
-	public AttributeImpl(String name,String value)
-	{
-		this(name);
-		setValue(value);
-	}
-	
-	//	IAttribute implementation
-	
-	public String getName()
-	{
-		return name;
-	}
-	public String getValue()
-	{
-		return value;
-	}
-	public void setName(String name)
-	{
-		this.name = name;
-	}
-	public void setValue(String value)
-	{
-		this.value = value;
-	}
-}

+ 0 - 75
src/main/java/commons/utility/spool/AttributeListImpl.java

@@ -1,75 +0,0 @@
-package commons.utility.spool;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Implementazione base di un contenitore di attributi
-*/
-public class AttributeListImpl implements IAttributeList
-{
-	Map<String, IAttribute> attrList = new Hashtable<String, IAttribute>();
-	
-	public AttributeListImpl()
-	{
-	}
-	
-	public void addAttributes(Iterator attrs)
-	{
-		removeAllAttributes();
-		while(attrs.hasNext())
-		{
-			addAttribute((IAttribute)attrs.next());
-		}
-	}
-
-	public void addAttributes(IAttribute[] attrs)
-	{
-		removeAllAttributes();
-		for(int i = 0;i < attrs.length;i++)
-		{
-			addAttribute(attrs[i]);
-		}
-	}
-	
-	//	IAttributeList implementation
-	
-	public void addAttribute(IAttribute attr)
-	{
-		attrList.put(attr.getName(),attr);
-	}
-
-	public IAttribute getAttribute(String attrName)
-	{
-		return attrList.get(attrName);
-	}
-
-	public Iterator getAttributes()
-	{
-		return attrList.values().iterator();
-	}
-
-	public IAttribute removeAttribute(String attrName)
-	{
-		return attrList.remove(attrName);
-	}
-
-	public boolean hasAttribute(String attrName)
-	{
-		return attrList.containsKey(attrName);
-	}
-	
-	public void removeAllAttributes()
-	{
-		attrList.clear();
-	}
-	
-	public String getAttributeValue(String attrName)
-	{
-		String value = "";
-		if(hasAttribute(attrName))
-			value = getAttribute(attrName).getValue();
-		return value;
-	}
-}

+ 0 - 244
src/main/java/commons/utility/spool/BoundText.java

@@ -1,244 +0,0 @@
-package commons.utility.spool;
-
-import java.awt.Color;
-import java.io.IOException;
-
-
-
-import commons.enumerate.AllineamentoCampoSpool_e;
-import commons.type.ModifyException;
-import commons.utility.field.tranf.PaddingModificator;
-
-import com.lowagie.text.DocumentException;
-import com.lowagie.text.pdf.BaseFont;
-import com.lowagie.text.pdf.PdfContentByte;
-
-public class BoundText implements IBound, IBoundWrite {
-
-	/* nome attributi nel file XML */
-	public final static String ATTR_X     = "x";
-	public final static String ATTR_Y     = "y";
-	public final static String ATTR_ALIGN = "a";
-	public final static String ATTR_LEN   = "l";
-	public final static String ATTR_NAME  = "nome";
-	
-	/* tipologia allineamento */
-	public static final String CENTRATO  = "c";
-	public static final String SINISTRA  = "s";
-	public static final String DESTRA    = "d";
-
-	public final static char EMPTY_CHAR = ' ';
-
-	private IPoint point;
-	private IFont font;
-	private int length;
-	private AllineamentoCampoSpool_e alignment;
-	private String name;
-	private String valore;
-	private float angle;
-	private float charSpacing;
-	private Color color;
-
-	public Color getColor() {
-		return color;
-	}
-
-	public void setColor(Color color) {
-		this.color = color;
-	}
-
-	public BoundText(Point point,
-	                 IFont font,
-	                 int length,
-	                 AllineamentoCampoSpool_e align,
-	                 String name,
-	                 String valore,
-	                 float angle,
-	                 float charSpacing,
-	                 Color color) {
-
-		setPoint(point);
-		setFont(font);
-		setLength(length);
-		setAlignment(align);
-		setName(name);
-		setValue(valore);
-		setCharSpacing(charSpacing);
-		setAngle(angle);
-		setColor(color);
-	}
-
-	public BoundText(Point point,
-	                 IFont font,
-	                 int length,
-	                 AllineamentoCampoSpool_e align,
-	                 String name,
-	                 String valore) {
-
-		this(point, font, length, align, name, valore, 0, 0, Color.BLACK);
-	}
-
-	public AllineamentoCampoSpool_e getAlignment() {
-		return alignment;
-	}
-
-	public IPoint getPoint() {
-		return point;
-	}
-
-	public int getLength() {
-		return length;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setAlignment(AllineamentoCampoSpool_e spool_e) {
-		alignment = spool_e;
-	}
-
-	public void setPoint(IPoint point) {
-		this.point = point;
-	}
-
-	public void setFont(IFont font) {
-		this.font = font;
-	}
-
-	public IFont getFont() {
-		return font;
-	}
-	public void setLength(int i) {
-		length = i;
-	}
-
-	public void setName(String string) {
-		name = string;
-	}
-
-	public String getValue() {
-		return valore;
-	}
-	public void setValue(String value) {
-		valore = value;
-	}
-
-	public float getCharSpacing() {
-		return charSpacing;
-	}
-
-	public void setCharSpacing(float charSpacing) {
-		this.charSpacing = charSpacing;
-	}
-	public float getAngle() {
-		return angle;
-	}
-	public void setAngle(float angle) {
-		this.angle = angle;
-	}
-
-	public void write(PdfContentByte cb){
-
-		String carat = formatText(this, getValue());
-
-		BaseFont bf;
-
-		try {
-			if (font.getBaseFont() != null)
-			{
-				bf = font.getBaseFont();
-			}
-			else
-			{
-				bf = BaseFont.createFont(font.getFontName(), BaseFont.WINANSI, false);
-			}
-
-			cb.beginText();
-
-			cb.setFontAndSize(bf, font.getFontHeight());
-
-			cb.setCharacterSpacing(getCharSpacing());
-
-			cb.setColorFill(color);
-
-			cb.showTextAligned(PdfContentByte.ALIGN_LEFT,
-			                   carat,
-			                   point.getX(),
-			                   point.getY(),
-			                   angle);
-
-			cb.endText();
-		} catch (DocumentException e) {
-			throw new RuntimeException( e );
-		} catch (IOException e) {
-			throw new RuntimeException( e );
-		}
-			
-
-	}
-
-	/**
-	 * Costruisce il testo da scrivere a seconda dell'allineamento
-	 * specificato
-	 * @param bound
-	 * @param value
-	 * @return
-	 */
-	private String formatText(IBound bound, String value) {
-
-		String ret = value;
-
-		if ( bound.getAlignment()!= null
-			 && 
-			 !AllineamentoCampoSpool_e.NULLO.equals(bound.getAlignment()) ) {
-
-			PaddingModificator pm = new PaddingModificator(PaddingModificator.Padding_e.LEFT, 
-			                                               bound.getLength(), 
-			                                               EMPTY_CHAR);
-
-			switch (bound.getAlignment().getOrdinal()) {
-				case AllineamentoCampoSpool_e.Values.CENTRATO:
-					pm.setPadding(PaddingModificator.Padding_e.CENTER);
-					break;
-				case AllineamentoCampoSpool_e.Values.DESTRA:
-					pm.setPadding(PaddingModificator.Padding_e.LEFT);
-					break;
-				case AllineamentoCampoSpool_e.Values.SINISTRA:
-					pm.setPadding(PaddingModificator.Padding_e.RIGHT);
-					break;
-			}
-			try {
-				ret = pm.modify(value);
-			} catch (ModifyException e) {
-				ret = value;
-			}
-		}
-
-		return ret;
-
-	}
-
-	/**
-	 * Traduce l'allineamento del file XML nel tipo
-	 * enumerato
-	 * @param align
-	 * @return
-	 */
-	public static AllineamentoCampoSpool_e getAlign(String align){    
-		if (align.equalsIgnoreCase( CENTRATO ))
-			return AllineamentoCampoSpool_e.CENTRATO;
-		else if (align.equalsIgnoreCase( SINISTRA ))
-			return AllineamentoCampoSpool_e.SINISTRA;
-		else if (align.equalsIgnoreCase( DESTRA ))
-			return AllineamentoCampoSpool_e.DESTRA;
-		else
-			return AllineamentoCampoSpool_e.NULLO;
-	}
-	
-	public IAttributeList getAttributes() {
-		return null;
-	}
-
-
-}

+ 0 - 63
src/main/java/commons/utility/spool/Font.java

@@ -1,63 +0,0 @@
-package commons.utility.spool;
-
-import com.lowagie.text.pdf.BaseFont;
-
-public class Font implements IFont {
-
-	private static final int CHAR_HEIGHT = 10;
-	private static final int CHAR_WIDTH = 6;  
-
-	private BaseFont baseFont;
-	private String fontName;
-	private int fontHeight;
-	private int fontWidth;
-	public Font(BaseFont baseFont) {
-		this.baseFont = baseFont;
-	}
-	
-	public Font() {
-		this(BaseFont.COURIER_BOLD, CHAR_HEIGHT, CHAR_WIDTH);
-	}
-
-	
-	public Font(String fontName,
-	            int fontHeight,
-	            int fontWidth) {
-		this.fontName = fontName;
-		this.fontHeight = fontHeight;
-		this.fontWidth = fontWidth;
-	}
-	public BaseFont getBaseFont()
-    {
-	    return baseFont;
-    }
-	public void setBaseFont(BaseFont bf)
-    {
-		this.baseFont = bf;
-    }
-	public String getFontName() {
-		return fontName;
-	}
-
-	public void setFontName(String valore) {
-		this.fontName = valore;
-	}
-
-	public int getFontHeight() {
-		return fontHeight;
-	}
-
-	public void setFontHeight(int valore) {
-		this.fontHeight = valore;
-	}
-
-	public int getFontWidth() {
-		return fontWidth;
-	}
-
-	public void setFontWidth(int valore) {
-		this.fontWidth = valore;
-	}
-
-
-}

+ 0 - 12
src/main/java/commons/utility/spool/IAttribute.java

@@ -1,12 +0,0 @@
-package commons.utility.spool;
-
-/**
- * Intf di un singolo attributo
-*/
-public interface IAttribute
-{
-	public abstract String getName();
-	public abstract String getValue();
-	public abstract void setName(String name);
-	public abstract void setValue(String value);
-}

+ 0 - 18
src/main/java/commons/utility/spool/IAttributeList.java

@@ -1,18 +0,0 @@
-package commons.utility.spool;
-
-import java.util.Iterator;
-
-/**
- * Intf per contenitore di attributi
-*/
-public interface IAttributeList
-{
-	public abstract void addAttribute(IAttribute attr);
-	public abstract IAttribute getAttribute(String attrName);
-	public abstract Iterator getAttributes();
-	public abstract IAttribute removeAttribute(String attrName);
-	public abstract boolean hasAttribute(String attrName);
-	public abstract void removeAllAttributes();
-	//	Forward method
-	public abstract String getAttributeValue(String attrName);
-}

+ 0 - 30
src/main/java/commons/utility/spool/IBound.java

@@ -1,30 +0,0 @@
-package commons.utility.spool;
-
-import commons.enumerate.AllineamentoCampoSpool_e;
-
-
-
-/**
- * @author basluc
-*/
-public interface IBound
-{
-	//	Allineamento del campo
-	public abstract AllineamentoCampoSpool_e getAlignment();
-	public abstract void setAlignment(AllineamentoCampoSpool_e spool_e);
-
-	//	Spiazzamento
-	public abstract IPoint getPoint();
-	public abstract void setPoint(IPoint point);
-
-	//	Lunghezza del campo
-	public abstract int getLength();
-	public abstract void setLength(int i);
-
-	//	Nome del bound
-	public abstract String getName();
-	public abstract void setName(String string);
-	
-	//	Attributi
-	public abstract IAttributeList getAttributes();
-}

+ 0 - 10
src/main/java/commons/utility/spool/IBoundNode.java

@@ -1,10 +0,0 @@
-package commons.utility.spool;
-
-
-public interface IBoundNode
-{
-	public abstract String getNodeName();
-	public abstract String getBoundAttribute(String attrName);
-	public abstract boolean hasAttribute(String attrName);
-	public abstract IAttributeList getAttributes();
-}

+ 0 - 9
src/main/java/commons/utility/spool/IBoundWrite.java

@@ -1,9 +0,0 @@
-package commons.utility.spool;
-
-import com.lowagie.text.pdf.PdfContentByte;
-
-public interface IBoundWrite {
-
-	public void write(final PdfContentByte cb);
-
-}

+ 0 - 15
src/main/java/commons/utility/spool/IFont.java

@@ -1,15 +0,0 @@
-package commons.utility.spool;
-
-import com.lowagie.text.pdf.BaseFont;
-
-public interface IFont {
-
-    public String getFontName();
-    public void setFontName(String valore);
-    public int getFontHeight();
-    public void setFontHeight(int valore);
-    public int getFontWidth();
-    public void setFontWidth(int valore);
-	public BaseFont getBaseFont();
-    
-}

+ 0 - 12
src/main/java/commons/utility/spool/IPoint.java

@@ -1,12 +0,0 @@
-package commons.utility.spool;
-
-
-public interface IPoint
-{
-	//	Larghezza
-	public int getX();
-	public void setX(int x);
-	//	Altezza
-	public int getY();
-	public void setY(int y);
-}

+ 0 - 13
src/main/java/commons/utility/spool/ISectionNode.java

@@ -1,13 +0,0 @@
-package commons.utility.spool;
-
-import java.util.Iterator;
-
-public interface ISectionNode
-{
-	public abstract String getNodeName();
-	public abstract Iterator/*<IBoundNode>*/ getBounds();
-	public abstract IBoundNode getBound(String name);
-	public abstract ISectionNode getChild(String name);
-	public abstract String getAttribute(String attrName);
-	public abstract IAttributeList getAttributes();
-}

+ 0 - 75
src/main/java/commons/utility/spool/MemoryBoundNode.java

@@ -1,75 +0,0 @@
-package commons.utility.spool;
-
-
-/**
- * Implementazione in memoria di un nodo
-*/
-public class MemoryBoundNode implements IBoundNode
-{
-	//	Il nodo parent
-	MemorySectionNode parent;
-	//	Gli attributi
-	AttributeListImpl attrsListImpl = new AttributeListImpl();
-	
-	public MemoryBoundNode(MemorySectionNode parent)
-	{
-		setParent(parent);
-	}
-
-	public MemorySectionNode getParent()
-	{
-		return parent;
-	}
-	public void setParent(MemorySectionNode node)
-	{
-		parent = node;
-	}
-
-	public AttributeListImpl getAttrsListImpl()
-	{
-		return attrsListImpl;
-	}
-	public void setAttrsListImpl(AttributeListImpl impl)
-	{
-		attrsListImpl = impl;
-	}
-
-	//	This impl public intf
-	public void addAttribute(String attrName,String value)
-	{
-		attrsListImpl.addAttribute(new AttributeImpl(attrName,value));
-	}
-	public void removeAttribute(String attrName)
-	{
-		attrsListImpl.removeAttribute(attrName);
-	}
-	public String getAttribute(String attrName)
-	{
-		String value = null;
-		if(attrsListImpl.hasAttribute(attrName))
-			value = attrsListImpl.getAttribute(attrName).getValue();
-		return value;	
-	}
-	
-	//	IBoundNode implementation
-
-	public String getNodeName()
-	{
-		return getBoundAttribute("nome");
-	}
-
-	public String getBoundAttribute(String attrName)
-	{
-		return getAttribute(attrName);
-	}
-
-	public boolean hasAttribute(String attrName)
-	{
-		return attrsListImpl.hasAttribute(attrName);
-	}
-	
-	public IAttributeList getAttributes()
-	{
-		return attrsListImpl;
-	}
-}

+ 0 - 74
src/main/java/commons/utility/spool/MemorySectionNode.java

@@ -1,74 +0,0 @@
-package commons.utility.spool;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Implementazione di una sezione in memoria
-*/
-public class MemorySectionNode implements ISectionNode
-{
-	//	Il nodo
-	MemoryBoundNode thisNodeImpl;
-	//	I bounds contenuti
-	Map<String, MemoryBoundNode> bounds = new Hashtable<String, MemoryBoundNode>();
-	//	Le sotto-sezioni
-	Hashtable<String, MemorySectionNode> sections = new Hashtable<String, MemorySectionNode>();
-	
-	public MemorySectionNode(MemorySectionNode parent)
-	{
-		thisNodeImpl = new MemoryBoundNode(parent);
-	}
-	
-	public void addBound(MemoryBoundNode bound)
-	{
-		bound.setParent(this);
-		bounds.put(bound.getNodeName(),bound);
-	}
-	
-	public void addSection(MemorySectionNode node)
-	{
-		sections.put(node.getNodeName(),node);
-	}
-
-	/**
-	 * @return L'implementazione del nodo che rappresenta la sezione
-	 */
-	public MemoryBoundNode getInternalNode()
-	{
-		return thisNodeImpl;
-	}
-	
-	//	ISectionNode implementation
-	
-	public String getNodeName()
-	{
-		return thisNodeImpl.getNodeName();
-	}
-
-	public Iterator getBounds()
-	{
-		return bounds.values().iterator();
-	}
-
-	public IBoundNode getBound(String name)
-	{
-		return bounds.get(name);
-	}
-
-	public ISectionNode getChild(String name)
-	{
-		return sections.get(name);
-	}
-
-	public String getAttribute(String attrName)
-	{
-		return thisNodeImpl.getBoundAttribute(attrName);
-	}
-
-	public IAttributeList getAttributes()
-	{
-		return thisNodeImpl.getAttributes();
-	}
-}

+ 0 - 42
src/main/java/commons/utility/spool/Point.java

@@ -1,42 +0,0 @@
-package commons.utility.spool;
-
-
-
-/**
- * @author basluc
-*/
-public final class Point implements IPoint
-{
-	int x,y;
-	
-	public Point()
-	{
-		this(0,0);
-	}
-	
-	public Point(int x,int y)
-	{
-		setX(x);
-		setY(y);
-	}
-	
-	public int getX()
-	{
-		return x;
-	}
-
-	public void setX(int x)
-	{
-		this.x = x;
-	}
-
-	public int getY()
-	{
-		return y;
-	}
-
-	public void setY(int y)
-	{
-		this.y = y;
-	}
-}

+ 0 - 109
src/main/java/commons/utility/tabelle/TabellaCaptcha.java

@@ -1,109 +0,0 @@
-package commons.utility.tabelle;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-import commons.utility.database.NullValue;
-
-public class TabellaCaptcha {
-	
-	private Map<Integer, BeanCaptcha> map = new HashMap<Integer, BeanCaptcha>();
-	
-	private final static String[] valori = {"4P3X4", 
-											"G5RRP",
-											"CS6T5",
-											"KK3J6",
-											"SXGPT",
-											"F64FE",
-											"5GC6R",
-											"BSXJY",
-											"VHMB2",
-											"WZHWR",
-											"RJ28Q"};
-	
-	private final static int MAX = 10;
-	
-	private static TabellaCaptcha instance = null;
-	
-	protected TabellaCaptcha()
-	{
-		riempiMappa();
-	}
-	
-	public static synchronized TabellaCaptcha getTabella()
-	{
-		if(instance == null)
-			instance = new TabellaCaptcha();
-		return instance;
-	}
-	
-	private void riempiMappa()
-	{
-		for(int i = 0; i <= MAX; i++)
-		{
-			BeanCaptcha bean = new BeanCaptcha();
-			bean.setImg("SHARED/IMG/CAPTCHA/captcha" + i + ".png");
-			bean.setValore(valori[i]);
-			bean.setKey(i);
-			map.put(i, bean);
-		}
-	}
-
-	protected Map<Integer, BeanCaptcha> getMap() {
-		return map;
-	}
-	
-	public BeanCaptcha getCaptcha(int idCaptcha)
-	{
-		return map.get(idCaptcha);
-	}
-	
-	public BeanCaptcha generateCaptcha()
-	{
-		Random diceRoller = new Random();
-		int indiceCaptcha = diceRoller.nextInt(MAX);
-		return map.get(indiceCaptcha);
-	}
-	
-	public class BeanCaptcha implements Serializable
-	{
-
-		private static final long serialVersionUID = 1L;
-		
-		private int key = NullValue.NUMBER;
-		
-		private String img = NullValue.STRING;
-		
-		private String valore = NullValue.STRING;
-
-
-		public int getKey() {
-			return key;
-		}
-
-		public void setKey(int key) {
-			this.key = key;
-		}
-
-		public String getImg() {
-			return img;
-		}
-
-		public void setImg(String img) {
-			this.img = img;
-		}
-
-		public String getValore() {
-			return valore;
-		}
-
-		public void setValore(String valore) {
-			this.valore = valore;
-		}
-		
-	}
-
-
-}

+ 0 - 36
src/main/java/commons/web/bean/BaseSessionBean.java

@@ -1,36 +0,0 @@
-package commons.web.bean;
-
-import java.io.Serializable;
-
-import commons.utility.IResetTransient;
-import commons.utility.bean.DatiAbilitazioni;
-import commons.common.DatiUtente;
-
-public abstract class BaseSessionBean implements Serializable, IResetTransient
-{
-
-	private static final long serialVersionUID = 1L;
-	
-	private DatiUtente datiUtente = null;
-	
-	private DatiAbilitazioni datiAbilitazioni = null;
-
-	
-	public DatiUtente getDatiUtente() {
-		return datiUtente;
-	}
-
-	public void setDatiUtente(DatiUtente datiUtente) {
-		this.datiUtente = datiUtente;
-	}
-
-	public DatiAbilitazioni getDatiAbilitazioni() {
-		return datiAbilitazioni;
-	}
-
-	public void setDatiAbilitazioni(DatiAbilitazioni datiAbilitazioni) {
-		this.datiAbilitazioni = datiAbilitazioni;
-	}
-	
-
-}

+ 0 - 58
src/main/java/commons/web/bean/BeanAbstractBase.java

@@ -1,58 +0,0 @@
-package commons.web.bean;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.springframework.validation.BindException;
-
-import commons.constant.Constant;
-import commons.utility.StringUtility;
-import commons.utility.database.NullValue;
-import commons.utility.messaggi.Messaggio;
-
-public abstract class BeanAbstractBase implements Serializable{
-
-	private static final long serialVersionUID = 1L;
-
-	private String message;
-
-	private BindException errors;
-
-	public BeanAbstractBase() {
-		message = NullValue.STRING;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public void addMessageList(List<Messaggio> errore) {
-		for (Messaggio beanErrore : errore) {
-			addMessage(beanErrore);    
-        }
-	}
-
-	public void addMessage(Messaggio errore) {
-		addMessage(errore.getDescrizione());
-	}
-	public void addMessage(String message) {
-		if (!StringUtility.empty(this.message)) {
-			this.message += Constant.BR_HTML;
-		}
-		this.message += message;
-	}
-
-	public void clearMessage() {
-		this.message = "";
-	}
-
-	public BindException getErrors() {
-		return errors;
-	}
-
-	public void setErrors(BindException errors) {
-		this.errors = errors;
-	}
-	
-
-}

+ 0 - 284
src/main/java/commons/web/mvc/BaseFieldForm.java

@@ -1,284 +0,0 @@
-package commons.web.mvc;
-
-import jakarta.servlet.jsp.JspException;
-import jakarta.servlet.jsp.JspWriter;
-import jakarta.servlet.jsp.tagext.BodyTagSupport;
-
-import commons.utility.StringUtility;
-
-public abstract class BaseFieldForm extends BodyTagSupport {
-
-	protected static final String CR = "\r\n";
-	protected static final String TAB = "\t";
-	
-	/* inizio attributi del tag*/
-	private String id;
-	private String name;
-	private String value;
-	private String size;
-	private String tabindex;
-	private String cssStyle;
-	private String cssClass;
-	private String disabled;
-	private String onclick;
-	private String onchange;
-	private String onblur;
-	private String onfocus;
-	private String ondblclick;
-	private String onhelp;
-	private String onkeydown;
-	private String onkeypress;
-	private String onkeyup;
-	private String onmousedown;
-	private String onmousemove;
-	private String onmouseout;
-	private String onmouseover;
-	private String onmouseup;
-	/* fine attributi*/
-	
-	@Override
-	public int doStartTag() throws JspException 
-	{
-		try 
-		{
-			
-			buildTag(pageContext.getOut());
-		} 
-		catch (Exception e) 
-		{
-			e.printStackTrace();
-			throw (new JspException(e.getMessage()));
-		}
-		return EVAL_BODY_BUFFERED;
-	}
-	
-
-    @Override
-	public int doEndTag() {
-    	// valore di default
-        return EVAL_PAGE;
-    }
-
-	
-	protected StringBuffer getSelectAttribute(){
-		StringBuffer sb = new StringBuffer();
-		setAttributo(sb,"name",name);
-		setAttributo(sb,"id",id);
-		setAttributo(sb,"style",cssStyle);
-		setAttributo(sb,"class",cssClass);
-		setAttributo(sb,"size",size);
-		setAttributo(sb,"tabindex",tabindex);
-		
-		if (!StringUtility.empty(disabled))
-			setAttributo(sb,"disabled",disabled);
-		
-		setAttributo(sb,"onclick",onclick);
-		setAttributo(sb,"onchange",onchange);
-		setAttributo(sb,"onfocus",onfocus);
-		setAttributo(sb,"ondblclick",ondblclick);
-		setAttributo(sb,"onhelp",onhelp);
-		setAttributo(sb,"onkeydown",onkeydown);
-		setAttributo(sb,"onkeypress",onkeypress);
-		setAttributo(sb,"onkeyup",onkeyup);
-		setAttributo(sb,"onmousedown",onmousedown);
-		setAttributo(sb,"onmousemove",onmousemove);
-		setAttributo(sb,"onmouseout",onmouseout);
-		setAttributo(sb,"onmouseover",onmouseover);
-		setAttributo(sb,"onmouseup",onmouseup);
-		return sb;
-		
-	}
-	protected void setAttributo(final StringBuffer sb, String attName, String attValue){
-		if (!StringUtility.empty(attValue)){
-			sb.append(getPrefixAttribute(sb)).append(attName).append("=\"").append(attValue).append("\"");
-		}
-	}
-	private String getPrefixAttribute(StringBuffer sb){
-		return sb.length() > 0 ?  " " : "";
-		
-	}
-	protected abstract void buildTag(JspWriter out) throws Exception;
-
-	public String getId() {
-    	return id;
-    }
-
-	public void setId(String id) {
-    	this.id = id;
-    }
-
-	public String getName() {
-    	return name;
-    }
-
-	public void setName(String name) {
-    	this.name = name;
-    }
-
-	public String getValue() {
-    	return value;
-    }
-
-	public void setValue(String value) {
-    	this.value = value;
-    }
-
-	public String getSize() {
-    	return size;
-    }
-
-	public void setSize(String size) {
-    	this.size = size;
-    }
-
-	public String getTabindex() {
-    	return tabindex;
-    }
-
-	public void setTabindex(String tabindex) {
-    	this.tabindex = tabindex;
-    }
-
-	public String getCssStyle() {
-    	return cssStyle;
-    }
-
-	public void setCssStyle(String cssStyle) {
-    	this.cssStyle = cssStyle;
-    }
-
-	public String getDisabled() {
-    	return disabled;
-    }
-
-
-	public void setDisabled(String disabled) {
-    	this.disabled = disabled;
-    }
-
-
-	public String getCssClass() {
-    	return cssClass;
-    }
-
-	public void setCssClass(String cssClass) {
-    	this.cssClass = cssClass;
-    }
-
-	public String getOnclick() {
-    	return onclick;
-    }
-
-	public void setOnclick(String onclick) {
-    	this.onclick = onclick;
-    }
-
-	public String getOnchange() {
-    	return onchange;
-    }
-
-	public void setOnchange(String onchange) {
-    	this.onchange = onchange;
-    }
-
-	public String getOnblur() {
-    	return onblur;
-    }
-
-	public void setOnblur(String onblur) {
-    	this.onblur = onblur;
-    }
-
-	public String getOnfocus() {
-    	return onfocus;
-    }
-
-	public void setOnfocus(String onfocus) {
-    	this.onfocus = onfocus;
-    }
-
-	public String getOndblclick() {
-    	return ondblclick;
-    }
-
-	public void setOndblclick(String ondblclick) {
-    	this.ondblclick = ondblclick;
-    }
-
-	public String getOnhelp() {
-    	return onhelp;
-    }
-
-	public void setOnhelp(String onhelp) {
-    	this.onhelp = onhelp;
-    }
-
-	public String getOnkeydown() {
-    	return onkeydown;
-    }
-
-	public void setOnkeydown(String onkeydown) {
-    	this.onkeydown = onkeydown;
-    }
-
-	public String getOnkeypress() {
-    	return onkeypress;
-    }
-
-	public void setOnkeypress(String onkeypress) {
-    	this.onkeypress = onkeypress;
-    }
-
-	public String getOnkeyup() {
-    	return onkeyup;
-    }
-
-	public void setOnkeyup(String onkeyup) {
-    	this.onkeyup = onkeyup;
-    }
-
-	public String getOnmousedown() {
-    	return onmousedown;
-    }
-
-	public void setOnmousedown(String onmousedown) {
-    	this.onmousedown = onmousedown;
-    }
-
-	public String getOnmousemove() {
-    	return onmousemove;
-    }
-
-	public void setOnmousemove(String onmousemove) {
-    	this.onmousemove = onmousemove;
-    }
-
-	public String getOnmouseout() {
-    	return onmouseout;
-    }
-
-	public void setOnmouseout(String onmouseout) {
-    	this.onmouseout = onmouseout;
-    }
-
-	public String getOnmouseover() {
-    	return onmouseover;
-    }
-
-	public void setOnmouseover(String onmouseover) {
-    	this.onmouseover = onmouseover;
-    }
-
-	public String getOnmouseup() {
-    	return onmouseup;
-    }
-
-	public void setOnmouseup(String onmouseup) {
-    	this.onmouseup = onmouseup;
-    }
-	
-	
-	
-	
-	
-}

+ 0 - 16
src/main/java/commons/web/mvc/BeanBase.java

@@ -1,16 +0,0 @@
-package commons.web.mvc;
-
-import java.io.Serializable;
-
-import commons.web.bean.BeanAbstractBase;
-
-
-public abstract class BeanBase<T extends Serializable> extends BeanAbstractBase implements IBeanBase<T> {
-	
-
-	
-	public boolean isVuoto()
-	{
-		return false;
-	}
-}

+ 0 - 95
src/main/java/commons/web/mvc/CustomPathMatcher.java

@@ -1,95 +0,0 @@
-package commons.web.mvc;
-
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Map;
-
-import org.springframework.util.AntPathMatcher;
-import org.springframework.util.PathMatcher;
-
-public class CustomPathMatcher implements PathMatcher {
-    private PathMatcher target;
-
-    public CustomPathMatcher() {
-        target = new AntPathMatcher();
-    }
-
-    public String combine(String pattern1, String pattern2) {
-        return target.combine(pattern1, pattern2); 
-    }
-
-    public String extractPathWithinPattern(String pattern, String path) {
-        if (isEncoded(pattern)) {
-            pattern = resolvePattern(pattern);
-            if (pattern == null) return "";
-        }
-        return target.extractPathWithinPattern(pattern, path);
-    }
-
-    public Map<String, String> extractUriTemplateVariables(String pattern,
-            String path) {
-        if (isEncoded(pattern)) {
-            pattern = resolvePattern(pattern);
-            if (pattern == null) return Collections.emptyMap();
-        }
-        return target.extractUriTemplateVariables(pattern, path);
-    }
-
-    public Comparator<String> getPatternComparator(String pattern) {
-        final Comparator<String> targetComparator = target.getPatternComparator(pattern);
-        return new Comparator<String>() {
-            public int compare(String o1, String o2) {
-                if (isEncoded(o1)) {
-                    if (isEncoded(o2)) {
-                        return 0;
-                    } else {
-                        return -1;
-                    }
-                } else if (isEncoded(o2)) {
-                    return 1;
-                }
-                return targetComparator.compare(o1, o2);
-            }        
-        };
-    }
-
-    public boolean isPattern(String pattern) {
-        if (isEncoded(pattern)) {
-            pattern = resolvePattern(pattern);
-            if (pattern == null) return true;
-        }
-        return target.isPattern(pattern);
-    }
-
-    public boolean match(String pattern, String path) {
-        if (isEncoded(pattern)) {
-            pattern = resolvePattern(pattern);
-            if (pattern == null) return false;
-        }
-        return target.match(pattern, path);
-    }
-
-    public boolean matchStart(String pattern, String path) {
-        if (isEncoded(pattern)) {
-            pattern = resolvePattern(pattern);
-            if (pattern == null) return false;
-        }
-        return target.match(pattern, path);
-    }
-
-    private boolean isEncoded(String pattern) {
-        return pattern != null && pattern.contains("$");
-    }
-
-    private String resolvePattern(String pattern) {
-        int i = pattern.indexOf('$');
-        if (i < 0) return pattern;
-        else if (i == pattern.length() - 1) {
-            return pattern.substring(0, i);
-        } else {
-            String tail = pattern.substring(i + 1);
-            if (tail.startsWith(".")) return null;
-            else return pattern.substring(0, i) + tail;
-        }
-    }
-}

+ 0 - 38
src/main/java/commons/web/mvc/ExpEval.java

@@ -1,38 +0,0 @@
-package commons.web.mvc;
-
-import jakarta.servlet.jsp.JspException;
-import jakarta.servlet.jsp.PageContext;
-import jakarta.servlet.jsp.tagext.Tag;
-
-public class ExpEval {
-	public static Object evalObject(String attrName, String attrValue, Tag tagObject, PageContext pageContext) throws JspException {
-		return evalExpression(attrName, attrValue, Object.class, tagObject, pageContext);
-	}
-
-	public static String evalString(String attrName, String attrValue, Tag tagObject, PageContext pageContext) throws JspException {
-		return (String) evalExpression(attrName, attrValue, String.class, tagObject, pageContext);
-	}
-
-	public static Integer evalInteger(String attrName, String attrValue, Tag tagObject, PageContext pageContext) throws JspException {
-		return (Integer) evalExpression(attrName, attrValue, Integer.class, tagObject, pageContext);
-	}
-
-	public static Boolean evalBoolean(String attrName, String attrValue, Tag tagObject, PageContext pageContext) throws JspException {
-		return (Boolean) evalExpression(attrName, attrValue, Boolean.class, tagObject, pageContext);
-	}
-
-	private static Object evalExpression(String attrName, String attrValue, Class<?> expectedType, Tag tagObject, PageContext pageContext) throws JspException {
-		if (attrValue == null) return null;
-		if (attrValue.indexOf("${") == -1) {
-			return attrValue;
-		}
-		try {
-			jakarta.el.ELProcessor elProcessor = new jakarta.el.ELProcessor();
-			elProcessor.defineBean("pageContext", pageContext);
-			elProcessor.defineBean("param", pageContext.getRequest().getParameterMap());
-			return elProcessor.eval(attrValue);
-		} catch (Exception e) {
-			throw new JspException("Error evaluating expression: " + attrValue, e);
-		}
-	}
-}

+ 0 - 28
src/main/java/commons/web/mvc/IBeanBase.java

@@ -1,28 +0,0 @@
-package commons.web.mvc;
-
-import java.io.Serializable;
-
-public interface IBeanBase<T extends Serializable> extends Serializable {
-
-	/**
-	 * Metodo utilizzato per riepire il bean a partire
-	 * dai dati del pojo
-	 * @param pojo da cui leggere i dati
-	 */
-	public abstract void fillBean(final T pojo);
-
-	/**
-	 * Metodo utilizzato per riempire i dati del pojo, questi poi 
-	 * viene tornato per essere salvato 
-	 * @param pojos pojos da popolare
-	 * @return pojo da salvare
-	 */
-	public abstract T fillPojo(final T pojo);
-	
-	/**
-	 * @return
-	 */
-	public abstract boolean isVuoto();
-
-
-}

+ 0 - 209
src/main/java/commons/web/mvc/SelectEnumJava.java

@@ -1,209 +0,0 @@
-package commons.web.mvc;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import jakarta.servlet.jsp.JspException;
-import jakarta.servlet.jsp.JspWriter;
-
-import commons.utility.StringUtility;
-import commons.utility.database.NullValue;
-
-public class SelectEnumJava extends BaseFieldForm 
-{
-
-	private static final long serialVersionUID = 1L;
-	
-	private static final String SEPARATOR_EXCLUDED = ",";
-
-	/* inizio attributi del tag*/
-	
-	/* I due tag sono alternativi, la presenza di enumValue esclude il valore di enumClass*/
-	private String enumClass;
-	private String enumValue;
-
-	private String nullValue;
-	/* fine attributi del tag*/
-
-	private Enum<?> NULLO;
-	private Class<Enum<?>> enumJavaClass;
-	private List<Enum<?>> enumJavaValues;
-	//private Enum<?> enumInstace;
-	
-	//contiene il valore ordinale degli enumerati da escludere
-	private List<Integer> excluded = new ArrayList<Integer>();
-	//madilati di visualizzazione delle descrizione
-	private boolean viewOrdinal = NullValue.BOOLEAN;
-
-	@Override
-	// eseguo il metodo doStartTag della classe super 
-	// e voglio che venga ignorato il body del tag se presente
-	public int doStartTag() throws JspException 
-	{
-		super.doStartTag();
-		return SKIP_BODY;
-	};
-
-	protected void buildTag(JspWriter out) throws Exception
-	{
-		StringBuffer sb = new StringBuffer();
-		sb.append("<select ").append(getSelectAttribute()).append(">");
-		sb.append(CR).append(createOption()).append(CR);
-		sb.append("</select>");
-
-		out.write(sb.toString());
-	}
-
-	private boolean doSelected(Enum<?> enumJava)
-	{
-        try
-        {        	
-			final Method methodForSelected = enumJava.getClass().getMethod("valueOf", String.class);
-			final Enum<?> enumSelected = (Enum<?>) methodForSelected.invoke(enumJava, enumValue);
-			
-			return enumJava.equals( enumSelected );
-			
-        }
-        catch (Exception e1)
-        {
-
-        }
-        
-        return NullValue.BOOLEAN;
-	}
-
-	private String getNullValueName(Enum<?> enumJava)
-	{
-
-        try
-        {
-	        final Method methodForOrdinal = enumJava.getClass().getMethod("getDrOrdinal", new Class[] {});
-			final int valoreOrdinale = (Integer) methodForOrdinal.invoke(enumJava, new Object[] {});
-			
-			final Method methodForDescription = enumJava.getClass().getMethod("getDescription", new Class[] {});		
-			final String descrizione = (String) methodForDescription.invoke(enumJava, new Object[] {});
-
-			String val = ( ! viewOrdinal ) ? descrizione : valoreOrdinale +  " - " + descrizione;
-			if (enumJava.equals(NULLO))
-			{
-				if (nullValue != null)
-					val = nullValue;
-
-			}
-			return StringUtility.empty(val) ? "&nbsp;" : val;
-        }        
-    	catch(Exception e)
-    	{
-    	
-    	}
-
-        return NullValue.STRING;
-	}
-
-	private StringBuffer createOption() 
-	{
-		StringBuffer sb = new StringBuffer();
-		//for (Enumerate enumerate : enumerateValues) 
-		for (Enum<?> enumJava : enumJavaValues)
-		{
-            try
-            {
-            	final Method methodForName; methodForName = enumJava.getClass().getMethod("name", new Class[] {});
-	            final String nome = (String) methodForName.invoke(enumJava, new Object[] {});
-
-            	final Method methodForOrdinal; methodForOrdinal = enumJava.getClass().getMethod("ordinal", new Class[] {});
-	            final Integer ordinal = (Integer) methodForOrdinal.invoke(enumJava, new Object[] {});
-	            
-				//if ( excluded.contains(valoreOrdinale) )
-					//continue;
-
-				if (excluded.contains(ordinal))
-					continue;
-
-				sb.append(TAB).append("<option value=").append("\"").append(nome).append("\"").append(doSelected(enumJava) ? " selected=\"selected\" " : "").append(">");
-				sb.append(getNullValueName(enumJava));
-				sb.append("</option>").append(CR);
-
-            }
-            catch (Exception e)
-            {
-
-            }
-			
-		}
-		return sb;
-	}
-
-	public void setEnumValue(String enumValue) throws JspException {
-		Object obj;
-		obj = ExpEval.evalString("enumValue", enumValue, this, pageContext);
-		this.enumValue = (String)obj;
-	}
-
-	@SuppressWarnings("unchecked")
-    public void setEnumClass(String enumClass) throws JspException 
-	{
-		Enum<?> enumInstace;
-		this.enumClass = enumClass;
-		try
-		{
-			enumJavaClass = (Class<Enum<?>>) Class.forName(enumClass);
-			enumJavaValues = new ArrayList<Enum<?>>();
-			Field[] f = enumJavaClass.getFields();
-			for (Field field : f)
-			{
-				if (field.get(null) instanceof Enum<?>)
-				{
-					enumInstace = (Enum<?>) field.get(null);
-					enumJavaValues.add(enumInstace);
-					if (field.getName().equalsIgnoreCase("NULLO"))
-						NULLO = enumInstace;
-				}
-			}
-		}
-		catch(ClassNotFoundException e){
-			throw new JspException(e);
-		} catch (SecurityException e) {
-			throw new JspException(e);
-		} catch (IllegalArgumentException e) {
-			throw new JspException(e);
-		} catch (IllegalAccessException e) {
-			throw new JspException(e);
-		}
-	}
-
-	public void setNullValue(String nullValue) {
-		this.nullValue = nullValue;
-	}
-
-	public void setEnumToExclude(String valoriDaEscludere) throws JspException 
-	{
-		//elimina i precedenti valori perch� la lista viene istanziata staticamente !!! 
-		excluded.clear();
-		Object obj = ExpEval.evalString("enumToExclude", valoriDaEscludere, this, pageContext);
-		if ( obj != null )
-		{
-			String[] exc = ( (String) obj).split(SEPARATOR_EXCLUDED);
-			for (int i = 0; i < exc.length; i++) {
-				try 
-				{
-					excluded.add(Integer.parseInt(exc[i].trim()));
-				}
-				catch (NumberFormatException e) {
-					// nothing...
-				}
-			}
-		}
-	}
-
-	public void setViewOrdinal(boolean viewOrdinal) 
-	{
-    	this.viewOrdinal = viewOrdinal;
-    }
-	public static void main(String[] args)
-    {
-		
-    }
-}

+ 0 - 81
src/main/java/commons/web/resolver/BaseResolverAJAX.java

@@ -1,81 +0,0 @@
-package commons.web.resolver;
-
-import jakarta.servlet.http.HttpServletRequest;
-
-import commons.utility.database.IDatabase;
-import commons.exception.ZSistemaException;
-import commons.utility.formatter.DataFormatter;
-import commons.web.bean.BaseSessionBean;
-
-public abstract class BaseResolverAJAX<IWebFacade, SESSION_BEAN extends BaseSessionBean> implements IResolverAjax
-{
-
-	private IWebFacade iWebFacade;
-	
-	private IDatabase database;
-	
-	private SESSION_BEAN sessionBean;
-	
-	private HttpServletRequest request;
-	
-	private DataFormatter formatter = DataFormatter.getInstance();
-	
-	public BaseResolverAJAX(IWebFacade webFacade,
-	                        IDatabase database,
-	                        SESSION_BEAN beanSessione,
-	                        HttpServletRequest request)
-    {
-	    super();
-	    this.iWebFacade = webFacade;
-	    this.database = database;
-	    this.sessionBean = beanSessione;
-	    this.request = request;
-    }
-
-	public String getParameter(String nomeParametro)
-    {
-		return request.getParameter(nomeParametro);
-    }
-
-	/**
-	 * Metodo dedicato a leggere i parametri dalla request
-	 */
-	protected abstract void extractData();
-	
-	protected abstract IResponseAjax resolve() throws ZSistemaException;
-	
-	public IResponseAjax write() throws ZSistemaException
-	{
-		
-		extractData();
-		
-		return resolve();
-		
-	}
-	
-	protected DataFormatter getFormatter()
-	{
-		return formatter;
-	}
-	
-	protected IWebFacade getIWebFacade()
-    {
-    	return iWebFacade;
-    }
-
-
-	protected IDatabase getDatabase()
-    {
-    	return database;
-    }
-
-
-	protected SESSION_BEAN getSessionBean()
-    {
-    	return sessionBean;
-    }
-	
-}
-
-
-

+ 0 - 10
src/main/java/commons/web/resolver/IResolverAjax.java

@@ -1,10 +0,0 @@
-package commons.web.resolver;
-
-import commons.exception.ZSistemaException;
-
-public interface IResolverAjax
-{
-
-	public abstract IResponseAjax write() throws ZSistemaException;
-	
-}

+ 0 - 14
src/main/java/commons/web/resolver/IResponseAjax.java

@@ -1,14 +0,0 @@
-package commons.web.resolver;
-
-import commons.enumerate.TipoResponseAJAX_e;
-
-
-
-public interface IResponseAjax
-{
-
-	public abstract TipoResponseAJAX_e getTipoResponse();
-	
-	public abstract String getResponseData();
-	
-}