Spokojenost: pokračování.
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 13 Jan 2011 23:13:09 +0100
changeset 165cdfc1e9e3a1b
parent 164 e146e2e3b80b
child 166 7f9c6d10c3f6
Spokojenost: pokračování.
java/nekurak.net-ear/nbproject/project.properties
java/nekurak.net-ejb/nbproject/project.properties
java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Kurackost.java
java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java
java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/VysledekHlasovani.java
java/nekurak.net-web/web/styl.css
java/nekurak.net-ws/nbproject/build-impl.xml
java/nekurak.net-ws/nbproject/genfiles.properties
java/nekurak.net-ws/nbproject/jax-ws.xml
java/nekurak.net-ws/nbproject/jaxws-build.xml
java/nekurak.net-ws/nbproject/project.xml
     1.1 --- a/java/nekurak.net-ear/nbproject/project.properties	Wed Jan 12 16:15:37 2011 +0100
     1.2 +++ b/java/nekurak.net-ear/nbproject/project.properties	Thu Jan 13 23:13:09 2011 +0100
     1.3 @@ -12,7 +12,7 @@
     1.4  j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args}
     1.5  j2ee.deploy.on.save=false
     1.6  j2ee.platform=1.6
     1.7 -j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar
     1.8 +j2ee.platform.classpath=
     1.9  j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
    1.10  j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
    1.11  j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
     2.1 --- a/java/nekurak.net-ejb/nbproject/project.properties	Wed Jan 12 16:15:37 2011 +0100
     2.2 +++ b/java/nekurak.net-ejb/nbproject/project.properties	Thu Jan 13 23:13:09 2011 +0100
     2.3 @@ -24,7 +24,7 @@
     2.4  includes=**
     2.5  j2ee.deploy.on.save=false
     2.6  j2ee.platform=1.6
     2.7 -j2ee.platform.classpath=${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jsr311-api.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/mail.jar
     2.8 +j2ee.platform.classpath=
     2.9  j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
    2.10  j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
    2.11  j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
     3.1 --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Kurackost.java	Wed Jan 12 16:15:37 2011 +0100
     3.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Kurackost.java	Thu Jan 13 23:13:09 2011 +0100
     3.3 @@ -7,7 +7,8 @@
     3.4   */
     3.5  public class Kurackost {
     3.6  
     3.7 -	private int id;
     3.8 +	/** 0 = neznámý stav */
     3.9 +	private int id = 0;
    3.10  
    3.11  	public int getId() {
    3.12  		return id;
     4.1 --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java	Wed Jan 12 16:15:37 2011 +0100
     4.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/Podnik.java	Thu Jan 13 23:13:09 2011 +0100
     4.3 @@ -28,7 +28,7 @@
     4.4  	private Set<Kategorie> kategorie = new HashSet<Kategorie>();
     4.5  	private Double sirka;
     4.6  	private Double delka;
     4.7 -	private Kurackost kurackost;
     4.8 +	private Kurackost kurackost = new Kurackost();
     4.9  
    4.10  	public Podnik() {
    4.11  	}
     5.1 --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/VysledekHlasovani.java	Wed Jan 12 16:15:37 2011 +0100
     5.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/dto/VysledekHlasovani.java	Thu Jan 13 23:13:09 2011 +0100
     5.3 @@ -11,7 +11,6 @@
     5.4  public class VysledekHlasovani {
     5.5  
     5.6  	private static final Logger log = Logger.getLogger(VysledekHlasovani.class.getSimpleName());
     5.7 -
     5.8  	private int hlasuAno;
     5.9  	private int hlasuNe;
    5.10  	private Podnik podnik;
    5.11 @@ -45,7 +44,7 @@
    5.12  	public Boolean getSpokojenost() {
    5.13  		int k = podnik.getKurackost().getId();
    5.14  
    5.15 -		if (k == 0) {
    5.16 +		if (k == 0 || (hlasuAno == 0 && hlasuNe == 0)) {
    5.17  			/** neznámý stav → neznámá spokojenost */
    5.18  			return null;
    5.19  		} else if (k == 1 || k == 4) {
    5.20 @@ -59,7 +58,7 @@
    5.21  			int soucet = hlasuAno + hlasuNe;
    5.22  			return hlasuAno > 0.35 * soucet && hlasuAno < 0.65 * soucet;
    5.23  		} else {
    5.24 -			log.log(Level.SEVERE, "Neznámá hodnota kuřáckosti: {0} u podniku: {1}", new Integer[] {k, podnik.getId()});
    5.25 +			log.log(Level.SEVERE, "Neznámá hodnota kuřáckosti: {0} u podniku: {1}", new Integer[]{k, podnik.getId()});
    5.26  			return null;
    5.27  		}
    5.28  	}
     6.1 --- a/java/nekurak.net-web/web/styl.css	Wed Jan 12 16:15:37 2011 +0100
     6.2 +++ b/java/nekurak.net-web/web/styl.css	Thu Jan 13 23:13:09 2011 +0100
     6.3 @@ -303,7 +303,7 @@
     6.4  	margin-left: 20px;
     6.5  	padding: 0 10px 0 12px;
     6.6  	background: silver;
     6.7 -	color: #666;
     6.8 +	color: #444;
     6.9  	text-decoration: none;
    6.10  	-moz-border-radius-bottomright:		4px;
    6.11  	-webkit-border-bottom-right-radius:	4px;
     7.1 --- a/java/nekurak.net-ws/nbproject/build-impl.xml	Wed Jan 12 16:15:37 2011 +0100
     7.2 +++ b/java/nekurak.net-ws/nbproject/build-impl.xml	Thu Jan 13 23:13:09 2011 +0100
     7.3 @@ -18,6 +18,7 @@
     7.4  
     7.5          -->
     7.6  <project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="nekurak.net-ws-impl">
     7.7 +    <import file="jaxws-build.xml"/>
     7.8      <import file="ant-deploy.xml"/>
     7.9      <fail message="Please build using Ant 1.7.1 or higher.">
    7.10          <condition>
     8.1 --- a/java/nekurak.net-ws/nbproject/genfiles.properties	Wed Jan 12 16:15:37 2011 +0100
     8.2 +++ b/java/nekurak.net-ws/nbproject/genfiles.properties	Thu Jan 13 23:13:09 2011 +0100
     8.3 @@ -3,8 +3,8 @@
     8.4  build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1
     8.5  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     8.6  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     8.7 -nbproject/build-impl.xml.data.CRC32=8b9ba573
     8.8 -nbproject/build-impl.xml.script.CRC32=14e75ae9
     8.9 +nbproject/build-impl.xml.data.CRC32=e6e63e07
    8.10 +nbproject/build-impl.xml.script.CRC32=9b10bf3f
    8.11  nbproject/build-impl.xml.stylesheet.CRC32=8419264d@1.24.3.1
    8.12  nbproject/wsit-deploy.xml.data.CRC32=4cb22909
    8.13  nbproject/wsit-deploy.xml.script.CRC32=deb039de
     9.1 --- a/java/nekurak.net-ws/nbproject/jax-ws.xml	Wed Jan 12 16:15:37 2011 +0100
     9.2 +++ b/java/nekurak.net-ws/nbproject/jax-ws.xml	Thu Jan 13 23:13:09 2011 +0100
     9.3 @@ -1,6 +1,12 @@
     9.4  <?xml version="1.0" encoding="UTF-8"?>
     9.5  <jax-ws xmlns="http://www.netbeans.org/ns/jax-ws/1">
     9.6    <services>
     9.7 +    <service name="Podnik">
     9.8 +      <implementation-class>cz.frantovo.nekurak.ws.Podnik</implementation-class>
     9.9 +    </service>
    9.10 +    <service name="Pokus">
    9.11 +      <implementation-class>cz.frantovo.nekurak.ws.Pokus</implementation-class>
    9.12 +    </service>
    9.13    </services>
    9.14    <clients/>
    9.15  </jax-ws>
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/java/nekurak.net-ws/nbproject/jaxws-build.xml	Thu Jan 13 23:13:09 2011 +0100
    10.3 @@ -0,0 +1,37 @@
    10.4 +<?xml version="1.0" encoding="UTF-8"?>
    10.5 +<!--
    10.6 +        *** GENERATED FROM jax-ws.xml - DO NOT EDIT !                             ***
    10.7 +        *** TO MODIFY wsimport options USE Web Service node -> Edit WS Attributes ***
    10.8 +        *** TO CHANGE TARGETS GENERATED TO jaxws-build.xml COPY THOSE             ***
    10.9 +        *** TARGETS TO ../build.xml AND MODIFY THAT FILE INSTEAD                  ***
   10.10 +
   10.11 +        -->
   10.12 +<project xmlns:xalan="http://xml.apache.org/xslt" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
   10.13 +    <!--
   10.14 +                ===================
   10.15 +                JAX-WS WSGEN SECTION
   10.16 +                ===================
   10.17 +            -->
   10.18 +    <target name="wsgen-init" depends="init, -do-compile">
   10.19 +        <mkdir dir="${build.generated.sources.dir}/jax-ws/resources/"/>
   10.20 +        <mkdir dir="${build.classes.dir}"/>
   10.21 +        <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
   10.22 +            <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
   10.23 +        </taskdef>
   10.24 +    </target>
   10.25 +    <target name="wsgen-Podnik" depends="wsgen-init">
   10.26 +        <wsgen sourcedestdir="${build.generated.sources.dir}/jax-ws" resourcedestdir="${build.generated.sources.dir}/jax-ws/resources/" destdir="${build.generated.sources.dir}/jax-ws" verbose="true" xendorsed="true" keep="true" genwsdl="true" sei="cz.frantovo.nekurak.ws.Podnik">
   10.27 +            <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
   10.28 +        </wsgen>
   10.29 +    </target>
   10.30 +    <target name="wsgen-Pokus" depends="wsgen-init">
   10.31 +        <wsgen sourcedestdir="${build.generated.sources.dir}/jax-ws" resourcedestdir="${build.generated.sources.dir}/jax-ws/resources/" destdir="${build.generated.sources.dir}/jax-ws" verbose="true" xendorsed="true" keep="true" genwsdl="true" sei="cz.frantovo.nekurak.ws.Pokus">
   10.32 +            <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
   10.33 +        </wsgen>
   10.34 +    </target>
   10.35 +    <!--
   10.36 +                ===================
   10.37 +                JAX-WS WSIMPORT SECTION
   10.38 +                ===================
   10.39 +            -->
   10.40 +</project>
    11.1 --- a/java/nekurak.net-ws/nbproject/project.xml	Wed Jan 12 16:15:37 2011 +0100
    11.2 +++ b/java/nekurak.net-ws/nbproject/project.xml	Thu Jan 13 23:13:09 2011 +0100
    11.3 @@ -2,7 +2,9 @@
    11.4  <project xmlns="http://www.netbeans.org/ns/project/1">
    11.5      <type>org.netbeans.modules.web.project</type>
    11.6      <configuration>
    11.7 -        <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"/>
    11.8 +        <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
    11.9 +            <extension file="jaxws-build.xml" id="jaxws"/>
   11.10 +        </buildExtensions>
   11.11          <data xmlns="http://www.netbeans.org/ns/web-project/3">
   11.12              <name>nekurak.net-ws</name>
   11.13              <minimum-ant-version>1.6.5</minimum-ant-version>