estruturacao e remocao de cayenne.

git-svn-id: https://svn.coded.pt/svn/SIPRP@1312 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Diogo Neves 16 years ago
parent 6f06ef1e8b
commit 0305e2030b

Binary file not shown.

Binary file not shown.

@ -19,6 +19,13 @@
-->
<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="PlanosActuacao-impl">
<import file="ant-deploy.xml"/>
<fail message="Please build using Ant 1.7.1 or higher.">
<condition>
<not>
<antversion atleast="1.7.1"/>
</not>
</condition>
</fail>
<target depends="dist,javadoc" description="Build whole project." name="default"/>
<!--
INITIALIZATION SECTION
@ -49,7 +56,6 @@
</condition>
<condition property="have.sources">
<or>
<available file="${src.src.dir}"/>
<available file="${src.dir}"/>
</or>
</condition>
@ -131,6 +137,9 @@
<isfalse value="${directory.deployment.supported}"/>
</and>
</condition>
<condition property="do.tmp.war.package">
<isfalse value="${directory.deployment.supported}"/>
</condition>
<property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
<condition else="" property="application.args.param" value="${application.args}">
<and>
@ -170,7 +179,6 @@
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
<fail unless="src.src.dir">Must set src.src.dir</fail>
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="test.src.dir">Must set test.src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
@ -202,15 +210,23 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
</target>
<target name="-init-macrodef-javac">
<macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
<attribute default="${src.src.dir}:${src.dir}" name="srcdir"/>
<attribute default="${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="${javac.debug}" name="debug"/>
<attribute default="${empty.dir}" name="gensrcdir"/>
<element name="customize" optional="true"/>
<sequential>
<property location="${build.dir}/empty" name="empty.dir"/>
<mkdir dir="${empty.dir}"/>
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
<src>
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
<include name="*"/>
</dirset>
</src>
<classpath>
<path path="@{classpath}"/>
</classpath>
@ -249,12 +265,13 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
<target name="-init-macrodef-java">
<macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
<attribute default="${main.class}" name="classname"/>
<attribute default="${debug.classpath}" name="classpath"/>
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" fork="true">
<jvmarg line="${runmain.jvmargs}"/>
<classpath>
<path path="${debug.classpath}:${j2ee.platform.classpath}"/>
<path path="@{classpath}:${j2ee.platform.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
@ -380,11 +397,9 @@ exists or setup the property manually. For example like this:
<fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
</copy>
</target>
<target name="-do-ws-compile"/>
<target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest,-do-ws-compile" if="have.sources" name="-do-compile">
<webproject2:javac destdir="${build.classes.dir}"/>
<target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">
<webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
@ -411,9 +426,8 @@ exists or setup the property manually. For example like this:
</target>
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<webproject2:javac excludes="" includes="${javac.includes}"/>
<webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
@ -507,35 +521,27 @@ exists or setup the property manually. For example like this:
<copyfiles files="${libs.jsf12-support.classpath}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.libs.jsf12-support.classpath" todir="${dist.ear.dir}"/>
<copyfiles files="${libs.woodstock-components.classpath}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.libs.woodstock-components.classpath" todir="${dist.ear.dir}"/>
<copyfiles files="${libs.woodstock-theme-default.classpath}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.libs.woodstock-theme-default.classpath" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.jdom.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.jdom.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.ashwood-2.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.ashwood-2.0.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.avalon-framework-4.2.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.avalon-framework-4.2.0.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.activation.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.activation.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.mail.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.mail.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.postgresql-8.0-315.jdbc3.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.postgresql-8.0-315.jdbc3.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.postgresql-8.1-407.jdbc3.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.postgresql-8.1-407.jdbc3.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.fop.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.fop.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.postgresql-8.2-506.jdbc4.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.postgresql-8.2-506.jdbc4.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.cayenne-server-3.0M2.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.cayenne-server-3.0M2.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.jai_imageio.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.jai_imageio.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.evologger.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.evologger.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.batik-all-1.7.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.batik-all-1.7.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.xmlgraphics-commons-1.3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xmlgraphics-commons-1.3.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.SIPRP.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.SIPRP.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-io-1.4.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-io-1.4.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-collections-3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-collections-3.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-lang-2.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-lang-2.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-logging-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-logging-1.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.evolute.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.evolute.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.jcalendar-1.3.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.jcalendar-1.3.2.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.log4j-1.2.8.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.log4j-1.2.8.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.mail.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.mail.jar-1" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.TableLayout.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.TableLayout.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.ashwood-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.ashwood-1.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.SIPRP.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.SIPRP.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.jdom.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.jdom.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.avalon-framework-4.2.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.avalon-framework-4.2.0.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.fop.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.fop.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.jai_imageio.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.jai_imageio.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.xmlgraphics-commons-1.3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xmlgraphics-commons-1.3.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.avalon-framework-4.2.0.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.avalon-framework-4.2.0.jar-1" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.batik-all-1.7.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.batik-all-1.7.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-io-1.4.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-io-1.4.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-logging-1.0.4.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-logging-1.0.4.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<mkdir dir="${build.web.dir}/META-INF"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Class-Path" value="${manifest.libs.jsf12.classpath} ${manifest.libs.jstl11.classpath} ${manifest.libs.jsf12-support.classpath} ${manifest.libs.woodstock-components.classpath} ${manifest.libs.woodstock-theme-default.classpath} ${manifest.file.reference.activation.jar} ${manifest.file.reference.mail.jar} ${manifest.file.reference.postgresql-8.0-315.jdbc3.jar} ${manifest.file.reference.postgresql-8.1-407.jdbc3.jar} ${manifest.file.reference.postgresql-8.2-506.jdbc4.jar} ${manifest.file.reference.cayenne-server-3.0M2.jar} ${manifest.file.reference.commons-collections-3.1.jar} ${manifest.file.reference.commons-lang-2.1.jar} ${manifest.file.reference.commons-logging-1.1.jar} ${manifest.file.reference.evolute.jar} ${manifest.file.reference.jcalendar-1.3.2.jar} ${manifest.file.reference.log4j-1.2.8.jar} ${manifest.file.reference.mail.jar-1} ${manifest.file.reference.TableLayout.jar} ${manifest.file.reference.ashwood-1.1.jar} ${manifest.file.reference.SIPRP.jar} ${manifest.file.reference.jdom.jar} ${manifest.file.reference.avalon-framework-4.2.0.jar} ${manifest.file.reference.fop.jar} ${manifest.file.reference.jai_imageio.jar} ${manifest.file.reference.xmlgraphics-commons-1.3.1.jar} ${manifest.file.reference.avalon-framework-4.2.0.jar-1} ${manifest.file.reference.batik-all-1.7.jar} ${manifest.file.reference.commons-io-1.4.jar} ${manifest.file.reference.commons-logging-1.0.4.jar} "/>
<attribute name="Class-Path" value="${manifest.libs.jsf12.classpath} ${manifest.libs.jstl11.classpath} ${manifest.libs.jsf12-support.classpath} ${manifest.libs.woodstock-components.classpath} ${manifest.libs.woodstock-theme-default.classpath} ${manifest.file.reference.jdom.jar} ${manifest.file.reference.ashwood-2.0.jar} ${manifest.file.reference.avalon-framework-4.2.0.jar} ${manifest.file.reference.activation.jar} ${manifest.file.reference.fop.jar} ${manifest.file.reference.postgresql-8.2-506.jdbc4.jar} ${manifest.file.reference.jai_imageio.jar} ${manifest.file.reference.evologger.jar} ${manifest.file.reference.batik-all-1.7.jar} ${manifest.file.reference.xmlgraphics-commons-1.3.1.jar} ${manifest.file.reference.SIPRP.jar} ${manifest.file.reference.commons-io-1.4.jar} ${manifest.file.reference.commons-collections-3.1.jar} ${manifest.file.reference.commons-lang-2.1.jar} ${manifest.file.reference.commons-logging-1.1.jar} ${manifest.file.reference.evolute.jar} ${manifest.file.reference.mail.jar-1} "/>
</manifest>
</target>
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
@ -544,34 +550,26 @@ exists or setup the property manually. For example like this:
<copyfiles files="${libs.jsf12-support.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.woodstock-components.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.woodstock-theme-default.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.jdom.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.ashwood-2.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.avalon-framework-4.2.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.activation.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.mail.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.postgresql-8.0-315.jdbc3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.postgresql-8.1-407.jdbc3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.fop.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.postgresql-8.2-506.jdbc4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.cayenne-server-3.0M2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.jai_imageio.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.evologger.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.batik-all-1.7.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.xmlgraphics-commons-1.3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.SIPRP.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-io-1.4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-collections-3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-lang-2.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-logging-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.evolute.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.jcalendar-1.3.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.log4j-1.2.8.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.mail.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.TableLayout.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.ashwood-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.SIPRP.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.jdom.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.avalon-framework-4.2.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.fop.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.jai_imageio.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.xmlgraphics-commons-1.3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.avalon-framework-4.2.0.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.batik-all-1.7.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-io-1.4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-logging-1.0.4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
<target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" name="do-ear-dist">
<target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
<dirname file="${dist.ear.war}" property="dist.jar.dir"/>
<mkdir dir="${dist.jar.dir}"/>
<jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
@ -691,12 +689,17 @@ exists or setup the property manually. For example like this:
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<webproject1:java classname="${run.class}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
</target>
<!--
DEBUGGING SECTION
-->
<target depends="init,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="true"/>
<nbstartserver debugmode="true"/>
<antcall target="connect-debugger"/>
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
<antcall target="debug-display-browser"/>
<antcall target="connect-client-debugger"/>
</target>
@ -716,7 +719,15 @@ exists or setup the property manually. For example like this:
<target if="do.debug.client" name="connect-client-debugger">
<webproject1:nbjsdebugstart webUrl="${client.url}"/>
</target>
<target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
</target>
<target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
<target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
<target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
<webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
</target>
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
<webproject1:nbjpdastart name="${debug.class}"/>
</target>
@ -742,12 +753,12 @@ exists or setup the property manually. For example like this:
<classpath>
<path path="${javac.classpath}:${j2ee.platform.classpath}"/>
</classpath>
<fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
@ -803,7 +814,7 @@ exists or setup the property manually. For example like this:
<webproject2:junit testincludes="**/*Test.java"/>
</target>
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
<fail if="tests.failed">Some tests failed; see details above.</fail>
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
</target>
<target depends="init" if="have.tests" name="test-report"/>
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
@ -816,7 +827,7 @@ exists or setup the property manually. For example like this:
<webproject2:junit excludes="" includes="${test.includes}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
<fail if="tests.failed">Some tests failed; see details above.</fail>
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
<!--

