diff --git a/trunk/SIPRPSoft/.classpath b/trunk/SIPRPSoft/.classpath
index 9a6cfe1b..95301e50 100644
--- a/trunk/SIPRPSoft/.classpath
+++ b/trunk/SIPRPSoft/.classpath
@@ -35,5 +35,6 @@
+
diff --git a/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml
index 628aa635..fadecbb0 100644
--- a/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml
+++ b/trunk/SIPRPSoft/ant/common/evo-app-build-common.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml
index 22c61d2c..1c844aae 100644
--- a/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml
+++ b/trunk/SIPRPSoft/ant/common/evo-app-build-obfuscate-common.xml
@@ -1,5 +1,7 @@
-
+
+
+
@@ -47,7 +49,7 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml
index 7fa14e9e..10f56152 100644
--- a/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml
+++ b/trunk/SIPRPSoft/ant/common/evo-app-compile-common.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml
index d81433f7..49b46ba0 100644
--- a/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml
+++ b/trunk/SIPRPSoft/ant/common/evo-app-deploy-common.xml
@@ -1,5 +1,5 @@
-
-
+
+
@@ -22,7 +22,7 @@
-
+
@@ -141,8 +141,41 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml b/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml
index 061b0872..c311b2cc 100644
--- a/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml
+++ b/trunk/SIPRPSoft/ant/common/evo-app-load-properties.xml
@@ -1,4 +1,4 @@
-
+
@@ -10,6 +10,8 @@
+
+
@@ -36,6 +38,11 @@
+
+
+
+
+
@@ -47,7 +54,7 @@
-
+
@@ -62,6 +69,10 @@
+
+
+
+
diff --git a/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml b/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml
index c8db9ba9..84b2469a 100644
--- a/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml
+++ b/trunk/SIPRPSoft/ant/common/evo-app-multiple-client-common.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-build-java5.xml b/trunk/SIPRPSoft/ant/evo-app-build-java5.xml
index 24157b47..3280e098 100644
--- a/trunk/SIPRPSoft/ant/evo-app-build-java5.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-build-java5.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml b/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml
index 2c947be9..d9d46f46 100644
--- a/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-build-jdo.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml
index 65193875..3b1f2ba1 100644
--- a/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate-jdo.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml
index 46a29690..168357f6 100644
--- a/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-build-obfuscate.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-build.xml b/trunk/SIPRPSoft/ant/evo-app-build.xml
index 2fd3da43..099651cb 100644
--- a/trunk/SIPRPSoft/ant/evo-app-build.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-build.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml b/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml
index 9d6f0cc3..e50cb65f 100644
--- a/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-multiple-client-build.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml b/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml
index 06a1ac8e..aaf21aed 100644
--- a/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-multiple-client-obfuscated-build.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml b/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml
index a499a031..9c9e3e96 100644
--- a/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml
+++ b/trunk/SIPRPSoft/ant/evo-app-ws-client-build.xml
@@ -1,4 +1,5 @@
-
+
+
@@ -8,7 +9,7 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-library-build.xml b/trunk/SIPRPSoft/ant/evo-library-build.xml
index 39a2bc19..495899c5 100644
--- a/trunk/SIPRPSoft/ant/evo-library-build.xml
+++ b/trunk/SIPRPSoft/ant/evo-library-build.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/ant/evo-tool-build.xml b/trunk/SIPRPSoft/ant/evo-tool-build.xml
index a2e45dbd..043576b7 100644
--- a/trunk/SIPRPSoft/ant/evo-tool-build.xml
+++ b/trunk/SIPRPSoft/ant/evo-tool-build.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/trunk/SIPRPSoft/build.xml b/trunk/SIPRPSoft/build.xml
index 5a5e6254..2ee97e0e 100644
--- a/trunk/SIPRPSoft/build.xml
+++ b/trunk/SIPRPSoft/build.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/trunk/SIPRPSoft/lib/evolute.jar b/trunk/SIPRPSoft/lib/evolute.jar
index cad72b06..c7350363 100644
Binary files a/trunk/SIPRPSoft/lib/evolute.jar and b/trunk/SIPRPSoft/lib/evolute.jar differ
diff --git a/trunk/SIPRPSoft/lib/shst.jar b/trunk/SIPRPSoft/lib/shst.jar
new file mode 100644
index 00000000..7b985b04
Binary files /dev/null and b/trunk/SIPRPSoft/lib/shst.jar differ
diff --git a/trunk/SIPRPSoft/properties/1-development/app.properties b/trunk/SIPRPSoft/properties/1-development/app.properties
new file mode 100644
index 00000000..ba939f00
--- /dev/null
+++ b/trunk/SIPRPSoft/properties/1-development/app.properties
@@ -0,0 +1,75 @@
+#APP level
+app.appName = SIPRPSoft
+app.main-class = siprp.Main
+app.main = siprp.Main
+
+db.url.prefix = jdbc:postgresql://
+db.user = postgres
+db.password = Typein
+#rg2h-opksiprp
+db.name = siprp_local_3
+db.connection.driver = org.postgresql.Driver
+
+jnlp.resources.property.server.address = evoserver
+jnlp.resources.property.server.port = 5432
+
+
+#app.max.mem=512M
+#app.run.args=test 1 2 3
+
+#app.resources.j2se.version = 1.0+
+#app.resources.j2se.initial-heap-size = 4m
+#app.resources.j2se.max-heap-size = 8m
+
+#app.ws.dest.package=com.evolute.test-project.stubs
+#app.ws.wsdl.url=https://www.evolute.pt/test-project/test-endpoint?wsdl
+#app.ws.wsdl.url.protocol=https
+#app.ws.wsdl.url.host=www.evolute.pt
+#app.ws.wsdl.url.port=443
+#app.ws.wsdl.url.path=/test-project/test-endpoint?wsdl
+
+#app.ssl.truststore.file=jssecacerts
+#app.ssl.truststore.pass=changeit
+
+#JNLP level
+#jnlp.app.appName = test-project
+#jnlp.information.title = jnlp-Test Project
+#jnlp.resources.j2se.version = 1.1+
+#jnlp.test.url=http://www.evolute.pt/~software/test-project
+
+
+#JNLP + PRODUCTION level
+#jnlp.production.app.main-class = !com.evolute.test-project.TestProject2
+#jnlp.production.app.appName = test-project
+#jnlp.production.url=http://www.evolute.pt/~software/test-project
+
+#jnlp.production.information.title = prod-Test Project
+#jnlp.production.information.vendor = prod-Evolute Lda
+#jnlp.production.information.description = prod-Tester Project for JNLP Generator
+#jnlp.production.information.description.short = prod-JNLP Tester
+#jnlp.production.information.icon = prod-logo.png
+
+#jnlp.production.resources.j2se.version = 1.6.0+
+#jnlp.production.resources.j2se.initial-heap-size = 64m
+#jnlp.production.resources.j2se.max-heap-size = 512m
+
+#jnlp.production.resources.property.jnlp.packEnabled = true
+#jnlp.production.resources.property.apple.laf.useScreenMenuBar = true
+#jnlp.production.resources.property.swing.defaultlaf = org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel
+#jnlp.production.resources.property.evolute.ui.overridePaint = false
+
+
+#JNLP + TEST level
+#jnlp.test.app.main-class = com.evolute.test-project.TestProject3
+#jnlp.test.app.appName = project-test
+#jnlp.test.url=http://www.evolute.pt/~software/versoes_teste/test-project
+
+#jnlp.test.information.title = test-Test Project
+#jnlp.test.information.vendor = test-Evolute Lda
+#jnlp.test.information.description = test-Tester Project for JNLP Generator
+#jnlp.test.information.description.short = test-JNLP Tester
+#jnlp.test.information.icon = test-logo.png
+
+#jnlp.test.resources.j2se.version = 1.6.0+
+#jnlp.test.resources.j2se.initial-heap-size = 64m
+#jnlp.test.resources.j2se.max-heap-size = 512m
diff --git a/trunk/SIPRPSoft/properties/2-testing/app.properties b/trunk/SIPRPSoft/properties/2-testing/app.properties
new file mode 100644
index 00000000..2bbd09e8
--- /dev/null
+++ b/trunk/SIPRPSoft/properties/2-testing/app.properties
@@ -0,0 +1,74 @@
+#APP level
+app.appName = SIPRPSoft
+app.main-class = siprp.Main
+app.main = siprp.Main
+
+db.url.prefix = jdbc:postgresql://
+db.user = siprp
+db.password = rg2h-opksiprp
+db.name = siprp_local_3
+db.connection.driver = org.postgresql.Driver
+
+jnlp.resources.property.server.address = www.evolute.pt
+jnlp.resources.property.server.port = 5436
+
+
+#app.max.mem=512M
+#app.run.args=test 1 2 3
+
+#app.resources.j2se.version = 1.0+
+#app.resources.j2se.initial-heap-size = 4m
+#app.resources.j2se.max-heap-size = 8m
+
+#app.ws.dest.package=com.evolute.test-project.stubs
+#app.ws.wsdl.url=https://www.evolute.pt/test-project/test-endpoint?wsdl
+#app.ws.wsdl.url.protocol=https
+#app.ws.wsdl.url.host=www.evolute.pt
+#app.ws.wsdl.url.port=443
+#app.ws.wsdl.url.path=/test-project/test-endpoint?wsdl
+
+#app.ssl.truststore.file=jssecacerts
+#app.ssl.truststore.pass=changeit
+
+#JNLP level
+#jnlp.app.appName = test-project
+#jnlp.information.title = jnlp-Test Project
+#jnlp.resources.j2se.version = 1.1+
+#jnlp.test.url=http://www.evolute.pt/~software/test-project
+
+
+#JNLP + PRODUCTION level
+#jnlp.production.app.main-class = !com.evolute.test-project.TestProject2
+#jnlp.production.app.appName = test-project
+#jnlp.production.url=http://www.evolute.pt/~software/test-project
+
+#jnlp.production.information.title = prod-Test Project
+#jnlp.production.information.vendor = prod-Evolute Lda
+#jnlp.production.information.description = prod-Tester Project for JNLP Generator
+#jnlp.production.information.description.short = prod-JNLP Tester
+#jnlp.production.information.icon = prod-logo.png
+
+#jnlp.production.resources.j2se.version = 1.6.0+
+#jnlp.production.resources.j2se.initial-heap-size = 64m
+#jnlp.production.resources.j2se.max-heap-size = 512m
+
+#jnlp.production.resources.property.jnlp.packEnabled = true
+#jnlp.production.resources.property.apple.laf.useScreenMenuBar = true
+#jnlp.production.resources.property.swing.defaultlaf = org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel
+#jnlp.production.resources.property.evolute.ui.overridePaint = false
+
+
+#JNLP + TEST level
+#jnlp.test.app.main-class = com.evolute.test-project.TestProject3
+#jnlp.test.app.appName = project-test
+#jnlp.test.url=http://www.evolute.pt/~software/versoes_teste/test-project
+
+#jnlp.test.information.title = test-Test Project
+#jnlp.test.information.vendor = test-Evolute Lda
+#jnlp.test.information.description = test-Tester Project for JNLP Generator
+#jnlp.test.information.description.short = test-JNLP Tester
+#jnlp.test.information.icon = test-logo.png
+
+#jnlp.test.resources.j2se.version = 1.6.0+
+#jnlp.test.resources.j2se.initial-heap-size = 64m
+#jnlp.test.resources.j2se.max-heap-size = 512m
diff --git a/trunk/SIPRPSoft/properties/app.properties b/trunk/SIPRPSoft/properties/3-production/app.properties
similarity index 90%
rename from trunk/SIPRPSoft/properties/app.properties
rename to trunk/SIPRPSoft/properties/3-production/app.properties
index 5cf730b6..d6ef1447 100644
--- a/trunk/SIPRPSoft/properties/app.properties
+++ b/trunk/SIPRPSoft/properties/3-production/app.properties
@@ -2,6 +2,16 @@
app.appName = SIPRPSoft
app.main-class = siprp.Main
app.main = siprp.Main
+
+db.url.prefix = jdbc:postgresql://
+db.user = postgres
+db.password = Typein
+db.name = siprp_local
+db.connection.driver = org.postgresql.Driver
+
+jnlp.resources.property.server.address = 10.158.2.2:5432
+jnlp.resources.property.server.port = 5432
+
#app.max.mem=512M
#app.run.args=test 1 2 3
diff --git a/trunk/SIPRPSoft/src/siprp/Main.java b/trunk/SIPRPSoft/src/siprp/Main.java
index e5f5bf5b..fb832592 100644
--- a/trunk/SIPRPSoft/src/siprp/Main.java
+++ b/trunk/SIPRPSoft/src/siprp/Main.java
@@ -31,10 +31,13 @@ import org.apache.cayenne.map.DataMap;
import siprp.clientes.AvisosPanel;
import siprp.companydataloaders.SIPRPDataLoader;
+import siprp.companydataloaders.SIPRPPropertiesLoader;
import siprp.lembretes.LembretesDemon;
import siprp.update.UpdateList;
import com.evolute.module.updater.Updater;
+import com.evolute.properties.EvoDefaultPropertiesLoader;
+import com.evolute.properties.PropertiesException;
import com.evolute.utils.Singleton;
import com.evolute.utils.db.DBException;
import com.evolute.utils.db.DBManager;
@@ -83,6 +86,8 @@ public class Main implements com.evolute.utils.ui.window.Connector
UIManager.put( "FormattedTextField.inactiveForeground", ColorUIResource.BLACK );
UIManager.put( "FormattedTextField.foreground", ColorUIResource.RED.darker() );
+ SIPRPPropertiesLoader.getInstance().load();
+
// Singleton.setInstance( SingletonConstants.COMPANY_NAME, "Centro Cl\u00ednico Avenida" );
// Singleton.setInstance( SingletonConstants.COMPANY_LOGO, "logo_evo.jpg" );
// Singleton.setInstance( SingletonConstants.WEB_AWARE, Boolean.FALSE );
diff --git a/trunk/SIPRPSoft/src/siprp/SHSTLogger.java b/trunk/SIPRPSoft/src/siprp/SHSTLogger.java
index d279ffbf..4b7f67a3 100644
--- a/trunk/SIPRPSoft/src/siprp/SHSTLogger.java
+++ b/trunk/SIPRPSoft/src/siprp/SHSTLogger.java
@@ -6,8 +6,6 @@
package siprp;
-import org.apache.log4j.Level;
-
import com.evolute.utils.Singleton;
import com.evolute.utils.db.DBManager;
import com.evolute.utils.db.Executer;
@@ -118,17 +116,19 @@ public class SHSTLogger implements Logger
}
@Override
- public void log(String arg0, Level arg1)
- {
+ public void close() {
+
}
@Override
- public void logException(Throwable arg0, Level arg1)
- {
+ public void log(String str, java.util.logging.Level level) {
+ // TODO Auto-generated method stub
+
}
-
+
@Override
- public void close() {
+ public void logException(Throwable ex, java.util.logging.Level level) {
+ // TODO Auto-generated method stub
}
diff --git a/trunk/SIPRPSoft/src/siprp/SIPRPTracker.java b/trunk/SIPRPSoft/src/siprp/SIPRPTracker.java
index def9f742..90eac178 100644
--- a/trunk/SIPRPSoft/src/siprp/SIPRPTracker.java
+++ b/trunk/SIPRPSoft/src/siprp/SIPRPTracker.java
@@ -10,6 +10,9 @@ import java.util.Hashtable;
import javax.swing.tree.DefaultMutableTreeNode;
+import shst.MedicinaTrackerInterface;
+import shst.medicina.MedicinaWindowInterface;
+import shst.medicina.multi.MultiMarcacoesWindow;
import siprp.clientes.AvisosPanel;
import siprp.clientes.ClientesWindow;
import siprp.estatistica.EstatisticaWindow;
@@ -37,13 +40,14 @@ import com.evolute.utils.tracker.WindowTracker;
*
* @author fpalma
*/
-public class SIPRPTracker extends WindowTracker
+public class SIPRPTracker extends WindowTracker implements MedicinaTrackerInterface
{
public static final String FICHA_APTIDAO = "Ficha de Aptid\u00e3o";
public static final String CRIACAO_FICHA_APTIDAO = "Cria\u00e7\u00e3o de Fichas de Aptid\u00e3o";
public static final String GESTAO_CLIENTES = "Gest\u00e3o de Clientes";
public static final String MEDICINA = "Medicina";
public static final String MEDICINA_MARCACOES = "Marca\u00e7\u00f5es";
+ public static final String MEDICINA_MULTI_MARCACOES = MultiMarcacoesWindow.TITLE;
public static final String MEDICINA_LOCAIS = "Locais de Realiza\u00e7\u00e3o";
public static final String MEDICINA_ENVIO_ANALISES= EnviarAnalisesWindow.TITLE;
public static final String MEDICINA_PRESENCAS = "Presen\u00e7as";
@@ -53,7 +57,8 @@ public class SIPRPTracker extends WindowTracker
private final AvisosPanel avisos;
private ClientesWindow clientesWindow;
- private MedicinaWindow medicinaWindow;
+ private MedicinaWindowInterface medicinaWindow;
+ private MultiMarcacoesWindow multiMarcacoesWindow;
private MedicinaProcessoWindow medicinaProcessoWindow;
private MarcacoesHigieneWindow higieneWindow;
@@ -166,6 +171,15 @@ public class SIPRPTracker extends WindowTracker
}
} );
+ medicinaNode.add( new DefaultMutableTreeNode( MEDICINA_MULTI_MARCACOES ) );
+ creators.put( MEDICINA_MULTI_MARCACOES, new WindowCreator() {
+ public TrackableWindow create()
+ throws Exception
+ {
+ return getMultiMarcacoesWindow();
+ }
+ });
+
medicinaNode.add( new DefaultMutableTreeNode( MEDICINA_LOCAIS ) );
creators.put( MEDICINA_LOCAIS, new WindowCreator() {
public TrackableWindow create()
@@ -288,7 +302,7 @@ public class SIPRPTracker extends WindowTracker
return clientesWindow;
}
- public MedicinaWindow getMedicinaWindow() throws Exception
+ public MedicinaWindowInterface getMedicinaWindow() throws Exception
{
if( medicinaWindow == null )
{
@@ -298,6 +312,16 @@ public class SIPRPTracker extends WindowTracker
return medicinaWindow;
}
+ public MultiMarcacoesWindow getMultiMarcacoesWindow() throws Exception
+ {
+ if( multiMarcacoesWindow == null )
+ {
+ multiMarcacoesWindow = new MultiMarcacoesWindow();
+ multiMarcacoesWindow.setTracker( SIPRPTracker.this );
+ }
+ return multiMarcacoesWindow;
+ }
+
public MedicinaProcessoWindow getMedicinaProcessoWindow()
{
if( medicinaProcessoWindow == null )
diff --git a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java
index ba02f062..ad4c8d3a 100644
--- a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java
+++ b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java
@@ -3,6 +3,7 @@ package siprp.companydataloaders;
import siprp.CompanyDataLoader;
import siprp.SingletonConstants;
+import com.evolute.properties.EvoPropertyKey;
import com.evolute.utils.Singleton;
/**
@@ -86,12 +87,16 @@ public class SIPRPDataLoader implements CompanyDataLoader
Singleton.setInstance( SingletonConstants.WEB_DB_NAME, "siprp" );
Singleton.setInstance( SingletonConstants.WEB_DRIVER_NAME, "org.postgresql.Driver" );
- Singleton.setInstance( SingletonConstants.LOCAL_USER, "siprp" );
- Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "rg2h-opksiprp" );
- Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
- Singleton.setInstance( SingletonConstants.LOCAL_URL, "www.evolute.pt:5436" );
- Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local_3" );
- Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
+ Singleton.setInstance( SingletonConstants.LOCAL_USER, Singleton.getInstance( EvoPropertyKey.DB.USER ) );
+ Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, Singleton.getInstance( EvoPropertyKey.DB.PASSWORD ) );
+ Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, Singleton.getInstance( EvoPropertyKey.DB.CONNECTION.PREFIX ) );
+ Singleton.setInstance( SingletonConstants.LOCAL_URL,
+ Singleton.getInstance( EvoPropertyKey.DB.CONNECTION.HOSTNAME ) + ":" + Singleton.getInstance( EvoPropertyKey.DB.CONNECTION.PORT )
+ );
+ Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, Singleton.getInstance( EvoPropertyKey.DB.NAME ) );
+ Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, Singleton.getInstance( EvoPropertyKey.DB.CONNECTION.DRIVER_NAME ) );
+
+
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
diff --git a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPPropertiesLoader.java b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPPropertiesLoader.java
new file mode 100644
index 00000000..57d2563b
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPPropertiesLoader.java
@@ -0,0 +1,38 @@
+package siprp.companydataloaders;
+
+import com.evolute.properties.EvoAbstractPropertiesLoader;
+import com.evolute.properties.PropertiesException;
+
+public class SIPRPPropertiesLoader extends EvoAbstractPropertiesLoader
+{
+
+ private static SIPRPPropertiesLoader instance;
+
+ private SIPRPPropertiesLoader()
+ {
+ this(null,null,null,null);
+ }
+
+ public synchronized static SIPRPPropertiesLoader getInstance()
+ {
+ if (instance == null)
+ {
+ instance = new SIPRPPropertiesLoader();
+ }
+ return instance;
+ }
+
+ public SIPRPPropertiesLoader(
+ String[] mandatorySystemProperties,
+ String[] mandatorySingletonProperties,
+ String[] mandatoryJNLPProperties,
+ String[] mandatoryAPPProperties)
+ {
+ super(mandatorySystemProperties, mandatorySingletonProperties, mandatoryJNLPProperties, mandatoryAPPProperties);
+ }
+
+ @Override
+ protected void postLoad() throws PropertiesException
+ {
+ }
+}
diff --git a/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java b/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java
index 79a12e3d..42082a8a 100644
--- a/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java
+++ b/trunk/SIPRPSoft/src/siprp/medicina/MedicinaWindow.java
@@ -27,10 +27,12 @@ import javax.swing.JPanel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
+import shst.MedicinaTrackerInterface;
+import shst.medicina.MedicinaWindowInterface;
import siprp.CompanyDataLoader;
import siprp.FichaDataProvider;
-import siprp.SIPRPTracker;
import siprp.SingletonConstants;
+import siprp.clientes.AvisosPanel;
import siprp.data.AvisoConstants;
import siprp.data.Marcacao;
import siprp.data.outer.ContactosData;
@@ -52,7 +54,7 @@ import com.evolute.utils.ui.window.TabbedWindow;
* @author fpalma
*/
public class MedicinaWindow extends TabbedWindow
- implements ActionListener, ListSelectionListener
+ implements ActionListener, ListSelectionListener, MedicinaWindowInterface
{
private static int iPermissionArray[][] =
new int[][]{ {},
@@ -75,7 +77,7 @@ public class MedicinaWindow extends TabbedWindow
protected MedicinaDataProvider provider;
protected FichaDataProvider fichaProvider;
protected ProviderInterface JDO;
- protected SIPRPTracker tracker;
+ protected MedicinaTrackerInterface tracker;
protected MedicinaUpperPanel upperPanel;
protected MarcacaoConsultaPanel marcacaoConsultaPanel;
@@ -403,7 +405,7 @@ public class MedicinaWindow extends TabbedWindow
}
if( tracker != null )
{
- tracker.getAvisosPanel().setEnabled( (!estado[ 0 ]) && (!estado[1]),
+ (( AvisosPanel )tracker.getAvisosPanel()).setEnabled( (!estado[ 0 ]) && (!estado[1]),
AvisoConstants.TIPO_TRABALHADOR );
}
}
@@ -696,8 +698,9 @@ public class MedicinaWindow extends TabbedWindow
}
}
- public void setTracker( SIPRPTracker tracker )
+ public void setTracker( MedicinaTrackerInterface tracker )
{
this.tracker = tracker;
+
}
}
diff --git a/trunk/SIPRPSoft/src/siprp/update/UpdateList.java b/trunk/SIPRPSoft/src/siprp/update/UpdateList.java
index cc4d6286..036bd0fd 100644
--- a/trunk/SIPRPSoft/src/siprp/update/UpdateList.java
+++ b/trunk/SIPRPSoft/src/siprp/update/UpdateList.java
@@ -32,6 +32,10 @@ import siprp.update.updates.V11_9_To_V12_0;
import siprp.update.updates.V12_0_To_V12_1;
import siprp.update.updates.V12_1_To_V12_2;
import siprp.update.updates.V12_2_To_V12_3;
+import siprp.update.updates.V12_3_To_V12_4;
+import siprp.update.updates.V12_4_To_V12_5;
+import siprp.update.updates.V12_5_To_V12_6;
+import siprp.update.updates.V12_6_To_V12_7;
import siprp.update.updates.V6_1_To_V7_0;
import siprp.update.updates.V7_0_To_V7_2;
import siprp.update.updates.V7_2_To_V7_4;
@@ -98,7 +102,9 @@ public class UpdateList
new V11_5_To_V11_6(), new V11_6_To_V11_7(),
new V11_7_To_V11_8(), new V11_8_To_V11_9(),
new V11_9_To_V12_0(), new V12_0_To_V12_1(),
- new V12_1_To_V12_2(),new V12_2_To_V12_3()
+ new V12_1_To_V12_2(), new V12_2_To_V12_3(),
+ new V12_3_To_V12_4(), new V12_4_To_V12_5(),
+ new V12_5_To_V12_6(), new V12_6_To_V12_7()
};
//
// protected static Executer EXECUTER;
diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V12_3_To_V12_4.java b/trunk/SIPRPSoft/src/siprp/update/updates/V12_3_To_V12_4.java
new file mode 100644
index 00000000..2eb2dd92
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/update/updates/V12_3_To_V12_4.java
@@ -0,0 +1,36 @@
+package siprp.update.updates;
+
+import com.evolute.module.updater.AbstractUpdate;
+import com.evolute.utils.sql.Update;
+
+public class V12_3_To_V12_4 extends AbstractUpdate
+{
+
+ public V12_3_To_V12_4( )
+ {
+ super( 12.3, 12.4, "Adicionar campos em algumas tabelas." );
+ }
+
+ @Override
+ public void doUpdate() throws Exception
+ {
+
+ Update update = new Update(
+ "ALTER TABLE trabalhadores ADD COLUMN nif CHARACTER VARYING( 255 );" +
+ "ALTER TABLE trabalhadores ADD COLUMN numero_utente CHARACTER VARYING( 255 );"
+ );
+ executeQuery( update );
+
+ update = new Update(
+ "ALTER TABLE marcacoes_trabalhador ADD COLUMN medico_id INTEGER;" +
+ "ALTER TABLE marcacoes_trabalhador ADD COLUMN inserted_stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT now();"
+ );
+ executeQuery( update );
+
+ update = new Update(
+ "ALTER TABLE empresas ADD COLUMN codigo_relatorio_unico CHARACTER VARYING( 64 );"
+ );
+ executeQuery( update );
+ }
+
+}
diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V12_4_To_V12_5.java b/trunk/SIPRPSoft/src/siprp/update/updates/V12_4_To_V12_5.java
new file mode 100644
index 00000000..06c8861c
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/update/updates/V12_4_To_V12_5.java
@@ -0,0 +1,57 @@
+package siprp.update.updates;
+
+import com.evolute.module.updater.AbstractUpdate;
+import com.evolute.utils.db.PSQLSequenceUtils;
+import com.evolute.utils.sql.Update;
+
+public class V12_4_To_V12_5 extends AbstractUpdate
+{
+
+ public V12_4_To_V12_5()
+ {
+ super( 12.4, 12.5, "A adicionar novos pagamentos por empresa" );
+ }
+
+ @Override
+ public void doUpdate() throws Exception
+ {
+ Update update = new Update(
+ "begin; " +
+ "create table empresa_preco_periodicidade_tipo( " +
+ " id serial primary key, " +
+ " nome varchar(64) not null " +
+ "); " +
+ "insert into empresa_preco_periodicidade_tipo(id,nome) values(1,'Anual'); " +
+ "insert into empresa_preco_periodicidade_tipo(id,nome) values(2,'Semestral'); " +
+ "insert into empresa_preco_periodicidade_tipo(id,nome) values(3,'Trimestral'); " +
+ "insert into empresa_preco_periodicidade_tipo(id,nome) values(4,'Mensal'); " +
+ "insert into empresa_preco_periodicidade_tipo(id,nome) values(5,'Pontual'); " +
+ "create table empresa_preco_servico_tipo( " +
+ " id serial primary key, " +
+ " nome varchar(64) not null " +
+ "); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(1,'Medicina'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(2,'Higiene e Seguran\\\\u00e7a'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(3,'Forma\\\\u00e7\\\\u00e3o'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(4,'Planos de Emergencia'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(5,'Avalia\\\\u00e7\\\\u00f5es de Risco'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(6,'Avalia\\\\u00e7\\\\u00f5es de Qualidade de Ar'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(7,'Ru\\\\u00eddo Laboral'); " +
+ "insert into empresa_preco_servico_tipo(id,nome) values(8,'Outro'); " +
+ "create table empresa_preco_servico( " +
+ " id serial primary key, " +
+ " empresa_preco_servico_tipo_id int4 not null references empresa_preco_servico_tipo(id), " +
+ " empresa_preco_periodicidade_tipo_id int4 references empresa_preco_periodicidade_tipo(id), " +
+ " tipo_outro varchar(64), " +
+ " empresa_id int4 not null references empresas(id), " +
+ " valor double precision, " +
+ " iniciado timestamp, " +
+ " activo boolean not null " +
+ "); " +
+ "commit; " );
+ getExecuter().executeQuery( update );
+ PSQLSequenceUtils.fixSequence("empresa_preco_periodicidade_tipo", "id");
+ PSQLSequenceUtils.fixSequence("empresa_preco_servico_tipo", "id");
+ }
+
+}
diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V12_5_To_V12_6.java b/trunk/SIPRPSoft/src/siprp/update/updates/V12_5_To_V12_6.java
new file mode 100644
index 00000000..1a5c40d6
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/update/updates/V12_5_To_V12_6.java
@@ -0,0 +1,23 @@
+package siprp.update.updates;
+
+import com.evolute.module.updater.AbstractUpdate;
+import com.evolute.utils.sql.Update;
+
+public class V12_5_To_V12_6 extends AbstractUpdate
+{
+
+ public V12_5_To_V12_6()
+ {
+ super( 12.5, 12.6, "Adicionar campos em algumas tabelas." );
+ }
+
+ @Override
+ public void doUpdate() throws Exception
+ {
+ Update update = new Update(
+ "ALTER TABLE exames ADD COLUMN impresso_stamp timestamp without time zone;"
+ );
+ executeQuery( update );
+ }
+
+}
diff --git a/trunk/SIPRPSoft/src/siprp/update/updates/V12_6_To_V12_7.java b/trunk/SIPRPSoft/src/siprp/update/updates/V12_6_To_V12_7.java
new file mode 100644
index 00000000..63bf0144
--- /dev/null
+++ b/trunk/SIPRPSoft/src/siprp/update/updates/V12_6_To_V12_7.java
@@ -0,0 +1,22 @@
+package siprp.update.updates;
+
+import com.evolute.module.updater.AbstractUpdate;
+import com.evolute.sql.CreateFunctionPlainUpdate;
+
+public class V12_6_To_V12_7 extends AbstractUpdate
+{
+
+ public V12_6_To_V12_7()
+ {
+ super( 12.6, 12.7, "Adicionar funcao plain()." );
+ }
+
+ @Override
+ public void doUpdate() throws Exception
+ {
+
+ CreateFunctionPlainUpdate update = new CreateFunctionPlainUpdate( 12.6, 12.7 );
+ update.doUpdate();
+ }
+
+}