obsolete
	
		
	
				
					
				
			git-svn-id: https://svn.coded.pt/svn/SIPRP@673 bb69d46d-e84e-40c8-a05a-06db0d6337410'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
| @ -1,66 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <!-- You may freely edit this file. See commented blocks below for --> |  | ||||||
| <!-- some examples of how to customize the build. --> |  | ||||||
| <!-- (If you delete it and reopen the project it will be recreated.) --> |  | ||||||
| <project name="AnaliseAcidentesTrabalho" default="default" basedir="."> |  | ||||||
|     <description>Builds, tests, and runs the project AnaliseAcidentesTrabalho.</description> |  | ||||||
|     <import file="nbproject/build-impl.xml"/> |  | ||||||
|     <!-- |  | ||||||
| 
 |  | ||||||
|     There exist several targets which are by default empty and which can be  |  | ||||||
|     used for execution of your tasks. These targets are usually executed  |  | ||||||
|     before and after some main targets. They are:  |  | ||||||
| 
 |  | ||||||
|       -pre-init:                 called before initialization of project properties  |  | ||||||
|       -post-init:                called after initialization of project properties  |  | ||||||
|       -pre-compile:              called before javac compilation  |  | ||||||
|       -post-compile:             called after javac compilation  |  | ||||||
|       -pre-compile-single:       called before javac compilation of single file |  | ||||||
|       -post-compile-single:      called after javac compilation of single file |  | ||||||
|       -pre-compile-test:         called before javac compilation of JUnit tests |  | ||||||
|       -post-compile-test:        called after javac compilation of JUnit tests |  | ||||||
|       -pre-compile-test-single:  called before javac compilation of single JUnit test |  | ||||||
|       -post-compile-test-single: called after javac compilation of single JUunit test |  | ||||||
|       -pre-dist:                 called before jar building  |  | ||||||
|       -post-dist:                called after jar building  |  | ||||||
|       -post-clean:               called after cleaning build products  |  | ||||||
|       -pre-run-deploy:           called before deploying |  | ||||||
|       -post-run-deploy:          called after deploying |  | ||||||
| 
 |  | ||||||
|     Example of pluging an obfuscator after the compilation could look like  |  | ||||||
| 
 |  | ||||||
|         <target name="post-compile"> |  | ||||||
|             <obfuscate> |  | ||||||
|                 <fileset dir="${build.classes.dir}"/> |  | ||||||
|             </obfuscate> |  | ||||||
|         </target> |  | ||||||
| 
 |  | ||||||
|     For list of available properties check the imported  |  | ||||||
|     nbproject/build-impl.xml file.  |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     Other way how to customize the build is by overriding existing main targets. |  | ||||||
|     The target of interest are:  |  | ||||||
| 
 |  | ||||||
|       init-macrodef-javac:    defines macro for javac compilation |  | ||||||
|       init-macrodef-junit:   defines macro for junit execution |  | ||||||
|       init-macrodef-debug:    defines macro for class debugging |  | ||||||
|       do-dist:                jar archive building |  | ||||||
|       run:                    execution of project  |  | ||||||
|       javadoc-build:          javadoc generation  |  | ||||||
| 
 |  | ||||||
|     Example of overriding the target for project execution could look like  |  | ||||||
| 
 |  | ||||||
|         <target name="run" depends="<PROJNAME>-impl.jar"> |  | ||||||
|             <exec dir="bin" executable="launcher.exe"> |  | ||||||
|                 <arg file="${dist.jar}"/> |  | ||||||
|             </exec> |  | ||||||
|         </target> |  | ||||||
| 
 |  | ||||||
|     Notice that overridden target depends on jar target and not only on  |  | ||||||
|     compile target as regular run target does. Again, for list of available  |  | ||||||
|     properties which you can use check the target you are overriding in  |  | ||||||
|     nbproject/build-impl.xml file.  |  | ||||||
| 
 |  | ||||||
|     --> |  | ||||||
| </project> |  | ||||||
| @ -1,28 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <project default="-deploy-ant" basedir="."> |  | ||||||
|     <target name="-init" if="deploy.ant.enabled"> |  | ||||||
|         <property file="${deploy.ant.properties.file}"/> |  | ||||||
|         <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/> |  | ||||||
|         <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}"> |  | ||||||
|             <patternset includes="META-INF/context.xml"/> |  | ||||||
|         </unwar> |  | ||||||
|         <xmlproperty file="${temp.module.folder}/META-INF/context.xml"/> |  | ||||||
|         <delete dir="${temp.module.folder}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init"> |  | ||||||
|         <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/> |  | ||||||
|         <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" |  | ||||||
|                  classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> |  | ||||||
|         <deploy url="${tomcat.url}/manager" username="${tomcat.username}" |  | ||||||
|                 password="${tomcat.password}" path="${Context(path)}" |  | ||||||
|                 war="${deploy.ant.archive}"/> |  | ||||||
|         <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init"> |  | ||||||
|         <echo message="Undeploying ${Context(path)}"/> |  | ||||||
|         <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask" |  | ||||||
|                 classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> |  | ||||||
|         <undeploy url="${tomcat.url}/manager" username="${tomcat.username}"  |  | ||||||
|                   password="${tomcat.password}" path="${Context(path)}"/> |  | ||||||
|     </target> |  | ||||||
| </project> |  | ||||||
| @ -1,739 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <!-- |  | ||||||
|         *** GENERATED FROM project.xml - DO NOT EDIT  *** |  | ||||||
|         ***         EDIT ../build.xml INSTEAD         *** |  | ||||||
| 
 |  | ||||||
|         For the purpose of easier reading the script |  | ||||||
|         is divided into following sections: |  | ||||||
|         - initialization |  | ||||||
|         - compilation |  | ||||||
|         - dist |  | ||||||
|         - execution |  | ||||||
|         - debugging |  | ||||||
|         - javadoc |  | ||||||
|         - junit compilation |  | ||||||
|         - junit execution |  | ||||||
|         - junit debugging |  | ||||||
|         - cleanup |  | ||||||
| 
 |  | ||||||