@ -1,8 +1,8 @@
build.xml.data.CRC32=d6fcc03c
build.xml.data.CRC32=d877c126
build.xml.script.CRC32=50b8b881
build.xml.stylesheet.CRC32=c0ebde35
build.xml.stylesheet.CRC32=c0ebde35@1.15.2.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=d6fcc03c
nbproject/build-impl.xml.script.CRC32=abe897d8
nbproject/build-impl.xml.stylesheet.CRC32=174458fc
nbproject/build-impl.xml.data.CRC32=d877c126
nbproject/build-impl.xml.script.CRC32=c92039f4
nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.2.1

@ -3,10 +3,10 @@ auxiliary.org-netbeans-modules-web-client-tools-api.dialogShowDebugPanel=false
auxiliary.org-netbeans-modules-web-client-tools-api.FIREFOX=true
auxiliary.org-netbeans-modules-web-client-tools-api.INTERNET_5f_EXPLORER=false
auxiliary.org-netbeans-modules-web-client-tools-api.serverdebug=true
deploy.ant.properties.file=/home/tsimao/.netbeans/6.5/tomcat60.properties
j2ee.platform.classpath=/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/tomcat-dbcp.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/servlet-api.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/annotations-api.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/tomcat-i18n-fr.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/jasper.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/tomcat-i18n-es.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/catalina.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/jasper-el.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/catalina-ha.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/tomcat-i18n-ja.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/el-api.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/catalina-ant.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/jsp-api.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/tomcat-coyote.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/lib/catalina-tribes.jar:/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18/bin/tomcat-juli.jar
j2ee.server.instance=tomcat60:home=/usr/local/netbeans-6.5.1/apache-tomcat-6.0.18:base=apache-tomcat-6.0.18_base
deploy.ant.properties.file=/home/dneves/.netbeans/6.7/tomcat60.properties
j2ee.platform.classpath=/usr/local/apache-tomcat-6.0.18/lib/catalina.jar:/usr/local/apache-tomcat-6.0.18/lib/catalina-tribes.jar:/usr/local/apache-tomcat-6.0.18/lib/jasper.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-coyote.jar:/usr/local/apache-tomcat-6.0.18/lib/annotations-api.jar:/usr/local/apache-tomcat-6.0.18/lib/servlet-api.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-i18n-es.jar:/usr/local/apache-tomcat-6.0.18/lib/jasper-el.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-dbcp.jar:/usr/local/apache-tomcat-6.0.18/lib/el-api.jar:/usr/local/apache-tomcat-6.0.18/lib/catalina-ha.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-i18n-ja.jar:/usr/local/apache-tomcat-6.0.18/lib/tomcat-i18n-fr.jar:/usr/local/apache-tomcat-6.0.18/lib/catalina-ant.jar:/usr/local/apache-tomcat-6.0.18/lib/jsp-api.jar:/usr/local/apache-tomcat-6.0.18/bin/tomcat-juli.jar
j2ee.server.instance=tomcat60:home=/usr/local/apache-tomcat-6.0.18:base=apache-tomcat-6.0.18_base
javac.debug=true
javadoc.preview=true
jaxws.endorsed.dir=/usr/local/netbeans-6.5.1/java2/modules/ext/jaxws21/api:/usr/local/netbeans-6.5.1/ide10/modules/ext/jaxb/api
user.properties.file=/home/tsimao/.netbeans/6.5/build.properties
jaxws.endorsed.dir=/usr/local/netbeans-6.7.1/java2/modules/ext/jaxws21/api:/usr/local/netbeans-6.7.1/ide11/modules/ext/jaxb/api
user.properties.file=/home/dneves/.netbeans/6.7/build.properties

@ -2,6 +2,7 @@ build.classes.dir=${build.web.dir}/WEB-INF/classes
build.classes.excludes=**/*.java,**/*.form
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
build.web.dir=${build.dir}/web
@ -20,32 +21,24 @@ dist.ear.war=${dist.dir}/${war.ear.name}
dist.javadoc.dir=${dist.dir}/javadoc
dist.war=${dist.dir}/${war.name}
excludes=
file.reference.activation.jar=jars/activation.jar
file.reference.ashwood-1.1.jar=../common/lib/ashwood-1.1.jar
file.reference.activation.jar=lib/activation.jar
file.reference.ashwood-2.0.jar=lib/ashwood-2.0.jar
file.reference.avalon-framework-4.2.0.jar=lib/avalon-framework-4.2.0.jar
file.reference.avalon-framework-4.2.0.jar-1=../SIPRPSoft/lib/avalon-framework-4.2.0.jar
file.reference.batik-all-1.7.jar=../SIPRPSoft/lib/batik-all-1.7.jar
file.reference.cayenne-server-3.0M2.jar=../common/lib/cayenne-server-3.0M2.jar
file.reference.batik-all-1.7.jar=lib/batik-all-1.7.jar
file.reference.common-src=../common/src
file.reference.commons-collections-3.1.jar=../common/lib/commons-collections-3.1.jar
file.reference.commons-io-1.4.jar=../SIPRPSoft/lib/commons-io-1.4.jar
file.reference.commons-lang-2.1.jar=../common/lib/commons-lang-2.1.jar
file.reference.commons-logging-1.0.4.jar=../SIPRPSoft/lib/commons-logging-1.0.4.jar
file.reference.commons-logging-1.1.jar=../common/lib/commons-logging-1.1.jar
file.reference.evolute.jar=../common/lib/evolute.jar
file.reference.fop.jar=../SIPRPSoft/lib/fop.jar
file.reference.commons-collections-3.1.jar=lib/commons-collections-3.1.jar
file.reference.commons-io-1.4.jar=lib/commons-io-1.4.jar
file.reference.commons-lang-2.1.jar=lib/commons-lang-2.1.jar
file.reference.commons-logging-1.1.jar=lib/commons-logging-1.1.jar
file.reference.evologger.jar=lib/evologger.jar
file.reference.evolute.jar=lib/evolute.jar
file.reference.fop.jar=lib/fop.jar
file.reference.jai_imageio.jar=lib/jai_imageio.jar
file.reference.jcalendar-1.3.2.jar=../common/lib/jcalendar-1.3.2.jar
file.reference.jdom.jar=lib/jdom.jar
file.reference.log4j-1.2.8.jar=../common/lib/log4j-1.2.8.jar
file.reference.mail.jar=jars/mail.jar
file.reference.mail.jar-1=../common/lib/mail.jar
file.reference.postgresql-8.0-315.jdbc3.jar=jars/postgresql-8.0-315.jdbc3.jar
file.reference.postgresql-8.1-407.jdbc3.jar=jars/postgresql-8.1-407.jdbc3.jar
file.reference.postgresql-8.2-506.jdbc4.jar=jars/postgresql-8.2-506.jdbc4.jar
file.reference.mail.jar-1=lib/mail.jar
file.reference.postgresql-8.2-506.jdbc4.jar=lib/postgresql-8.2-506.jdbc4.jar
file.reference.SIPRP.jar=lib/SIPRP.jar
file.reference.TableLayout.jar=../common/lib/TableLayout.jar
file.reference.xmlgraphics-commons-1.3.1.jar=../SIPRPSoft/lib/xmlgraphics-commons-1.3.1.jar
file.reference.xmlgraphics-commons-1.3.1.jar=lib/xmlgraphics-commons-1.3.1.jar
includes=**
j2ee.deploy.on.save=false
j2ee.platform=1.5
@ -57,31 +50,23 @@ javac.classpath=\
${libs.jsf12-support.classpath}:\
${libs.woodstock-components.classpath}:\
${libs.woodstock-theme-default.classpath}:\
${file.reference.activation.jar}:\
${file.reference.mail.jar}:\
${file.reference.postgresql-8.0-315.jdbc3.jar}:\
${file.reference.postgresql-8.1-407.jdbc3.jar}:\
${file.reference.postgresql-8.2-506.jdbc4.jar}:\
${file.reference.cayenne-server-3.0M2.jar}:\
${file.reference.commons-collections-3.1.jar}:\
${file.reference.commons-lang-2.1.jar}:\
${file.reference.commons-logging-1.1.jar}:\
${file.reference.evolute.jar}:\
${file.reference.jcalendar-1.3.2.jar}:\
${file.reference.log4j-1.2.8.jar}:\
${file.reference.mail.jar-1}:\
${file.reference.TableLayout.jar}:\
${file.reference.ashwood-1.1.jar}:\
${file.reference.SIPRP.jar}:\
${file.reference.jdom.jar}:\
${file.reference.ashwood-2.0.jar}:\
${file.reference.avalon-framework-4.2.0.jar}:\
${file.reference.activation.jar}:\
${file.reference.fop.jar}:\
${file.reference.postgresql-8.2-506.jdbc4.jar}:\
${file.reference.jai_imageio.jar}:\
${file.reference.xmlgraphics-commons-1.3.1.jar}:\
${file.reference.avalon-framework-4.2.0.jar-1}:\
${file.reference.evologger.jar}:\
${file.reference.batik-all-1.7.jar}:\
${file.reference.xmlgraphics-commons-1.3.1.jar}:\
${file.reference.SIPRP.jar}:\
${file.reference.commons-io-1.4.jar}:\
${file.reference.commons-logging-1.0.4.jar}
${file.reference.commons-collections-3.1.jar}:\
${file.reference.commons-lang-2.1.jar}:\
${file.reference.commons-logging-1.1.jar}:\
${file.reference.evolute.jar}:\
${file.reference.mail.jar-1}
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
@ -119,7 +104,6 @@ runmain.jvmargs=
source.encoding=ISO-8859-1
source.root=src
src.dir=${source.root}/java
src.src.dir=${file.reference.common-src}
test.src.dir=test
war.content.additional=\
${libs.exceptionhandler-runtime.classpath}