|         --> |  | ||||||
| <project name="AnaliseAcidentesTrabalho-impl" default="build" basedir=".." xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1" xmlns:webproject1="http://www.netbeans.org/ns/web-project/1"> |  | ||||||
|     <import file="ant-deploy.xml"/> |  | ||||||
|     <target name="default" depends="dist,javadoc" description="Build whole project."/> |  | ||||||
|     <!-- |  | ||||||
|                 INITIALIZATION SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="-pre-init"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-private" depends="-pre-init"> |  | ||||||
|         <property file="nbproject/private/private.properties"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-user" depends="-pre-init,-init-private"> |  | ||||||
|         <property file="${user.properties.file}"/> |  | ||||||
|         <!-- The two properties below are usually overridden --> |  | ||||||
|         <!-- by the active platform. Just a fallback. --> |  | ||||||
|         <property name="default.javac.source" value="1.4"/> |  | ||||||
|         <property name="default.javac.target" value="1.4"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-project" depends="-pre-init,-init-private,-init-user"> |  | ||||||
|         <property file="nbproject/project.properties"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-ear-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir"> |  | ||||||
|         <property value="${build.ear.web.dir}/META-INF" name="build.meta.inf.dir"/> |  | ||||||
|         <property name="build.classes.dir.real" value="${build.ear.classes.dir}"/> |  | ||||||
|         <property name="build.web.dir.real" value="${build.ear.web.dir}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property, -do-ear-init"> |  | ||||||
|         <condition property="have.tests"> |  | ||||||
|             <or> |  | ||||||
|                 <available file="${test.src.dir}"/> |  | ||||||
|             </or> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="have.sources"> |  | ||||||
|             <or> |  | ||||||
|                 <available file="${src.dir}"/> |  | ||||||
|             </or> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="netbeans.home+have.tests"> |  | ||||||
|             <and> |  | ||||||
|                 <isset property="netbeans.home"/> |  | ||||||
|                 <isset property="have.tests"/> |  | ||||||
|             </and> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="no.javadoc.preview"> |  | ||||||
|             <isfalse value="${javadoc.preview}"/> |  | ||||||
|         </condition> |  | ||||||
|         <property name="javac.compilerargs" value=""/> |  | ||||||
|         <condition property="no.deps"> |  | ||||||
|             <and> |  | ||||||
|                 <istrue value="${no.dependencies}"/> |  | ||||||
|             </and> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="no.dist.ear.dir"> |  | ||||||
|             <not> |  | ||||||
|                 <isset property="dist.ear.dir"/> |  | ||||||
|             </not> |  | ||||||
|         </condition> |  | ||||||
|         <property name="build.web.excludes" value="${build.classes.excludes}"/> |  | ||||||
|         <condition property="do.compile.jsps"> |  | ||||||
|             <istrue value="${compile.jsps}"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="do.display.browser"> |  | ||||||
|             <istrue value="${display.browser}"/> |  | ||||||
|         </condition> |  | ||||||
|         <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/> |  | ||||||
|         <available file="${conf.dir}/persistence.xml" property="has.persistence.xml"/> |  | ||||||
|         <condition property="do.war.package.with.custom.manifest"> |  | ||||||
|             <and> |  | ||||||
|                 <istrue value="${war.package}"/> |  | ||||||
|                 <isset property="has.custom.manifest"/> |  | ||||||
|             </and> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="do.war.package.without.custom.manifest"> |  | ||||||
|             <and> |  | ||||||
|                 <istrue value="${war.package}"/> |  | ||||||
|                 <not> |  | ||||||
|                     <isset property="has.custom.manifest"/> |  | ||||||
|                 </not> |  | ||||||
|             </and> |  | ||||||
|         </condition> |  | ||||||
|         <property value="${build.web.dir}/META-INF" name="build.meta.inf.dir"/> |  | ||||||
|         <property name="build.classes.dir.real" value="${build.classes.dir}"/> |  | ||||||
|         <property name="build.web.dir.real" value="${build.web.dir}"/> |  | ||||||
|         <condition property="application.args.param" value="${application.args}" else=""> |  | ||||||
|             <and> |  | ||||||
|                 <isset property="application.args"/> |  | ||||||
|                 <not> |  | ||||||
|                     <equals arg1="${application.args}" arg2="" trim="true"/> |  | ||||||
|                 </not> |  | ||||||
|             </and> |  | ||||||
|         </condition> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-init"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init"> |  | ||||||
|         <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> |  | ||||||
|         <fail unless="build.web.dir">Must set build.web.dir</fail> |  | ||||||
|         <fail unless="build.generated.dir">Must set build.generated.dir</fail> |  | ||||||
|         <fail unless="dist.dir">Must set dist.dir</fail> |  | ||||||
|         <fail unless="build.classes.dir">Must set build.classes.dir</fail> |  | ||||||
|         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> |  | ||||||
|         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> |  | ||||||
|         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> |  | ||||||
|         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> |  | ||||||
|         <fail unless="dist.war">Must set dist.war</fail> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-property"> |  | ||||||
|         <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1"> |  | ||||||
|             <attribute name="name"/> |  | ||||||
|             <attribute name="value"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <property name="@{name}" value="${@{value}}"/> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-javac"> |  | ||||||
|         <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> |  | ||||||
|             <attribute name="srcdir" default="${src.dir}"/> |  | ||||||
|             <attribute name="destdir" default="${build.classes.dir.real}"/> |  | ||||||
|             <attribute name="classpath" default="${javac.classpath}:${j2ee.platform.classpath}"/> |  | ||||||
|             <attribute name="debug" default="${javac.debug}"/> |  | ||||||
|             <element name="customize" optional="true"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false"> |  | ||||||
|                     <classpath> |  | ||||||
|                         <path path="@{classpath}"/> |  | ||||||
|                     </classpath> |  | ||||||
|                     <compilerarg line="${javac.compilerargs}"/> |  | ||||||
|                     <customize/> |  | ||||||
|                 </javac> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-junit"> |  | ||||||
|         <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> |  | ||||||
|             <attribute name="includes" default="**/*Test.java"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed"> |  | ||||||
|                     <batchtest todir="${build.test.results.dir}"> |  | ||||||
|                         <fileset dir="${test.src.dir}" includes="@{includes}"/> |  | ||||||
|                     </batchtest> |  | ||||||
|                     <classpath> |  | ||||||
|                         <path path="${run.test.classpath}"/> |  | ||||||
|                     </classpath> |  | ||||||
|                     <syspropertyset> |  | ||||||
|                         <propertyref prefix="test-sys-prop."/> |  | ||||||
|                         <mapper type="glob" from="test-sys-prop.*" to="*"/> |  | ||||||
|                     </syspropertyset> |  | ||||||
|                     <formatter type="brief" usefile="false"/> |  | ||||||
|                     <formatter type="xml"/> |  | ||||||
|                 </junit> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-java"> |  | ||||||
|         <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1"> |  | ||||||
|             <attribute name="classname" default="${main.class}"/> |  | ||||||
|             <element name="customize" optional="true"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <java fork="true" classname="@{classname}"> |  | ||||||
|                     <jvmarg line="${runmain.jvmargs}"/> |  | ||||||
|                     <classpath> |  | ||||||
|                         <path path="${build.classes.dir.real}:${javac.classpath}:${j2ee.platform.classpath}"/> |  | ||||||
|                     </classpath> |  | ||||||
|                     <syspropertyset> |  | ||||||
|                         <propertyref prefix="run-sys-prop."/> |  | ||||||
|                         <mapper type="glob" from="run-sys-prop.*" to="*"/> |  | ||||||
|                     </syspropertyset> |  | ||||||
|                     <customize/> |  | ||||||
|                 </java> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-nbjpda"> |  | ||||||
|         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1"> |  | ||||||
|             <attribute name="name" default="${main.class}"/> |  | ||||||
|             <attribute name="classpath" default="${debug.classpath}"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}"> |  | ||||||
|                     <classpath> |  | ||||||
|                         <path path="@{classpath}"/> |  | ||||||
|                     </classpath> |  | ||||||
|                 </nbjpdastart> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1"> |  | ||||||
|             <attribute name="dir" default="${build.classes.dir.real}"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <nbjpdareload> |  | ||||||
|                     <fileset includes="${fix.includes}*.class" dir="@{dir}"/> |  | ||||||
|                 </nbjpdareload> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-debug"> |  | ||||||
|         <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1"> |  | ||||||
|             <attribute name="classname" default="${main.class}"/> |  | ||||||
|             <attribute name="classpath" default="${debug.classpath}"/> |  | ||||||
|             <attribute name="args" default="${application.args.param}"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <java fork="true" classname="@{classname}"> |  | ||||||
|                     <jvmarg value="-Xdebug"/> |  | ||||||
|                     <jvmarg value="-Xnoagent"/> |  | ||||||
|                     <jvmarg value="-Djava.compiler=none"/> |  | ||||||
|                     <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> |  | ||||||
|                     <jvmarg line="${runmain.jvmargs}"/> |  | ||||||
|                     <classpath> |  | ||||||
|                         <path path="@{classpath}"/> |  | ||||||
|                     </classpath> |  | ||||||
|                     <syspropertyset> |  | ||||||
|                         <propertyref prefix="run-sys-prop."/> |  | ||||||
|                         <mapper type="glob" from="run-sys-prop.*" to="*"/> |  | ||||||
|                     </syspropertyset> |  | ||||||
|                     <arg line="@{args}"/> |  | ||||||
|                 </java> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-macrodef-copy-ear-war"> |  | ||||||
|         <macrodef name="copy-ear-war"> |  | ||||||
|             <attribute name="file"/> |  | ||||||
|             <attribute name="propname"/> |  | ||||||
|             <sequential> |  | ||||||
|                 <basename property="base_@{propname}" file="@{file}"/> |  | ||||||
|                 <zipfileset id="tld.files_@{propname}" src="@{file}" includes="META-INF/*.tld META-INF/tlds/*.tld"/> |  | ||||||
|                 <pathconvert property="tld.files.path_@{propname}" refid="tld.files_@{propname}"/> |  | ||||||
|                 <condition value="yes" property="hastlds_@{propname}"> |  | ||||||
|                     <contains string="${tld.files.path_@{propname}}" substring=".tld" casesensitive="false"/> |  | ||||||
|                 </condition> |  | ||||||
|                 <condition value="${build.web.dir.real}/WEB-INF/lib" property="copy.to.dir_@{propname}"> |  | ||||||
|                     <isset property="hastlds_@{propname}"/> |  | ||||||
|                 </condition> |  | ||||||
|                 <condition value="${dist.ear.dir}" property="copy.to.dir_@{propname}"> |  | ||||||
|                     <not> |  | ||||||
|                         <isset property="hastlds_@{propname}"/> |  | ||||||
|                     </not> |  | ||||||
|                 </condition> |  | ||||||
|                 <copy file="@{file}" todir="${copy.to.dir_@{propname}}"/> |  | ||||||
|                 <condition value="${base_@{propname}}" property="@{propname}"> |  | ||||||
|                     <not> |  | ||||||
|                         <isset property="hastlds_@{propname}"/> |  | ||||||
|                     </not> |  | ||||||
|                 </condition> |  | ||||||
|                 <condition value="" property="@{propname}"> |  | ||||||
|                     <isset property="hastlds_@{propname}"/> |  | ||||||
|                 </condition> |  | ||||||
|             </sequential> |  | ||||||
|         </macrodef> |  | ||||||
|     </target> |  | ||||||
|     <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-copy-ear-war"/> |  | ||||||
|     <!-- |  | ||||||
|                 COMPILATION SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="deps-module-jar" depends="init" if="no.dist.ear.dir" unless="no.deps"/> |  | ||||||
|     <target name="deps-ear-jar" depends="init" if="dist.ear.dir" unless="no.deps"/> |  | ||||||
|     <target name="deps-jar" depends="init, deps-module-jar, deps-ear-jar" unless="no.deps"/> |  | ||||||
|     <target name="-pre-pre-compile" depends="init,deps-jar"> |  | ||||||
|         <mkdir dir="${build.classes.dir.real}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-pre-compile"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-copy-webdir"> |  | ||||||
|         <copy todir="${build.web.dir.real}"> |  | ||||||
|             <fileset excludes="${build.web.excludes}" dir="${web.docbase.dir}"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-compile" 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"> |  | ||||||
|         <webproject2:javac destdir="${build.classes.dir.real}"/> |  | ||||||
|         <copy todir="${build.classes.dir.real}"> |  | ||||||
|             <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-copy-manifest" if="has.custom.manifest"> |  | ||||||
|         <mkdir dir="${build.meta.inf.dir}"/> |  | ||||||
|         <copy todir="${build.meta.inf.dir}"> |  | ||||||
|             <fileset dir="${conf.dir}" includes="MANIFEST.MF"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-copy-persistence-xml" if="has.persistence.xml"> |  | ||||||
|         <mkdir dir="${build.web.dir.real}/WEB-INF/classes/META-INF"/> |  | ||||||
|         <copy todir="${build.web.dir.real}/WEB-INF/classes/META-INF"> |  | ||||||
|             <fileset dir="${conf.dir}" includes="persistence.xml"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-compile"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/> |  | ||||||
|     <target name="-pre-compile-single"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile"> |  | ||||||
|         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |  | ||||||
|         <webproject2:javac> |  | ||||||
|             <customize> |  | ||||||
|                 <patternset includes="${javac.includes}"/> |  | ||||||
|             </customize> |  | ||||||
|         </webproject2:javac> |  | ||||||
|         <copy todir="${build.classes.dir.real}"> |  | ||||||
|             <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-compile-single"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/> |  | ||||||
|     <target name="compile-jsps" depends="compile" if="do.compile.jsps" description="Test compile JSP pages to expose compilation errors."> |  | ||||||
|         <mkdir dir="${build.generated.dir}/src"/> |  | ||||||
|         <java classname="org.netbeans.modules.web.project.ant.JspC" fork="true" failonerror="true"> |  | ||||||
|             <arg value="-uriroot"/> |  | ||||||
|             <arg file="${basedir}/${build.web.dir.real}"/> |  | ||||||
|             <arg value="-d"/> |  | ||||||
|             <arg file="${basedir}/${build.generated.dir}/src"/> |  | ||||||
|             <arg value="-die1"/> |  | ||||||
|             <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/> |  | ||||||
|         </java> |  | ||||||
|         <mkdir dir="${build.generated.dir}/classes"/> |  | ||||||
|         <webproject2:javac srcdir="${build.generated.dir}/src" destdir="${build.generated.dir}/classes" classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-compile-single-jsp" depends="compile" if="jsp.includes"> |  | ||||||
|         <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail> |  | ||||||
|         <mkdir dir="${build.generated.dir}/src"/> |  | ||||||
|         <java classname="org.netbeans.modules.web.project.ant.JspCSingle" fork="true" failonerror="true"> |  | ||||||
|             <arg value="-uriroot"/> |  | ||||||
|             <arg file="${basedir}/${build.web.dir.real}"/> |  | ||||||
|             <arg value="-d"/> |  | ||||||
|             <arg file="${basedir}/${build.generated.dir}/src"/> |  | ||||||
|             <arg value="-die1"/> |  | ||||||
|             <arg value="-jspc.files"/> |  | ||||||
|             <arg path="${jsp.includes}"/> |  | ||||||
|             <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/> |  | ||||||
|         </java> |  | ||||||
|         <mkdir dir="${build.generated.dir}/classes"/> |  | ||||||
|         <webproject2:javac srcdir="${build.generated.dir}/src" destdir="${build.generated.dir}/classes" classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}"> |  | ||||||
|             <customize> |  | ||||||
|                 <patternset includes="${javac.jsp.includes}"/> |  | ||||||
|             </customize> |  | ||||||
|         </webproject2:javac> |  | ||||||
|     </target> |  | ||||||
|     <target name="compile-single-jsp"> |  | ||||||
|         <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail> |  | ||||||
|         <antcall target="-do-compile-single-jsp"/> |  | ||||||
|     </target> |  | ||||||
|     <!-- |  | ||||||
|                 DIST BUILDING SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="-pre-dist"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-dist-without-manifest" if="do.war.package.without.custom.manifest" depends="init,compile,compile-jsps,-pre-dist"> |  | ||||||
|         <dirname property="dist.jar.dir" file="${dist.war}"/> |  | ||||||
|         <mkdir dir="${dist.jar.dir}"/> |  | ||||||
|         <jar jarfile="${dist.war}" compress="${jar.compress}"> |  | ||||||
|             <fileset dir="${build.web.dir.real}"/> |  | ||||||
|         </jar> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-dist-with-manifest" if="do.war.package.with.custom.manifest" depends="init,compile,compile-jsps,-pre-dist"> |  | ||||||
|         <dirname property="dist.jar.dir" file="${dist.war}"/> |  | ||||||
|         <mkdir dir="${dist.jar.dir}"/> |  | ||||||
|         <jar manifest="${build.meta.inf.dir}/MANIFEST.MF" jarfile="${dist.war}" compress="${jar.compress}"> |  | ||||||
|             <fileset dir="${build.web.dir.real}"/> |  | ||||||
|         </jar> |  | ||||||
|     </target> |  | ||||||
|     <target name="do-dist" depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest"/> |  | ||||||
|     <target name="library-inclusion-in-manifest" depends="init" if="dist.ear.dir"> |  | ||||||
|         <basename property="included.lib.file.reference.activation.jar" file="${file.reference.activation.jar}"/> |  | ||||||
|         <copy-ear-war file="${file.reference.activation.jar}" propname="included.lib.file.reference.activation.jar.X"/> |  | ||||||
|         <basename property="included.lib.file.reference.mail.jar" file="${file.reference.mail.jar}"/> |  | ||||||
|         <copy-ear-war file="${file.reference.mail.jar}" propname="included.lib.file.reference.mail.jar.X"/> |  | ||||||
|         <basename property="included.lib.file.reference.postgresql-8.2-506.jdbc4.jar" file="${file.reference.postgresql-8.2-506.jdbc4.jar}"/> |  | ||||||
|         <copy-ear-war file="${file.reference.postgresql-8.2-506.jdbc4.jar}" propname="included.lib.file.reference.postgresql-8.2-506.jdbc4.jar.X"/> |  | ||||||
|         <basename property="included.lib.file.reference.itext-2.0.5.jar" file="${file.reference.itext-2.0.5.jar}"/> |  | ||||||
|         <copy-ear-war file="${file.reference.itext-2.0.5.jar}" propname="included.lib.file.reference.itext-2.0.5.jar.X"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.6}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.5}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.4}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.3}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsfsupport-runtime.classpath.libfile.3}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsfsupport-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsfsupport-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.webui-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.webui-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jdbcsupport-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jdbcsupport-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.theme-default.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jstl11.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jstl11.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <mkdir dir="${build.web.dir.real}/META-INF"/> |  | ||||||
|         <manifest file="${build.web.dir.real}/META-INF/MANIFEST.MF" mode="update"> |  | ||||||
|             <attribute name="Class-Path" value="${included.lib.file.reference.activation.jar} ${included.lib.file.reference.mail.jar} ${included.lib.file.reference.postgresql-8.2-506.jdbc4.jar} ${included.lib.file.reference.itext-2.0.5.jar} "/> |  | ||||||
|         </manifest> |  | ||||||
|         <delete dir="${dist.ear.dir}/temp"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="library-inclusion-in-archive" depends="init" unless="dist.ear.dir"> |  | ||||||
|         <copy file="${file.reference.activation.jar}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${file.reference.mail.jar}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${file.reference.postgresql-8.2-506.jdbc4.jar}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${file.reference.itext-2.0.5.jar}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.6}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.5}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.4}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.3}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsf-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsfsupport-runtime.classpath.libfile.3}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsfsupport-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jsfsupport-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.webui-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.webui-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jdbcsupport-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jdbcsupport-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.theme-default.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jstl11.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|         <copy file="${libs.jstl11.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="do-ear-dist" depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest"> |  | ||||||
|         <dirname property="dist.jar.dir" file="${dist.ear.war}"/> |  | ||||||
|         <mkdir dir="${dist.jar.dir}"/> |  | ||||||
|         <jar jarfile="${dist.ear.war}" compress="${jar.compress}" manifest="${build.web.dir.real}/META-INF/MANIFEST.MF"> |  | ||||||
|             <fileset dir="${build.web.dir.real}"/> |  | ||||||
|         </jar> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-dist"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="dist" depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)."/> |  | ||||||
|     <target name="dist-ear" depends="init,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR."/> |  | ||||||
|     <!-- |  | ||||||
|                 EXECUTION SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="run" depends="run-deploy,run-display-browser" description="Deploy to server and show in browser."/> |  | ||||||
|     <target name="-pre-run-deploy"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-run-deploy"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-pre-nbmodule-run-deploy"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-nbmodule-run-deploy"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-run-deploy-am"> |  | ||||||
|         <!-- Task to deploy to the Access Manager runtime. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="run-deploy" depends="init,compile,compile-jsps,-do-compile-single-jsp,dist,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy"/> |  | ||||||
|     <target name="-run-deploy-nb" if="netbeans.home"> |  | ||||||
|         <nbdeploy debugmode="false" clientUrlPart="${client.urlPart}" forceRedeploy="${forceRedeploy}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-init-deploy-ant" unless="netbeans.home"> |  | ||||||
|         <property name="deploy.ant.archive" value="${dist.war}"/> |  | ||||||
|         <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/> |  | ||||||
|         <property name="deploy.ant.resource.dir" value="${resource.dir}"/> |  | ||||||
|         <property name="deploy.ant.enabled" value="true"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="run-undeploy" depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant"/> |  | ||||||
|     <target name="-run-undeploy-nb" if="netbeans.home"> |  | ||||||
|         <fail message="Undeploy is not supported from within the IDE"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="verify" depends="init,dist"> |  | ||||||
|         <nbverify file="${dist.war}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="run-display-browser" depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl"/> |  | ||||||
|     <target name="-init-display-browser" if="do.display.browser"> |  | ||||||
|         <condition property="do.display.browser.nb"> |  | ||||||
|             <isset property="netbeans.home"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="do.display.browser.cl"> |  | ||||||
|             <isset property="deploy.ant.enabled"/> |  | ||||||
|         </condition> |  | ||||||
|     </target> |  | ||||||
|     <target name="-display-browser-nb" if="do.display.browser.nb"> |  | ||||||
|         <nbbrowse url="${client.url}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-get-browser" if="do.display.browser.cl" unless="browser"> |  | ||||||
|         <condition property="browser" value="rundll32"> |  | ||||||
|             <os family="windows"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser.args" value="url.dll,FileProtocolHandler" else=""> |  | ||||||
|             <os family="windows"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/bin/open"> |  | ||||||
|             <os family="mac"/> |  | ||||||
|         </condition> |  | ||||||
|         <property environment="env"/> |  | ||||||
|         <condition property="browser" value="${env.BROWSER}"> |  | ||||||
|             <isset property="env.BROWSER"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/bin/firefox"> |  | ||||||
|             <available file="/usr/bin/firefox"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/local/firefox/firefox"> |  | ||||||
|             <available file="/usr/local/firefox/firefox"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/bin/mozilla"> |  | ||||||
|             <available file="/usr/bin/mozilla"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/local/mozilla/mozilla"> |  | ||||||
|             <available file="/usr/local/mozilla/mozilla"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/sfw/lib/firefox/firefox"> |  | ||||||
|             <available file="/usr/sfw/lib/firefox/firefox"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/opt/csw/bin/firefox"> |  | ||||||
|             <available file="/opt/csw/bin/firefox"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla"> |  | ||||||
|             <available file="/usr/sfw/lib/mozilla/mozilla"/> |  | ||||||
|         </condition> |  | ||||||
|         <condition property="browser" value="/opt/csw/bin/mozilla"> |  | ||||||
|             <available file="/opt/csw/bin/mozilla"/> |  | ||||||
|         </condition> |  | ||||||
|     </target> |  | ||||||
|     <target name="-display-browser-cl" depends="-get-browser" if="do.display.browser.cl"> |  | ||||||
|         <fail unless="browser"> |  | ||||||
|                     Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. |  | ||||||
|                 </fail> |  | ||||||
|         <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/> |  | ||||||
|         <echo>Launching ${browse.url}</echo> |  | ||||||
|         <exec executable="${browser}" spawn="true"> |  | ||||||
|             <arg line="${browser.args} ${browse.url}"/> |  | ||||||
|         </exec> |  | ||||||
|     </target> |  | ||||||
|     <target name="run-main" depends="init,compile-single"> |  | ||||||
|         <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |  | ||||||
|         <webproject1:java classname="${run.class}"/> |  | ||||||
|     </target> |  | ||||||
|     <!-- |  | ||||||
|                 DEBUGGING SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="debug" description="Debug project in IDE." depends="init,compile,compile-jsps,-do-compile-single-jsp,dist" if="netbeans.home"> |  | ||||||
|         <nbdeploy debugmode="true" clientUrlPart="${client.urlPart}"/> |  | ||||||
|         <antcall target="connect-debugger"/> |  | ||||||
|         <antcall target="debug-display-browser"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="connect-debugger" unless="is.debugged"> |  | ||||||
|         <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}"> |  | ||||||
|             <classpath> |  | ||||||
|                 <path path="${debug.classpath}:${ws.debug.classpaths}"/> |  | ||||||
|             </classpath> |  | ||||||
|             <sourcepath> |  | ||||||
|                 <path path="${web.docbase.dir}:${ws.web.docbase.dirs}"/> |  | ||||||
|             </sourcepath> |  | ||||||
|         </nbjpdaconnect> |  | ||||||
|     </target> |  | ||||||
|     <target name="debug-display-browser" if="do.display.browser"> |  | ||||||
|         <nbbrowse url="${client.url}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="debug-single" if="netbeans.home" depends="init,compile,compile-jsps,-do-compile-single-jsp,debug"/> |  | ||||||
|     <target name="-debug-start-debugger" if="netbeans.home" depends="init"> |  | ||||||
|         <webproject1:nbjpdastart name="${debug.class}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single"> |  | ||||||
|         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |  | ||||||
|         <webproject1:debug classname="${debug.class}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="debug-single-main" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/> |  | ||||||
|     <target name="-pre-debug-fix" depends="init"> |  | ||||||
|         <fail unless="fix.includes">Must set fix.includes</fail> |  | ||||||
|         <property name="javac.includes" value="${fix.includes}.java"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single"> |  | ||||||
|         <webproject1:nbjpdareload/> |  | ||||||
|     </target> |  | ||||||
|     <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/> |  | ||||||
|     <!-- |  | ||||||
|                 JAVADOC SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="javadoc-build" depends="init"> |  | ||||||
|         <mkdir dir="${dist.javadoc.dir}"/> |  | ||||||
|         <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true"> |  | ||||||
|             <classpath> |  | ||||||
|                 <path path="${javac.classpath}:${j2ee.platform.classpath}"/> |  | ||||||
|             </classpath> |  | ||||||
|             <sourcepath> |  | ||||||
|                 <pathelement location="${src.dir}"/> |  | ||||||
|             </sourcepath> |  | ||||||
|             <packageset dir="${src.dir}" includes="*/**"/> |  | ||||||
|             <fileset dir="${src.dir}" includes="*.java"/> |  | ||||||
|         </javadoc> |  | ||||||
|     </target> |  | ||||||
|     <target name="javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,javadoc-build"> |  | ||||||
|         <nbbrowse file="${dist.javadoc.dir}/index.html"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="javadoc" depends="init,javadoc-build,javadoc-browse" description="Build Javadoc."/> |  | ||||||
|     <!-- |  | ||||||
|                  |  | ||||||
|                 JUNIT COMPILATION SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile"> |  | ||||||
|         <mkdir dir="${build.test.classes.dir}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-pre-compile-test"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test"> |  | ||||||
|         <webproject2:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}:${j2ee.platform.classpath}"/> |  | ||||||
|         <copy todir="${build.test.classes.dir}"> |  | ||||||
|             <fileset dir="${test.src.dir}" excludes="**/*.java"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-compile-test"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/> |  | ||||||
|     <target name="-pre-compile-test-single"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single"> |  | ||||||
|         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |  | ||||||
|         <webproject2:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}:${j2ee.platform.classpath}"> |  | ||||||
|             <customize> |  | ||||||
|                 <patternset includes="${javac.includes}"/> |  | ||||||
|             </customize> |  | ||||||
|         </webproject2:javac> |  | ||||||
|         <copy todir="${build.test.classes.dir}"> |  | ||||||
|             <fileset dir="${test.src.dir}" excludes="**/*.java"/> |  | ||||||
|         </copy> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-compile-test-single"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/> |  | ||||||
|     <!-- |  | ||||||
|                  |  | ||||||
|                 JUNIT EXECUTION SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="-pre-test-run" if="have.tests" depends="init"> |  | ||||||
|         <mkdir dir="${build.test.results.dir}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run"> |  | ||||||
|         <webproject2:junit/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run"> |  | ||||||
|         <fail if="tests.failed">Some tests failed; see details above.</fail> |  | ||||||
|     </target> |  | ||||||
|     <target name="test-report" if="have.tests" depends="init"/> |  | ||||||
|     <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/> |  | ||||||
|     <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/> |  | ||||||
|     <target name="-pre-test-run-single" if="have.tests" depends="init"> |  | ||||||
|         <mkdir dir="${build.test.results.dir}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single"> |  | ||||||
|         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> |  | ||||||
|         <webproject2:junit includes="${test.includes}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single"> |  | ||||||
|         <fail if="tests.failed">Some tests failed; see details above.</fail> |  | ||||||
|     </target> |  | ||||||
|     <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/> |  | ||||||
|     <!-- |  | ||||||
|                  |  | ||||||
|                 JUNIT DEBUGGING SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test"> |  | ||||||
|         <fail unless="test.class">Must select one file in the IDE or set test.class</fail> |  | ||||||
|         <webproject1:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}" args="${test.class}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test"> |  | ||||||
|         <webproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/> |  | ||||||
|     <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single"> |  | ||||||
|         <webproject1:nbjpdareload dir="${build.test.classes.dir}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/> |  | ||||||
|     <!-- |  | ||||||
|                  |  | ||||||
|                 CLEANUP SECTION |  | ||||||
|             --> |  | ||||||
|     <target name="deps-clean" depends="init" if="no.dist.ear.dir" unless="no.deps"/> |  | ||||||
|     <target name="do-clean" depends="init"> |  | ||||||
|         <condition value="${build.web.dir.real}" property="build.dir.to.clean"> |  | ||||||
|             <isset property="dist.ear.dir"/> |  | ||||||
|         </condition> |  | ||||||
|         <property value="${build.web.dir.real}" name="build.dir.to.clean"/> |  | ||||||
|         <delete includeEmptyDirs="true" quiet="true"> |  | ||||||
|             <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/> |  | ||||||
|         </delete> |  | ||||||
|         <delete dir="${build.dir}"/> |  | ||||||
|         <available file="${build.dir.to.clean}/WEB-INF/lib" type="dir" property="status.clean-failed"/> |  | ||||||
|         <delete dir="${dist.dir}"/> |  | ||||||
|     </target> |  | ||||||
|     <target name="check-clean" depends="do-clean" if="status.clean-failed"> |  | ||||||
|         <echo message="Warning: unable to delete some files in ${build.web.dir.real}/WEB-INF/lib - they are probably locked by the J2EE server. "/> |  | ||||||
|         <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/> |  | ||||||
|     </target> |  | ||||||
|     <target name="-post-clean"> |  | ||||||
|         <!-- Empty placeholder for easier customization. --> |  | ||||||
|         <!-- You can override this target in the ../build.xml file. --> |  | ||||||
|     </target> |  | ||||||
|     <target name="clean" depends="init,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products."/> |  | ||||||
|     <target name="clean-ear" depends="clean" description="Clean build products."/> |  | ||||||
| </project> |  | ||||||
| @ -1,8 +0,0 @@ | |||||||
| build.xml.data.CRC32=2ba63215 |  | ||||||
| build.xml.script.CRC32=ab1471e9 |  | ||||||
| build.xml.stylesheet.CRC32=95be3570 |  | ||||||
| # 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=2ba63215 |  | ||||||
| nbproject/build-impl.xml.script.CRC32=cae04df0 |  | ||||||
| nbproject/build-impl.xml.stylesheet.CRC32=ac43bae1 |  | ||||||
| @ -1,88 +0,0 @@ | |||||||
| build.classes.dir=${build.web.dir}/WEB-INF/classes |  | ||||||
| build.classes.excludes=**/*.java,**/*.form |  | ||||||
| build.dir=build |  | ||||||
| build.ear.classes.dir=${build.ear.web.dir}/WEB-INF/classes |  | ||||||
| build.ear.web.dir=${build.dir}/web |  | ||||||
| build.generated.dir=${build.dir}/generated |  | ||||||
| build.test.classes.dir=${build.dir}/test/classes |  | ||||||
| build.test.results.dir=${build.dir}/test/results |  | ||||||
| build.web.dir=${build.dir}/web |  | ||||||
| build.web.excludes=${build.classes.excludes} |  | ||||||
| client.urlPart= |  | ||||||
| compile.jsps=false |  | ||||||
| conf.dir=${source.root}/conf |  | ||||||
| creator=3.0 |  | ||||||
| debug.classpath=${javac.classpath}:${build.classes.dir}:${build.ear.classes.dir} |  | ||||||
| debug.test.classpath=\ |  | ||||||
|     ${run.test.classpath} |  | ||||||
| display.browser=true |  | ||||||
| dist.dir=dist |  | ||||||
| dist.ear.war=${dist.dir}/${war.ear.name} |  | ||||||
| dist.javadoc.dir=${dist.dir}/javadoc |  | ||||||
| dist.war=${dist.dir}/${war.name} |  | ||||||
| file.reference.activation.jar=jars/activation.jar |  | ||||||
| file.reference.itext-2.0.5.jar=../../../Download/iText205/itext-2.0.5.jar |  | ||||||
| file.reference.mail.jar=jars/mail.jar |  | ||||||
| file.reference.postgresql-8.2-506.jdbc4.jar=jars/postgresql-8.2-506.jdbc4.jar |  | ||||||
| j2ee.platform=1.4 |  | ||||||
| j2ee.server.type=Tomcat55 |  | ||||||
| jar.compress=false |  | ||||||
| javac.classpath=\ |  | ||||||
|     ${libs.jsf-designtime.classpath}:\ |  | ||||||
|     ${libs.jsfsupport-designtime.classpath}:\ |  | ||||||
|     ${libs.webui-designtime.classpath}:\ |  | ||||||
|     ${libs.jdbcsupport-designtime.classpath}:\ |  | ||||||
|     ${libs.theme-default.classpath}:\ |  | ||||||
|     ${libs.jstl11.classpath}:\ |  | ||||||
|     ${file.reference.activation.jar}:\ |  | ||||||
|     ${file.reference.mail.jar}:\ |  | ||||||
|     ${file.reference.postgresql-8.2-506.jdbc4.jar}:\ |  | ||||||
|     ${file.reference.itext-2.0.5.jar} |  | ||||||
| # Space-separated list of extra javac options |  | ||||||
| javac.compilerargs= |  | ||||||
| javac.debug=true |  | ||||||
| javac.deprecation=false |  | ||||||
| javac.source=1.4 |  | ||||||
| javac.target=1.4 |  | ||||||
| javac.test.classpath=\ |  | ||||||
|     ${javac.classpath}:\ |  | ||||||
|     ${build.classes.dir}:\ |  | ||||||
|     ${libs.junit.classpath} |  | ||||||
| javadoc.additionalparam= |  | ||||||
| javadoc.author=false |  | ||||||
| javadoc.encoding= |  | ||||||
| javadoc.noindex=false |  | ||||||
| javadoc.nonavbar=false |  | ||||||
| javadoc.notree=false |  | ||||||
| javadoc.preview=true |  | ||||||
| javadoc.private=false |  | ||||||
| javadoc.splitindex=true |  | ||||||
| javadoc.use=true |  | ||||||
| javadoc.version=false |  | ||||||
| javadoc.windowtitle= |  | ||||||
| jspcompilation.classpath=${jspc.classpath}:${javac.classpath} |  | ||||||
| lib.dir=${web.docbase.dir}/WEB-INF/lib |  | ||||||
| platform.active=default_platform |  | ||||||
| resource.dir=setup |  | ||||||
| run.test.classpath=\ |  | ||||||
|     ${javac.test.classpath}:\ |  | ||||||
|     ${build.test.classes.dir} |  | ||||||
| # Space-separated list of JVM arguments used when running class with main method |  | ||||||
| # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): |  | ||||||
| runmain.jvmargs= |  | ||||||
| source.root=src |  | ||||||
| src.dir=${source.root}/java |  | ||||||
| test.src.dir=test |  | ||||||
| war.content.additional=\ |  | ||||||
|     ${libs.jsf-runtime.classpath}:\ |  | ||||||
|     ${libs.jsfsupport-runtime.classpath}:\ |  | ||||||
|     ${libs.webui-runtime.classpath}:\ |  | ||||||
|     ${libs.jdbcsupport-runtime.classpath}:\ |  | ||||||
|     ${libs.exceptionhandler-runtime.classpath}:\ |  | ||||||
|     ${libs.theme-default.classpath}:\ |  | ||||||
|     ${libs.jstl11.classpath} |  | ||||||
| war.ear.name=AnaliseAcidentesTrabalho.war |  | ||||||
| war.name=AnaliseAcidentesTrabalho.war |  | ||||||
| war.package=true |  | ||||||
| web.docbase.dir=web |  | ||||||
| webinf.dir=web/WEB-INF |  | ||||||
| @ -1,83 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <project xmlns="http://www.netbeans.org/ns/project/1"> |  | ||||||
|     <type>org.netbeans.modules.web.project</type> |  | ||||||
|     <configuration> |  | ||||||
|         <creator-data xmlns="http://www.sun.com/creator/ns" jsf.current.theme="theme-default" jsf.pagebean.package="analiseacidentestrabalho" jsf.project.libraries.dir="lib" jsf.project.version="3.0" jsf.startPage="Login.jsp"/> |  | ||||||
|         <data xmlns="http://www.netbeans.org/ns/web-project/3"> |  | ||||||
|             <name>AnaliseAcidentesTrabalho</name> |  | ||||||
|             <minimum-ant-version>1.6</minimum-ant-version> |  | ||||||
|             <web-module-libraries> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.jsf-designtime.classpath}</file> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="3"> |  | ||||||
|                     <file>${libs.jsfsupport-designtime.classpath}</file> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.webui-designtime.classpath}</file> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.jdbcsupport-designtime.classpath}</file> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${libs.theme-default.classpath}</file> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.jstl11.classpath}</file> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${file.reference.activation.jar}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${file.reference.mail.jar}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${file.reference.postgresql-8.2-506.jdbc4.jar}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${file.reference.itext-2.0.5.jar}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|             </web-module-libraries> |  | ||||||
|             <web-module-additional-libraries> |  | ||||||
|                 <library files="6"> |  | ||||||
|                     <file>${libs.jsf-runtime.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="3"> |  | ||||||
|                     <file>${libs.jsfsupport-runtime.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.webui-runtime.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.jdbcsupport-runtime.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${libs.exceptionhandler-runtime.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="1"> |  | ||||||
|                     <file>${libs.theme-default.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|                 <library files="2"> |  | ||||||
|                     <file>${libs.jstl11.classpath}</file> |  | ||||||
|                     <path-in-war>WEB-INF/lib</path-in-war> |  | ||||||
|                 </library> |  | ||||||
|             </web-module-additional-libraries> |  | ||||||
|             <source-roots> |  | ||||||
|                 <root id="src.dir"/> |  | ||||||
|             </source-roots> |  | ||||||
|             <test-roots> |  | ||||||
|                 <root id="test.src.dir"/> |  | ||||||
|             </test-roots> |  | ||||||
|         </data> |  | ||||||
|     </configuration> |  | ||||||
| </project> |  | ||||||
| @ -1,2 +0,0 @@ | |||||||
| Manifest-Version: 1.0 |  | ||||||
| 
 |  | ||||||
| @ -1,138 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Acidentado.java |  | ||||||
|  * |  | ||||||
|  * Created on October 16, 2007, 2:36 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Acidentado { |  | ||||||
|     private Integer id; |  | ||||||
|     private String nome; |  | ||||||
|     private java.sql.Date data_nascimento; |  | ||||||
|     private String bilhete_identidade; |  | ||||||
|     private String morada; |  | ||||||
|     private String cod_postal; |  | ||||||
|     private String localidade; |  | ||||||
|     private String contacto_telefonico; |  | ||||||
|     private java.sql.Date data_admissao; |  | ||||||
|     private String funcao; |  | ||||||
|     private String turno; |  | ||||||
|     private Integer trabalhador_id; |  | ||||||
|     private String numero_mecanografico;     |  | ||||||
|     /** Creates a new instance of Acidentado */ |  | ||||||
|     public Acidentado() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public java.sql.Date getData_nascimento() { |  | ||||||
|         return data_nascimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_nascimento(java.sql.Date data_nascimento) { |  | ||||||
|         this.data_nascimento = data_nascimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getBilhete_identidade() { |  | ||||||
|         return bilhete_identidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setBilhete_identidade(String bilhete_identidade) { |  | ||||||
|         this.bilhete_identidade = bilhete_identidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getMorada() { |  | ||||||
|         return morada; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMorada(String morada) { |  | ||||||
|         this.morada = morada; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getCod_postal() { |  | ||||||
|         return cod_postal; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCod_postal(String cod_postal) { |  | ||||||
|         this.cod_postal = cod_postal; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLocalidade() { |  | ||||||
|         return localidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLocalidade(String localidade) { |  | ||||||
|         this.localidade = localidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getContacto_telefonico() { |  | ||||||
|         return contacto_telefonico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setContacto_telefonico(String contacto_telefonico) { |  | ||||||
|         this.contacto_telefonico = contacto_telefonico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public java.sql.Date getData_admissao() { |  | ||||||
|         return data_admissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_admissao(java.sql.Date data_admissao) { |  | ||||||
|         this.data_admissao = data_admissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getFuncao() { |  | ||||||
|         return funcao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFuncao(String funcao) { |  | ||||||
|         this.funcao = funcao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getTrabalhador_id() { |  | ||||||
|         return trabalhador_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTrabalhador_id(Integer trabalhador_id) { |  | ||||||
|         this.trabalhador_id = trabalhador_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome() { |  | ||||||
|         return nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome(String nome) { |  | ||||||
|         this.nome = nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTurno() { |  | ||||||
|         return turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTurno(String turno) { |  | ||||||
|         this.turno = turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNumero_mecanografico() { |  | ||||||
|         return numero_mecanografico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNumero_mecanografico(String numero_mecanografico) { |  | ||||||
|         this.numero_mecanografico = numero_mecanografico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,842 +0,0 @@ | |||||||
| /* |  | ||||||
|  * AnaliseAcidente.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 1:34 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import java.sql.Date; |  | ||||||
| import java.sql.Time; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class AnaliseAcidente { |  | ||||||
|     private Integer id; |  | ||||||
|     private Integer nr; |  | ||||||
|     private String analise_nr; |  | ||||||
|     private Date data_acidente; |  | ||||||
|     private Integer acidentado_id; |  | ||||||
|     private String nome_acidentado; |  | ||||||
|     private Integer empresa_id; |  | ||||||
|     private Integer estabelecimento_id; |  | ||||||
|     private Integer estado; |  | ||||||
|     private Integer estado_assinatura; |  | ||||||
|     private String fase; |  | ||||||
|      |  | ||||||
|     private String morada; |  | ||||||
|     private String telefone; |  | ||||||
|     private Integer horas_turno; |  | ||||||
|     private String seccao; |  | ||||||
|     private String local_trabalho; |  | ||||||
|     private String tarefa; |  | ||||||
|     private String substancias; |  | ||||||
|     private String superior_hierarquico; |  | ||||||
|     private String condicoes; |  | ||||||
|     private String testemunhas; |  | ||||||
|     private String causas; |  | ||||||
|     private String descricao; |  | ||||||
|     private String conclusoes; |  | ||||||
|     private String accoes; |  | ||||||
|      |  | ||||||
|     private Time hora_acidente; |  | ||||||
|     private String formacao_shst; |  | ||||||
|     private String formacao_shst_nao_porque; |  | ||||||
|     private String outros_acidentes_com_colaborador; |  | ||||||
|     private Integer nr_acidentes_com_colaborador; |  | ||||||
|     private Integer nr_relatorio_acidente_colaborador1; |  | ||||||
|     private Integer nr_relatorio_acidente_colaborador2; |  | ||||||
|     private Integer nr_relatorio_acidente_colaborador3; |  | ||||||
|     private Integer nr_relatorio_acidente_colaborador4;     |  | ||||||
|     private String acidentes_outros_colaboradores; |  | ||||||
|     private Integer nr_acidentes_outros_colaboradores; |  | ||||||
|     private Integer nr_relatorio_acidente_outros_colaboradores1; |  | ||||||
|     private Integer nr_relatorio_acidente_outros_colaboradores2; |  | ||||||
|     private Integer nr_relatorio_acidente_outros_colaboradores3; |  | ||||||
|     private Integer nr_relatorio_acidente_outros_colaboradores4;     |  | ||||||
|      |  | ||||||
|     private String lesao_cabeca; |  | ||||||
|     private String lesao_pescoco; |  | ||||||
|     private String lesao_tronco; |  | ||||||
|     private String lesao_membro_sup_dir; |  | ||||||
|     private String lesao_membro_sup_esq;     |  | ||||||
|     private String lesao_membro_inf_dir;     |  | ||||||
|     private String lesao_membro_inf_esq; |  | ||||||
|     private String especif1; |  | ||||||
|     private String especif2; |  | ||||||
|     private String especif3; |  | ||||||
|     private String especif4;     |  | ||||||
|     private String tipo_lesao; |  | ||||||
|     private String tipo_incapacidade;  // 't' ou 'p'
 |  | ||||||
|     private Integer coef_incapacidade; |  | ||||||
|     private Date data_aval_incapacidade; |  | ||||||
|     private Date data_rev_incapacidade;     |  | ||||||
|     private Date periodo_incapacidade_de;     |  | ||||||
|     private Date periodo_incapacidade_a;         |  | ||||||
|     private String img_flexao; |  | ||||||
|     private String img_ext1; |  | ||||||
|     private String img_ext2;     |  | ||||||
|     private String img_cab2;     |  | ||||||
|     private String img_cab3;         |  | ||||||
|     private String img_ma2;         |  | ||||||
|     private String img_ma3;         |  | ||||||
|     private String img_ma5;         |  | ||||||
|     private String img_ma6;         |  | ||||||
|     private String img_ma8;         |  | ||||||
|     private String img_ma10;      |  | ||||||
|      |  | ||||||
|     private String img_rot1; |  | ||||||
|     private String img_rot2;     |  | ||||||
|     private String img_cab1;     |  | ||||||
|     private String img_cab4;         |  | ||||||
|     private String img_ma1;     |  | ||||||
|     private String img_ma4;             |  | ||||||
|     private String img_ma7;     |  | ||||||
|     private String img_ma9;             |  | ||||||
|      |  | ||||||
|     private Integer restricao_carga; |  | ||||||
|     private String restricao_motricidade; |  | ||||||
|     private String restricao_conducao; |  | ||||||
|     private String restricao_vibracoes; |  | ||||||
|     private String restricao_outras; |  | ||||||
|     private String med_observ; |  | ||||||
|      |  | ||||||
|     private Integer medico_id; |  | ||||||
|     private Integer tecnico_saude_id; |  | ||||||
|      |  | ||||||
|     private String ass_resp_seg; |  | ||||||
|     private String ass_seg; |  | ||||||
|     private String ass_hs; |  | ||||||
|     private String ass_med; |  | ||||||
|     private String ass_resp_rh; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of AnaliseAcidente */ |  | ||||||
|     public AnaliseAcidente() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Date getData_acidente() { |  | ||||||
|         return data_acidente; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_acidente(Date data_acidente) { |  | ||||||
|         this.data_acidente = data_acidente; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getAcidentado_id() { |  | ||||||
|         return acidentado_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAcidentado_id(Integer acidentado_id) { |  | ||||||
|         this.acidentado_id = acidentado_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getEstado() { |  | ||||||
|         return estado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstado(Integer estado) { |  | ||||||
|         this.estado = estado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome_acidentado() { |  | ||||||
|         return nome_acidentado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome_acidentado(String nome_acidentado) { |  | ||||||
|         this.nome_acidentado = nome_acidentado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getEstabelecimento_id() { |  | ||||||
|         return estabelecimento_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstabelecimento_id(Integer estabelecimento_id) { |  | ||||||
|         this.estabelecimento_id = estabelecimento_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr() { |  | ||||||
|         return nr; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr(Integer nr) { |  | ||||||
|         this.nr = nr; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getMorada() { |  | ||||||
|         return morada; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMorada(String morada) { |  | ||||||
|         this.morada = morada; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTelefone() { |  | ||||||
|         return telefone; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTelefone(String telefone) { |  | ||||||
|         this.telefone = telefone; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getHoras_turno() { |  | ||||||
|         return horas_turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHoras_turno(Integer horas_turno) { |  | ||||||
|         this.horas_turno = horas_turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getSeccao() { |  | ||||||
|         return seccao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setSeccao(String seccao) { |  | ||||||
|         this.seccao = seccao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLocal_trabalho() { |  | ||||||
|         return local_trabalho; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLocal_trabalho(String local_trabalho) { |  | ||||||
|         this.local_trabalho = local_trabalho; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTarefa() { |  | ||||||
|         return tarefa; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTarefa(String tarefa) { |  | ||||||
|         this.tarefa = tarefa; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getSubstancias() { |  | ||||||
|         return substancias; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setSubstancias(String substancias) { |  | ||||||
|         this.substancias = substancias; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getSuperior_hierarquico() { |  | ||||||
|         return superior_hierarquico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setSuperior_hierarquico(String superior_hierarquico) { |  | ||||||
|         this.superior_hierarquico = superior_hierarquico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getCondicoes() { |  | ||||||
|         return condicoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCondicoes(String condicoes) { |  | ||||||
|         this.condicoes = condicoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTestemunhas() { |  | ||||||
|         return testemunhas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTestemunhas(String testemunhas) { |  | ||||||
|         this.testemunhas = testemunhas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getCausas() { |  | ||||||
|         return causas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCausas(String causas) { |  | ||||||
|         this.causas = causas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getDescricao() { |  | ||||||
|         return descricao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setDescricao(String descricao) { |  | ||||||
|         this.descricao = descricao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getConclusoes() { |  | ||||||
|         return conclusoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setConclusoes(String conclusoes) { |  | ||||||
|         this.conclusoes = conclusoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAccoes() { |  | ||||||
|         return accoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAccoes(String accoes) { |  | ||||||
|         this.accoes = accoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Time getHora_acidente() { |  | ||||||
|         return hora_acidente; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHora_acidente(Time hora_acidente) { |  | ||||||
|         this.hora_acidente = hora_acidente; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getFormacao_shst() { |  | ||||||
|         return formacao_shst; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFormacao_shst(String formacao_shst) { |  | ||||||
|         this.formacao_shst = formacao_shst; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getFormacao_shst_nao_porque() { |  | ||||||
|         return formacao_shst_nao_porque; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFormacao_shst_nao_porque(String formacao_shst_nao_porque) { |  | ||||||
|         this.formacao_shst_nao_porque = formacao_shst_nao_porque; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getOutros_acidentes_com_colaborador() { |  | ||||||
|         return outros_acidentes_com_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setOutros_acidentes_com_colaborador(String outros_acidentes_com_colaborador) { |  | ||||||
|         this.outros_acidentes_com_colaborador = outros_acidentes_com_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_acidentes_com_colaborador() { |  | ||||||
|         return nr_acidentes_com_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_acidentes_com_colaborador(Integer nr_acidentes_com_colaborador) { |  | ||||||
|         this.nr_acidentes_com_colaborador = nr_acidentes_com_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_colaborador1() { |  | ||||||
|         return nr_relatorio_acidente_colaborador1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_colaborador1(Integer nr_relatorio_acidente_colaborador1) { |  | ||||||
|         this.nr_relatorio_acidente_colaborador1 = nr_relatorio_acidente_colaborador1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_colaborador2() { |  | ||||||
|         return nr_relatorio_acidente_colaborador2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_colaborador2(Integer nr_relatorio_acidente_colaborador2) { |  | ||||||
|         this.nr_relatorio_acidente_colaborador2 = nr_relatorio_acidente_colaborador2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_colaborador3() { |  | ||||||
|         return nr_relatorio_acidente_colaborador3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_colaborador3(Integer nr_relatorio_acidente_colaborador3) { |  | ||||||
|         this.nr_relatorio_acidente_colaborador3 = nr_relatorio_acidente_colaborador3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_colaborador4() { |  | ||||||
|         return nr_relatorio_acidente_colaborador4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_colaborador4(Integer nr_relatorio_acidente_colaborador4) { |  | ||||||
|         this.nr_relatorio_acidente_colaborador4 = nr_relatorio_acidente_colaborador4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAcidentes_outros_colaboradores() { |  | ||||||
|         return acidentes_outros_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAcidentes_outros_colaboradores(String acidentes_outros_colaboradores) { |  | ||||||
|         this.acidentes_outros_colaboradores = acidentes_outros_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_acidentes_outros_colaboradores() { |  | ||||||
|         return nr_acidentes_outros_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_acidentes_outros_colaboradores(Integer nr_acidentes_outros_colaboradores) { |  | ||||||
|         this.nr_acidentes_outros_colaboradores = nr_acidentes_outros_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_outros_colaboradores1() { |  | ||||||
|         return nr_relatorio_acidente_outros_colaboradores1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_outros_colaboradores1(Integer nr_relatorio_acidente_outros_colaboradores1) { |  | ||||||
|         this.nr_relatorio_acidente_outros_colaboradores1 = nr_relatorio_acidente_outros_colaboradores1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_outros_colaboradores2() { |  | ||||||
|         return nr_relatorio_acidente_outros_colaboradores2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_outros_colaboradores2(Integer nr_relatorio_acidente_outros_colaboradores2) { |  | ||||||
|         this.nr_relatorio_acidente_outros_colaboradores2 = nr_relatorio_acidente_outros_colaboradores2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_outros_colaboradores3() { |  | ||||||
|         return nr_relatorio_acidente_outros_colaboradores3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_outros_colaboradores3(Integer nr_relatorio_acidente_outros_colaboradores3) { |  | ||||||
|         this.nr_relatorio_acidente_outros_colaboradores3 = nr_relatorio_acidente_outros_colaboradores3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getNr_relatorio_acidente_outros_colaboradores4() { |  | ||||||
|         return nr_relatorio_acidente_outros_colaboradores4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidente_outros_colaboradores4(Integer nr_relatorio_acidente_outros_colaboradores4) { |  | ||||||
|         this.nr_relatorio_acidente_outros_colaboradores4 = nr_relatorio_acidente_outros_colaboradores4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_cabeca() { |  | ||||||
|         return lesao_cabeca; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_cabeca(String lesao_cabeca) { |  | ||||||
|         this.lesao_cabeca = lesao_cabeca; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_pescoco() { |  | ||||||
|         return lesao_pescoco; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_pescoco(String lesao_pescoco) { |  | ||||||
|         this.lesao_pescoco = lesao_pescoco; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_tronco() { |  | ||||||
|         return lesao_tronco; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_tronco(String lesao_tronco) { |  | ||||||
|         this.lesao_tronco = lesao_tronco; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_membro_sup_dir() { |  | ||||||
|         return lesao_membro_sup_dir; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_membro_sup_dir(String lesao_membro_sup_dir) { |  | ||||||
|         this.lesao_membro_sup_dir = lesao_membro_sup_dir; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_membro_sup_esq() { |  | ||||||
|         return lesao_membro_sup_esq; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_membro_sup_esq(String lesao_membro_sup_esq) { |  | ||||||
|         this.lesao_membro_sup_esq = lesao_membro_sup_esq; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_membro_inf_dir() { |  | ||||||
|         return lesao_membro_inf_dir; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_membro_inf_dir(String lesao_membro_inf_dir) { |  | ||||||
|         this.lesao_membro_inf_dir = lesao_membro_inf_dir; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLesao_membro_inf_esq() { |  | ||||||
|         return lesao_membro_inf_esq; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLesao_membro_inf_esq(String lesao_membro_inf_esq) { |  | ||||||
|         this.lesao_membro_inf_esq = lesao_membro_inf_esq; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getEspecif1() { |  | ||||||
|         return especif1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEspecif1(String especif1) { |  | ||||||
|         this.especif1 = especif1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getEspecif2() { |  | ||||||
|         return especif2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEspecif2(String especif2) { |  | ||||||
|         this.especif2 = especif2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getEspecif3() { |  | ||||||
|         return especif3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEspecif3(String especif3) { |  | ||||||
|         this.especif3 = especif3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getEspecif4() { |  | ||||||
|         return especif4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEspecif4(String especif4) { |  | ||||||
|         this.especif4 = especif4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTipo_incapacidade() { |  | ||||||
|         return tipo_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTipo_incapacidade(String tipo_incapacidade) { |  | ||||||
|         this.tipo_incapacidade = tipo_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getCoef_incapacidade() { |  | ||||||
|         return coef_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCoef_incapacidade(Integer coef_incapacidade) { |  | ||||||
|         this.coef_incapacidade = coef_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Date getData_aval_incapacidade() { |  | ||||||
|         return data_aval_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_aval_incapacidade(Date data_aval_incapacidade) { |  | ||||||
|         this.data_aval_incapacidade = data_aval_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Date getData_rev_incapacidade() { |  | ||||||
|         return data_rev_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_rev_incapacidade(Date data_rev_incapacidade) { |  | ||||||
|         this.data_rev_incapacidade = data_rev_incapacidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Date getPeriodo_incapacidade_de() { |  | ||||||
|         return periodo_incapacidade_de; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setPeriodo_incapacidade_de(Date periodo_incapacidade_de) { |  | ||||||
|         this.periodo_incapacidade_de = periodo_incapacidade_de; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Date getPeriodo_incapacidade_a() { |  | ||||||
|         return periodo_incapacidade_a; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setPeriodo_incapacidade_a(Date periodo_incapacidade_a) { |  | ||||||
|         this.periodo_incapacidade_a = periodo_incapacidade_a; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_flexao() { |  | ||||||
|         return img_flexao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_flexao(String img_flexao) { |  | ||||||
|         this.img_flexao = img_flexao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ext1() { |  | ||||||
|         return img_ext1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ext1(String img_ext1) { |  | ||||||
|         this.img_ext1 = img_ext1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ext2() { |  | ||||||
|         return img_ext2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ext2(String img_ext2) { |  | ||||||
|         this.img_ext2 = img_ext2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_cab2() { |  | ||||||
|         return img_cab2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_cab2(String img_cab2) { |  | ||||||
|         this.img_cab2 = img_cab2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_cab3() { |  | ||||||
|         return img_cab3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_cab3(String img_cab3) { |  | ||||||
|         this.img_cab3 = img_cab3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma2() { |  | ||||||
|         return img_ma2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma2(String img_ma2) { |  | ||||||
|         this.img_ma2 = img_ma2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma3() { |  | ||||||
|         return img_ma3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma3(String img_ma3) { |  | ||||||
|         this.img_ma3 = img_ma3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma5() { |  | ||||||
|         return img_ma5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma5(String img_ma5) { |  | ||||||
|         this.img_ma5 = img_ma5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma6() { |  | ||||||
|         return img_ma6; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma6(String img_ma6) { |  | ||||||
|         this.img_ma6 = img_ma6; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma8() { |  | ||||||
|         return img_ma8; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma8(String img_ma8) { |  | ||||||
|         this.img_ma8 = img_ma8; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma10() { |  | ||||||
|         return img_ma10; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma10(String img_ma10) { |  | ||||||
|         this.img_ma10 = img_ma10; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getRestricao_carga() { |  | ||||||
|         return restricao_carga; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRestricao_carga(Integer restricao_carga) { |  | ||||||
|         this.restricao_carga = restricao_carga; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getRestricao_motricidade() { |  | ||||||
|         return restricao_motricidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRestricao_motricidade(String restricao_motricidade) { |  | ||||||
|         this.restricao_motricidade = restricao_motricidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getRestricao_conducao() { |  | ||||||
|         return restricao_conducao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRestricao_conducao(String restricao_conducao) { |  | ||||||
|         this.restricao_conducao = restricao_conducao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getRestricao_vibracoes() { |  | ||||||
|         return restricao_vibracoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRestricao_vibracoes(String restricao_vibracoes) { |  | ||||||
|         this.restricao_vibracoes = restricao_vibracoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getRestricao_outras() { |  | ||||||
|         return restricao_outras; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRestricao_outras(String restricao_outras) { |  | ||||||
|         this.restricao_outras = restricao_outras; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getMed_observ() { |  | ||||||
|         return med_observ; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMed_observ(String med_observ) { |  | ||||||
|         this.med_observ = med_observ; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTipo_lesao() { |  | ||||||
|         return tipo_lesao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTipo_lesao(String tipo_lesao) { |  | ||||||
|         this.tipo_lesao = tipo_lesao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_rot1() { |  | ||||||
|         return img_rot1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_rot1(String img_rot1) { |  | ||||||
|         this.img_rot1 = img_rot1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_rot2() { |  | ||||||
|         return img_rot2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_rot2(String img_rot2) { |  | ||||||
|         this.img_rot2 = img_rot2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_cab1() { |  | ||||||
|         return img_cab1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_cab1(String img_cab1) { |  | ||||||
|         this.img_cab1 = img_cab1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_cab4() { |  | ||||||
|         return img_cab4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_cab4(String img_cab4) { |  | ||||||
|         this.img_cab4 = img_cab4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma1() { |  | ||||||
|         return img_ma1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma1(String img_ma1) { |  | ||||||
|         this.img_ma1 = img_ma1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma4() { |  | ||||||
|         return img_ma4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma4(String img_ma4) { |  | ||||||
|         this.img_ma4 = img_ma4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma7() { |  | ||||||
|         return img_ma7; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma7(String img_ma7) { |  | ||||||
|         this.img_ma7 = img_ma7; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getImg_ma9() { |  | ||||||
|         return img_ma9; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImg_ma9(String img_ma9) { |  | ||||||
|         this.img_ma9 = img_ma9; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getEmpresa_id() { |  | ||||||
|         return empresa_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEmpresa_id(Integer empresa_id) { |  | ||||||
|         this.empresa_id = empresa_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getMedico_id() { |  | ||||||
|         return medico_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMedico_id(Integer medico_id) { |  | ||||||
|         this.medico_id = medico_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getTecnico_saude_id() { |  | ||||||
|         return tecnico_saude_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTecnico_saude_id(Integer tecnico_saude_id) { |  | ||||||
|         this.tecnico_saude_id = tecnico_saude_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAnalise_nr() { |  | ||||||
|         return analise_nr; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalise_nr(String analise_nr) { |  | ||||||
|         this.analise_nr = analise_nr; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getFase() { |  | ||||||
|         return fase; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFase(String fase) { |  | ||||||
|         this.fase = fase; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getEstado_assinatura() { |  | ||||||
|         return estado_assinatura; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstado_assinatura(Integer estado_assinatura) { |  | ||||||
|         this.estado_assinatura = estado_assinatura; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAss_resp_seg() { |  | ||||||
|         return ass_resp_seg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAss_resp_seg(String ass_resp_seg) { |  | ||||||
|         this.ass_resp_seg = ass_resp_seg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAss_seg() { |  | ||||||
|         return ass_seg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAss_seg(String ass_seg) { |  | ||||||
|         this.ass_seg = ass_seg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAss_hs() { |  | ||||||
|         return ass_hs; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAss_hs(String ass_hs) { |  | ||||||
|         this.ass_hs = ass_hs; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAss_med() { |  | ||||||
|         return ass_med; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAss_med(String ass_med) { |  | ||||||
|         this.ass_med = ass_med; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAss_resp_rh() { |  | ||||||
|         return ass_resp_rh; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAss_resp_rh(String ass_resp_rh) { |  | ||||||
|         this.ass_resp_rh = ass_resp_rh; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,100 +0,0 @@ | |||||||
| /* |  | ||||||
|  * ApplicationBean1.java |  | ||||||
|  * |  | ||||||
|  * Created on September 18, 2007, 3:14 PM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractApplicationBean; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Application scope data bean for your application.  Create properties |  | ||||||
|  *  here to represent cached data that should be made available to all users |  | ||||||
|  *  and pages in the application.</p> |  | ||||||
|  * |  | ||||||
|  * <p>An instance of this class will be created for you automatically, |  | ||||||
|  * the first time your application evaluates a value binding expression |  | ||||||
|  * or method binding expression that references a managed bean using |  | ||||||
|  * this class.</p> |  | ||||||
|  */ |  | ||||||
| public class ApplicationBean1 extends AbstractApplicationBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new application data bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public ApplicationBean1() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when this bean is initially added to |  | ||||||
|      * application scope.  Typically, this occurs as a result of evaluating |  | ||||||
|      * a value binding or method binding expression, which utilizes the |  | ||||||
|      * managed bean facility to instantiate this bean and store it into |  | ||||||
|      * application scope.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to initialize and cache application wide |  | ||||||
|      * data values (such as the lists of valid options for dropdown list |  | ||||||
|      * components), or to allocate resources that are required for the |  | ||||||
|      * lifetime of the application.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("ApplicationBean1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when this bean is removed from |  | ||||||
|      * application scope.  Typically, this occurs as a result of |  | ||||||
|      * the application being shut down by its owning container.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to clean up resources allocated |  | ||||||
|      * during the execution of the <code>init()</code> method, or |  | ||||||
|      * at any later time during the lifetime of the application.</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Return an appropriate character encoding based on the |  | ||||||
|      * <code>Locale</code> defined for the current JavaServer Faces |  | ||||||
|      * view.  If no more suitable encoding can be found, return |  | ||||||
|      * "UTF-8" as a general purpose default.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation uses the implementation from |  | ||||||
|      * our superclass, <code>AbstractApplicationBean</code>.</p> |  | ||||||
|      */ |  | ||||||
|     public String getLocaleCharacterEncoding() { |  | ||||||
|         return super.getLocaleCharacterEncoding(); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1 +0,0 @@ | |||||||
| # Sample ResourceBundle properties file |  | ||||||
| @ -1,730 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Dummy.java |  | ||||||
|  * |  | ||||||
|  * |  | ||||||
|  * Created on September 19, 2007, 10:56 AM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractPageBean; |  | ||||||
| import com.sun.rave.web.ui.component.Body; |  | ||||||
| import com.sun.rave.web.ui.component.Button; |  | ||||||
| import com.sun.rave.web.ui.component.Calendar; |  | ||||||
| import com.sun.rave.web.ui.component.Checkbox; |  | ||||||
| import com.sun.rave.web.ui.component.DropDown; |  | ||||||
| import com.sun.rave.web.ui.component.Form; |  | ||||||
| import com.sun.rave.web.ui.component.Head; |  | ||||||
| import com.sun.rave.web.ui.component.HiddenField; |  | ||||||
| import com.sun.rave.web.ui.component.Html; |  | ||||||
| import com.sun.rave.web.ui.component.Hyperlink; |  | ||||||
| import com.sun.rave.web.ui.component.ImageComponent; |  | ||||||
| import com.sun.rave.web.ui.component.ImageHyperlink; |  | ||||||
| import com.sun.rave.web.ui.component.Link; |  | ||||||
| import com.sun.rave.web.ui.component.Page; |  | ||||||
| import com.sun.rave.web.ui.component.PanelGroup; |  | ||||||
| import com.sun.rave.web.ui.component.PasswordField; |  | ||||||
| import com.sun.rave.web.ui.component.RadioButton; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import com.sun.rave.web.ui.component.Table; |  | ||||||
| import com.sun.rave.web.ui.component.TableColumn; |  | ||||||
| import com.sun.rave.web.ui.component.TableRowGroup; |  | ||||||
| import com.sun.rave.web.ui.component.TextArea; |  | ||||||
| import com.sun.rave.web.ui.component.TextField; |  | ||||||
| import com.sun.rave.web.ui.component.Upload; |  | ||||||
| import com.sun.rave.web.ui.model.SingleSelectOptionsList; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Page bean that corresponds to a similarly named JSP page.  This |  | ||||||
|  * class contains component definitions (and initialization code) for |  | ||||||
|  * all components that you have defined on this page, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class Dummy extends AbstractPageBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Page page1 = new Page(); |  | ||||||
|      |  | ||||||
|     public Page getPage1() { |  | ||||||
|         return page1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setPage1(Page p) { |  | ||||||
|         this.page1 = p; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Html html1 = new Html(); |  | ||||||
|      |  | ||||||
|     public Html getHtml1() { |  | ||||||
|         return html1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHtml1(Html h) { |  | ||||||
|         this.html1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Head head1 = new Head(); |  | ||||||
|      |  | ||||||
|     public Head getHead1() { |  | ||||||
|         return head1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHead1(Head h) { |  | ||||||
|         this.head1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Link link1 = new Link(); |  | ||||||
|      |  | ||||||
|     public Link getLink1() { |  | ||||||
|         return link1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setLink1(Link l) { |  | ||||||
|         this.link1 = l; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Body body1 = new Body(); |  | ||||||
|      |  | ||||||
|     public Body getBody1() { |  | ||||||
|         return body1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setBody1(Body b) { |  | ||||||
|         this.body1 = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Form form1 = new Form(); |  | ||||||
|      |  | ||||||
|     public Form getForm1() { |  | ||||||
|         return form1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setForm1(Form f) { |  | ||||||
|         this.form1 = f; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel1 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel1() { |  | ||||||
|         return groupPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel1(PanelGroup pg) { |  | ||||||
|         this.groupPanel1 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image1 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage1() { |  | ||||||
|         return image1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage1(ImageComponent ic) { |  | ||||||
|         this.image1 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image2 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage2() { |  | ||||||
|         return image2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage2(ImageComponent ic) { |  | ||||||
|         this.image2 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel2 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel2() { |  | ||||||
|         return groupPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel2(PanelGroup pg) { |  | ||||||
|         this.groupPanel2 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText lblUser1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getLblUser1() { |  | ||||||
|         return lblUser1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLblUser1(StaticText st) { |  | ||||||
|         this.lblUser1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText1() { |  | ||||||
|         return staticText1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText1(StaticText st) { |  | ||||||
|         this.staticText1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkEditUser1 = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkEditUser1() { |  | ||||||
|         return lnkEditUser1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkEditUser1(Hyperlink h) { |  | ||||||
|         this.lnkEditUser1 = h; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText2() { |  | ||||||
|         return staticText2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText2(StaticText st) { |  | ||||||
|         this.staticText2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkLogout1 = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkLogout1() { |  | ||||||
|         return lnkLogout1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkLogout1(Hyperlink h) { |  | ||||||
|         this.lnkLogout1 = h; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText3 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText3() { |  | ||||||
|         return staticText3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText3(StaticText st) { |  | ||||||
|         this.staticText3 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel4() { |  | ||||||
|         return gridPanel4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel4(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel4 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridHeader = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridHeader() { |  | ||||||
|         return gridHeader; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridHeader(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridHeader = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel5 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel5() { |  | ||||||
|         return groupPanel5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel5(PanelGroup pg) { |  | ||||||
|         this.groupPanel5 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText lblUser2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getLblUser2() { |  | ||||||
|         return lblUser2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLblUser2(StaticText st) { |  | ||||||
|         this.lblUser2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText7 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText7() { |  | ||||||
|         return staticText7; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText7(StaticText st) { |  | ||||||
|         this.staticText7 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkEditUser2 = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkEditUser2() { |  | ||||||
|         return lnkEditUser2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkEditUser2(Hyperlink h) { |  | ||||||
|         this.lnkEditUser2 = h; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText8 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText8() { |  | ||||||
|         return staticText8; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText8(StaticText st) { |  | ||||||
|         this.staticText8 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkLogout2 = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkLogout2() { |  | ||||||
|         return lnkLogout2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkLogout2(Hyperlink h) { |  | ||||||
|         this.lnkLogout2 = h; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText9 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText9() { |  | ||||||
|         return staticText9; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText9(StaticText st) { |  | ||||||
|         this.staticText9 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel2() { |  | ||||||
|         return gridPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel2(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel2 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel3 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel3() { |  | ||||||
|         return groupPanel3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel3(PanelGroup pg) { |  | ||||||
|         this.groupPanel3 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image3 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage3() { |  | ||||||
|         return image3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage3(ImageComponent ic) { |  | ||||||
|         this.image3 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel5() { |  | ||||||
|         return gridPanel5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel5(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel5 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText4 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText4() { |  | ||||||
|         return staticText4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText4(StaticText st) { |  | ||||||
|         this.staticText4 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel6() { |  | ||||||
|         return gridPanel6; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel6(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel6 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel4 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel4() { |  | ||||||
|         return groupPanel4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel4(PanelGroup pg) { |  | ||||||
|         this.groupPanel4 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText5 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText5() { |  | ||||||
|         return staticText5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText5(StaticText st) { |  | ||||||
|         this.staticText5 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText stHeaderNr1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStHeaderNr1() { |  | ||||||
|         return stHeaderNr1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStHeaderNr1(StaticText st) { |  | ||||||
|         this.stHeaderNr1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel6 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel6() { |  | ||||||
|         return groupPanel6; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel6(PanelGroup pg) { |  | ||||||
|         this.groupPanel6 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText6 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText6() { |  | ||||||
|         return staticText6; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText6(StaticText st) { |  | ||||||
|         this.staticText6 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText stHeaderDate1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStHeaderDate1() { |  | ||||||
|         return stHeaderDate1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStHeaderDate1(StaticText st) { |  | ||||||
|         this.stHeaderDate1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image4 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage4() { |  | ||||||
|         return image4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage4(ImageComponent ic) { |  | ||||||
|         this.image4 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private RadioButton radioButton1 = new RadioButton(); |  | ||||||
| 
 |  | ||||||
|     public RadioButton getRadioButton1() { |  | ||||||
|         return radioButton1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRadioButton1(RadioButton rb) { |  | ||||||
|         this.radioButton1 = rb; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel7 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel7() { |  | ||||||
|         return groupPanel7; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel7(PanelGroup pg) { |  | ||||||
|         this.groupPanel7 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText10 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText10() { |  | ||||||
|         return staticText10; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText10(StaticText st) { |  | ||||||
|         this.staticText10 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText11 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText11() { |  | ||||||
|         return staticText11; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText11(StaticText st) { |  | ||||||
|         this.staticText11 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText12 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText12() { |  | ||||||
|         return staticText12; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText12(StaticText st) { |  | ||||||
|         this.staticText12 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText13 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText13() { |  | ||||||
|         return staticText13; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText13(StaticText st) { |  | ||||||
|         this.staticText13 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText14 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText14() { |  | ||||||
|         return staticText14; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText14(StaticText st) { |  | ||||||
|         this.staticText14 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private RadioButton rbTurnoManha = new RadioButton(); |  | ||||||
| 
 |  | ||||||
|     public RadioButton getRbTurnoManha() { |  | ||||||
|         return rbTurnoManha; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRbTurnoManha(RadioButton rb) { |  | ||||||
|         this.rbTurnoManha = rb; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private RadioButton rbTurnoTarde = new RadioButton(); |  | ||||||
| 
 |  | ||||||
|     public RadioButton getRbTurnoTarde() { |  | ||||||
|         return rbTurnoTarde; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRbTurnoTarde(RadioButton rb) { |  | ||||||
|         this.rbTurnoTarde = rb; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private RadioButton rbTurnoNoite = new RadioButton(); |  | ||||||
| 
 |  | ||||||
|     public RadioButton getRbTurnoNoite() { |  | ||||||
|         return rbTurnoNoite; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRbTurnoNoite(RadioButton rb) { |  | ||||||
|         this.rbTurnoNoite = rb; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Button button1 = new Button(); |  | ||||||
| 
 |  | ||||||
|     public Button getButton1() { |  | ||||||
|         return button1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setButton1(Button b) { |  | ||||||
|         this.button1 = b; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HiddenField hiddenField1 = new HiddenField(); |  | ||||||
| 
 |  | ||||||
|     public HiddenField getHiddenField1() { |  | ||||||
|         return hiddenField1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHiddenField1(HiddenField hf) { |  | ||||||
|         this.hiddenField1 = hf; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new Page bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public Dummy() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page is navigated to, |  | ||||||
|      * either directly via a URL, or indirectly via page navigation. |  | ||||||
|      * Customize this method to acquire resources that will be needed |  | ||||||
|      * for event handlers and lifecycle methods, whether or not this |  | ||||||
|      * page is performing post back processing.</p> |  | ||||||
|      * |  | ||||||
|      * <p>Note that, if the current request is a postback, the property |  | ||||||
|      * values of the components do <strong>not</strong> represent any |  | ||||||
|      * values submitted with this request.  Instead, they represent the |  | ||||||
|      * property values that were saved for this view when it was rendered.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("Dummy Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after the component tree has been |  | ||||||
|      * restored, but before any event processing takes place.  This method |  | ||||||
|      * will <strong>only</strong> be called on a postback request that |  | ||||||
|      * is processing a form submit.  Customize this method to allocate |  | ||||||
|      * resources that will be required in your event handlers.</p> |  | ||||||
|      */ |  | ||||||
|     public void preprocess() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called just before rendering takes place. |  | ||||||
|      * This method will <strong>only</strong> be called for the page that |  | ||||||
|      * will actually be rendered (and not, for example, on a page that |  | ||||||
|      * handled a postback and then navigated to a different page).  Customize |  | ||||||
|      * this method to allocate resources that will be required for rendering |  | ||||||
|      * this page.</p> |  | ||||||
|      */ |  | ||||||
|     public void prerender() { |  | ||||||
|         //txtIn.setText("OLA");
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called (regardless of whether |  | ||||||
|      * or not this was the page that was actually rendered).  Customize this |  | ||||||
|      * method to release resources acquired in the <code>init()</code>, |  | ||||||
|      * <code>preprocess()</code>, or <code>prerender()</code> methods (or |  | ||||||
|      * acquired during execution of an event handler).</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String button1_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|         //System.out.println("TEXT : " + txtIn.getText().toString());
 |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butCancelar_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butGravar_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butEnviar_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butImagem_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkMoreMed1_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkNome_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkDataNascimento_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkEditUser_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkLogout_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| @ -1,239 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Error.java |  | ||||||
|  * |  | ||||||
|  * Created on September 19, 2007, 5:21 PM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractPageBean; |  | ||||||
| import com.sun.rave.web.ui.component.Body; |  | ||||||
| import com.sun.rave.web.ui.component.Form; |  | ||||||
| import com.sun.rave.web.ui.component.Head; |  | ||||||
| import com.sun.rave.web.ui.component.Html; |  | ||||||
| import com.sun.rave.web.ui.component.Link; |  | ||||||
| import com.sun.rave.web.ui.component.Page; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import com.sun.rave.web.ui.component.TextField; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Page bean that corresponds to a similarly named JSP page.  This |  | ||||||
|  * class contains component definitions (and initialization code) for |  | ||||||
|  * all components that you have defined on this page, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class Erro extends AbstractPageBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Page page1 = new Page(); |  | ||||||
|      |  | ||||||
|     public Page getPage1() { |  | ||||||
|         return page1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setPage1(Page p) { |  | ||||||
|         this.page1 = p; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Html html1 = new Html(); |  | ||||||
|      |  | ||||||
|     public Html getHtml1() { |  | ||||||
|         return html1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHtml1(Html h) { |  | ||||||
|         this.html1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Head head1 = new Head(); |  | ||||||
|      |  | ||||||
|     public Head getHead1() { |  | ||||||
|         return head1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHead1(Head h) { |  | ||||||
|         this.head1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Link link1 = new Link(); |  | ||||||
|      |  | ||||||
|     public Link getLink1() { |  | ||||||
|         return link1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setLink1(Link l) { |  | ||||||
|         this.link1 = l; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Body body1 = new Body(); |  | ||||||
|      |  | ||||||
|     public Body getBody1() { |  | ||||||
|         return body1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setBody1(Body b) { |  | ||||||
|         this.body1 = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Form form1 = new Form(); |  | ||||||
|      |  | ||||||
|     public Form getForm1() { |  | ||||||
|         return form1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setForm1(Form f) { |  | ||||||
|         this.form1 = f; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel2() { |  | ||||||
|         return gridPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel2(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel2 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtCab = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtCab() { |  | ||||||
|         return txtCab; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtCab(StaticText st) { |  | ||||||
|         this.txtCab = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtMsg = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtMsg() { |  | ||||||
|         return txtMsg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtMsg(StaticText st) { |  | ||||||
|         this.txtMsg = st; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new Page bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public Erro() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page is navigated to, |  | ||||||
|      * either directly via a URL, or indirectly via page navigation. |  | ||||||
|      * Customize this method to acquire resources that will be needed |  | ||||||
|      * for event handlers and lifecycle methods, whether or not this |  | ||||||
|      * page is performing post back processing.</p> |  | ||||||
|      * |  | ||||||
|      * <p>Note that, if the current request is a postback, the property |  | ||||||
|      * values of the components do <strong>not</strong> represent any |  | ||||||
|      * values submitted with this request.  Instead, they represent the |  | ||||||
|      * property values that were saved for this view when it was rendered.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("Error Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after the component tree has been |  | ||||||
|      * restored, but before any event processing takes place.  This method |  | ||||||
|      * will <strong>only</strong> be called on a postback request that |  | ||||||
|      * is processing a form submit.  Customize this method to allocate |  | ||||||
|      * resources that will be required in your event handlers.</p> |  | ||||||
|      */ |  | ||||||
|     public void preprocess() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called just before rendering takes place. |  | ||||||
|      * This method will <strong>only</strong> be called for the page that |  | ||||||
|      * will actually be rendered (and not, for example, on a page that |  | ||||||
|      * handled a postback and then navigated to a different page).  Customize |  | ||||||
|      * this method to allocate resources that will be required for rendering |  | ||||||
|      * this page.</p> |  | ||||||
|      */ |  | ||||||
|     public void prerender() { |  | ||||||
|         txtMsg.setText( getSessionBean1().getMsg() ); |  | ||||||
|         getSessionBean1().setMsg(""); |  | ||||||
|         System.out.println("ERROR PAGE"); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called (regardless of whether |  | ||||||
|      * or not this was the page that was actually rendered).  Customize this |  | ||||||
|      * method to release resources acquired in the <code>init()</code>, |  | ||||||
|      * <code>preprocess()</code>, or <code>prerender()</code> methods (or |  | ||||||
|      * acquired during execution of an event handler).</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| @ -1,40 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Empresa.java |  | ||||||
|  * |  | ||||||
|  * Created on October 11, 2007, 5:19 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Estabelecimento { |  | ||||||
|     private Integer id; |  | ||||||
|     private String nome_plain; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Empresa */ |  | ||||||
|     public Estabelecimento() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome_plain() { |  | ||||||
|         return nome_plain; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome_plain(String nome_plain) { |  | ||||||
|         this.nome_plain = nome_plain; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,152 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Footer.java |  | ||||||
|  * |  | ||||||
|  * Created on September 19, 2007, 10:57 AM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractFragmentBean; |  | ||||||
| import com.sun.rave.web.ui.component.ImageComponent; |  | ||||||
| import com.sun.rave.web.ui.component.PanelGroup; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Fragment bean that corresponds to a similarly named JSP page |  | ||||||
|  * fragment.  This class contains component definitions (and initialization |  | ||||||
|  * code) for all components that you have defined on this fragment, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class Footer extends AbstractFragmentBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization. <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel1 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel1() { |  | ||||||
|         return groupPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel1(PanelGroup pg) { |  | ||||||
|         this.groupPanel1 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText1() { |  | ||||||
|         return staticText1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText1(StaticText st) { |  | ||||||
|         this.staticText1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText2() { |  | ||||||
|         return staticText2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText2(StaticText st) { |  | ||||||
|         this.staticText2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image1 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage1() { |  | ||||||
|         return image1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage1(ImageComponent ic) { |  | ||||||
|         this.image1 = ic; |  | ||||||
|     } |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     public Footer() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page containing |  | ||||||
|      * this page fragment is navigated to, either directly via a URL, |  | ||||||
|      * or indirectly via page navigation.  Override this method to acquire |  | ||||||
|      * resources that will be needed for event handlers and lifecycle methods.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation does nothing.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("Page1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called.  Override this |  | ||||||
|      * method to release resources acquired in the <code>init()</code> |  | ||||||
|      * resources that will be needed for event handlers and lifecycle methods.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation does nothing.</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,120 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Header.java |  | ||||||
|  * |  | ||||||
|  * Created on September 19, 2007, 10:14 AM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractFragmentBean; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Fragment bean that corresponds to a similarly named JSP page |  | ||||||
|  * fragment.  This class contains component definitions (and initialization |  | ||||||
|  * code) for all components that you have defined on this fragment, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class Header extends AbstractFragmentBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization. <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText1() { |  | ||||||
|         return staticText1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText1(StaticText st) { |  | ||||||
|         this.staticText1 = st; |  | ||||||
|     } |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     public Header() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page containing |  | ||||||
|      * this page fragment is navigated to, either directly via a URL, |  | ||||||
|      * or indirectly via page navigation.  Override this method to acquire |  | ||||||
|      * resources that will be needed for event handlers and lifecycle methods.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation does nothing.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("Page1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called.  Override this |  | ||||||
|      * method to release resources acquired in the <code>init()</code> |  | ||||||
|      * resources that will be needed for event handlers and lifecycle methods.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation does nothing.</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,480 +0,0 @@ | |||||||
| /* |  | ||||||
|  * LoadImage.java |  | ||||||
|  * |  | ||||||
|  * Created on September 26, 2007, 5:36 PM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractPageBean; |  | ||||||
| import com.sun.rave.web.ui.component.Body; |  | ||||||
| import com.sun.rave.web.ui.component.Button; |  | ||||||
| import com.sun.rave.web.ui.component.Form; |  | ||||||
| import com.sun.rave.web.ui.component.Head; |  | ||||||
| import com.sun.rave.web.ui.component.Html; |  | ||||||
| import com.sun.rave.web.ui.component.ImageComponent; |  | ||||||
| import com.sun.rave.web.ui.component.Link; |  | ||||||
| import com.sun.rave.web.ui.component.Page; |  | ||||||
| import com.sun.rave.web.ui.component.PanelGroup; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import com.sun.rave.web.ui.component.Upload; |  | ||||||
| import com.sun.rave.web.ui.model.UploadedFile; |  | ||||||
| import java.io.File; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| import javax.servlet.ServletContext; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Page bean that corresponds to a similarly named JSP page.  This |  | ||||||
|  * class contains component definitions (and initialization code) for |  | ||||||
|  * all components that you have defined on this page, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class LoadImage extends AbstractPageBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Page page1 = new Page(); |  | ||||||
|      |  | ||||||
|     public Page getPage1() { |  | ||||||
|         return page1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setPage1(Page p) { |  | ||||||
|         this.page1 = p; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Html html1 = new Html(); |  | ||||||
|      |  | ||||||
|     public Html getHtml1() { |  | ||||||
|         return html1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHtml1(Html h) { |  | ||||||
|         this.html1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Head head1 = new Head(); |  | ||||||
|      |  | ||||||
|     public Head getHead1() { |  | ||||||
|         return head1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHead1(Head h) { |  | ||||||
|         this.head1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Link link1 = new Link(); |  | ||||||
|      |  | ||||||
|     public Link getLink1() { |  | ||||||
|         return link1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setLink1(Link l) { |  | ||||||
|         this.link1 = l; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Body body1 = new Body(); |  | ||||||
|      |  | ||||||
|     public Body getBody1() { |  | ||||||
|         return body1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setBody1(Body b) { |  | ||||||
|         this.body1 = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Form form1 = new Form(); |  | ||||||
|      |  | ||||||
|     public Form getForm1() { |  | ||||||
|         return form1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setForm1(Form f) { |  | ||||||
|         this.form1 = f; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridBase1() { |  | ||||||
|         return gridBase1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridBase1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridBase1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridLayout() { |  | ||||||
|         return gridLayout; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridLayout(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridLayout = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText1() { |  | ||||||
|         return staticText1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText1(StaticText st) { |  | ||||||
|         this.staticText1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Upload fileUpload1 = new Upload(); |  | ||||||
| 
 |  | ||||||
|     public Upload getFileUpload1() { |  | ||||||
|         return fileUpload1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFileUpload1(Upload u) { |  | ||||||
|         this.fileUpload1 = u; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Button butUpload = new Button(); |  | ||||||
| 
 |  | ||||||
|     public Button getButUpload() { |  | ||||||
|         return butUpload; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setButUpload(Button b) { |  | ||||||
|         this.butUpload = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     // </editor-fold>    
 |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new Page bean instance.</p> |  | ||||||
|      */ |  | ||||||
|      |  | ||||||
|     private String realImageFilePath; |  | ||||||
|     //private static final String IMAGE_URL = "/resources/image-file";    
 |  | ||||||
|     private String IMAGE_URL = "/resources/images";         |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText2() { |  | ||||||
|         return staticText2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText2(StaticText st) { |  | ||||||
|         this.staticText2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel1 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel1() { |  | ||||||
|         return groupPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel1(PanelGroup pg) { |  | ||||||
|         this.groupPanel1 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText3 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText3() { |  | ||||||
|         return staticText3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText3(StaticText st) { |  | ||||||
|         this.staticText3 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtFileName = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtFileName() { |  | ||||||
|         return txtFileName; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtFileName(StaticText st) { |  | ||||||
|         this.txtFileName = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel2 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel2() { |  | ||||||
|         return groupPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel2(PanelGroup pg) { |  | ||||||
|         this.groupPanel2 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText5 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText5() { |  | ||||||
|         return staticText5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText5(StaticText st) { |  | ||||||
|         this.staticText5 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtFileType = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtFileType() { |  | ||||||
|         return txtFileType; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtFileType(StaticText st) { |  | ||||||
|         this.txtFileType = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel3 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel3() { |  | ||||||
|         return groupPanel3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel3(PanelGroup pg) { |  | ||||||
|         this.groupPanel3 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText7 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText7() { |  | ||||||
|         return staticText7; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText7(StaticText st) { |  | ||||||
|         this.staticText7 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtFileSize = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtFileSize() { |  | ||||||
|         return txtFileSize; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtFileSize(StaticText st) { |  | ||||||
|         this.txtFileSize = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image1 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage1() { |  | ||||||
|         return image1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage1(ImageComponent ic) { |  | ||||||
|         this.image1 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtMsg = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtMsg() { |  | ||||||
|         return txtMsg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtMsg(StaticText st) { |  | ||||||
|         this.txtMsg = st; |  | ||||||
|     } |  | ||||||
|     public LoadImage() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page is navigated to, |  | ||||||
|      * either directly via a URL, or indirectly via page navigation. |  | ||||||
|      * Customize this method to acquire resources that will be needed |  | ||||||
|      * for event handlers and lifecycle methods, whether or not this |  | ||||||
|      * page is performing post back processing.</p> |  | ||||||
|      * |  | ||||||
|      * <p>Note that, if the current request is a postback, the property |  | ||||||
|      * values of the components do <strong>not</strong> represent any |  | ||||||
|      * values submitted with this request.  Instead, they represent the |  | ||||||
|      * property values that were saved for this view when it was rendered.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("LoadImage Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|          |  | ||||||
| 	if (!getSessionBean1().isLoggedIn()) { |  | ||||||
| 	    try { |  | ||||||
| 		getExternalContext().redirect("Login.jsp"); |  | ||||||
| 	    } catch(Exception e) {   |  | ||||||
| 	    // . . .  handle exception . . .              
 |  | ||||||
| 	    } |  | ||||||
| 	}	         |  | ||||||
|          |  | ||||||
|         getSessionBean1().setImageName(null);                 |  | ||||||
|         ServletContext theApplicationsServletContext = |  | ||||||
|              (ServletContext) this.getExternalContext().getContext(); |  | ||||||
|          this.realImageFilePath = theApplicationsServletContext.getRealPath(IMAGE_URL);         |  | ||||||
|          try |  | ||||||
|          { |  | ||||||
|             realImageFilePath += "/tmp" + getSessionBean1().getCurrentUser().getLogin(); |  | ||||||
|             File f = new File(realImageFilePath); |  | ||||||
|             f.mkdir();            |  | ||||||
|          } |  | ||||||
|          catch(Exception ex) |  | ||||||
|          { |  | ||||||
|              ex.printStackTrace(); |  | ||||||
|          } |  | ||||||
| 
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after the component tree has been |  | ||||||
|      * restored, but before any event processing takes place.  This method |  | ||||||
|      * will <strong>only</strong> be called on a postback request that |  | ||||||
|      * is processing a form submit.  Customize this method to allocate |  | ||||||
|      * resources that will be required in your event handlers.</p> |  | ||||||
|      */ |  | ||||||
|     public void preprocess() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called just before rendering takes place. |  | ||||||
|      * This method will <strong>only</strong> be called for the page that |  | ||||||
|      * will actually be rendered (and not, for example, on a page that |  | ||||||
|      * handled a postback and then navigated to a different page).  Customize |  | ||||||
|      * this method to allocate resources that will be required for rendering |  | ||||||
|      * this page.</p> |  | ||||||
|      */ |  | ||||||
|     public void prerender() { |  | ||||||
|   String uploadedFileName = (String) |  | ||||||
|        this.txtFileName.getValue(); |  | ||||||
|        if ( uploadedFileName != null ) { |  | ||||||
|             IMAGE_URL += getSessionBean1().getImageName(); |  | ||||||
|             System.out.println("IMAGE URL : " + IMAGE_URL); |  | ||||||
|            image1.setUrl(IMAGE_URL); |  | ||||||
| 	   }         |  | ||||||
|          txtMsg.setText(getSessionBean1().getMsg()); |  | ||||||
|          getSessionBean1().setMsg("");         |  | ||||||
| 
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called (regardless of whether |  | ||||||
|      * or not this was the page that was actually rendered).  Customize this |  | ||||||
|      * method to release resources acquired in the <code>init()</code>, |  | ||||||
|      * <code>preprocess()</code>, or <code>prerender()</code> methods (or |  | ||||||
|      * acquired during execution of an event handler).</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkLogout_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkNome_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkDataNascimento_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butUpload_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
| 
 |  | ||||||
|         UploadedFile uploadedFile = fileUpload1.getUploadedFile(); |  | ||||||
|         String uploadedFileName = uploadedFile.getOriginalName(); |  | ||||||
|         // Some browsers return complete path name, some don't
 |  | ||||||
|         // Make sure we only have the file name
 |  | ||||||
|         // First, try forward slash
 |  | ||||||
|         int index = uploadedFileName.lastIndexOf('/'); |  | ||||||
|         String justFileName; |  | ||||||
|         if ( index >= 0) { |  | ||||||
|             justFileName = uploadedFileName.substring( index + 1 ); |  | ||||||
|         } else { |  | ||||||
|             // Try backslash
 |  | ||||||
|             index = uploadedFileName.lastIndexOf('\\'); |  | ||||||
|             if (index >= 0) { |  | ||||||
|                 justFileName = uploadedFileName.substring( index + 1 ); |  | ||||||
|             } else { |  | ||||||
|                 // No forward or back slashes
 |  | ||||||
|                 justFileName = uploadedFileName; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         justFileName = justFileName.substring(0, justFileName.lastIndexOf('.')); |  | ||||||
|         this.txtFileName.setValue(justFileName); |  | ||||||
|         Long uploadedFileSize = new Long(uploadedFile.getSize()); |  | ||||||
|         this.txtFileSize.setValue(uploadedFileSize); |  | ||||||
|         String uploadedFileType = uploadedFile.getContentType(); |  | ||||||
|         this.txtFileType.setValue(uploadedFileType); |  | ||||||
|         if ( uploadedFileType.equals("image/jpeg") |  | ||||||
|         || uploadedFileType.equals("image/pjpeg") |  | ||||||
|         || uploadedFileType.equals("image/gif") |  | ||||||
|         || uploadedFileType.equals("image/png") |  | ||||||
|         || uploadedFileType.equals("image/x-png")) { |  | ||||||
|             try { |  | ||||||
|                 realImageFilePath += "/" + justFileName; |  | ||||||
|                 File file = new File(this.realImageFilePath); |  | ||||||
|                 uploadedFile.write(file); |  | ||||||
|                 getSessionBean1().setImageName(justFileName);                 |  | ||||||
|                 //getSessionBean1().setMsg("Ficheiro carregado !");                
 |  | ||||||
|             } catch (Exception ex) { |  | ||||||
|                 ex.printStackTrace(); |  | ||||||
|                 getSessionBean1().setMsg("Não foi possivel carregar o ficheiro !"); |  | ||||||
|                 return null; |  | ||||||
|             } |  | ||||||
|         } else { |  | ||||||
|             getSessionBean1().setMsg("O ficheiro deve ser do tipo JPEG, PJPEG, GIF, PNG, ou X-PNG !");             |  | ||||||
|             new File(this.realImageFilePath).delete(); |  | ||||||
|             return null; |  | ||||||
|         } |  | ||||||
|         return "analise_acidente"; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| @ -1,514 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Page1.java |  | ||||||
|  * |  | ||||||
|  * Created on September 18, 2007, 3:14 PM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractPageBean; |  | ||||||
| import com.sun.rave.web.ui.component.Body; |  | ||||||
| import com.sun.rave.web.ui.component.Button; |  | ||||||
| import com.sun.rave.web.ui.component.Form; |  | ||||||
| import com.sun.rave.web.ui.component.Head; |  | ||||||
| import com.sun.rave.web.ui.component.Html; |  | ||||||
| import com.sun.rave.web.ui.component.Hyperlink; |  | ||||||
| import com.sun.rave.web.ui.component.Link; |  | ||||||
| import com.sun.rave.web.ui.component.Page; |  | ||||||
| import com.sun.rave.web.ui.component.PasswordField; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import com.sun.rave.web.ui.component.TextField; |  | ||||||
| import com.sun.rave.web.ui.model.Option; |  | ||||||
| import db.AnalisesDataProvider; |  | ||||||
| import db.UtilizadoresDataProvider; |  | ||||||
| import java.sql.Connection; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Page bean that corresponds to a similarly named JSP page.  This |  | ||||||
|  * class contains component definitions (and initialization code) for |  | ||||||
|  * all components that you have defined on this page, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class Login extends AbstractPageBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Page page1 = new Page(); |  | ||||||
|      |  | ||||||
|     public Page getPage1() { |  | ||||||
|         return page1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setPage1(Page p) { |  | ||||||
|         this.page1 = p; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Html html1 = new Html(); |  | ||||||
|      |  | ||||||
|     public Html getHtml1() { |  | ||||||
|         return html1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHtml1(Html h) { |  | ||||||
|         this.html1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Head head1 = new Head(); |  | ||||||
|      |  | ||||||
|     public Head getHead1() { |  | ||||||
|         return head1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHead1(Head h) { |  | ||||||
|         this.head1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Link link1 = new Link(); |  | ||||||
|      |  | ||||||
|     public Link getLink1() { |  | ||||||
|         return link1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setLink1(Link l) { |  | ||||||
|         this.link1 = l; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Body body1 = new Body(); |  | ||||||
|      |  | ||||||
|     public Body getBody1() { |  | ||||||
|         return body1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setBody1(Body b) { |  | ||||||
|         this.body1 = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Form form1 = new Form(); |  | ||||||
|      |  | ||||||
|     public Form getForm1() { |  | ||||||
|         return form1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setForm1(Form f) { |  | ||||||
|         this.form1 = f; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel6() { |  | ||||||
|         return gridPanel6; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel6(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel6 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel2() { |  | ||||||
|         return gridPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel2(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel2 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel3() { |  | ||||||
|         return gridPanel3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel3(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel3 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel4() { |  | ||||||
|         return gridPanel4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel4(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel4 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText1() { |  | ||||||
|         return staticText1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText1(StaticText st) { |  | ||||||
|         this.staticText1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private TextField txtUtilizador = new TextField(); |  | ||||||
| 
 |  | ||||||
|     public TextField getTxtUtilizador() { |  | ||||||
|         return txtUtilizador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtUtilizador(TextField tf) { |  | ||||||
|         this.txtUtilizador = tf; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText2() { |  | ||||||
|         return staticText2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText2(StaticText st) { |  | ||||||
|         this.staticText2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PasswordField txtPassword = new PasswordField(); |  | ||||||
| 
 |  | ||||||
|     public PasswordField getTxtPassword() { |  | ||||||
|         return txtPassword; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtPassword(PasswordField pf) { |  | ||||||
|         this.txtPassword = pf; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel5() { |  | ||||||
|         return gridPanel5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel5(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel5 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkPassRecovery = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkPassRecovery() { |  | ||||||
|         return lnkPassRecovery; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkPassRecovery(Hyperlink h) { |  | ||||||
|         this.lnkPassRecovery = h; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Button butLogin = new Button(); |  | ||||||
| 
 |  | ||||||
|     public Button getButLogin() { |  | ||||||
|         return butLogin; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setButLogin(Button b) { |  | ||||||
|         this.butLogin = b; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtMsg = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtMsg() { |  | ||||||
|         return txtMsg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtMsg(StaticText st) { |  | ||||||
|         this.txtMsg = st; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     // </editor-fold>
 |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new Page bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public Login() { |  | ||||||
|         connect(); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page is navigated to, |  | ||||||
|      * either directly via a URL, or indirectly via page navigation. |  | ||||||
|      * Customize this method to acquire resources that will be needed |  | ||||||
|      * for event handlers and lifecycle methods, whether or not this |  | ||||||
|      * page is performing post back processing.</p> |  | ||||||
|      * |  | ||||||
|      * <p>Note that, if the current request is a postback, the property |  | ||||||
|      * values of the components do <strong>not</strong> represent any |  | ||||||
|      * values submitted with this request.  Instead, they represent the |  | ||||||
|      * property values that were saved for this view when it was rendered.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("Page1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
| 
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after the component tree has been |  | ||||||
|      * restored, but before any event processing takes place.  This method |  | ||||||
|      * will <strong>only</strong> be called on a postback request that |  | ||||||
|      * is processing a form submit.  Customize this method to allocate |  | ||||||
|      * resources that will be required in your event handlers.</p> |  | ||||||
|      */ |  | ||||||
|     public void preprocess() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called just before rendering takes place. |  | ||||||
|      * This method will <strong>only</strong> be called for the page that |  | ||||||
|      * will actually be rendered (and not, for example, on a page that |  | ||||||
|      * handled a postback and then navigated to a different page).  Customize |  | ||||||
|      * this method to allocate resources that will be required for rendering |  | ||||||
|      * this page.</p> |  | ||||||
|      */ |  | ||||||
|     public void prerender() { |  | ||||||
| 
 |  | ||||||
|         txtMsg.setText(getSessionBean1().getMsg()); |  | ||||||
|         getSessionBean1().setMsg(""); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called (regardless of whether |  | ||||||
|      * or not this was the page that was actually rendered).  Customize this |  | ||||||
|      * method to release resources acquired in the <code>init()</code>, |  | ||||||
|      * <code>preprocess()</code>, or <code>prerender()</code> methods (or |  | ||||||
|      * acquired during execution of an event handler).</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butLogin_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|         String sRet = null; |  | ||||||
| 
 |  | ||||||
|         UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); |  | ||||||
|         if(txtUtilizador.getText() != null) |  | ||||||
|         { |  | ||||||
|             String utilizador = (String) txtUtilizador.getText(); |  | ||||||
|             if(utilizador.trim().length() > 0) |  | ||||||
|             { |  | ||||||
|                 if(txtPassword.getText() != null) |  | ||||||
|                 { |  | ||||||
|                     String password = (String) txtPassword.getText(); |  | ||||||
|                     if(password.trim().length() > 0) |  | ||||||
|                     { |  | ||||||
|                         try |  | ||||||
|                         { |  | ||||||
|                             Utilizador u = udp.getUtilizador(utilizador); |  | ||||||
|                             if(u.getActivo().matches("y")) |  | ||||||
|                             { |  | ||||||
|                                 if(!password.equals(u.getPassword())) |  | ||||||
|                                 { |  | ||||||
|                                     getSessionBean1().setMsg("Palavra-chave inválida !");						    								    					 |  | ||||||
|                                 } |  | ||||||
|                                 else |  | ||||||
|                                 { |  | ||||||
|                                     //if(u.getOwner_id().intValue() == 0 ) 
 |  | ||||||
| 
 |  | ||||||
|                                     //Login Ok !
 |  | ||||||
| 
 |  | ||||||
|                                     try |  | ||||||
|                                     { |  | ||||||
|                                         Integer permissao = udp.getPermissionCode(u.getId());                                     |  | ||||||
|                                         if(permissao.intValue() == 1)   //seguranca
 |  | ||||||
|                                         { |  | ||||||
|                                             sRet = "form_seguranca"; |  | ||||||
|                                         } |  | ||||||
|                                         else if(permissao.intValue() == 2)  // rh
 |  | ||||||
|                                         { |  | ||||||
|                                             sRet = "form_rh";                                         |  | ||||||
|                                         } |  | ||||||
|                                         else if(permissao.intValue() == 3)  // hs
 |  | ||||||
|                                         { |  | ||||||
|                                             System.out.println("PERMISSAO : HS"); |  | ||||||
|                                             sRet = "form_hs";                                         |  | ||||||
|                                         }                   |  | ||||||
|                                         else if(permissao.intValue() == 5)  // medico
 |  | ||||||
|                                         { |  | ||||||
|                                             sRet = "form_medico";                                         |  | ||||||
|                                         }    |  | ||||||
|                                         else if(permissao.intValue() == 6)  // administrador de loja
 |  | ||||||
|                                         { |  | ||||||
|                                             //sRet = "loja_admin";                                        
 |  | ||||||
|                                         }                                        |  | ||||||
|                                         u.setCodigo_permissao(permissao); |  | ||||||
|                                         getSessionBean1().setCurrentUser( u );  |  | ||||||
|                                         getSessionBean1().setLoggedIn(true); |  | ||||||
|                                         initializeClock();    |  | ||||||
|                                         initializeDropDownOptions();                                         |  | ||||||
| 
 |  | ||||||
|                                         // só para testes. retirar depois :
 |  | ||||||
|                                         ///getSessionBean1().setModoEdicaoUtilizador("new");
 |  | ||||||
|                                         ///sRet = "create_user";                                    
 |  | ||||||
|                                     } |  | ||||||
|                                     catch(Exception e1) |  | ||||||
|                                     { |  | ||||||
|                                         e1.printStackTrace(); |  | ||||||
|                                         getSessionBean1().setMsg("Não tem permissão para entrar na aplicação !"); |  | ||||||
|                                     } |  | ||||||
|                                 }                                 |  | ||||||
| 
 |  | ||||||
|                             } |  | ||||||
|                             else |  | ||||||
|                             { |  | ||||||
|                                 getSessionBean1().setMsg("Utilizador inválido ! ");						    								                                     |  | ||||||
|                             } |  | ||||||
|                         } |  | ||||||
|                         catch(Exception ex) |  | ||||||
|                         { |  | ||||||
|                             getSessionBean1().setMsg("Utilizador inválido ! ");						    								     |  | ||||||
|                         } |  | ||||||
|                     } |  | ||||||
|                     else |  | ||||||
|                     { |  | ||||||
|                         getSessionBean1().setMsg("Falta palavra-chave !");						    				 |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|                 else |  | ||||||
|                 { |  | ||||||
|                     getSessionBean1().setMsg("Falta palavra-chave !");						     |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 getSessionBean1().setMsg("Falta utilizador !");			 |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             getSessionBean1().setMsg("Falta utilizador !"); |  | ||||||
|         } |  | ||||||
|         return sRet; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String lnkPassRecovery_action() { |  | ||||||
|         // TODO: Replace with your code
 |  | ||||||
| 
 |  | ||||||
|         return "recuperar_password"; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private void connect() |  | ||||||
|     { |  | ||||||
| 	db.Db db = new db.Db(); |  | ||||||
| 	try |  | ||||||
| 	{ |  | ||||||
| 	    Connection connection = db.connect(); |  | ||||||
| 	} |  | ||||||
| 	catch(Exception ex) |  | ||||||
| 	{ |  | ||||||
|             getSessionBean1().setMsg("Erro na ligação à Base de Dados");             |  | ||||||
| 	    //***** terminate session 
 |  | ||||||
|             try { |  | ||||||
|                 getExternalContext().redirect("faces/Erro.jsp"); |  | ||||||
|             } catch(Exception e) {   |  | ||||||
|             // . . .  handle exception . . .  
 |  | ||||||
|                 e.printStackTrace(); |  | ||||||
|             } |  | ||||||
| 	    ex.printStackTrace(); |  | ||||||
| 	} |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private void initializeClock() |  | ||||||
|     { |  | ||||||
|         com.sun.rave.web.ui.model.Option[] horasOptions = new com.sun.rave.web.ui.model.Option[24];         |  | ||||||
|         for(int i=0; i < 24; i++) |  | ||||||
|         { |  | ||||||
|              |  | ||||||
|             horasOptions[i] = new Option(new Integer(i), new Integer(i).toString()); |  | ||||||
|         }     |  | ||||||
|         getSessionBean1().setHorasOptions(horasOptions); |  | ||||||
|          |  | ||||||
|         com.sun.rave.web.ui.model.Option[] minutosOptions = new com.sun.rave.web.ui.model.Option[12];         |  | ||||||
|         int j = 0; |  | ||||||
|         for(int i=0; i < 12; i++) |  | ||||||
|         { |  | ||||||
|              |  | ||||||
|             minutosOptions[i] = new Option(new Integer(j), new Integer(j).toString()); |  | ||||||
|             j += 5; |  | ||||||
|         }     |  | ||||||
|         getSessionBean1().setMinutosOptions(minutosOptions);         |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private void initializeDropDownOptions() |  | ||||||
|     { |  | ||||||
|            UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); |  | ||||||
|            try |  | ||||||
|            { |  | ||||||
|                 getSessionBean1().setTecnicosOptions(udp.getTecnicosSaudeList());     |  | ||||||
|                 //drpTipo.setSelected(new Integer(0));
 |  | ||||||
|            } |  | ||||||
|            catch(Exception ex) |  | ||||||
|            { |  | ||||||
|                ex.printStackTrace(); |  | ||||||
|            }             |  | ||||||
|             |  | ||||||
|            try |  | ||||||
|            { |  | ||||||
|                 getSessionBean1().setMedicosOptions(udp.getMedicosList());     |  | ||||||
|                 //drpTipo.setSelected(new Integer(0));
 |  | ||||||
|            } |  | ||||||
|            catch(Exception ex) |  | ||||||
|            { |  | ||||||
|                ex.printStackTrace(); |  | ||||||
|            }                        |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| @ -1,53 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Medico.java |  | ||||||
|  * |  | ||||||
|  * Created on October 12, 2007, 11:00 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Medico { |  | ||||||
|     private Integer id; |  | ||||||
|     private String nome; |  | ||||||
|     private String numero_cedula; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Medico */ |  | ||||||
|     public Medico() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome() { |  | ||||||
|         return nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome(String nome) { |  | ||||||
|         this.nome = nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNumero_cedula() { |  | ||||||
|         return numero_cedula; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNumero_cedula(String numero_cedula) { |  | ||||||
|         this.numero_cedula = numero_cedula; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public String toString() {     |  | ||||||
|         return utils.Utils.unicodeToHTML(nome); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,49 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Medida.java |  | ||||||
|  * |  | ||||||
|  * Created on October 19, 2007, 4:59 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Medida { |  | ||||||
|     private Integer id; |  | ||||||
|     private Integer analise_id; |  | ||||||
|     private String medida; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Medida */ |  | ||||||
|     public Medida() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getAnalise_id() { |  | ||||||
|         return analise_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalise_id(Integer analise_id) { |  | ||||||
|         this.analise_id = analise_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getMedida() { |  | ||||||
|         return medida; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMedida(String medida) { |  | ||||||
|         this.medida = medida; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,49 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Permissao.java |  | ||||||
|  * |  | ||||||
|  * Created on October 25, 2007, 4:40 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Permissao { |  | ||||||
|     private Integer id; |  | ||||||
|     private Integer user_id; |  | ||||||
|     private Integer codigo_permissao; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Permissao */ |  | ||||||
|     public Permissao() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getUser_id() { |  | ||||||
|         return user_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setUser_id(Integer user_id) { |  | ||||||
|         this.user_id = user_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getCodigo_permissao() { |  | ||||||
|         return codigo_permissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCodigo_permissao(Integer codigo_permissao) { |  | ||||||
|         this.codigo_permissao = codigo_permissao; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,49 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Recomendacao.java |  | ||||||
|  * |  | ||||||
|  * Created on October 16, 2007, 3:13 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Recomendacao { |  | ||||||
|     private Integer id; |  | ||||||
|     private Integer analise_id; |  | ||||||
|     private String recomendacao; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Recomendacao */ |  | ||||||
|     public Recomendacao() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getAnalise_id() { |  | ||||||
|         return analise_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalise_id(Integer analise_id) { |  | ||||||
|         this.analise_id = analise_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getRecomendacao() { |  | ||||||
|         return recomendacao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setRecomendacao(String recomendacao) { |  | ||||||
|         this.recomendacao = recomendacao; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,525 +0,0 @@ | |||||||
| /* |  | ||||||
|  * RecuperarPassword.java |  | ||||||
|  * |  | ||||||
|  * Created on September 19, 2007, 9:57 AM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractPageBean; |  | ||||||
| import com.sun.rave.web.ui.component.Body; |  | ||||||
| import com.sun.rave.web.ui.component.Button; |  | ||||||
| import com.sun.rave.web.ui.component.Form; |  | ||||||
| import com.sun.rave.web.ui.component.Head; |  | ||||||
| import com.sun.rave.web.ui.component.Html; |  | ||||||
| import com.sun.rave.web.ui.component.Link; |  | ||||||
| import com.sun.rave.web.ui.component.Page; |  | ||||||
| import com.sun.rave.web.ui.component.PanelGroup; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import com.sun.rave.web.ui.component.TextField; |  | ||||||
| import db.UtilizadoresDataProvider; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.util.Properties; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| import javax.mail.BodyPart; |  | ||||||
| import javax.mail.Message; |  | ||||||
| import javax.mail.Multipart; |  | ||||||
| import javax.mail.Session; |  | ||||||
| import javax.mail.Transport; |  | ||||||
| import javax.mail.internet.InternetAddress; |  | ||||||
| import javax.mail.internet.MimeBodyPart; |  | ||||||
| import javax.mail.internet.MimeMessage; |  | ||||||
| import javax.mail.internet.MimeMultipart; |  | ||||||
| import utils.Utils; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Page bean that corresponds to a similarly named JSP page.  This |  | ||||||
|  * class contains component definitions (and initialization code) for |  | ||||||
|  * all components that you have defined on this page, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class RecuperarPassword extends AbstractPageBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Page page1 = new Page(); |  | ||||||
|      |  | ||||||
|     public Page getPage1() { |  | ||||||
|         return page1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setPage1(Page p) { |  | ||||||
|         this.page1 = p; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Html html1 = new Html(); |  | ||||||
|      |  | ||||||
|     public Html getHtml1() { |  | ||||||
|         return html1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHtml1(Html h) { |  | ||||||
|         this.html1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Head head1 = new Head(); |  | ||||||
|      |  | ||||||
|     public Head getHead1() { |  | ||||||
|         return head1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setHead1(Head h) { |  | ||||||
|         this.head1 = h; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Link link1 = new Link(); |  | ||||||
|      |  | ||||||
|     public Link getLink1() { |  | ||||||
|         return link1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setLink1(Link l) { |  | ||||||
|         this.link1 = l; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Body body1 = new Body(); |  | ||||||
|      |  | ||||||
|     public Body getBody1() { |  | ||||||
|         return body1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setBody1(Body b) { |  | ||||||
|         this.body1 = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Form form1 = new Form(); |  | ||||||
|      |  | ||||||
|     public Form getForm1() { |  | ||||||
|         return form1; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void setForm1(Form f) { |  | ||||||
|         this.form1 = f; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel2() { |  | ||||||
|         return gridPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel2(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel2 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel3() { |  | ||||||
|         return gridPanel3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel3(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel3 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText txtMsg = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getTxtMsg() { |  | ||||||
|         return txtMsg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtMsg(StaticText st) { |  | ||||||
|         this.txtMsg = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText3 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText3() { |  | ||||||
|         return staticText3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText3(StaticText st) { |  | ||||||
|         this.staticText3 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel4() { |  | ||||||
|         return gridPanel4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel4(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel4 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText1 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText1() { |  | ||||||
|         return staticText1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText1(StaticText st) { |  | ||||||
|         this.staticText1 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private TextField txtUtilizador = new TextField(); |  | ||||||
| 
 |  | ||||||
|     public TextField getTxtUtilizador() { |  | ||||||
|         return txtUtilizador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtUtilizador(TextField tf) { |  | ||||||
|         this.txtUtilizador = tf; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText2() { |  | ||||||
|         return staticText2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText2(StaticText st) { |  | ||||||
|         this.staticText2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private TextField txtEmail = new TextField(); |  | ||||||
| 
 |  | ||||||
|     public TextField getTxtEmail() { |  | ||||||
|         return txtEmail; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTxtEmail(TextField tf) { |  | ||||||
|         this.txtEmail = tf; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel5() { |  | ||||||
|         return gridPanel5; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel5(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel5 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel1 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel1() { |  | ||||||
|         return groupPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel1(PanelGroup pg) { |  | ||||||
|         this.groupPanel1 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Button butCancelar = new Button(); |  | ||||||
| 
 |  | ||||||
|     public Button getButCancelar() { |  | ||||||
|         return butCancelar; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setButCancelar(Button b) { |  | ||||||
|         this.butCancelar = b; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Button butOk = new Button(); |  | ||||||
| 
 |  | ||||||
|     public Button getButOk() { |  | ||||||
|         return butOk; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setButOk(Button b) { |  | ||||||
|         this.butOk = b; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new Page bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public RecuperarPassword() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page is navigated to, |  | ||||||
|      * either directly via a URL, or indirectly via page navigation. |  | ||||||
|      * Customize this method to acquire resources that will be needed |  | ||||||
|      * for event handlers and lifecycle methods, whether or not this |  | ||||||
|      * page is performing post back processing.</p> |  | ||||||
|      * |  | ||||||
|      * <p>Note that, if the current request is a postback, the property |  | ||||||
|      * values of the components do <strong>not</strong> represent any |  | ||||||
|      * values submitted with this request.  Instead, they represent the |  | ||||||
|      * property values that were saved for this view when it was rendered.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("RecuperarPassword Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
| //	if (!getSessionBean1().isLoggedIn()) {
 |  | ||||||
| //	    try {
 |  | ||||||
| //		getExternalContext().redirect("Login.jsp");
 |  | ||||||
| //	    } catch(Exception e) {  
 |  | ||||||
| //	    // . . .  handle exception . . .              
 |  | ||||||
| //	    }
 |  | ||||||
| //	}	        
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after the component tree has been |  | ||||||
|      * restored, but before any event processing takes place.  This method |  | ||||||
|      * will <strong>only</strong> be called on a postback request that |  | ||||||
|      * is processing a form submit.  Customize this method to allocate |  | ||||||
|      * resources that will be required in your event handlers.</p> |  | ||||||
|      */ |  | ||||||
|     public void preprocess() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called just before rendering takes place. |  | ||||||
|      * This method will <strong>only</strong> be called for the page that |  | ||||||
|      * will actually be rendered (and not, for example, on a page that |  | ||||||
|      * handled a postback and then navigated to a different page).  Customize |  | ||||||
|      * this method to allocate resources that will be required for rendering |  | ||||||
|      * this page.</p> |  | ||||||
|      */ |  | ||||||
|     public void prerender() { |  | ||||||
|         txtMsg.setText(getSessionBean1().getMsg()); |  | ||||||
|         getSessionBean1().setMsg(""); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called (regardless of whether |  | ||||||
|      * or not this was the page that was actually rendered).  Customize this |  | ||||||
|      * method to release resources acquired in the <code>init()</code>, |  | ||||||
|      * <code>preprocess()</code>, or <code>prerender()</code> methods (or |  | ||||||
|      * acquired during execution of an event handler).</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butLogin_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String butCancelar_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|         return "login"; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public String butOk_action() { |  | ||||||
|         // TODO: Process the button click action. Return value is a navigation
 |  | ||||||
|         // case name where null will return to the same page.
 |  | ||||||
|          |  | ||||||
|          |  | ||||||
|         if(fieldsValidationOk()) |  | ||||||
|         { |  | ||||||
|             UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); |  | ||||||
|             try |  | ||||||
|             { |  | ||||||
|                 String utilizador = (String) txtUtilizador.getText(); |  | ||||||
|                 Utilizador u = udp.getUtilizador(utilizador); |  | ||||||
|                 String email = (String) txtEmail.getText(); |  | ||||||
|                 if(u.getEmail().equals(email)) |  | ||||||
|                 { |  | ||||||
|                     //send mail :
 |  | ||||||
|                     try |  | ||||||
|                     { |  | ||||||
|                         sendEmail(u.getEmail(), u.getLogin(), u.getPassword(), "linojose@mail.com");                         |  | ||||||
|                         getSessionBean1().setMsg("A sua password foi enviada para o seu email");                         |  | ||||||
|                         return "login"; |  | ||||||
|                     } |  | ||||||
|                     catch(Exception ex) |  | ||||||
|                     { |  | ||||||
|                         getSessionBean1().setMsg("Erro no envio da password !");                         |  | ||||||
|                     } |  | ||||||
| 
 |  | ||||||
|                 } |  | ||||||
|                 else |  | ||||||
|                 { |  | ||||||
|                     getSessionBean1().setMsg("Os dados não coincidem com os registos !"); |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|             catch(Exception ex) |  | ||||||
|             { |  | ||||||
|                 getSessionBean1().setMsg("Utilizador inválido !");                 |  | ||||||
|             } |  | ||||||
|         }     |  | ||||||
|          |  | ||||||
|          |  | ||||||
|         return null; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|   private void sendEmail(String emailTo, String login, String password, String admin_email) throws Exception |  | ||||||
|   { |  | ||||||
|         Properties props = new Properties();  |  | ||||||
|         //props.put("mail.transport.protocol", "smtp"); 
 |  | ||||||
|         props.put("mail.smtp.host", "smtp.netcabo.pt");  |  | ||||||
|         props.put("mail.from", admin_email);  |  | ||||||
|         Session session1 = Session.getInstance(props);  |  | ||||||
|         Message msg = new MimeMessage(session1);  |  | ||||||
| 
 |  | ||||||
| //    try 
 |  | ||||||
| //    { 
 |  | ||||||
|         //Address Email_TO = new InternetAddress("myemail@bol.com.br");         
 |  | ||||||
|         msg.setFrom(new InternetAddress(admin_email)); |  | ||||||
|         InternetAddress[] address = {new InternetAddress(emailTo)}; |  | ||||||
|         msg.setRecipients(Message.RecipientType.TO, address); |  | ||||||
|         msg.setSubject("Envio da password"); |  | ||||||
|         msg.setSentDate(new Date());  |  | ||||||
|         Multipart multipart = new MimeMultipart(); |  | ||||||
|         BodyPart msgBodyPart = new MimeBodyPart(); |  | ||||||
|         String html;     |  | ||||||
|         html="<html><head>  <meta content='text/html;charset=ISO-8859-1' http-equiv='Content-Type'></head>"; |  | ||||||
|         html+="<body bgcolor='#ffffff' text='#000000'>"; |  | ||||||
|         html+="<h3>Envio da password de " + login + " :</h3>"; |  | ||||||
|         html+="<p>Password: " + password + "</p>";  |  | ||||||
|         html+="<body></html>"; |  | ||||||
|         msgBodyPart.setContent(html, "text/html"); |  | ||||||
|         multipart.addBodyPart(msgBodyPart); |  | ||||||
|         msg.setContent(multipart);            |  | ||||||
|         Transport.send(msg);  |  | ||||||
|         System.out.println("Email Enviado !!!! " + emailTo + ", " + login);  |  | ||||||
| //    } 
 |  | ||||||
| //    catch (Exception ex)
 |  | ||||||
| //    { 
 |  | ||||||
| //        System.out.println("MAIL ERROR : " + ex.getMessage());
 |  | ||||||
| //        ex.printStackTrace(); 
 |  | ||||||
| //    } 
 |  | ||||||
|        |  | ||||||
|   }     |  | ||||||
|      |  | ||||||
|     private boolean fieldsValidationOk() |  | ||||||
|     { |  | ||||||
|         if(txtUtilizador.getText() != null) |  | ||||||
|         { |  | ||||||
|             String utilizador = (String) txtUtilizador.getText(); |  | ||||||
|             if(utilizador.trim().length() == 0) |  | ||||||
|             { |  | ||||||
|                 getSessionBean1().setMsg("Falta utilizador !"); |  | ||||||
|                 return false; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             getSessionBean1().setMsg("Falta utilizador !"); |  | ||||||
|             return false;             |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         if(txtEmail.getText() != null) |  | ||||||
|         { |  | ||||||
|             String email = (String) txtEmail.getText(); |  | ||||||
|             if(email.trim().length() == 0) |  | ||||||
|             { |  | ||||||
|                 getSessionBean1().setMsg("Falta email !"); |  | ||||||
|                 return false; |  | ||||||
|             } |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 if(! Utils.isValidEmail(email)) |  | ||||||
|                 { |  | ||||||
|                     getSessionBean1().setMsg("Email inválido !"); |  | ||||||
|                     return false; |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             getSessionBean1().setMsg("Falta email !"); |  | ||||||
|             return false;             |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         return true; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| //    private boolean isValidEmail(String email){
 |  | ||||||
| //        boolean res = true;
 |  | ||||||
| //        
 |  | ||||||
| //        int indexOfAtChar=email.indexOf("@");
 |  | ||||||
| //
 |  | ||||||
| //        if(indexOfAtChar > 0)
 |  | ||||||
| //        {
 |  | ||||||
| //            int indexOfDotChar =
 |  | ||||||
| //                email.indexOf(".",indexOfAtChar);
 |  | ||||||
| //            if(indexOfDotChar > 0)
 |  | ||||||
| //            {
 |  | ||||||
| //              res = true;
 |  | ||||||
| //            }
 |  | ||||||
| //            else
 |  | ||||||
| //            {
 |  | ||||||
| //                res = false;
 |  | ||||||
| //            }
 |  | ||||||
| //        }
 |  | ||||||
| //        else{
 |  | ||||||
| //            res = false;
 |  | ||||||
| //        }        
 |  | ||||||
| //        return res;
 |  | ||||||
| //    }        
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| @ -1,100 +0,0 @@ | |||||||
| /* |  | ||||||
|  * RequestBean1.java |  | ||||||
|  * |  | ||||||
|  * Created on September 18, 2007, 3:14 PM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractRequestBean; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Request scope data bean for your application.  Create properties |  | ||||||
|  *  here to represent data that should be made available across different |  | ||||||
|  *  pages in the same HTTP request, so that the page bean classes do not |  | ||||||
|  *  have to be directly linked to each other.</p> |  | ||||||
|  * |  | ||||||
|  * <p>An instance of this class will be created for you automatically, |  | ||||||
|  * the first time your application evaluates a value binding expression |  | ||||||
|  * or method binding expression that references a managed bean using |  | ||||||
|  * this class.</p> |  | ||||||
|  */ |  | ||||||
| public class RequestBean1 extends AbstractRequestBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new request data bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public RequestBean1() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when this bean is initially added to |  | ||||||
|      * request scope.  Typically, this occurs as a result of evaluating |  | ||||||
|      * a value binding or method binding expression, which utilizes the |  | ||||||
|      * managed bean facility to instantiate this bean and store it into |  | ||||||
|      * request scope.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to allocate resources that are required |  | ||||||
|      * for the lifetime of the current request.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("RequestBean1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when this bean is removed from |  | ||||||
|      * request scope.  This occurs automatically when the corresponding |  | ||||||
|      * HTTP response has been completed and sent to the client.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to clean up resources allocated |  | ||||||
|      * during the execution of the <code>init()</code> method, or |  | ||||||
|      * at any later time during the lifetime of the request.</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,459 +0,0 @@ | |||||||
| /* |  | ||||||
|  * SessionBean1.java |  | ||||||
|  * |  | ||||||
|  * Created on September 18, 2007, 3:14 PM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractSessionBean; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import pagestate.AnaliseAcidenteTrabalhoState; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Session scope data bean for your application.  Create properties |  | ||||||
|  *  here to represent cached data that should be made available across |  | ||||||
|  *  multiple HTTP requests for an individual user.</p> |  | ||||||
|  * |  | ||||||
|  * <p>An instance of this class will be created for you automatically, |  | ||||||
|  * the first time your application evaluates a value binding expression |  | ||||||
|  * or method binding expression that references a managed bean using |  | ||||||
|  * this class.</p> |  | ||||||
|  */ |  | ||||||
| public class SessionBean1 extends AbstractSessionBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Construct a new session data bean instance.</p> |  | ||||||
|      */ |  | ||||||
|     public SessionBean1() { |  | ||||||
|         msg = new String(""); |  | ||||||
|         currentUser = new Utilizador(); |  | ||||||
|         analisesActualDataProvider = new db.AnalisesActualDataProvider(); |  | ||||||
|         analisesSeguimentoDataProvider = new db.AnalisesSeguimentoDataProvider();         |  | ||||||
|         analisesConcluidasDataProvider = new db.AnalisesConcluidasDataProvider(); |  | ||||||
|         trabalhadoresListDataProvider = new db.TrabalhadoresListDataProvider(); |  | ||||||
|          |  | ||||||
|         setNavFrom(""); |  | ||||||
|         setAcidentado(null); |  | ||||||
|         setCurrentAnalise(null); |  | ||||||
|         setLoggedIn(false); |  | ||||||
|          |  | ||||||
|         modoEdicaoUtilizador = ""; |  | ||||||
|         setIdSequence(1); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when this bean is initially added to |  | ||||||
|      * session scope.  Typically, this occurs as a result of evaluating |  | ||||||
|      * a value binding or method binding expression, which utilizes the |  | ||||||
|      * managed bean facility to instantiate this bean and store it into |  | ||||||
|      * session scope.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to initialize and cache data values |  | ||||||
|      * or resources that are required for the lifetime of a particular |  | ||||||
|      * user session.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("SessionBean1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when the session containing it is about to be |  | ||||||
|      * passivated.  Typically, this occurs in a distributed servlet container |  | ||||||
|      * when the session is about to be transferred to a different |  | ||||||
|      * container instance, after which the <code>activate()</code> method |  | ||||||
|      * will be called to indicate that the transfer is complete.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to release references to session data |  | ||||||
|      * or resources that can not be serialized with the session itself.</p> |  | ||||||
|      */ |  | ||||||
|     public void passivate() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when the session containing it was |  | ||||||
|      * reactivated.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to reacquire references to session |  | ||||||
|      * data or resources that could not be serialized with the |  | ||||||
|      * session itself.</p> |  | ||||||
|      */ |  | ||||||
|     public void activate() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>This method is called when this bean is removed from |  | ||||||
|      * session scope.  Typically, this occurs as a result of |  | ||||||
|      * the session timing out or being terminated by the application.</p> |  | ||||||
|      * |  | ||||||
|      * <p>You may customize this method to clean up resources allocated |  | ||||||
|      * during the execution of the <code>init()</code> method, or |  | ||||||
|      * at any later time during the lifetime of the application.</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private String msg; |  | ||||||
| 
 |  | ||||||
|     public String getMsg() { |  | ||||||
|         return msg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMsg(String msg) { |  | ||||||
|         this.msg = msg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Utilizador currentUser; |  | ||||||
| 
 |  | ||||||
|     public Utilizador getCurrentUser() { |  | ||||||
|         return currentUser; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCurrentUser(Utilizador currentUser) { |  | ||||||
|         this.currentUser = currentUser; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private db.AnalisesActualDataProvider analisesActualDataProvider; |  | ||||||
|     private db.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider;     |  | ||||||
|     private db.AnalisesConcluidasDataProvider analisesConcluidasDataProvider;     |  | ||||||
|     private db.TrabalhadoresListDataProvider trabalhadoresListDataProvider;         |  | ||||||
| 
 |  | ||||||
|     public db.AnalisesActualDataProvider getAnalisesActualDataProvider() { |  | ||||||
|         return analisesActualDataProvider; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalisesActualDataProvider(db.AnalisesActualDataProvider analisesActualDataProvider) { |  | ||||||
|         this.analisesActualDataProvider = analisesActualDataProvider; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public db.AnalisesSeguimentoDataProvider getAnalisesSeguimentoDataProvider() { |  | ||||||
|         return analisesSeguimentoDataProvider; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalisesSeguimentoDataProvider(db.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider) { |  | ||||||
|         this.analisesSeguimentoDataProvider = analisesSeguimentoDataProvider; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public db.AnalisesConcluidasDataProvider getAnalisesConcluidasDataProvider() { |  | ||||||
|         return analisesConcluidasDataProvider; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalisesConcluidasDataProvider(db.AnalisesConcluidasDataProvider analisesConcluidasDataProvider) { |  | ||||||
|         this.analisesConcluidasDataProvider = analisesConcluidasDataProvider; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public db.TrabalhadoresListDataProvider getTrabalhadoresListDataProvider() { |  | ||||||
|         return trabalhadoresListDataProvider; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTrabalhadoresListDataProvider(db.TrabalhadoresListDataProvider trabalhadoresListDataProvider) { |  | ||||||
|         this.trabalhadoresListDataProvider = trabalhadoresListDataProvider; |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] anoOptions; |  | ||||||
| 
 |  | ||||||
|     private Integer anoChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getAnoChoice() { |  | ||||||
|         return anoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnoChoice(Integer anoChoice) { |  | ||||||
|         this.anoChoice = anoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getAnoOptions() { |  | ||||||
|         return anoOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnoOptions(com.sun.rave.web.ui.model.Option[] anoOptions) { |  | ||||||
|         this.anoOptions = anoOptions; |  | ||||||
|     }         |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] mesOptions; |  | ||||||
| 
 |  | ||||||
|     private Integer mesChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getMesChoice() { |  | ||||||
|         return mesChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMesChoice(Integer mesChoice) { |  | ||||||
|         this.mesChoice = mesChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getMesOptions() { |  | ||||||
|         return mesOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMesOptions(com.sun.rave.web.ui.model.Option[] mesOptions) { |  | ||||||
|         this.mesOptions = mesOptions; |  | ||||||
|     }             |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] diaOptions; |  | ||||||
| 
 |  | ||||||
|     private Integer diaChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getDiaChoice() { |  | ||||||
|         return diaChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setDiaChoice(Integer diaChoice) { |  | ||||||
|         this.diaChoice = diaChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getDiaOptions() { |  | ||||||
|         return diaOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setDiaOptions(com.sun.rave.web.ui.model.Option[] diaOptions) { |  | ||||||
|         this.diaOptions = diaOptions; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private String imageName; |  | ||||||
| 
 |  | ||||||
|     public String getImageName() { |  | ||||||
|         return imageName; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImageName(String imageName) { |  | ||||||
|         this.imageName = imageName; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private String navFrom; |  | ||||||
| 
 |  | ||||||
|     public String getNavFrom() { |  | ||||||
|         return navFrom; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNavFrom(String navFrom) { |  | ||||||
|         this.navFrom = navFrom; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Acidentado acidentado; |  | ||||||
| 
 |  | ||||||
|     public Acidentado getAcidentado() { |  | ||||||
|         return acidentado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAcidentado(Acidentado acidentado) { |  | ||||||
|         this.acidentado = acidentado; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state; |  | ||||||
| 
 |  | ||||||
|     public AnaliseAcidenteTrabalhoState getAnalise_acidente_trabalho_state() { |  | ||||||
|         return analise_acidente_trabalho_state; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAnalise_acidente_trabalho_state(AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state) { |  | ||||||
|         this.analise_acidente_trabalho_state = analise_acidente_trabalho_state; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private AnaliseAcidente currentAnalise; |  | ||||||
| 
 |  | ||||||
|     public AnaliseAcidente getCurrentAnalise() { |  | ||||||
|         return currentAnalise; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCurrentAnalise(AnaliseAcidente currentAnalise) { |  | ||||||
|         this.currentAnalise = currentAnalise; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private boolean loggedIn; |  | ||||||
| 
 |  | ||||||
|     public boolean isLoggedIn() |  | ||||||
|     { |  | ||||||
|             return loggedIn; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLoggedIn(boolean loggedIn) |  | ||||||
|     { |  | ||||||
|             this.loggedIn = loggedIn; |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
|     private String modoEdicaoUtilizador; |  | ||||||
| 
 |  | ||||||
|     public String getModoEdicaoUtilizador() { |  | ||||||
|         return modoEdicaoUtilizador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setModoEdicaoUtilizador(String modoEdicaoUtilizador) { |  | ||||||
|         this.modoEdicaoUtilizador = modoEdicaoUtilizador; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Integer tipoChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getTipoChoice() { |  | ||||||
|         return tipoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTipoChoice(Integer tipoChoice) { |  | ||||||
|         this.tipoChoice = tipoChoice; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] tiposOptions;     |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getTiposOptions() { |  | ||||||
|         return tiposOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTiposOptions(com.sun.rave.web.ui.model.Option[] tiposOptions) { |  | ||||||
|         this.tiposOptions = tiposOptions; |  | ||||||
|     }         |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     private Integer estabelecimentoChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getEstabelecimentoChoice() { |  | ||||||
|         return estabelecimentoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstabelecimentoChoice(Integer estabelecimentoChoice) { |  | ||||||
|         this.estabelecimentoChoice = estabelecimentoChoice; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] estabelecimentosOptions;     |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getEstabelecimentosOptions() { |  | ||||||
|         return estabelecimentosOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstabelecimentosOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosOptions) { |  | ||||||
|         this.estabelecimentosOptions = estabelecimentosOptions; |  | ||||||
|     }  |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     private Integer tecnicoChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getTecnicoChoice() { |  | ||||||
|         return tecnicoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTecnicoChoice(Integer tecnicoChoice) { |  | ||||||
|         this.tecnicoChoice = tecnicoChoice; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] tecnicosOptions;     |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getTecnicosOptions() { |  | ||||||
|         return tecnicosOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTecnicosOptions(com.sun.rave.web.ui.model.Option[] tecnicosOptions) { |  | ||||||
|         this.tecnicosOptions = tecnicosOptions; |  | ||||||
|     }  |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     private Integer medicoChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getMedicoChoice() { |  | ||||||
|         return medicoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMedicoChoice(Integer medicoChoice) { |  | ||||||
|         this.medicoChoice = medicoChoice; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] medicosOptions;     |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getMedicosOptions() { |  | ||||||
|         return medicosOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMedicosOptions(com.sun.rave.web.ui.model.Option[] medicosOptions) { |  | ||||||
|         this.medicosOptions = medicosOptions; |  | ||||||
|     }  |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     // Clock :
 |  | ||||||
|     private Integer horaChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getHoraChoice() { |  | ||||||
|         return horaChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHoraChoice(Integer horaChoice) { |  | ||||||
|         this.horaChoice = horaChoice; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] horasOptions;     |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getHorasOptions() { |  | ||||||
|         return horasOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHorasOptions(com.sun.rave.web.ui.model.Option[] horasOptions) { |  | ||||||
|         this.horasOptions = horasOptions; |  | ||||||
|     }      |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     private Integer minutoChoice; |  | ||||||
| 
 |  | ||||||
|     public Integer getMinutoChoice() { |  | ||||||
|         return minutoChoice; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMinutoChoice(Integer minutoChoice) { |  | ||||||
|         this.minutoChoice = minutoChoice; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private com.sun.rave.web.ui.model.Option[] minutosOptions;     |  | ||||||
| 
 |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getMinutosOptions() { |  | ||||||
|         return minutosOptions; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMinutosOptions(com.sun.rave.web.ui.model.Option[] minutosOptions) { |  | ||||||
|         this.minutosOptions = minutosOptions; |  | ||||||
|     }        |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     private int idSequence; |  | ||||||
| 
 |  | ||||||
|     public int getIdSequence() { |  | ||||||
|         return idSequence; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setIdSequence(int idSequence) { |  | ||||||
|         this.idSequence = idSequence; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,44 +0,0 @@ | |||||||
| /* |  | ||||||
|  * TecnicoSaude.java |  | ||||||
|  * |  | ||||||
|  * Created on October 12, 2007, 11:00 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class TecnicoSaude { |  | ||||||
|     private Integer id; |  | ||||||
|     private String nome; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of TecnicoSaude */ |  | ||||||
|     public TecnicoSaude() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome() { |  | ||||||
|         return nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome(String nome) { |  | ||||||
|         this.nome = nome; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public String toString() {     |  | ||||||
|         return utils.Utils.unicodeToHTML(nome); |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,67 +0,0 @@ | |||||||
| /* |  | ||||||
|  * TipoUtilizador.java |  | ||||||
|  * |  | ||||||
|  * Created on October 11, 2007, 4:32 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
|      |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class TipoUtilizador { |  | ||||||
|     private Integer id; |  | ||||||
|     private Integer tipo; |  | ||||||
|     private String descricao; |  | ||||||
|     private String activo; |  | ||||||
|     private Integer ordem; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of TipoUtilizador */ |  | ||||||
|     public TipoUtilizador() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getTipo() { |  | ||||||
|         return tipo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTipo(Integer tipo) { |  | ||||||
|         this.tipo = tipo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getDescricao() { |  | ||||||
|         return descricao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setDescricao(String descricao) { |  | ||||||
|         this.descricao = descricao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getActivo() { |  | ||||||
|         return activo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setActivo(String activo) { |  | ||||||
|         this.activo = activo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getOrdem() { |  | ||||||
|         return ordem; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setOrdem(Integer ordem) { |  | ||||||
|         this.ordem = ordem; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,203 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Top.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 11:04 AM |  | ||||||
|  * Copyright lluis |  | ||||||
|  */ |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| import com.sun.rave.web.ui.appbase.AbstractFragmentBean; |  | ||||||
| import com.sun.rave.web.ui.component.Hyperlink; |  | ||||||
| import com.sun.rave.web.ui.component.ImageComponent; |  | ||||||
| import com.sun.rave.web.ui.component.PanelGroup; |  | ||||||
| import com.sun.rave.web.ui.component.StaticText; |  | ||||||
| import javax.faces.FacesException; |  | ||||||
| import javax.faces.component.html.HtmlPanelGrid; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * <p>Fragment bean that corresponds to a similarly named JSP page |  | ||||||
|  * fragment.  This class contains component definitions (and initialization |  | ||||||
|  * code) for all components that you have defined on this fragment, as well as |  | ||||||
|  * lifecycle methods and event handlers where you may add behavior |  | ||||||
|  * to respond to incoming events.</p> |  | ||||||
|  */ |  | ||||||
| public class Top extends AbstractFragmentBean { |  | ||||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 |  | ||||||
|     private int __placeholder; |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Automatically managed component initialization. <strong>WARNING:</strong> |  | ||||||
|      * This method is automatically generated, so any user-specified code inserted |  | ||||||
|      * here is subject to being replaced.</p> |  | ||||||
|      */ |  | ||||||
|     private void _init() throws Exception { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); |  | ||||||
| 
 |  | ||||||
|     public HtmlPanelGrid getGridPanel1() { |  | ||||||
|         return gridPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { |  | ||||||
|         this.gridPanel1 = hpg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel1 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel1() { |  | ||||||
|         return groupPanel1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel1(PanelGroup pg) { |  | ||||||
|         this.groupPanel1 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image1 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage1() { |  | ||||||
|         return image1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage1(ImageComponent ic) { |  | ||||||
|         this.image1 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private ImageComponent image2 = new ImageComponent(); |  | ||||||
| 
 |  | ||||||
|     public ImageComponent getImage2() { |  | ||||||
|         return image2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setImage2(ImageComponent ic) { |  | ||||||
|         this.image2 = ic; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PanelGroup groupPanel2 = new PanelGroup(); |  | ||||||
| 
 |  | ||||||
|     public PanelGroup getGroupPanel2() { |  | ||||||
|         return groupPanel2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setGroupPanel2(PanelGroup pg) { |  | ||||||
|         this.groupPanel2 = pg; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText lblUser = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getLblUser() { |  | ||||||
|         return lblUser; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLblUser(StaticText st) { |  | ||||||
|         this.lblUser = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText2 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText2() { |  | ||||||
|         return staticText2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText2(StaticText st) { |  | ||||||
|         this.staticText2 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkChangePassword = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkChangePassword() { |  | ||||||
|         return lnkChangePassword; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkChangePassword(Hyperlink h) { |  | ||||||
|         this.lnkChangePassword = h; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private StaticText staticText3 = new StaticText(); |  | ||||||
| 
 |  | ||||||
|     public StaticText getStaticText3() { |  | ||||||
|         return staticText3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setStaticText3(StaticText st) { |  | ||||||
|         this.staticText3 = st; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private Hyperlink lnkLogout = new Hyperlink(); |  | ||||||
| 
 |  | ||||||
|     public Hyperlink getLnkLogout() { |  | ||||||
|         return lnkLogout; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLnkLogout(Hyperlink h) { |  | ||||||
|         this.lnkLogout = h; |  | ||||||
|     } |  | ||||||
|     // </editor-fold>
 |  | ||||||
|      |  | ||||||
|     public Top() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called whenever a page containing |  | ||||||
|      * this page fragment is navigated to, either directly via a URL, |  | ||||||
|      * or indirectly via page navigation.  Override this method to acquire |  | ||||||
|      * resources that will be needed for event handlers and lifecycle methods.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation does nothing.</p> |  | ||||||
|      */ |  | ||||||
|     public void init() { |  | ||||||
|         // Perform initializations inherited from our superclass
 |  | ||||||
|         super.init(); |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *before* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialiation code here
 |  | ||||||
|          |  | ||||||
|          |  | ||||||
|         // <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
 |  | ||||||
|         // Initialize automatically managed components
 |  | ||||||
|         // *Note* - this logic should NOT be modified
 |  | ||||||
|         try { |  | ||||||
|             _init(); |  | ||||||
|         } catch (Exception e) { |  | ||||||
|             log("Page1 Initialization Failure", e); |  | ||||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); |  | ||||||
|         } |  | ||||||
|          |  | ||||||
|         // </editor-fold>
 |  | ||||||
|         // Perform application initialization that must complete
 |  | ||||||
|         // *after* managed components are initialized
 |  | ||||||
|         // TODO - add your own initialization code here
 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     /** |  | ||||||
|      * <p>Callback method that is called after rendering is completed for |  | ||||||
|      * this request, if <code>init()</code> was called.  Override this |  | ||||||
|      * method to release resources acquired in the <code>init()</code> |  | ||||||
|      * resources that will be needed for event handlers and lifecycle methods.</p> |  | ||||||
|      * |  | ||||||
|      * <p>The default implementation does nothing.</p> |  | ||||||
|      */ |  | ||||||
|     public void destroy() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected ApplicationBean1 getApplicationBean1() { |  | ||||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected RequestBean1 getRequestBean1() { |  | ||||||
|         return (RequestBean1)getBean("RequestBean1"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * <p>Return a reference to the scoped data bean.</p> |  | ||||||
|      */ |  | ||||||
|     protected SessionBean1 getSessionBean1() { |  | ||||||
|         return (SessionBean1)getBean("SessionBean1"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,77 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Trabalhador.java |  | ||||||
|  * |  | ||||||
|  * Created on September 26, 2007, 4:23 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Trabalhador { |  | ||||||
|     private Integer id; |  | ||||||
|     private String nome; |  | ||||||
|     private java.sql.Date data_nascimento; |  | ||||||
|     private String funcao; |  | ||||||
|     private java.sql.Date data_admissao; |  | ||||||
|     private String numero_mecanografico; |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Trabalhador */ |  | ||||||
|     public Trabalhador() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome() { |  | ||||||
|         return nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome(String nome) { |  | ||||||
|         this.nome = nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public java.sql.Date getData_nascimento() { |  | ||||||
|         return data_nascimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_nascimento(java.sql.Date data_nascimento) { |  | ||||||
|         this.data_nascimento = data_nascimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getFuncao() { |  | ||||||
|         return funcao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFuncao(String funcao) { |  | ||||||
|         this.funcao = funcao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public java.sql.Date getData_admissao() { |  | ||||||
|         return data_admissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_admissao(java.sql.Date data_admissao) { |  | ||||||
|         this.data_admissao = data_admissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNumero_mecanografico() { |  | ||||||
|         return numero_mecanografico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNumero_mecanografico(String numero_mecanografico) { |  | ||||||
|         this.numero_mecanografico = numero_mecanografico; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,161 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Utilizador.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 9:58 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package analiseacidentestrabalho; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Utilizador { |  | ||||||
|     private Integer id; |  | ||||||
|     private String login; |  | ||||||
|     private String password; |  | ||||||
|     private String email; |  | ||||||
|     private Integer empresa_id; |  | ||||||
|     private Integer estabelecimento_id; |  | ||||||
|     private String administrador; |  | ||||||
|     private Integer tipo; |  | ||||||
|     private String numero_cedula; |  | ||||||
|     private String cap; |  | ||||||
|      |  | ||||||
|     private Integer codigo_permissao; |  | ||||||
|      |  | ||||||
|     private String nome; |  | ||||||
|      |  | ||||||
|     private Integer medico_id; |  | ||||||
|     private Integer funcionario_hst_id; |  | ||||||
|      |  | ||||||
|     private String activo; |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Utilizador */ |  | ||||||
|     public Utilizador() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getId() { |  | ||||||
|         return id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setId(Integer id) { |  | ||||||
|         this.id = id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getLogin() { |  | ||||||
|         return login; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLogin(String login) { |  | ||||||
|         this.login = login; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getPassword() { |  | ||||||
|         return password; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setPassword(String password) { |  | ||||||
|         this.password = password; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getEmail() { |  | ||||||
|         return email; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEmail(String email) { |  | ||||||
|         this.email = email; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getEmpresa_id() { |  | ||||||
|         return empresa_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEmpresa_id(Integer empresa_id) { |  | ||||||
|         this.empresa_id = empresa_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getEstabelecimento_id() { |  | ||||||
|         return estabelecimento_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstabelecimento_id(Integer estabelecimento_id) { |  | ||||||
|         this.estabelecimento_id = estabelecimento_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAdministrador() { |  | ||||||
|         return administrador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAdministrador(String administrador) { |  | ||||||
|         this.administrador = administrador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getCodigo_permissao() { |  | ||||||
|         return codigo_permissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCodigo_permissao(Integer codigo_permissao) { |  | ||||||
|         this.codigo_permissao = codigo_permissao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getTipo() { |  | ||||||
|         return tipo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTipo(Integer tipo) { |  | ||||||
|         this.tipo = tipo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNumero_cedula() { |  | ||||||
|         return numero_cedula; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNumero_cedula(String numero_cedula) { |  | ||||||
|         this.numero_cedula = numero_cedula; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getCap() { |  | ||||||
|         return cap; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCap(String cap) { |  | ||||||
|         this.cap = cap; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getNome() { |  | ||||||
|         return nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNome(String nome) { |  | ||||||
|         this.nome = nome; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getMedico_id() { |  | ||||||
|         return medico_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMedico_id(Integer medico_id) { |  | ||||||
|         this.medico_id = medico_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getFuncionario_hst_id() { |  | ||||||
|         return funcionario_hst_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFuncionario_hst_id(Integer funcionario_hst_id) { |  | ||||||
|         this.funcionario_hst_id = funcionario_hst_id; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getActivo() { |  | ||||||
|         return activo; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setActivo(String activo) { |  | ||||||
|         this.activo = activo; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,24 +0,0 @@ | |||||||
| /* |  | ||||||
|  * AnalisesActualDataProvider.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 1:41 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import com.sun.data.provider.impl.ObjectListDataProvider; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class AnalisesActualDataProvider extends ObjectListDataProvider { |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of AnalisesActualDataProvider */ |  | ||||||
|     public AnalisesActualDataProvider() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,24 +0,0 @@ | |||||||
| /* |  | ||||||
|  * AnalisesConcluidasDataProvider.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 1:43 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import com.sun.data.provider.impl.ObjectListDataProvider; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class AnalisesConcluidasDataProvider extends ObjectListDataProvider { |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of AnalisesConcluidasDataProvider */ |  | ||||||
|     public AnalisesConcluidasDataProvider() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,24 +0,0 @@ | |||||||
| /* |  | ||||||
|  * AnalisesSeguimentoDataProvider.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 1:42 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import com.sun.data.provider.impl.ObjectListDataProvider; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class AnalisesSeguimentoDataProvider extends ObjectListDataProvider { |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of AnalisesSeguimentoDataProvider */ |  | ||||||
|     public AnalisesSeguimentoDataProvider() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,58 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Db.java |  | ||||||
|  * |  | ||||||
|  * Created on September 19, 2007, 5:10 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import java.sql.Connection; |  | ||||||
| import java.sql.DriverManager; |  | ||||||
| import java.sql.ResultSet; |  | ||||||
| import java.sql.Statement; |  | ||||||
| import javax.faces.context.FacesContext; |  | ||||||
| import javax.servlet.http.HttpSession; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Db { |  | ||||||
|     String connectionURL = "jdbc:postgresql://storage:5432/siprp"; |  | ||||||
|     String User = "postgres"; |  | ||||||
|     String Pass = null; |  | ||||||
|     Connection connection = null;     |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Db */ |  | ||||||
|     public Db() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public Connection connect() throws Exception |  | ||||||
|     { |  | ||||||
|         Class.forName("org.postgresql.Driver").newInstance(); |  | ||||||
|         connection = DriverManager.getConnection(connectionURL, User, Pass);             |  | ||||||
|         HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);				                 |  | ||||||
|         session.setAttribute("connection", connection); |  | ||||||
|         return connection; |  | ||||||
|     }    |  | ||||||
|      |  | ||||||
|     public Statement createStatement() |  | ||||||
|     { |  | ||||||
|         HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);				         |  | ||||||
|         connection = (Connection) session.getAttribute("connection");         |  | ||||||
|         Statement st; |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             st = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);       		 |  | ||||||
|             return st; |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|             ex.printStackTrace(); |  | ||||||
|             return null; |  | ||||||
|         }		         |  | ||||||
|     }     |  | ||||||
| } |  | ||||||
| @ -1,64 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Dblocal.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 2:07 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import java.sql.Connection; |  | ||||||
| import java.sql.DriverManager; |  | ||||||
| import java.sql.ResultSet; |  | ||||||
| import java.sql.Statement; |  | ||||||
| import javax.faces.context.FacesContext; |  | ||||||
| import javax.servlet.http.HttpSession; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Dblocal { |  | ||||||
|     String connectionURL = "jdbc:postgresql://storage:5432/siprp_local"; |  | ||||||
|     String User = "postgres"; |  | ||||||
|     String Pass = null; |  | ||||||
|     Connection connection = null;     |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Dblocal */ |  | ||||||
|     public Dblocal() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public Connection connect() throws Exception |  | ||||||
|     { |  | ||||||
|         Class.forName("org.postgresql.Driver").newInstance(); |  | ||||||
|         connection = DriverManager.getConnection(connectionURL, User, Pass);             |  | ||||||
|         HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);				                 |  | ||||||
|         session.setAttribute("connection_local", connection); |  | ||||||
|         return connection; |  | ||||||
|     }    |  | ||||||
|      |  | ||||||
|     public Statement createStatement() |  | ||||||
|     { |  | ||||||
|         HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);				         |  | ||||||
|         connection = (Connection) session.getAttribute("connection_local");         |  | ||||||
|         Statement st; |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             st = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);       		 |  | ||||||
|             return st; |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|             ex.printStackTrace(); |  | ||||||
|             return null; |  | ||||||
|         }		         |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
|     public void close() throws Exception |  | ||||||
|     { |  | ||||||
|         connection.close(); |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,24 +0,0 @@ | |||||||
| /* |  | ||||||
|  * TrabalhadoresListDataProvider.java |  | ||||||
|  * |  | ||||||
|  * Created on September 26, 2007, 4:25 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import com.sun.data.provider.impl.ObjectListDataProvider; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class TrabalhadoresListDataProvider extends ObjectListDataProvider { |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of TrabalhadoresListDataProvider */ |  | ||||||
|     public TrabalhadoresListDataProvider() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,275 +0,0 @@ | |||||||
| /* |  | ||||||
|  * UtilizadoresDataProvider.java |  | ||||||
|  * |  | ||||||
|  * Created on September 20, 2007, 10:03 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package db; |  | ||||||
| 
 |  | ||||||
| import analiseacidentestrabalho.Medico; |  | ||||||
| import analiseacidentestrabalho.Permissao; |  | ||||||
| import analiseacidentestrabalho.TecnicoSaude; |  | ||||||
| import analiseacidentestrabalho.Utilizador; |  | ||||||
| import com.sun.rave.web.ui.model.Option; |  | ||||||
| import java.sql.ResultSet; |  | ||||||
| import java.sql.Statement; |  | ||||||
| import java.util.ArrayList; |  | ||||||
| import java.util.ListIterator; |  | ||||||
| import utils.Utils; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class UtilizadoresDataProvider { |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of UtilizadoresDataProvider */ |  | ||||||
|     public UtilizadoresDataProvider() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public Integer getMaxUserId() |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "SELECT max(utilizadores.id)+1 AS MAXUSERID FROM utilizadores"; |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             ResultSet rs = st.executeQuery(sql); |  | ||||||
|             rs.first(); |  | ||||||
|             Integer newId = new Integer(rs.getInt("MAXUSERID")); |  | ||||||
|             if(newId.intValue() == 0) |  | ||||||
|             { |  | ||||||
|                 newId = new Integer(1); |  | ||||||
|             } |  | ||||||
|             return newId;             |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|             ex.printStackTrace();             |  | ||||||
|             return new Integer(1); |  | ||||||
|         } |  | ||||||
|     }   |  | ||||||
|      |  | ||||||
|     public Integer createNewUtilizador(Utilizador u) throws Exception |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         Integer newUserId = getMaxUserId();	 |  | ||||||
| 	 |  | ||||||
|         String sql = "INSERT INTO utilizadores (id, login, password, email, empresa_id, estabelecimento_id, administrador, tipo, numero_cedula, cap, nome, medico_id, funcionario_hst_id, activo) VALUES (" + newUserId  + ", '" + u.getLogin() + "', '" + u.getPassword() + "', '" + u.getEmail() + "', " + u.getEmpresa_id() + ", " + u.getEstabelecimento_id() + ", '" + u.getAdministrador() + "', " + u.getTipo() + ", '" + u.getNumero_cedula() + "', '" + u.getCap() + "', '" + u.getNome() + "', " + u.getMedico_id() + ", " + u.getFuncionario_hst_id() + ", '" + u.getActivo() + "')"; |  | ||||||
|         System.out.println("SQL CREATE : " + sql); |  | ||||||
|         st.execute(sql);         |  | ||||||
|         return newUserId;	 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void updateUtilizador(Utilizador u) throws Exception |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
| 	String sql = "UPDATE utilizadores SET login = '" + u.getLogin() +  "', password = '" + u.getPassword() + "', email = '" + u.getEmail() + "', empresa_id = " + u.getEmpresa_id() + ", estabelecimento_id = " + u.getEstabelecimento_id() + ", administrador = '" + u.getAdministrador() + "', tipo = " + u.getTipo() + ", numero_cedula = '" + u.getNumero_cedula() + "', cap = '" + u.getCap() + "', nome = '" + u.getNome() + "', medico_id = " + u.getMedico_id() + ", funcionario_hst_id = " + u.getFuncionario_hst_id() + ", activo = '" + u.getActivo()  + "' WHERE id = " + u.getId(); |  | ||||||
|         st.execute(sql);           	 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void deleteUser(Integer userId) throws Exception |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "UPDATE utilizadores SET activo = 'n' WHERE id = " + userId; |  | ||||||
|         st.execute(sql);           	 |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public Utilizador getUtilizador(String login) throws Exception |  | ||||||
|     { |  | ||||||
| 	Utilizador u = new Utilizador(); |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "SELECT * FROM utilizadores WHERE login = '" + login + "'"; |  | ||||||
|         ResultSet rs = st.executeQuery(sql); |  | ||||||
|         rs.first(); |  | ||||||
| 	u.setId(new Integer(rs.getInt("id"))); |  | ||||||
| 	u.setLogin(rs.getString("login")); |  | ||||||
| 	u.setPassword(rs.getString("password")); |  | ||||||
|         u.setEmail(rs.getString("email")); |  | ||||||
|         u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); |  | ||||||
|         u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); |  | ||||||
|         u.setAdministrador(rs.getString("administrador"));       |  | ||||||
|         u.setTipo(new Integer(rs.getInt("tipo"))); |  | ||||||
|         u.setNumero_cedula(rs.getString("numero_cedula")); |  | ||||||
|         u.setCap(rs.getString("cap")); |  | ||||||
|         u.setNome(rs.getString("nome")); |  | ||||||
|         u.setMedico_id(new Integer(rs.getInt("medico_id"))); |  | ||||||
|         u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));  |  | ||||||
|         u.setActivo(rs.getString("activo")); |  | ||||||
| 	return u; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public Utilizador getUtilizador(Integer id) throws Exception |  | ||||||
|     { |  | ||||||
| 	Utilizador u = new Utilizador(); |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "SELECT * FROM utilizadores WHERE id = " + id; |  | ||||||
|         ResultSet rs = st.executeQuery(sql); |  | ||||||
|         rs.first(); |  | ||||||
| 	u.setId(new Integer(rs.getInt("id"))); |  | ||||||
| 	u.setLogin(rs.getString("login")); |  | ||||||
| 	u.setPassword(rs.getString("password")); |  | ||||||
|         u.setEmail(rs.getString("email")); |  | ||||||
|         u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); |  | ||||||
|         u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); |  | ||||||
|         u.setAdministrador(rs.getString("administrador"));       |  | ||||||
|         u.setTipo(new Integer(rs.getInt("tipo"))); |  | ||||||
|         u.setNumero_cedula(rs.getString("numero_cedula")); |  | ||||||
|         u.setCap(rs.getString("cap")); |  | ||||||
|         u.setNome(rs.getString("nome")); |  | ||||||
|         u.setMedico_id(new Integer(rs.getInt("medico_id"))); |  | ||||||
|         u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));  |  | ||||||
|         u.setActivo(rs.getString("activo")); |  | ||||||
| 	return u; |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
|     public ArrayList getUtilizadoresListByTipo(Integer tipo) throws Exception |  | ||||||
|     { |  | ||||||
|         ArrayList list = new ArrayList(); |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "SELECT * FROM utilizadores WHERE tipo = " + tipo; |  | ||||||
|         ResultSet rs = st.executeQuery(sql); |  | ||||||
|         rs.first(); |  | ||||||
|         do |  | ||||||
|         { |  | ||||||
|             Utilizador u = new Utilizador(); |  | ||||||
|             u.setId(new Integer(rs.getInt("id"))); |  | ||||||
|             u.setLogin(rs.getString("login")); |  | ||||||
|             u.setPassword(rs.getString("password")); |  | ||||||
|             u.setEmail(rs.getString("email")); |  | ||||||
|             u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); |  | ||||||
|             u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); |  | ||||||
|             u.setAdministrador(rs.getString("administrador"));       |  | ||||||
|             u.setTipo(new Integer(rs.getInt("tipo"))); |  | ||||||
|             u.setNumero_cedula(rs.getString("numero_cedula")); |  | ||||||
|             u.setCap(rs.getString("cap")); |  | ||||||
|             u.setNome(rs.getString("nome")); |  | ||||||
|             u.setMedico_id(new Integer(rs.getInt("medico_id"))); |  | ||||||
|             u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));  |  | ||||||
|             u.setActivo(rs.getString("activo"));     |  | ||||||
|             list.add(u); |  | ||||||
|         }while(rs.next()); |  | ||||||
|         return list; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception |  | ||||||
|     { |  | ||||||
| //        Dblocal dblocal = new Dblocal();
 |  | ||||||
| //        dblocal.connect();
 |  | ||||||
| //        Statement stlocal = dblocal.createStatement();                
 |  | ||||||
|         Statement st = createStatement();         |  | ||||||
|         ArrayList list = new ArrayList(); |  | ||||||
|         Medico m = new Medico(); |  | ||||||
|         m.setId(new Integer(0)); |  | ||||||
|         m.setNome(""); |  | ||||||
|         list.add(m); |  | ||||||
|         String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = 5"; |  | ||||||
|         ResultSet rs = st.executeQuery(sql); |  | ||||||
|         rs.first(); |  | ||||||
| 	do |  | ||||||
| 	{ |  | ||||||
| 	    m = new Medico(); |  | ||||||
| 	    m.setId(new Integer(rs.getInt("id"))); |  | ||||||
|             m.setNome(Utils.unicodeToHTML(rs.getString("nome"))); |  | ||||||
| 	    list.add(m); |  | ||||||
| 	}while(rs.next()); |  | ||||||
|         com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];         |  | ||||||
|         ListIterator iter = list.listIterator(); |  | ||||||
|         int i = 0; |  | ||||||
|         while(iter.hasNext()) |  | ||||||
|         { |  | ||||||
|             m = (Medico) iter.next(); |  | ||||||
|              |  | ||||||
|             listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome())); |  | ||||||
|             i++; |  | ||||||
|         } |  | ||||||
| //        dblocal.close();                
 |  | ||||||
|         return listOptions;                 |  | ||||||
|     }   |  | ||||||
|      |  | ||||||
|     public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception |  | ||||||
|     { |  | ||||||
| //        Dblocal dblocal = new Dblocal();
 |  | ||||||
| //        dblocal.connect();
 |  | ||||||
| //        Statement stlocal = dblocal.createStatement();    
 |  | ||||||
|         Statement st = createStatement();            |  | ||||||
|         ArrayList list = new ArrayList(); |  | ||||||
|         TecnicoSaude t = new TecnicoSaude(); |  | ||||||
|         t.setId(new Integer(0)); |  | ||||||
|         t.setNome(""); |  | ||||||
|         list.add(t); |  | ||||||
|         String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = 3"; |  | ||||||
|         ResultSet rs = st.executeQuery(sql); |  | ||||||
|         rs.first(); |  | ||||||
| 	do |  | ||||||
| 	{ |  | ||||||
| 	    t = new TecnicoSaude(); |  | ||||||
| 	    t.setId(new Integer(rs.getInt("id"))); |  | ||||||
|             t.setNome(Utils.unicodeToHTML(rs.getString("nome"))); |  | ||||||
| 	    list.add(t); |  | ||||||
| 	}while(rs.next()); |  | ||||||
|         com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()];         |  | ||||||
|         ListIterator iter = list.listIterator(); |  | ||||||
|         int i = 0; |  | ||||||
|         while(iter.hasNext()) |  | ||||||
|         { |  | ||||||
|             t = (TecnicoSaude) iter.next(); |  | ||||||
|              |  | ||||||
|             listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome())); |  | ||||||
|             i++; |  | ||||||
|         } |  | ||||||
| //        dblocal.close();                
 |  | ||||||
|         return listOptions;                         |  | ||||||
|     }         |  | ||||||
|      |  | ||||||
|     public Integer getMaxPermissaoId() |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "SELECT max(permissoes.id)+1 AS MAXPERMISSAOID FROM permissoes"; |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             ResultSet rs = st.executeQuery(sql); |  | ||||||
|             rs.first(); |  | ||||||
|             Integer newId = new Integer(rs.getInt("MAXPERMISSAOID")); |  | ||||||
|             if(newId.intValue() == 0) |  | ||||||
|             { |  | ||||||
|                 newId = new Integer(1); |  | ||||||
|             } |  | ||||||
|             return newId;             |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|             ex.printStackTrace();             |  | ||||||
|             return new Integer(1); |  | ||||||
|         } |  | ||||||
|     }   |  | ||||||
|      |  | ||||||
|     public Integer createPermissao(Permissao p) throws Exception |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         Integer newId = getMaxPermissaoId();	 |  | ||||||
| 	 |  | ||||||
|         String sql = "INSERT INTO permissoes (id, user_id, codigo_permissao) VALUES (" + newId  + ", " + p.getUser_id() + ", " + p.getCodigo_permissao() + ")"; |  | ||||||
|         st.execute(sql);         |  | ||||||
|         return newId;	 |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
|     public Integer getPermissionCode(Integer userId) throws Exception |  | ||||||
|     { |  | ||||||
|         Statement st = createStatement(); |  | ||||||
|         String sql = "SELECT * FROM permissoes WHERE user_id = " + userId; |  | ||||||
|         ResultSet rs = st.executeQuery(sql); |  | ||||||
|         rs.first(); |  | ||||||
|         Integer permission = new Integer(rs.getInt("codigo_permissao")); |  | ||||||
| 	return permission;         |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private Statement createStatement() |  | ||||||
|     { |  | ||||||
|         Db db = new Db(); |  | ||||||
|         return db.createStatement(); |  | ||||||
|     }        |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,391 +0,0 @@ | |||||||
| /* |  | ||||||
|  * AnaliseAcidenteTrabalhoState.java |  | ||||||
|  * |  | ||||||
|  * Created on September 27, 2007, 5:18 PM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package pagestate; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class AnaliseAcidenteTrabalhoState { |  | ||||||
|     private int estado; |  | ||||||
|     private Object empresa; |  | ||||||
|     private Object estabelecimento; |  | ||||||
|     private Object trabalhador; |  | ||||||
|     private Object data_nascimento; |  | ||||||
|      |  | ||||||
|     private Object bi; |  | ||||||
|     private Object morada; |  | ||||||
|     private Object cod_postal1; |  | ||||||
|     private Object cod_postal2;     |  | ||||||
|     private Object localidade; |  | ||||||
|     private Object contacto_telefonico; |  | ||||||
|     private String turno; |  | ||||||
|      |  | ||||||
|     private Object horas_turno; |  | ||||||
|     private Object seccao; |  | ||||||
|     private Object local_trabalho; |  | ||||||
|     private Integer hours; |  | ||||||
|     private Integer minutes; |  | ||||||
|     private Object tarefa; |  | ||||||
|     private Object substancias; |  | ||||||
|      |  | ||||||
|     private Object superior_hierarquico; |  | ||||||
|     private Object condicoes; |  | ||||||
|     private Object testemunhas; |  | ||||||
|     private Object causas; |  | ||||||
|     private Object descricao; |  | ||||||
|     private Object conclusoes; |  | ||||||
|     private Object accoes; |  | ||||||
|      |  | ||||||
|      |  | ||||||
|     private String formacao_shst; |  | ||||||
|     private Object formacao_shsht_n_why; |  | ||||||
|     private String acidentes_colaborador; |  | ||||||
|     private Object nr_acidentes_colaborador; |  | ||||||
|     private String acidentes_colaboradores; |  | ||||||
|     private Object nr_acidentes_colaboradores; |  | ||||||
|      |  | ||||||
|     private Object nr_relatorio_acidentes_colaborador_1; |  | ||||||
|     private Object nr_relatorio_acidentes_colaborador_2;     |  | ||||||
|     private Object nr_relatorio_acidentes_colaborador_3;     |  | ||||||
|     private Object nr_relatorio_acidentes_colaborador_4;     |  | ||||||
|      |  | ||||||
|     private Object nr_relatorio_acidentes_colaboradores_1; |  | ||||||
|     private Object nr_relatorio_acidentes_colaboradores_2;     |  | ||||||
|     private Object nr_relatorio_acidentes_colaboradores_3;     |  | ||||||
|     private Object nr_relatorio_acidentes_colaboradores_4;     |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of AnaliseAcidenteTrabalhoState */ |  | ||||||
|     public AnaliseAcidenteTrabalhoState() { |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getEstabelecimento() { |  | ||||||
|         return estabelecimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstabelecimento(Object estabelecimento) { |  | ||||||
|         this.estabelecimento = estabelecimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getTrabalhador() { |  | ||||||
|         return trabalhador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTrabalhador(Object trabalhador) { |  | ||||||
|         this.trabalhador = trabalhador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getData_nascimento() { |  | ||||||
|         return data_nascimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setData_nascimento(Object data_nascimento) { |  | ||||||
|         this.data_nascimento = data_nascimento; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getHoras_turno() { |  | ||||||
|         return horas_turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHoras_turno(Object horas_turno) { |  | ||||||
|         this.horas_turno = horas_turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getSeccao() { |  | ||||||
|         return seccao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setSeccao(Object seccao) { |  | ||||||
|         this.seccao = seccao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getLocal_trabalho() { |  | ||||||
|         return local_trabalho; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLocal_trabalho(Object local_trabalho) { |  | ||||||
|         this.local_trabalho = local_trabalho; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getTarefa() { |  | ||||||
|         return tarefa; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTarefa(Object tarefa) { |  | ||||||
|         this.tarefa = tarefa; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getSubstancias() { |  | ||||||
|         return substancias; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setSubstancias(Object substancias) { |  | ||||||
|         this.substancias = substancias; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getSuperior_hierarquico() { |  | ||||||
|         return superior_hierarquico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setSuperior_hierarquico(Object superior_hierarquico) { |  | ||||||
|         this.superior_hierarquico = superior_hierarquico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getCondicoes() { |  | ||||||
|         return condicoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCondicoes(Object condicoes) { |  | ||||||
|         this.condicoes = condicoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getTestemunhas() { |  | ||||||
|         return testemunhas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTestemunhas(Object testemunhas) { |  | ||||||
|         this.testemunhas = testemunhas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getCausas() { |  | ||||||
|         return causas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCausas(Object causas) { |  | ||||||
|         this.causas = causas; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getDescricao() { |  | ||||||
|         return descricao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setDescricao(Object descricao) { |  | ||||||
|         this.descricao = descricao; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getAccoes() { |  | ||||||
|         return accoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAccoes(Object accoes) { |  | ||||||
|         this.accoes = accoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getConclusoes() { |  | ||||||
|         return conclusoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setConclusoes(Object conclusoes) { |  | ||||||
|         this.conclusoes = conclusoes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getEmpresa() { |  | ||||||
|         return empresa; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEmpresa(Object empresa) { |  | ||||||
|         this.empresa = empresa; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public int getEstado() { |  | ||||||
|         return estado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setEstado(int estado) { |  | ||||||
|         this.estado = estado; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getBi() { |  | ||||||
|         return bi; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setBi(Object bi) { |  | ||||||
|         this.bi = bi; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getMorada() { |  | ||||||
|         return morada; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMorada(Object morada) { |  | ||||||
|         this.morada = morada; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getCod_postal1() { |  | ||||||
|         return cod_postal1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCod_postal1(Object cod_postal1) { |  | ||||||
|         this.cod_postal1 = cod_postal1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getCod_postal2() { |  | ||||||
|         return cod_postal2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setCod_postal2(Object cod_postal2) { |  | ||||||
|         this.cod_postal2 = cod_postal2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getLocalidade() { |  | ||||||
|         return localidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setLocalidade(Object localidade) { |  | ||||||
|         this.localidade = localidade; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getContacto_telefonico() { |  | ||||||
|         return contacto_telefonico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setContacto_telefonico(Object contacto_telefonico) { |  | ||||||
|         this.contacto_telefonico = contacto_telefonico; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getTurno() { |  | ||||||
|         return turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setTurno(String turno) { |  | ||||||
|         this.turno = turno; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getHours() { |  | ||||||
|         return hours; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setHours(Integer hours) { |  | ||||||
|         this.hours = hours; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Integer getMinutes() { |  | ||||||
|         return minutes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setMinutes(Integer minutes) { |  | ||||||
|         this.minutes = minutes; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getFormacao_shst() { |  | ||||||
|         return formacao_shst; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFormacao_shst(String formacao_shst) { |  | ||||||
|         this.formacao_shst = formacao_shst; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getFormacao_shsht_n_why() { |  | ||||||
|         return formacao_shsht_n_why; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setFormacao_shsht_n_why(Object formacao_shsht_n_why) { |  | ||||||
|         this.formacao_shsht_n_why = formacao_shsht_n_why; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAcidentes_colaborador() { |  | ||||||
|         return acidentes_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAcidentes_colaborador(String acidentes_colaborador) { |  | ||||||
|         this.acidentes_colaborador = acidentes_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_acidentes_colaborador() { |  | ||||||
|         return nr_acidentes_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_acidentes_colaborador(Object nr_acidentes_colaborador) { |  | ||||||
|         this.nr_acidentes_colaborador = nr_acidentes_colaborador; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public String getAcidentes_colaboradores() { |  | ||||||
|         return acidentes_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setAcidentes_colaboradores(String acidentes_colaboradores) { |  | ||||||
|         this.acidentes_colaboradores = acidentes_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_acidentes_colaboradores() { |  | ||||||
|         return nr_acidentes_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_acidentes_colaboradores(Object nr_acidentes_colaboradores) { |  | ||||||
|         this.nr_acidentes_colaboradores = nr_acidentes_colaboradores; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaborador_1() { |  | ||||||
|         return nr_relatorio_acidentes_colaborador_1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaborador_1(Object nr_relatorio_acidentes_colaborador_1) { |  | ||||||
|         this.nr_relatorio_acidentes_colaborador_1 = nr_relatorio_acidentes_colaborador_1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaborador_2() { |  | ||||||
|         return nr_relatorio_acidentes_colaborador_2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaborador_2(Object nr_relatorio_acidentes_colaborador_2) { |  | ||||||
|         this.nr_relatorio_acidentes_colaborador_2 = nr_relatorio_acidentes_colaborador_2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaborador_3() { |  | ||||||
|         return nr_relatorio_acidentes_colaborador_3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaborador_3(Object nr_relatorio_acidentes_colaborador_3) { |  | ||||||
|         this.nr_relatorio_acidentes_colaborador_3 = nr_relatorio_acidentes_colaborador_3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaborador_4() { |  | ||||||
|         return nr_relatorio_acidentes_colaborador_4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaborador_4(Object nr_relatorio_acidentes_colaborador_4) { |  | ||||||
|         this.nr_relatorio_acidentes_colaborador_4 = nr_relatorio_acidentes_colaborador_4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaboradores_1() { |  | ||||||
|         return nr_relatorio_acidentes_colaboradores_1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaboradores_1(Object nr_relatorio_acidentes_colaboradores_1) { |  | ||||||
|         this.nr_relatorio_acidentes_colaboradores_1 = nr_relatorio_acidentes_colaboradores_1; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaboradores_2() { |  | ||||||
|         return nr_relatorio_acidentes_colaboradores_2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaboradores_2(Object nr_relatorio_acidentes_colaboradores_2) { |  | ||||||
|         this.nr_relatorio_acidentes_colaboradores_2 = nr_relatorio_acidentes_colaboradores_2; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaboradores_3() { |  | ||||||
|         return nr_relatorio_acidentes_colaboradores_3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaboradores_3(Object nr_relatorio_acidentes_colaboradores_3) { |  | ||||||
|         this.nr_relatorio_acidentes_colaboradores_3 = nr_relatorio_acidentes_colaboradores_3; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public Object getNr_relatorio_acidentes_colaboradores_4() { |  | ||||||
|         return nr_relatorio_acidentes_colaboradores_4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     public void setNr_relatorio_acidentes_colaboradores_4(Object nr_relatorio_acidentes_colaboradores_4) { |  | ||||||
|         this.nr_relatorio_acidentes_colaboradores_4 = nr_relatorio_acidentes_colaboradores_4; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,168 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Pdf.java |  | ||||||
|  * |  | ||||||
|  * Created on November 13, 2007, 11:33 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package pdf; |  | ||||||
| 
 |  | ||||||
| import analiseacidentestrabalho.Acidentado; |  | ||||||
| import analiseacidentestrabalho.AnaliseAcidente; |  | ||||||
| import com.lowagie.text.Chunk; |  | ||||||
| import com.lowagie.text.Document; |  | ||||||
| import com.lowagie.text.Font; |  | ||||||
| import com.lowagie.text.FontFactory; |  | ||||||
| import com.lowagie.text.Paragraph; |  | ||||||
| import com.lowagie.text.Rectangle; |  | ||||||
| import com.lowagie.text.pdf.BaseFont; |  | ||||||
| import com.lowagie.text.pdf.PdfAction; |  | ||||||
| import com.lowagie.text.pdf.PdfPCell; |  | ||||||
| import com.lowagie.text.pdf.PdfPTable; |  | ||||||
| import com.lowagie.text.pdf.PdfWriter; |  | ||||||
| import db.AnalisesDataProvider; |  | ||||||
| import java.awt.Color; |  | ||||||
| import java.io.FileOutputStream; |  | ||||||
| import javax.faces.context.FacesContext; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Pdf { |  | ||||||
| 
 |  | ||||||
|     PdfPCell cell = null; |  | ||||||
|     Paragraph p = null; |  | ||||||
|     private final static int FONT_SIZE = 5;       |  | ||||||
|     /** Creates a new instance of Pdf */ |  | ||||||
|     public Pdf() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     public void generatePdf(String folder, AnaliseAcidente a) |  | ||||||
|     { |  | ||||||
|         PdfPTable table = null; |  | ||||||
|         FacesContext ctx = FacesContext.getCurrentInstance(); |  | ||||||
|         ////HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
 |  | ||||||
|         Document document = new Document();            |  | ||||||
|         ////response.setContentType("application/pdf"); 
 |  | ||||||
| 
 |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             ////PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
 |  | ||||||
|             PdfWriter.getInstance(document, new FileOutputStream(folder + "/" + a.getId().toString() + ".pdf"));                     |  | ||||||
|             document.open(); |  | ||||||
|             //document.add(new Paragraph("Hello World"));
 |  | ||||||
|             //document.add(new Paragraph(new Date().toString()));
 |  | ||||||
|              |  | ||||||
|             table = createTableEmpresa(a); |  | ||||||
|             document.add(table); |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|             ex.printStackTrace(); |  | ||||||
|         } |  | ||||||
|         document.close();                             |  | ||||||
|     } |  | ||||||
|      |  | ||||||
|     private PdfPTable createTableHeader(AnaliseAcidente a)  |  | ||||||
|     { |  | ||||||
|         PdfPTable table = new PdfPTable(3); |  | ||||||
|         return table; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private PdfPTable createTableEmpresa(AnaliseAcidente a)  |  | ||||||
|     { |  | ||||||
|         String empresa_str = ""; |  | ||||||
|         String estabelecimento_str = ""; |  | ||||||
|         String trabalhador_str = ""; |  | ||||||
|         AnalisesDataProvider adp = new AnalisesDataProvider(); |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); |  | ||||||
|             empresa_str = utils.Utils.unicodeToHTML(nome_empresa); |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|            ex.printStackTrace(); |  | ||||||
|         }                  |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             estabelecimento_str = adp.getEstabelecimentoNome(a.getEstabelecimento_id()); |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|            ex.printStackTrace(); |  | ||||||
|         }          |  | ||||||
|          |  | ||||||
|         Acidentado ac = null; |  | ||||||
|         try |  | ||||||
|         { |  | ||||||
|             ac = adp.getAcidentado(a.getAcidentado_id()); |  | ||||||
|             trabalhador_str = ac.getNome(); |  | ||||||
|         } |  | ||||||
|         catch(Exception ex) |  | ||||||
|         { |  | ||||||
|            ex.printStackTrace(); |  | ||||||
|         }     |  | ||||||
|          |  | ||||||
|         //TableEvents event = new TableEvents();
 |  | ||||||
|          |  | ||||||
|         float[] widths = { 1f, 4f };                 |  | ||||||
|         PdfPTable table = new PdfPTable(widths); |  | ||||||
|         table.getDefaultCell().setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP | Rectangle.BOTTOM); |  | ||||||
|         //PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3"));                                                
 |  | ||||||
|         //cell.setColspan(3);
 |  | ||||||
|         //table.addCell(cell); 
 |  | ||||||
|          |  | ||||||
| 
 |  | ||||||
|          |  | ||||||
|           |  | ||||||
|         cell = new PdfPCell(new Paragraph("Empresa:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); |  | ||||||
|         cell.setBorder(Rectangle.NO_BORDER);  |  | ||||||
|         cell.setBackgroundColor(new Color(102, 133, 151));            |  | ||||||
|         table.addCell(cell); |  | ||||||
|          |  | ||||||
|         cell = new PdfPCell(new Paragraph(empresa_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255))    )); |  | ||||||
|         cell.setBorder(Rectangle.NO_BORDER);  |  | ||||||
|         cell.setBackgroundColor(new Color(102, 133, 151));                    |  | ||||||
|         table.addCell(cell);         |  | ||||||
|          |  | ||||||
|         cell = new PdfPCell(new Paragraph("Estabelecimento:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); |  | ||||||
|         cell.setBorder(Rectangle.NO_BORDER);  |  | ||||||
|         cell.setBackgroundColor(new Color(102, 133, 151));            |  | ||||||
|         table.addCell(cell);                 |  | ||||||
| 
 |  | ||||||
|         cell = new PdfPCell(new Paragraph(estabelecimento_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)))); |  | ||||||
|         cell.setBorder(Rectangle.NO_BORDER);  |  | ||||||
|         cell.setBackgroundColor(new Color(102, 133, 151));            |  | ||||||
|         table.addCell(cell);    |  | ||||||
|          |  | ||||||
|         cell = new PdfPCell(new Paragraph("Trabalhador:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); |  | ||||||
|         cell.setBorder(Rectangle.NO_BORDER);  |  | ||||||
|         cell.setBackgroundColor(new Color(102, 133, 151));     |  | ||||||
|          |  | ||||||
|         table.addCell(cell);   |  | ||||||
|          |  | ||||||
|         cell = new PdfPCell(new Paragraph(trabalhador_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)))); |  | ||||||
|         cell.setBorder(Rectangle.NO_BORDER);  |  | ||||||
|         cell.setBackgroundColor(new Color(102, 133, 151));            |  | ||||||
|         table.addCell(cell);    |  | ||||||
|         table.getDefaultCell().setBackgroundColor(new Color(102, 133, 151));    |  | ||||||
|         table.getDefaultCell().setPadding(0f); |  | ||||||
|         table.setSpacingAfter(0f); |  | ||||||
|         table.setSpacingBefore(0f); |  | ||||||
|         return table;         |  | ||||||
|     }     |  | ||||||
|      |  | ||||||
|     private PdfPTable createTableEmpresaHs(AnaliseAcidente a)  |  | ||||||
|     { |  | ||||||
|         PdfPTable table = new PdfPTable(3); |  | ||||||
|         return table;         |  | ||||||
|     }   |  | ||||||
|      |  | ||||||
|      |  | ||||||
|      |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,151 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Strings.java |  | ||||||
|  * |  | ||||||
|  * Created on October 8, 2007, 9:17 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package utils; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Strings { |  | ||||||
| 	public static String unicodeToHTML( String text ) |  | ||||||
| 	{ |  | ||||||
| 		if( text == null || text.length() < 6 ) |  | ||||||
| 		{ |  | ||||||
| 			return text; |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		String output = text; |  | ||||||
| 		output = output.replace( "\\u0009", " " ); |  | ||||||
| 		output = output.replace( "\\u000a", "<br>" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u00a0", " " ); |  | ||||||
| 		output = output.replace( "\\u00aa", "ª" ); |  | ||||||
| 		output = output.replace( "\\u00ba", "º" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u00c0", "À" ); |  | ||||||
| 		output = output.replace( "\\u00c1", "Á" ); |  | ||||||
| 		output = output.replace( "\\u00c2", "Â" ); |  | ||||||
| 		output = output.replace( "\\u00c3", "Ã" ); |  | ||||||
| 		output = output.replace( "\\u00c7", "Ç" ); |  | ||||||
| 		output = output.replace( "\\u00c8", "È" ); |  | ||||||
| 		output = output.replace( "\\u00c9", "É" ); |  | ||||||
|                  |  | ||||||
| 		output = output.replace( "\\u00ca", "Ê" ); |  | ||||||
| 		output = output.replace( "\\u00cc", "Ì" ); |  | ||||||
| 		output = output.replace( "\\u00cd", "Í" ); |  | ||||||
| 		output = output.replace( "\\u00ce", "Î" ); |  | ||||||
| 		output = output.replace( "\\u00d2", "ò" ); |  | ||||||
| 		output = output.replace( "\\u00d3", "ó" ); |  | ||||||
| 		output = output.replace( "\\u00d4", "ô" ); |  | ||||||
| 		output = output.replace( "\\u00d5", "õ" ); |  | ||||||
| 		output = output.replace( "\\u00d9", "Ù" ); |  | ||||||
| 		output = output.replace( "\\u00da", "Ú" ); |  | ||||||
| 		output = output.replace( "\\u00db", "Û" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u00e0", "à" ); |  | ||||||
| 		output = output.replace( "\\u00e1", "á" ); |  | ||||||
| 		output = output.replace( "\\u00e2", "â" ); |  | ||||||
| 		output = output.replace( "\\u00e3", "ã" ); |  | ||||||
| 		output = output.replace( "\\u00e7", "ç" ); |  | ||||||
| 		output = output.replace( "\\u00e8", "è" ); |  | ||||||
| 		output = output.replace( "\\u00e9", "é" ); |  | ||||||
| 		output = output.replace( "\\u00ea", "ê" ); |  | ||||||
| 		output = output.replace( "\\u00ec", "ì" ); |  | ||||||
| 		output = output.replace( "\\u00ed", "í" ); |  | ||||||
| 		output = output.replace( "\\u00ee", "î" ); |  | ||||||
| 		output = output.replace( "\\u00f2", "ò" ); |  | ||||||
| 		output = output.replace( "\\u00f3", "ó" ); |  | ||||||
| 		output = output.replace( "\\u00f4", "ô" ); |  | ||||||
| 		output = output.replace( "\\u00f5", "õ" ); |  | ||||||
| 		output = output.replace( "\\u00f9", "ù" ); |  | ||||||
| 		output = output.replace( "\\u00fa", "ú" ); |  | ||||||
| 		output = output.replace( "\\u00fb", "û" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u0153", "œ" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u2013", "-" ); |  | ||||||
| 		output = output.replace( "\\u2014", "-" ); |  | ||||||
| 		output = output.replace( "\\u2018|\\u2019", "'" ); |  | ||||||
| 		output = output.replace( "\\u201c|\\u201d", "\"" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u2022", "*" ); |  | ||||||
| 		output = output.replace( "\\u2026", "..." ); |  | ||||||
| 
 |  | ||||||
| 		return output; |  | ||||||
| 	} |  | ||||||
|          |  | ||||||
| 	public static String textToUnicode( String text ) |  | ||||||
|         { |  | ||||||
| 		String output = text;     |  | ||||||
| 		output = output.replace( "À", "\\u00c0" ); |  | ||||||
| 		output = output.replace( "Á", "\\u00c1" ); |  | ||||||
| 		output = output.replace( "Â", "\\u00c2" ); |  | ||||||
| 		output = output.replace( "Ã", "\\u00c3" ); |  | ||||||
| 		output = output.replace( "Ç", "\\u00c7" ); |  | ||||||
| 		output = output.replace( "È", "\\u00c8" ); |  | ||||||
| 		output = output.replace( "É", "\\u00c9" ); |  | ||||||
|                  |  | ||||||
| 		output = output.replace( "Ê", "\\u00ca" ); |  | ||||||
| 		output = output.replace( "Ì", "\\u00cc" ); |  | ||||||
| 		output = output.replace( "Í", "\\u00cd" ); |  | ||||||
| 		output = output.replace( "Î", "\\u00ce" ); |  | ||||||
| 		output = output.replace( "ò", "\\u00d2" ); |  | ||||||
| 		output = output.replace( "ó", "\\u00d3" ); |  | ||||||
| 		output = output.replace( "ô", "\\u00d4" ); |  | ||||||
| 		output = output.replace( "õ", "\\u00d5" ); |  | ||||||
| 		output = output.replace( "Ù", "\\u00d9" ); |  | ||||||
| 		output = output.replace( "Ú", "\\u00da" ); |  | ||||||
| 		output = output.replace( "Û", "\\u00db" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "à", "\\u00e0" ); |  | ||||||
| 		output = output.replace( "á", "\\u00e1" ); |  | ||||||
| 		output = output.replace( "â", "\\u00e2" ); |  | ||||||
| 		output = output.replace( "ã", "\\u00e3" ); |  | ||||||
| 		output = output.replace( "ç", "\\u00e7" ); |  | ||||||
| 		output = output.replace( "è", "\\u00e8" ); |  | ||||||
| 		output = output.replace( "é", "\\u00e9" ); |  | ||||||
| 		output = output.replace( "ê", "\\u00ea" ); |  | ||||||
| 		output = output.replace( "ì", "\\u00ec" ); |  | ||||||
| 		output = output.replace( "í", "\\u00ed" ); |  | ||||||
| 		output = output.replace( "î", "\\u00ee" ); |  | ||||||
| 		output = output.replace( "ò", "\\u00f2" ); |  | ||||||
| 		output = output.replace( "ó", "\\u00f3" ); |  | ||||||
| 		output = output.replace( "ô", "\\u00f4" ); |  | ||||||
| 		output = output.replace( "õ", "\\u00f5" ); |  | ||||||
| 		output = output.replace( "ù", "\\u00f9" ); |  | ||||||
| 		output = output.replace( "ú", "\\u00fa" ); |  | ||||||
| 		output = output.replace( "û", "\\u00fb" );     |  | ||||||
|                  |  | ||||||
| 		return output;                 |  | ||||||
|         } |  | ||||||
| 	 |  | ||||||
| 	public static String RTFToUnicode( String text ) |  | ||||||
| 	{ |  | ||||||
| 		if( text == null || text.length() < 4 ) |  | ||||||
| 		{ |  | ||||||
| 			return text; |  | ||||||
| 		} |  | ||||||
| 		String output = text; |  | ||||||
| 		output = output.replaceAll( "\\'", "\\u00" ); |  | ||||||
| 		return output; |  | ||||||
| 	} |  | ||||||
| 	 |  | ||||||
| 	public static String unicodeToRTF( String text ) |  | ||||||
| 	{ |  | ||||||
| 		if( text == null || text.length() < 6 ) |  | ||||||
| 		{ |  | ||||||
| 			return text; |  | ||||||
| 		} |  | ||||||
| 		String output = text; |  | ||||||
| 		output = output.replaceAll( "\\\\u00", "\\\\'" ); |  | ||||||
| 		return output; |  | ||||||
| 	} |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,133 +0,0 @@ | |||||||
| /* |  | ||||||
|  * Utils.java |  | ||||||
|  * |  | ||||||
|  * Created on October 12, 2007, 9:39 AM |  | ||||||
|  * |  | ||||||
|  * To change this template, choose Tools | Template Manager |  | ||||||
|  * and open the template in the editor. |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| package utils; |  | ||||||
| 
 |  | ||||||
| import java.text.SimpleDateFormat; |  | ||||||
| import java.util.Calendar; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.util.GregorianCalendar; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * |  | ||||||
|  * @author lluis |  | ||||||
|  */ |  | ||||||
| public class Utils { |  | ||||||
|      |  | ||||||
|     /** Creates a new instance of Utils */ |  | ||||||
|     public Utils() { |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| 	public static String unicodeToHTML( String text ) |  | ||||||
| 	{ |  | ||||||
| 		if( text == null || text.length() < 6 ) |  | ||||||
| 		{ |  | ||||||
| 			return text; |  | ||||||
| 		} |  | ||||||
| 
 |  | ||||||
| 		String output = text; |  | ||||||
| 		output = output.replace( "\\u0009", " " ); |  | ||||||
| 		output = output.replace( "\\u000a", "<br>" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u00a0", " " ); |  | ||||||
| 		output = output.replace( "\\u00aa", "ª" ); |  | ||||||
| 		output = output.replace( "\\u00ba", "º" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u00c0", "À" ); |  | ||||||
| 		output = output.replace( "\\u00c1", "Á" ); |  | ||||||
| 		output = output.replace( "\\u00c2", "Â" ); |  | ||||||
| 		output = output.replace( "\\u00c3", "Ã" ); |  | ||||||
| 		output = output.replace( "\\u00c7", "Ç" ); |  | ||||||
| 		output = output.replace( "\\u00c8", "È" ); |  | ||||||
| 		output = output.replace( "\\u00c9", "É" ); |  | ||||||
|                  |  | ||||||
| 		output = output.replace( "\\u00ca", "Ê" ); |  | ||||||
| 		output = output.replace( "\\u00cc", "Ì" ); |  | ||||||
| 		output = output.replace( "\\u00cd", "Í" ); |  | ||||||
| 		output = output.replace( "\\u00ce", "Î" ); |  | ||||||
| 		output = output.replace( "\\u00d2", "ò" ); |  | ||||||
| 		output = output.replace( "\\u00d3", "ó" ); |  | ||||||
| 		output = output.replace( "\\u00d4", "ô" ); |  | ||||||
| 		output = output.replace( "\\u00d5", "õ" ); |  | ||||||
| 		output = output.replace( "\\u00d9", "Ù" ); |  | ||||||
| 		output = output.replace( "\\u00da", "Ú" ); |  | ||||||
| 		output = output.replace( "\\u00db", "Û" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u00e0", "à" ); |  | ||||||
| 		output = output.replace( "\\u00e1", "á" ); |  | ||||||
| 		output = output.replace( "\\u00e2", "â" ); |  | ||||||
| 		output = output.replace( "\\u00e3", "ã" ); |  | ||||||
| 		output = output.replace( "\\u00e7", "ç" ); |  | ||||||
| 		output = output.replace( "\\u00e8", "è" ); |  | ||||||
| 		output = output.replace( "\\u00e9", "é" ); |  | ||||||
| 		output = output.replace( "\\u00ea", "ê" ); |  | ||||||
| 		output = output.replace( "\\u00ec", "ì" ); |  | ||||||
| 		output = output.replace( "\\u00ed", "í" ); |  | ||||||
| 		output = output.replace( "\\u00ee", "î" ); |  | ||||||
| 		output = output.replace( "\\u00f2", "ò" ); |  | ||||||
| 		output = output.replace( "\\u00f3", "ó" ); |  | ||||||
| 		output = output.replace( "\\u00f4", "ô" ); |  | ||||||
| 		output = output.replace( "\\u00f5", "õ" ); |  | ||||||
| 		output = output.replace( "\\u00f9", "ù" ); |  | ||||||
| 		output = output.replace( "\\u00fa", "ú" ); |  | ||||||
| 		output = output.replace( "\\u00fb", "û" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u0153", "œ" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u2013", "-" ); |  | ||||||
| 		output = output.replace( "\\u2014", "-" ); |  | ||||||
| 		output = output.replace( "\\u2018|\\u2019", "'" ); |  | ||||||
| 		output = output.replace( "\\u201c|\\u201d", "\"" ); |  | ||||||
| 
 |  | ||||||
| 		output = output.replace( "\\u2022", "*" ); |  | ||||||
| 		output = output.replace( "\\u2026", "..." ); |  | ||||||
| 
 |  | ||||||
| 		return output; |  | ||||||
| 	}     |  | ||||||
|          |  | ||||||
|     public static String getPageFrom(String referer) |  | ||||||
|     { |  | ||||||
|         String pageFrom = referer.substring(referer.lastIndexOf("/")+1); |  | ||||||
|         return pageFrom; |  | ||||||
|     }  |  | ||||||
|      |  | ||||||
|     public static boolean isValidEmail(String email){ |  | ||||||
|         boolean res = true; |  | ||||||
|          |  | ||||||
|         int indexOfAtChar=email.indexOf("@"); |  | ||||||
| 
 |  | ||||||
|         if(indexOfAtChar > 0) |  | ||||||
|         { |  | ||||||
|             int indexOfDotChar = |  | ||||||
|                 email.indexOf(".",indexOfAtChar); |  | ||||||
|             if(indexOfDotChar > 0) |  | ||||||
|             { |  | ||||||
|               res = true; |  | ||||||
|             } |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 res = false; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else{ |  | ||||||
|             res = false; |  | ||||||
|         }         |  | ||||||
|         return res; |  | ||||||
|     }         |  | ||||||
|      |  | ||||||
|     public static String dateToYYYYMMDD(Date ddate) |  | ||||||
|     { |  | ||||||
|         Calendar cal = new GregorianCalendar(); |  | ||||||
|         cal.setTime(ddate);   |  | ||||||
|         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); |  | ||||||
|         String date_str = dateFormat.format(cal.getTime()); |  | ||||||
|         return date_str; |  | ||||||
|     } |  | ||||||
|      |  | ||||||
| } |  | ||||||
| @ -1,26 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui"> |  | ||||||
|     <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> |  | ||||||
|     <f:view> |  | ||||||
|         <ui:page binding="#{Erro.page1}" id="page1"> |  | ||||||
|             <ui:html binding="#{Erro.html1}" id="html1"> |  | ||||||
|                 <ui:head binding="#{Erro.head1}" id="head1"> |  | ||||||
|                     <ui:link binding="#{Erro.link1}" id="link1" url="/resources/stylesheet.css"/> |  | ||||||
|                 </ui:head> |  | ||||||
|                 <ui:body binding="#{Erro.body1}" id="body1" style="-rave-layout: grid"> |  | ||||||
|                     <ui:form binding="#{Erro.form1}" id="form1"> |  | ||||||
|                         <h:panelGrid binding="#{Erro.gridPanel1}" columns="1" id="gridPanel1" |  | ||||||
|                             style="height: 24px; left: 0px; top: 120px; position: absolute; width: 100%" styleClass="centerBlock" width="576"> |  | ||||||
|                             <h:panelGrid binding="#{Erro.gridPanel2}" columnClasses="gridColCenter" columns="1" id="gridPanel2" style="height: 96px" |  | ||||||
|                                 styleClass="centerBlock" width="504"> |  | ||||||
|                                 <ui:staticText binding="#{Erro.txtCab}" escape="false" id="txtCab" |  | ||||||
|                                     style="color: #003333; font-size: 18px; height: 22px; width: 576px" text="Erro"/> |  | ||||||
|                                 <ui:staticText binding="#{Erro.txtMsg}" escape="false" id="txtMsg" style="color: #990000; height: 24px; width: 384px"/> |  | ||||||
|                             </h:panelGrid> |  | ||||||
|                         </h:panelGrid> |  | ||||||
|                     </ui:form> |  | ||||||
|                 </ui:body> |  | ||||||
|             </ui:html> |  | ||||||
|         </ui:page> |  | ||||||
|     </f:view> |  | ||||||
| </jsp:root> |  | ||||||
| @ -1,12 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <div style="height: 200px; width: 100%; -rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://www.sun.com/web/ui"> |  | ||||||
|     <f:subview id="Footer"> |  | ||||||
|         <h:panelGrid binding="#{Footer.gridPanel1}" columnClasses="gridColCenter" columns="1" id="gridPanel1" style="height: 24px; left: 0px; top: 0px; position: absolute; width: 100%"> |  | ||||||
|             <ui:panelGroup binding="#{Footer.groupPanel1}" id="groupPanel1" style="border-bottom: solid #ffffff 1px; height: 21px; width: 200px"> |  | ||||||
|                 <ui:staticText binding="#{Footer.staticText1}" id="staticText1" text="Software desenvolvido por "/> |  | ||||||
|                 <ui:image binding="#{Footer.image1}" height="21" id="image1" url="/resources/images/logo_evolute_small.png" width="100"/> |  | ||||||
|                 <ui:staticText binding="#{Footer.staticText2}" escape="false" id="staticText2" text="&nbsp;&copy; 2008 "/> |  | ||||||
|             </ui:panelGroup> |  | ||||||
|         </h:panelGrid> |  | ||||||
|     </f:subview> |  | ||||||
| </div> |  | ||||||
| @ -1,8 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <div style="height: 200px; width: 100%; -rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://www.sun.com/web/ui"> |  | ||||||
|     <f:subview id="Header"> |  | ||||||
|         <h:panelGrid binding="#{Header.gridPanel1}" columnClasses="gridColCenter" columns="1" id="gridPanel1" style="height: 24px; width: 100%" width="264"> |  | ||||||
|             <ui:staticText binding="#{Header.staticText1}" escape="false" id="staticText1" style="height: 24px; width: 336px" text="SIPRP - Análise Acidente"/> |  | ||||||
|         </h:panelGrid> |  | ||||||
|     </f:subview> |  | ||||||
| </div> |  | ||||||
| @ -1,45 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui"> |  | ||||||
|     <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> |  | ||||||
|     <f:view> |  | ||||||
|         <ui:page binding="#{Login.page1}" id="page1"> |  | ||||||
|             <ui:html binding="#{Login.html1}" id="html1"> |  | ||||||
|                 <ui:head binding="#{Login.head1}" id="head1"> |  | ||||||
|                     <ui:link binding="#{Login.link1}" id="link1" url="/resources/stylesheet.css"/> |  | ||||||
|                 </ui:head> |  | ||||||
|                 <ui:body binding="#{Login.body1}" id="body1" style="-rave-layout: grid"> |  | ||||||
|                     <ui:form binding="#{Login.form1}" id="form1"> |  | ||||||
|                         <h:panelGrid binding="#{Login.gridPanel6}" id="gridPanel6" style="height: 24px; left: 0px; top: 300px; position: absolute; width: 100%" |  | ||||||
|                             styleClass="centerBlock" width="456"> |  | ||||||
|                             <h:panelGrid binding="#{Login.gridPanel1}" columns="1" id="gridPanel1" style="height: 24px" styleClass="centerBlock" width="456"> |  | ||||||
|                                 <h:panelGrid binding="#{Login.gridPanel2}" columns="1" id="gridPanel2" |  | ||||||
|                                     style="border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0); height: 24px" width="432"> |  | ||||||
|                                     <h:panelGrid binding="#{Login.gridPanel3}" columns="1" id="gridPanel3" style="height: 24px" width="432"> |  | ||||||
|                                         <h:panelGrid binding="#{Login.gridPanel4}" columnClasses="gridColLeft, gridColRight" columns="2" id="gridPanel4" |  | ||||||
|                                             style="height: 72px" width="432"> |  | ||||||
|                                             <ui:staticText binding="#{Login.staticText1}" id="staticText1" style="height: 24px; width: 144px" text="Utilizador:"/> |  | ||||||
|                                             <ui:textField binding="#{Login.txtUtilizador}" id="txtUtilizador" style="width: 100%"/> |  | ||||||
|                                             <ui:staticText binding="#{Login.staticText2}" id="staticText2" style="height: 24px; width: 144px" text="Palavra-chave:"/> |  | ||||||
|                                             <ui:passwordField binding="#{Login.txtPassword}" id="txtPassword" style="height: 24px; width: 100%"/> |  | ||||||
|                                         </h:panelGrid> |  | ||||||
|                                     </h:panelGrid> |  | ||||||
|                                     <h:panelGrid binding="#{Login.gridPanel5}" columnClasses="gridColLeft, gridColRight" columns="2" id="gridPanel5" |  | ||||||
|                                         style="height: 24px" width="432"> |  | ||||||
|                                         <ui:hyperlink action="#{Login.lnkPassRecovery_action}" binding="#{Login.lnkPassRecovery}" id="lnkPassRecovery" |  | ||||||
|                                             style="height: 24px; width: 168px" text="Recuperar palavra-chave"/> |  | ||||||
|                                         <ui:button action="#{Login.butLogin_action}" binding="#{Login.butLogin}" id="butLogin" |  | ||||||
|                                             style="height: 24px; width: 120px" text="Entrar"/> |  | ||||||
|                                     </h:panelGrid> |  | ||||||
|                                 </h:panelGrid> |  | ||||||
|                                 <ui:staticText binding="#{Login.txtMsg}" escape="false" id="txtMsg" style="color: rgb(204, 0, 0); height: 24px; width: 240px"/> |  | ||||||
|                             </h:panelGrid> |  | ||||||
|                         </h:panelGrid> |  | ||||||
|                         <div class="gridColCenter" style="height: 22px; left: 0px; top: 500px; position: absolute; width: 100%"> |  | ||||||
|                             <jsp:directive.include file="Footer.jspf"/> |  | ||||||
|                         </div> |  | ||||||
|                     </ui:form> |  | ||||||
|                 </ui:body> |  | ||||||
|             </ui:html> |  | ||||||
|         </ui:page> |  | ||||||
|     </f:view> |  | ||||||
| </jsp:root> |  | ||||||
| @ -1,2 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <Context path="/AnaliseAcidentesTrabalho"/> |  | ||||||
| @ -1,46 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui"> |  | ||||||
|     <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> |  | ||||||
|     <f:view> |  | ||||||
|         <ui:page binding="#{RecuperarPassword.page1}" id="page1"> |  | ||||||
|             <ui:html binding="#{RecuperarPassword.html1}" id="html1"> |  | ||||||
|                 <ui:head binding="#{RecuperarPassword.head1}" id="head1"> |  | ||||||
|                     <ui:link binding="#{RecuperarPassword.link1}" id="link1" url="/resources/stylesheet.css"/> |  | ||||||
|                 </ui:head> |  | ||||||
|                 <ui:body binding="#{RecuperarPassword.body1}" id="body1" style="-rave-layout: grid"> |  | ||||||
|                     <ui:form binding="#{RecuperarPassword.form1}" id="form1"> |  | ||||||
|                         <h:panelGrid binding="#{RecuperarPassword.gridPanel1}" id="gridPanel1" |  | ||||||
|                             style="height: 24px; left: 0px; top: 300px; position: absolute; width: 100%" styleClass="centerBlock" width="456"> |  | ||||||
|                             <h:panelGrid binding="#{RecuperarPassword.gridPanel2}" columns="1" id="gridPanel2" style="height: 24px" styleClass="centerBlock" width="456"> |  | ||||||
|                                 <h:panelGrid binding="#{RecuperarPassword.gridPanel3}" columns="1" id="gridPanel3" |  | ||||||
|                                     style="border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0); height: 24px" width="432"> |  | ||||||
|                                     <ui:staticText binding="#{RecuperarPassword.staticText3}" id="staticText3" style="height: 24px; width: 240px" text="Preencha os seguintes dados pessoais"/> |  | ||||||
|                                     <h:panelGrid binding="#{RecuperarPassword.gridPanel4}" columnClasses="gridColLeft, gridColRight" columns="2" id="gridPanel4" |  | ||||||
|                                         style="height: 72px" width="432"> |  | ||||||
|                                         <ui:staticText binding="#{RecuperarPassword.staticText1}" id="staticText1" style="height: 24px; width: 144px" text="Utilizador:"/> |  | ||||||
|                                         <ui:textField binding="#{RecuperarPassword.txtUtilizador}" id="txtUtilizador" style="width: 100%"/> |  | ||||||
|                                         <ui:staticText binding="#{RecuperarPassword.staticText2}" id="staticText2" style="height: 24px; width: 144px" text="E-mail:"/> |  | ||||||
|                                         <ui:textField binding="#{RecuperarPassword.txtEmail}" id="txtEmail" style="width: 100%"/> |  | ||||||
|                                     </h:panelGrid> |  | ||||||
|                                     <h:panelGrid binding="#{RecuperarPassword.gridPanel5}" columnClasses="gridColRight" id="gridPanel5" |  | ||||||
|                                         style="height: 24px; width: 100%" width="360"> |  | ||||||
|                                         <ui:panelGroup binding="#{RecuperarPassword.groupPanel1}" id="groupPanel1" style="height: 24px; width: 264px"> |  | ||||||
|                                             <ui:button action="#{RecuperarPassword.butCancelar_action}" binding="#{RecuperarPassword.butCancelar}" |  | ||||||
|                                                 id="butCancelar" style="height: 24px; width: 96px" text="Cancelar"/> |  | ||||||
|                                             <ui:button action="#{RecuperarPassword.butOk_action}" binding="#{RecuperarPassword.butOk}" id="butOk" |  | ||||||
|                                                 style="height: 24px; width: 96px" text="OK"/> |  | ||||||
|                                         </ui:panelGroup> |  | ||||||
|                                     </h:panelGrid> |  | ||||||
|                                 </h:panelGrid> |  | ||||||
|                                 <ui:staticText binding="#{RecuperarPassword.txtMsg}" id="txtMsg" style="color: rgb(204, 0, 0); height: 24px; width: 240px"/> |  | ||||||
|                             </h:panelGrid> |  | ||||||
|                         </h:panelGrid> |  | ||||||
|                         <div class="gridColCenter" style="height: 22px; left: 0px; top: 500px; position: absolute; width: 100%"> |  | ||||||
|                             <jsp:directive.include file="Footer.jspf"/> |  | ||||||
|                         </div> |  | ||||||
|                     </ui:form> |  | ||||||
|                 </ui:body> |  | ||||||
|             </ui:html> |  | ||||||
|         </ui:page> |  | ||||||
|     </f:view> |  | ||||||
| </jsp:root> |  | ||||||
| @ -1,18 +0,0 @@ | |||||||
| <?xml version='1.0' encoding='UTF-8'?> |  | ||||||
| <!DOCTYPE faces-config PUBLIC |  | ||||||
|   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" |  | ||||||
|   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> |  | ||||||
| <faces-config> |  | ||||||
| 
 |  | ||||||
|   <!-- Set default locale and add supported locales here... |  | ||||||
|   <application> |  | ||||||
|     <locale-config> |  | ||||||
|       <default-locale>en</default-locale> |  | ||||||
|       <supported-locale>de</supported-locale> |  | ||||||
|       <supported-locale>fr</supported-locale> |  | ||||||
|       <supported-locale>es</supported-locale> |  | ||||||
|     </locale-config> |  | ||||||
|   </application> |  | ||||||
|   --> |  | ||||||
| 
 |  | ||||||
| </faces-config> |  | ||||||
| @ -1,95 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" |  | ||||||
|                               "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> |  | ||||||
| <faces-config> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>SessionBean1</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.SessionBean1</managed-bean-class> |  | ||||||
|         <managed-bean-scope>session</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>Login</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.Login</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>ApplicationBean1</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.ApplicationBean1</managed-bean-class> |  | ||||||
|         <managed-bean-scope>application</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>RequestBean1</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.RequestBean1</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>RecuperarPassword</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.RecuperarPassword</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>Header</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.Header</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>Dummy</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.Dummy</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>Footer</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.Footer</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>FormSeguranca</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.FormSeguranca</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>Erro</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.Erro</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>Top</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.Top</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>LoadImage</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.LoadImage</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>AnaliseAcidenteTrabalho</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.AnaliseAcidenteTrabalho</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>ViewAnaliseAcidenteTrabalho</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.ViewAnaliseAcidenteTrabalho</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>FormRH</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.FormRH</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>FormHS</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.FormHS</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>FichaUtilizador</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.FichaUtilizador</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
|     <managed-bean> |  | ||||||
|         <managed-bean-name>FormMedico</managed-bean-name> |  | ||||||
|         <managed-bean-class>analiseacidentestrabalho.FormMedico</managed-bean-class> |  | ||||||
|         <managed-bean-scope>request</managed-bean-scope> |  | ||||||
|     </managed-bean> |  | ||||||
| </faces-config> |  | ||||||
| @ -1,215 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" |  | ||||||
|                               "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> |  | ||||||
| <faces-config> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/Login.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>recuperar_password</from-outcome> |  | ||||||
|             <to-view-id>/RecuperarPassword.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>erro</from-outcome> |  | ||||||
|             <to-view-id>/Erro.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_seguranca</from-outcome> |  | ||||||
|             <to-view-id>/FormSeguranca.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_rh</from-outcome> |  | ||||||
|             <to-view-id>/FormRH.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_hs</from-outcome> |  | ||||||
|             <to-view-id>/FormHS.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_medico</from-outcome> |  | ||||||
|             <to-view-id>/FormMedico.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>create_user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/RecuperarPassword.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/FormSeguranca.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>analise_acidente</from-outcome> |  | ||||||
|             <to-view-id>/AnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>view_analise</from-outcome> |  | ||||||
|             <to-view-id>/ViewAnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/FormRH.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>analise_acidente</from-outcome> |  | ||||||
|             <to-view-id>/AnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>view_analise</from-outcome> |  | ||||||
|             <to-view-id>/ViewAnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/FormHS.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>analise_acidente</from-outcome> |  | ||||||
|             <to-view-id>/AnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>view_analise</from-outcome> |  | ||||||
|             <to-view-id>/ViewAnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/FormMedico.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>analise_acidente</from-outcome> |  | ||||||
|             <to-view-id>/AnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>view_analise</from-outcome> |  | ||||||
|             <to-view-id>/ViewAnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/AnaliseAcidenteTrabalho.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>load_image</from-outcome> |  | ||||||
|             <to-view-id>/LoadImage.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_seguranca</from-outcome> |  | ||||||
|             <to-view-id>/FormSeguranca.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_rh</from-outcome> |  | ||||||
|             <to-view-id>/FormRH.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_hs</from-outcome> |  | ||||||
|             <to-view-id>/FormHS.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_medico</from-outcome> |  | ||||||
|             <to-view-id>/FormMedico.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/LoadImage.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>analise_acidente</from-outcome> |  | ||||||
|             <to-view-id>/AnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/FichaUtilizador.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_seguranca</from-outcome> |  | ||||||
|             <to-view-id>/FormSeguranca.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_rh</from-outcome> |  | ||||||
|             <to-view-id>/FormRH.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_hs</from-outcome> |  | ||||||
|             <to-view-id>/FormHS.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_medico</from-outcome> |  | ||||||
|             <to-view-id>/FormMedico.jsp</to-view-id> |  | ||||||
|         </navigation-case>         |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>analise_acidente</from-outcome> |  | ||||||
|             <to-view-id>/AnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>view_analise</from-outcome> |  | ||||||
|             <to-view-id>/ViewAnaliseAcidenteTrabalho.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|     </navigation-rule> |  | ||||||
|     <navigation-rule> |  | ||||||
|         <from-view-id>/ViewAnaliseAcidenteTrabalho.jsp</from-view-id> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>login</from-outcome> |  | ||||||
|             <to-view-id>/Login.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>user</from-outcome> |  | ||||||
|             <to-view-id>/FichaUtilizador.jsp</to-view-id> |  | ||||||
|         </navigation-case>  |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_seguranca</from-outcome> |  | ||||||
|             <to-view-id>/FormSeguranca.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_rh</from-outcome> |  | ||||||
|             <to-view-id>/FormRH.jsp</to-view-id> |  | ||||||
|         </navigation-case> |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_hs</from-outcome> |  | ||||||
|             <to-view-id>/FormHS.jsp</to-view-id> |  | ||||||
|         </navigation-case>         |  | ||||||
|         <navigation-case> |  | ||||||
|             <from-outcome>form_medico</from-outcome> |  | ||||||
|             <to-view-id>/FormMedico.jsp</to-view-id> |  | ||||||
|         </navigation-case>                 |  | ||||||
|     </navigation-rule> |  | ||||||
| </faces-config> |  | ||||||
| @ -1,14 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"><context-param><param-name>javax.faces.STATE_SAVING_METHOD</param-name><param-value>server</param-value></context-param><context-param><param-name>javax.faces.CONFIG_FILES</param-name><param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value></context-param><context-param><param-name>com.sun.faces.validateXml</param-name><param-value>true</param-value></context-param><context-param><param-name>com.sun.faces.verifyObjects</param-name><param-value>false</param-value></context-param><filter><filter-name>UploadFilter</filter-name><filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class><init-param><description> |  | ||||||
|           The maximum allowed upload size in bytes.  If this is set |  | ||||||
|           to a negative value, there is no maximum.  The default |  | ||||||
|           value is 1000000. |  | ||||||
|         </description><param-name>maxSize</param-name><param-value>1000000</param-value></init-param><init-param><description> |  | ||||||
|           The size (in bytes) of an uploaded file which, if it is |  | ||||||
|           exceeded, will cause the file to be written directly to |  | ||||||
|           disk instead of stored in memory.  Files smaller than or |  | ||||||
|           equal to this size will be stored in memory.  The default |  | ||||||
|           value is 4096. |  | ||||||
|         </description><param-name>sizeThreshold</param-name><param-value>4096</param-value></init-param></filter><filter-mapping><filter-name>UploadFilter</filter-name><servlet-name>Faces Servlet</servlet-name></filter-mapping><servlet><servlet-name>Faces Servlet</servlet-name><servlet-class>javax.faces.webapp.FacesServlet</servlet-class><load-on-startup> 1 </load-on-startup></servlet><servlet><servlet-name>ExceptionHandlerServlet</servlet-name><servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class><init-param><param-name>errorHost</param-name><param-value>localhost</param-value></init-param><init-param><param-name>errorPort</param-name><param-value>24444</param-value></init-param></servlet><servlet><servlet-name>ThemeServlet</servlet-name><servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class></servlet><servlet-mapping><servlet-name>Faces Servlet</servlet-name><url-pattern>/faces/*</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ExceptionHandlerServlet</servlet-name><url-pattern>/error/ExceptionHandler</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ThemeServlet</servlet-name><url-pattern>/theme/*</url-pattern></servlet-mapping><welcome-file-list> |  | ||||||
|         <welcome-file>faces/Login.jsp</welcome-file> |  | ||||||
|         </welcome-file-list><error-page><exception-type>javax.servlet.ServletException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>java.io.IOException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>javax.faces.FacesException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type><location>/error/ExceptionHandler</location></error-page><jsp-config><jsp-property-group><url-pattern>*.jspf</url-pattern><is-xml>true</is-xml></jsp-property-group></jsp-config></web-app> |  | ||||||
| Before Width: | Height: | Size: 1.8 KiB | 
| Before Width: | Height: | Size: 60 B | 
| Before Width: | Height: | Size: 3.7 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 2.3 KiB | 
| Before Width: | Height: | Size: 5.6 KiB | 
| Before Width: | Height: | Size: 5.2 KiB | 
| Before Width: | Height: | Size: 5.9 KiB | 
| Before Width: | Height: | Size: 4.9 KiB | 
| Before Width: | Height: | Size: 5.5 KiB | 
| Before Width: | Height: | Size: 6.3 KiB | 
| Before Width: | Height: | Size: 5.5 KiB | 
| Before Width: | Height: | Size: 5.4 KiB | 
| Before Width: | Height: | Size: 5.4 KiB | 
| Before Width: | Height: | Size: 5.0 KiB | 
| Before Width: | Height: | Size: 6.4 KiB | 
| Before Width: | Height: | Size: 7.1 KiB | 
| Before Width: | Height: | Size: 8.0 KiB | 
| Before Width: | Height: | Size: 5.8 KiB | 
| Before Width: | Height: | Size: 79 B | 
| Before Width: | Height: | Size: 79 B | 
| @ -1,188 +0,0 @@ | |||||||
| /* Style rules to make data tables look better */ |  | ||||||
| body {background-color: #bbd400} |  | ||||||
| .list-header { |  | ||||||
|   background-color: #eeeeee; |  | ||||||
|   font-size: larger; |  | ||||||
|   font-weight: bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .list-paging-header { |  | ||||||
|   background-color: white; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft { |  | ||||||
|   text-align : left; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColCenter { |  | ||||||
|   text-align: center;  |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColRight { |  | ||||||
|   text-align: right; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColRightBottom { |  | ||||||
|   text-align: right; |  | ||||||
|   vertical-align: bottom; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft5{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 5%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft10{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 10%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft15{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 15%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft20{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 20%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft25{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 25%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft30{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 30%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft70{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 70%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft75{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 75%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft85{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 85%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft90{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 90%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColLeft95{ |  | ||||||
|     text-align: left; |  | ||||||
|     width: 95%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridColRight85{ |  | ||||||
|     text-align: right; |  | ||||||
|     width: 85%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridBlockHeader{ |  | ||||||
|     background-color : #668597; |  | ||||||
|     text-align: left; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .restricoes{ |  | ||||||
|    border-spacing: 0; |  | ||||||
|    padding: 0px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .assinaturas{ |  | ||||||
|    border-spacing: 0; |  | ||||||
|    padding: 0px; |  | ||||||
| } |  | ||||||
| .gridColRestricoes{ |  | ||||||
|   border_bottom: solid 1px #000000; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridLayoutTopCols { |  | ||||||
|   vertical-align : top; |  | ||||||
|   width : 50%; |  | ||||||
|   border : solid 1px #000000; |  | ||||||
|   background-color: #f6f4e8; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .gridCellBordered { |  | ||||||
|   border-bottom : solid 1px #000000; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .footer {  |  | ||||||
|   bottom: 0;  |  | ||||||
|   height: 10%;  |  | ||||||
|   position: fixed;  |  | ||||||
|   right: 0;  |  | ||||||
|   top: 90%;  |  | ||||||
|   width: 100%  |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .centerBlock{ |  | ||||||
|     text-align: center; |  | ||||||
|     left: 0; |  | ||||||
|     right: 0; |  | ||||||
|     margin-left: auto; |  | ||||||
|     margin-right: auto;} |  | ||||||
| 
 |  | ||||||
| .labelBold{ |  | ||||||
|   font-weight : bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .list-row-even {  |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .list-row-odd {  |  | ||||||
|   background-color: #eeeeee; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* Style rules for message severity levels */ |  | ||||||
| 
 |  | ||||||
| .infoMessage { |  | ||||||
|   color: black; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .warnMessage { |  | ||||||
|   color: orange; |  | ||||||
|   font-weight: bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .errorMessage { |  | ||||||
|   color: red; |  | ||||||
|   font-weight: bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .fatalMessage { |  | ||||||
|   color: red; |  | ||||||
|   font-style: italic; |  | ||||||
|   font-weight: bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| .labelTrabalhador { |  | ||||||
|    color: #000000; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .labelTrabalhador:hover { |  | ||||||
|    font-weight: bold; |  | ||||||
|    text-decoration : none; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .labelCSS{ |  | ||||||
|     font-weight : bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .show{ |  | ||||||
|   display : inline; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .hide{ |  | ||||||
|   display : none ; |  | ||||||
| } |  | ||||||