@ -28,63 +28,43 @@
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.activation.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.mail.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.postgresql-8.0-315.jdbc3.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.postgresql-8.1-407.jdbc3.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.postgresql-8.2-506.jdbc4.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.cayenne-server-3.0M2.jar}</file>
<file>${file.reference.jdom.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.commons-collections-3.1.jar}</file>
<file>${file.reference.ashwood-2.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.commons-lang-2.1.jar}</file>
<file>${file.reference.avalon-framework-4.2.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.commons-logging-1.1.jar}</file>
<file>${file.reference.activation.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.evolute.jar}</file>
<file>${file.reference.fop.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.jcalendar-1.3.2.jar}</file>
<file>${file.reference.postgresql-8.2-506.jdbc4.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.log4j-1.2.8.jar}</file>
<file>${file.reference.jai_imageio.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.mail.jar-1}</file>
<file>${file.reference.evologger.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.TableLayout.jar}</file>
<file>${file.reference.batik-all-1.7.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.ashwood-1.1.jar}</file>
<file>${file.reference.xmlgraphics-commons-1.3.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
@ -92,39 +72,27 @@
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.jdom.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.avalon-framework-4.2.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.fop.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.jai_imageio.jar}</file>
<file>${file.reference.commons-io-1.4.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.xmlgraphics-commons-1.3.1.jar}</file>
<file>${file.reference.commons-collections-3.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.avalon-framework-4.2.0.jar-1}</file>
<file>${file.reference.commons-lang-2.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.batik-all-1.7.jar}</file>
<file>${file.reference.commons-logging-1.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.commons-io-1.4.jar}</file>
<file>${file.reference.evolute.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.commons-logging-1.0.4.jar}</file>
<file>${file.reference.mail.jar-1}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
</web-module-libraries>
@ -135,7 +103,6 @@
</library>
</web-module-additional-libraries>
<source-roots>
<root id="src.src.dir"/>
<root id="src.dir"/>
</source-roots>
<test-roots>

@ -18,7 +18,7 @@ import javax.servlet.http.HttpSession;
* @author lluis
*/
public class Db {
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp"; //testes
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp_20100629"; //testes
// String connectionURL = "jdbc:postgresql://www.evolute.pt:5436/siprp"; //real
String connectionURL = "jdbc:postgresql://localhost:5436/siprp"; //real

@ -16,7 +16,7 @@ import java.sql.Statement;
* @author lluis
*/
public class DbRelatorios {
//String connectionURL = "jdbc:postgresql://storage:5432/siprp"; //testes
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp_20100629"; //testes
String connectionURL = "jdbc:postgresql://localhost:5436/siprp"; //real

@ -9,6 +9,7 @@
package db;
import com.evolute.application.initializer.DefaultDatabaseInitializer;
import com.evolute.utils.error.ErrorLogger;
import java.sql.Connection;
import java.sql.DriverManager;
@ -22,12 +23,23 @@ import javax.servlet.http.HttpSession;
* @author lluis
*/
public class Dblocal {
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp_local_3"; //testes
// String server = "evoserver";
// String port = "5432";
// String database = "siprp_local_3_20100713";
String User = "postgres";
String Pass = null;
String server = "localhost";
String port = "5436";
String database = "siprp_local_3";
String connectionURL = "jdbc:postgresql://" + server + ":" + port + "/" + database;
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp_local_3_20100713"; //testes
// String connectionURL = "jdbc:postgresql://www.evolute.pt:5436/siprp_local_3"; //testes local_3
String connectionURL = "jdbc:postgresql://localhost:5436/siprp_local_3";
// String connectionURL = "jdbc:postgresql://localhost:5436/siprp_local_3";
String User = "postgres";
String Pass = null;
Connection connection = null;
/** Creates a new instance of Dblocal */
@ -45,7 +57,17 @@ public class Dblocal {
// application.setLocalConnection(connection);
// }
new DefaultDatabaseInitializer( server, port, database, User, Pass ).doInit();
// Insert.setDefaultKeyRetriever( PostgresqlAutoKeyRetriever.RETRIEVER );
// ProviderRegistry.registerDefaultProviderFactory( new EvoDataProviderFactory() );
// ConnectionIdentity conn = new ConnectionIdentity( connectionURL, User );
// conn.setPassword( Pass );
// ProviderRegistry.registerDefaultConnection( conn );
// ProviderInterface< ?, ? > provider = ProviderRegistry.getDefaultProvider( conn );
//
// Singleton.setInstance( Singleton.DEFAULT_OBJECT_PROVIDER, provider );
// Singleton.setInstance( Singleton.DEFAULT_EVO_DATA_PROVIDER, provider );
HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);
session.setAttribute("connection_local", connection);

@ -10,26 +10,16 @@ import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import org.apache.cayenne.access.DataDomain;
import org.apache.cayenne.access.DataNode;
import org.apache.cayenne.conf.DefaultConfiguration;
import org.apache.cayenne.conn.DriverDataSource;
import org.apache.cayenne.dba.AutoAdapter;
import org.apache.cayenne.map.DataMap;
import com.evolute.utils.Singleton;
import com.evolute.utils.error.ErrorLogger;
import siprp.SingletonConstants;
/**
*
* @author lluis
*/
public class DblocalRelatorios {
//String connectionURL = "jdbc:postgresql://storage/siprp_local"; //testes
//String connectionURL = "jdbc:postgresql://storage/siprp_local_3"; //testes local_3
public class DblocalRelatorios
{
// String connectionURL = "jdbc:postgresql://evoserver/siprp_local_3_20100713"; //testes local_3
String connectionURL = "jdbc:postgresql://localhost:5436/siprp_local_3";
@ -43,17 +33,6 @@ public class DblocalRelatorios {
Class.forName("org.postgresql.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, User, Pass);
DataDomain domain = DefaultConfiguration.getSharedConfiguration().getDomain();
DataMap map = domain.getMap( "SIPRPMap" );
DriverDataSource dataSource = new DriverDataSource((String) Singleton.getInstance( SingletonConstants.LOCAL_DRIVER_NAME ), connectionURL, User, Pass );
DataNode node = new DataNode("SIPRPNode");
node.setDataSource( dataSource );
node.setAdapter( new AutoAdapter(dataSource) );
node.addDataMap( map );
node.setEntityResolver( domain.getEntityResolver() );
domain.reset();
domain.addNode( node );
//HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);
//session.setAttribute("connection_local", connection);
return connection;

@ -5,13 +5,15 @@
package db.entidades;
import java.io.Serializable;
import java.util.List;
/**
*
* @author lluis
*/
public class Area {
public class Area implements Serializable
{
private Integer id;
private Integer area_id; //from relatorios
private Integer plano_id;

@ -5,12 +5,14 @@
package db.entidades;
import java.io.Serializable;
/**
*
* @author dneves
*/
public class EstadoMedida
public class EstadoMedida implements Serializable
{
private Integer id;

@ -5,13 +5,15 @@
package db.entidades;
import java.io.Serializable;
import java.util.List;
/**
*
* @author lluis
*/
public class Medida {
public class Medida implements Serializable
{
private Integer id;
private Integer medida_id; //from relatorios
private Integer valor_id;

@ -6,6 +6,7 @@
package db.entidades;
import global.Global;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@ -14,7 +15,8 @@ import java.util.List;
*
* @author lluis
*/
public class PlanoActuacao {
public class PlanoActuacao implements Serializable
{
private static final SimpleDateFormat D_F = new SimpleDateFormat( "dd-MM-yyyy" );

@ -5,11 +5,14 @@
package db.entidades;
import java.io.Serializable;
/**
*
* @author lluis
*/
public class PostoTrabalho {
public class PostoTrabalho implements Serializable
{
private Integer id;
private Integer posto_id; //from relatorios
private Integer medida_id;

@ -6,6 +6,7 @@
package db.entidades;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@ -13,7 +14,8 @@ import java.util.List;
*
* @author lluis
*/
public class Risco {
public class Risco implements Serializable
{
private Integer id;
private Integer area_id;
private String descricao;

@ -5,13 +5,15 @@
package db.entidades;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author lluis
*/
public class Utilizador {
public class Utilizador implements Serializable
{
private Integer id;
private String login;
private String password;

@ -5,6 +5,7 @@
package db.entidades;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@ -12,7 +13,8 @@ import java.util.List;
*
* @author lluis
*/
public class Valor {
public class Valor implements Serializable
{
private Integer id;
private Integer risco_id;
private Integer valor;

@ -33,7 +33,6 @@ import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletResponse;
import siprp.database.cayenne.providers.PlanoActuacaoDAO;
import siprp.planoactuacao.print.PlanoActuacaoPDFCreator;
import tabledataproviders.PlanosActualDataProvider;
import tabledataproviders.PlanosConcluidosDataProvider;
@ -684,8 +683,9 @@ FacesContext context = FacesContext.getCurrentInstance();
if(!getApplicationBean1().isTimerStarted())
{
Timer.scheduleEvent(new TimedEvent(){
public void executeAction() throws Exception
Timer.scheduleEvent( new TimedEvent()
{
public void executeAction() throws Exception
{
try
{
@ -693,13 +693,12 @@ FacesContext context = FacesContext.getCurrentInstance();
}
catch( Exception ex )
{
ErrorLogger.logException( ex );
}
Timer.resetEvent( this );
}
}, 300);
getApplicationBean1().setTimerStarted(true);
}, 300 );
getApplicationBean1().setTimerStarted( true );
}
@ -712,7 +711,17 @@ FacesContext context = FacesContext.getCurrentInstance();
{
estabelecimento_id = u.getEstabelecimento_id();
}
PlanoActuacaoDAO pa = new PlanoActuacaoDAO();
// try
// {
//// PlanoActuacaoDAO pa = new PlanoActuacaoDAO();
// PlanoActuacaoDataProvider pa = PlanoActuacaoDataProvider.getProvider();
// }
// catch ( Exception ex )
// {
// ErrorLogger.logException( ex );
// }
List<Date> list = new ArrayList();
Calendar calendar = Calendar.getInstance();

@ -22,8 +22,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import mail.Mail;
import siprp.database.cayenne.objects.HsRelatorio;
import siprp.database.cayenne.providers.PlanoActuacaoDAO;
import siprp.data.provider.PlanoActuacaoDataProvider;
import siprp.data.outer.HsRelatorioData;
import static com.evolute.utils.strings.UnicodeLatin1Map.*;
/**
@ -36,14 +36,12 @@ public class PlanosActuacao {
//RelatoriosDataProvider rdp;
List<PlanoActuacao> planosList;
List<Date> planosOnlineList;
PlanoActuacaoDAO pa = new PlanoActuacaoDAO();
// PlanoActuacaoDAO pa = new PlanoActuacaoDAO();
//DB
public PlanosActuacao()
{
try
@ -107,55 +105,64 @@ public class PlanosActuacao {
private void initRelatorios(List<Date> list, Integer estabelecimentoId)
{
System.out.println("initRelatorios for estabelecimento id: " + estabelecimentoId );
if( estabelecimentoId == null )
{
System.out.println("A adicionar planos de estabelecimentos novos");
List<Integer> estabelecimentos = cpdp.getEstabelecimentosWithPlanos();
putPlanosOnline(pa.getRelatoriosNotIn(estabelecimentos));
estabelecimentos = cpdp.getEstabelecimentosWithPlanos();
System.out.println("A adicionar planos a estabelecimentos anteriores");
for( Integer estabelecimentoID : estabelecimentos )
{
try
{
System.out.println("A importar relatorio para o estabelecimento: " + estabelecimentoID );
List<Date> datas = cpdp.getPlanosOnline(estabelecimentoID);
if( datas.isEmpty() )
{
System.out.println("Nenhuma data de relatorio para o estabelecimento: " + estabelecimentoID );
}
else
{
List<HsRelatorio> relatorios = pa.getRelatoriosNotIn(datas, estabelecimentoID);
if( relatorios.isEmpty() )
{
System.out.println("Nenhum relatorio novo para o estabelecimento: " + estabelecimentoID );
}
else
{
putPlanosOnline(relatorios);
}
}
}
catch(Exception e )
{
ErrorLogger.logException( e );
}
}
}
else
try
{
PlanoActuacaoDataProvider pa = PlanoActuacaoDataProvider.getProvider();
if( estabelecimentoId == null )
{
System.out.println("A adicionar planos de estabelecimentos novos");
List<Integer> estabelecimentos = cpdp.getEstabelecimentosWithPlanos();
putPlanosOnline(pa.getRelatoriosNotIn(estabelecimentos));
estabelecimentos = cpdp.getEstabelecimentosWithPlanos();
System.out.println("A adicionar planos a estabelecimentos anteriores");
for( Integer estabelecimentoID : estabelecimentos )
{
try
{
System.out.println("A importar relatorio para o estabelecimento: " + estabelecimentoID );
List<Date> datas = cpdp.getPlanosOnline(estabelecimentoID);
if( datas.isEmpty() )
{
System.out.println("Nenhuma data de relatorio para o estabelecimento: " + estabelecimentoID );
}
else
{
List< HsRelatorioData > relatorios = pa.getRelatoriosNotIn(datas, estabelecimentoID);
if( relatorios.isEmpty() )
{
System.out.println("Nenhum relatorio novo para o estabelecimento: " + estabelecimentoID );
}
else
{
putPlanosOnline(relatorios);
}
}
}
catch(Exception e )
{
ErrorLogger.logException( e );
}
}
}
else
{
putPlanosOnline(pa.getRelatoriosNotIn(list, estabelecimentoId));
}
}
catch ( Exception e )
{
putPlanosOnline(pa.getRelatoriosNotIn(list, estabelecimentoId));
}
ErrorLogger.logException( e );
}
}
private void putPlanosOnline(List<HsRelatorio> listRelatorios)
private void putPlanosOnline(List< HsRelatorioData > listRelatorios)
{
System.out.println("putPlanosOnline (" + listRelatorios == null ? "null" : listRelatorios.size() );
Iterator<HsRelatorio> iter = listRelatorios.iterator();
Iterator<HsRelatorioData> iter = listRelatorios.iterator();
while(iter.hasNext())
{
HsRelatorio relatorio = iter.next();
HsRelatorioData relatorio = iter.next();
System.out.println("RELATORIO ID : " + relatorio.getId().toString());
try
{
@ -175,29 +182,39 @@ public class PlanosActuacao {
}
}
private PlanoActuacao createPlano(HsRelatorio relatorio) throws Exception
private PlanoActuacao createPlano(HsRelatorioData relatorio) throws Exception
{
System.out.println("CREATE PLANO - RELATORIO ID : " + relatorio.getId().toString());
PlanoActuacao p = new PlanoActuacao();
p.setData_visita(relatorio.getToHsMarcacoesEstabelecimento().getData());
p.setData_visita( relatorio.toMarcacao_id().getData() );
// p.setData_visita(relatorio.getToHsMarcacoesEstabelecimento().getData());
//////////
if(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst() != null)
// if(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst() != null)
if ( relatorio.toMarcacao_id().toTecnico_hst() != null )
{
p.setTecnico_hs_id(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst().getId());
p.setTecnico_hs_nome(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst().getNome());
// p.setTecnico_hs_id(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst().getId());
// p.setTecnico_hs_nome(relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosHst().getNome());
p.setTecnico_hs_id( relatorio.toMarcacao_id().toTecnico_hst().getId() );
p.setTecnico_hs_nome( relatorio.toMarcacao_id().toTecnico_hst().getNome() );
}
if ( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst() != null )
// if ( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst() != null )
if ( relatorio.toMarcacao_id().toTecnico_superior_hst() != null )
{
p.setTecnico_superior_hs_id( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst().getId() );
p.setTecnico_superior_hs_nome( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst().getNome() );
// p.setTecnico_superior_hs_id( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst().getId() );
// p.setTecnico_superior_hs_nome( relatorio.getToHsMarcacoesEstabelecimento().getToMarcacoesTecnicosSuperioresHst().getNome() );
p.setTecnico_superior_hs_id( relatorio.toMarcacao_id().toTecnico_superior_hst().getId() );
p.setTecnico_superior_hs_nome( relatorio.toMarcacao_id().toTecnico_superior_hst().getNome() );
}
/////////
p.setFase(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO));
p.setEstabelecimento_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getId());
p.setEmpresa_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getToEmpresas().getId());
// p.setEstabelecimento_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getId());
// p.setEmpresa_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getToEmpresas().getId());
p.setEstabelecimento_id( relatorio.toMarcacao_id().toEstabelecimento_id().getId() );
p.setEmpresa_id( relatorio.toMarcacao_id().toEstabelecimento_id().toEmpresa_id().getId() );
try
{
//p.setNome_empresa(utils.Utils.unicodeToHTML(rdp.getEmpresaNome(p.getEmpresa_id())));
@ -207,7 +224,8 @@ public class PlanosActuacao {
{
ErrorLogger.logException( ex );
}
p.setNome_estabelecimento(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getNome());
// p.setNome_estabelecimento(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getNome());
p.setNome_estabelecimento( relatorio.toMarcacao_id().toEstabelecimento_id().getNome() );
p.setData_relatorio(relatorio.getData());
//p = rdp.getFullPlano(p, relatorio.getId());
p = cpdp.getFullPlano(p, relatorio.getId());

Loading…
Cancel
Save