Update - Part2
parent
88855b7cbe
commit
a7cc3b520f
|
@ -0,0 +1,68 @@
|
|||
<?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.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="ProjectDAE-ejb" default="default" basedir="." xmlns:ejbjarproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
|
||||
<description>Builds, tests, and runs the project ProjectDAE-ejb.</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-dist: called before archive building
|
||||
-post-dist: called after archive building
|
||||
-post-clean: called after cleaning build products
|
||||
-pre-run-deploy: called before deploying
|
||||
-post-run-deploy: called after deploying
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
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-debug: defines macro for class debugging
|
||||
do-dist: 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>
|
|
@ -0,0 +1,4 @@
|
|||
Manifest-Version: 1.0
|
||||
Ant-Version: Apache Ant 1.9.4
|
||||
Created-By: 1.8.0_66-b17 (Oracle Corporation)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||
<persistence-unit name="ProjectDAEPU" transaction-type="JTA">
|
||||
<jta-data-source>jdbc/PDAE</jta-data-source>
|
||||
<persistence-unit name="ProjectDAE-ejbPU" transaction-type="JTA">
|
||||
<jta-data-source>jdbc/ProjectDAE</jta-data-source>
|
||||
<exclude-unlisted-classes>false</exclude-unlisted-classes>
|
||||
<properties>
|
||||
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
entity/Administrator_.java
|
||||
entity/EventParticipant_.java
|
||||
entity/Event_.java
|
||||
entity/Participant_.java
|
||||
entity/Responsible_.java
|
||||
entity/ParticipantEvent_.java
|
||||
entity/Subject_.java
|
||||
entity/User_.java
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
META-INF/eclipselink-orm.xml
|
||||
META-INF/orm.xml
|
|
@ -0,0 +1,11 @@
|
|||
package entity;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(Administrator.class)
|
||||
public class Administrator_ extends User_ {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package entity;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(EventParticipant.class)
|
||||
public class EventParticipant_ {
|
||||
|
||||
public static volatile SingularAttribute<EventParticipant, Long> id_event;
|
||||
public static volatile SingularAttribute<EventParticipant, Boolean> presence;
|
||||
public static volatile SingularAttribute<EventParticipant, Integer> id_participant;
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package entity;
|
||||
|
||||
import entity.Participant;
|
||||
import entity.Responsible;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.ListAttribute;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(Event.class)
|
||||
public class Event_ {
|
||||
|
||||
public static volatile SingularAttribute<Event, Date> date;
|
||||
public static volatile SingularAttribute<Event, Boolean> openInscriptions;
|
||||
public static volatile SingularAttribute<Event, Responsible> responsible;
|
||||
public static volatile SingularAttribute<Event, String> name;
|
||||
public static volatile SingularAttribute<Event, Integer> id;
|
||||
public static volatile SingularAttribute<Event, String> type;
|
||||
public static volatile SingularAttribute<Event, String> local;
|
||||
public static volatile ListAttribute<Event, Participant> participants;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package entity;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(ParticipantEvent.class)
|
||||
public class ParticipantEvent_ {
|
||||
|
||||
public static volatile SingularAttribute<ParticipantEvent, Integer> event_id;
|
||||
public static volatile SingularAttribute<ParticipantEvent, Integer> participant_id;
|
||||
public static volatile SingularAttribute<ParticipantEvent, Boolean> present;
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package entity;
|
||||
|
||||
import entity.Event;
|
||||
import entity.Subject;
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.ListAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(Participant.class)
|
||||
public class Participant_ extends User_ {
|
||||
|
||||
public static volatile ListAttribute<Participant, Subject> subjects;
|
||||
public static volatile ListAttribute<Participant, Event> events;
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package entity;
|
||||
|
||||
import entity.Event;
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.ListAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(Responsible.class)
|
||||
public class Responsible_ extends User_ {
|
||||
|
||||
public static volatile ListAttribute<Responsible, Event> events;
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package entity;
|
||||
|
||||
import entity.Participant;
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.ListAttribute;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(Subject.class)
|
||||
public class Subject_ {
|
||||
|
||||
public static volatile SingularAttribute<Subject, Integer> courseYear;
|
||||
public static volatile SingularAttribute<Subject, String> name;
|
||||
public static volatile SingularAttribute<Subject, String> scholarYear;
|
||||
public static volatile SingularAttribute<Subject, Integer> id;
|
||||
public static volatile ListAttribute<Subject, Participant> participants;
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package entity;
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
import javax.persistence.metamodel.StaticMetamodel;
|
||||
|
||||
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
|
||||
@StaticMetamodel(User.class)
|
||||
public class User_ {
|
||||
|
||||
public static volatile SingularAttribute<User, String> password;
|
||||
public static volatile SingularAttribute<User, String> name;
|
||||
public static volatile SingularAttribute<User, Integer> id;
|
||||
public static volatile SingularAttribute<User, String> email;
|
||||
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project default="-deploy-ant" basedir=".">
|
||||
<target name="-init-cl-deployment-env" if="deploy.ant.enabled">
|
||||
<property file="${deploy.ant.properties.file}" />
|
||||
<available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
|
||||
<available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
|
||||
<available file="${deploy.ant.resource.dir}" property="has.setup"/>
|
||||
<tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
|
||||
<echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
|
||||
<tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
|
||||
<copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
|
||||
<!-- The doctype triggers resolution which can fail -->
|
||||
<replace file="${temp.sun.web}">
|
||||
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
|
||||
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
|
||||
</replace>
|
||||
<replace file="${temp.sun.web}">
|
||||
<replacetoken><![CDATA[<sun-web-app]]></replacetoken>
|
||||
<replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
|
||||
</replace>
|
||||
<xmlproperty file="${temp.sun.web}" validate="false">
|
||||
</xmlproperty>
|
||||
<delete file="${temp.sun.web}"/>
|
||||
<condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
|
||||
<isset property="sun-web-app.context-root"/>
|
||||
</condition>
|
||||
<condition property="deploy.context.root.argument" value="&contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
|
||||
<isset property="sun-web-app.context-root"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
|
||||
<tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
|
||||
<copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
|
||||
<!-- The doctype triggers resolution which can fail -->
|
||||
<replace file="${temp.gf.web}">
|
||||
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
|
||||
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
|
||||
</replace>
|
||||
<replace file="${temp.gf.web}">
|
||||
<replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
|
||||
<replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
|
||||
</replace>
|
||||
<xmlproperty file="${temp.gf.web}" validate="false">
|
||||
</xmlproperty>
|
||||
<delete file="${temp.gf.web}"/>
|
||||
<condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
|
||||
<isset property="glassfish-web-app.context-root"/>
|
||||
</condition>
|
||||
<condition property="deploy.context.root.argument" value="&contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
|
||||
<isset property="glassfish-web-app.context-root"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
|
||||
<property name="deploy.context.root.argument" value=""/>
|
||||
</target>
|
||||
<target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
|
||||
<tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
|
||||
<mkdir dir="${gfv3.resources.dir}"/>
|
||||
<mkdir dir="${gfv3.resources.dir}/META-INF"/>
|
||||
<copy todir="${gfv3.resources.dir}/META-INF">
|
||||
<fileset dir="${deploy.ant.resource.dir}"/>
|
||||
</copy>
|
||||
<jar destfile="${deploy.ant.archive}" update="true">
|
||||
<fileset dir="${gfv3.resources.dir}"/>
|
||||
</jar>
|
||||
<delete dir="${gfv3.resources.dir}"/>
|
||||
</target>
|
||||
<target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
|
||||
<antcall target="-deploy-without-pw"/>
|
||||
<antcall target="-deploy-with-pw"/>
|
||||
</target>
|
||||
|
||||
<target name="-deploy-without-pw" unless="gfv3.password">
|
||||
<echo message="Deploying ${deploy.ant.archive}"/>
|
||||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
|
||||
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
|
||||
<get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&force=true&name=${ant.project.name}"
|
||||
dest="${gfv3.results.file}"/>
|
||||
<delete file="${gfv3.results.file}"/>
|
||||
</target>
|
||||
<target name="-deploy-with-pw" if="gfv3.password">
|
||||
<echo message="Deploying ${deploy.ant.archive}"/>
|
||||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
|
||||
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
|
||||
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&force=true&name=${ant.project.name}"
|
||||
dest="${gfv3.results.file}"/>
|
||||
<delete file="${gfv3.results.file}"/>
|
||||
</target>
|
||||
<target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
|
||||
<antcall target="-undeploy-without-pw"/>
|
||||
<antcall target="-undeploy-with-pw"/>
|
||||
</target>
|
||||
|
||||
<target name="-undeploy-without-pw" unless="gfv3.password">
|
||||
<echo message="Undeploying ${deploy.ant.archive}"/>
|
||||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
|
||||
<get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
|
||||
dest="${gfv3.results.file}"/>
|
||||
<delete file="${gfv3.results.file}"/>
|
||||
</target>
|
||||
<target name="-undeploy-with-pw" if="gfv3.password">
|
||||
<echo message="Undeploying ${deploy.ant.archive}"/>
|
||||
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
|
||||
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
|
||||
dest="${gfv3.results.file}"/>
|
||||
<delete file="${gfv3.results.file}"/>
|
||||
</target>
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,8 @@
|
|||
build.xml.data.CRC32=73227301
|
||||
build.xml.script.CRC32=2639f0b7
|
||||
build.xml.stylesheet.CRC32=5910fda3@1.55.1
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=73227301
|
||||
nbproject/build-impl.xml.script.CRC32=683baaed
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1
|
|
@ -0,0 +1,8 @@
|
|||
deploy.ant.properties.file=C:\\Users\\franc\\AppData\\Roaming\\NetBeans\\8.1\\config\\GlassFishEE6\\Properties\\gfv3-944635675.properties
|
||||
j2ee.platform.is.jsr109=true
|
||||
j2ee.server.domain=C:/Users/franc/GlassFish_Server/glassfish/domains/domain1
|
||||
j2ee.server.home=C:/Users/franc/GlassFish_Server/glassfish
|
||||
j2ee.server.instance=[C:\\Users\\franc\\GlassFish_Server\\glassfish;C:\\Users\\franc\\GlassFish_Server\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848
|
||||
j2ee.server.middleware=C:/Users/franc/GlassFish_Server
|
||||
netbeans.user=C:\\Users\\franc\\AppData\\Roaming\\NetBeans\\8.1
|
||||
user.properties.file=C:\\Users\\franc\\AppData\\Roaming\\NetBeans\\8.1\\build.properties
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-ejb/src/java/ejbs/EventBean.java</file>
|
||||
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-ejb/src/java/ejbs/ResponsibleBean.java</file>
|
||||
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-ejb/src/java/ejbs/ParticipantBean.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
|
@ -0,0 +1,76 @@
|
|||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=true
|
||||
annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false
|
||||
annotation.processing.processors.list=
|
||||
annotation.processing.run.all.processors=true
|
||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
|
||||
build.dir=build
|
||||
build.ear.classes.dir=${build.dir}/classes
|
||||
build.generated.dir=${build.dir}/generated
|
||||
build.generated.sources.dir=${build.dir}/generated-sources
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
debug.classpath=${javac.classpath}:${build.classes.dir}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
dist.dir=dist
|
||||
dist.ear.jar=${dist.dir}/${jar.name}
|
||||
dist.jar=${dist.dir}/${jar.name}
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=\
|
||||
${libs.javaee-endorsed-api-7.0.classpath}
|
||||
excludes=
|
||||
includes=**
|
||||
j2ee.compile.on.save=true
|
||||
j2ee.deploy.on.save=true
|
||||
j2ee.platform=1.7
|
||||
j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar
|
||||
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
|
||||
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
|
||||
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.jar
|
||||
j2ee.platform.wsimport.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.jar
|
||||
j2ee.platform.wsit.classpath=
|
||||
j2ee.server.type=gfv3ee6
|
||||
jar.compress=false
|
||||
jar.name=ProjectDAE-ejb.jar
|
||||
javac.classpath=
|
||||
javac.debug=true
|
||||
javac.deprecation=false
|
||||
javac.processorpath=\
|
||||
${javac.classpath}:\
|
||||
${libs.eclipselink.classpath}:\
|
||||
${libs.eclipselinkmodelgen.classpath}
|
||||
javac.source=1.8
|
||||
javac.target=1.8
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javac.test.processorpath=${javac.test.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.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=
|
||||
meta.inf=${source.root}/conf
|
||||
meta.inf.excludes=sun-cmp-mappings.xml
|
||||
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 a class with a main method or a unit test
|
||||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
|
||||
runmain.jvmargs=
|
||||
source.encoding=UTF-8
|
||||
source.root=src
|
||||
src.dir=${source.root}/java
|
||||
test.src.dir=test
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.j2ee.ejbjarproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
|
||||
<name>ProjectDAE-ejb</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir" name="Source Packages"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir" name="Test Packages"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
|
||||
<resources>
|
||||
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="derby_net_ProjectDAE_daePool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
|
||||
<property name="serverName" value="localhost"/>
|
||||
<property name="portNumber" value="1527"/>
|
||||
<property name="databaseName" value="ProjectDAE"/>
|
||||
<property name="User" value="dae"/>
|
||||
<property name="Password" value="dae"/>
|
||||
<property name="URL" value="jdbc:derby://localhost:1527/ProjectDAE"/>
|
||||
<property name="driverClass" value="org.apache.derby.jdbc.ClientDriver"/>
|
||||
</jdbc-connection-pool>
|
||||
<jdbc-resource enabled="true" jndi-name="jdbc/ProjectDAE" object-type="user" pool-name="derby_net_ProjectDAE_daePool"/>
|
||||
</resources>
|
|
@ -0,0 +1,2 @@
|
|||
Manifest-Version: 1.0
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||
<persistence-unit name="ProjectDAE-ejbPU" transaction-type="JTA">
|
||||
<jta-data-source>jdbc/ProjectDAE</jta-data-source>
|
||||
<exclude-unlisted-classes>false</exclude-unlisted-classes>
|
||||
<properties>
|
||||
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
</persistence>
|
|
@ -26,7 +26,7 @@ import javax.validation.ConstraintViolationException;
|
|||
@Stateless
|
||||
public class AdministratorBean {
|
||||
|
||||
@PersistenceContext(unitName = "ProjectDAEPU")
|
||||
@PersistenceContext(unitName = "ProjectDAE-ejbPU")
|
||||
private EntityManager em;
|
||||
|
||||
//Create Admin
|
|
@ -6,6 +6,7 @@
|
|||
package ejbs;
|
||||
|
||||
import static com.sun.xml.bind.util.CalendarConv.formatter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.EJB;
|
||||
import javax.ejb.Singleton;
|
||||
|
@ -30,6 +31,8 @@ public class ConfigBean {
|
|||
@EJB
|
||||
private SubjectBean subjectBean;
|
||||
|
||||
|
||||
|
||||
// Add business logic below. (Right-click in editor and choose
|
||||
// "Insert Code > Add Business Method")
|
||||
|
||||
|
@ -38,16 +41,19 @@ public class ConfigBean {
|
|||
|
||||
try {
|
||||
// Create Administrator
|
||||
System.out.println("Create Administrator");
|
||||
administratorBean.createAdmininstrator(1, "administrator1", "administrator1", "Admistrator1@DAE.pt");
|
||||
administratorBean.createAdmininstrator(2, "administrator2", "administrator2", "Admistrator2@DAE.pt");
|
||||
|
||||
// Create Responsible
|
||||
System.out.println("Create Responsible");
|
||||
responsibleBean.createResponsible(3, "responsible1", "responsible1", "Responsible1@DAE.pt");
|
||||
responsibleBean.createResponsible(4, "responsible2", "responsible2", "Responsible2@DAE.pt");
|
||||
responsibleBean.createResponsible(5, "responsible3", "responsible3", "Responsible3@DAE.pt");
|
||||
responsibleBean.createResponsible(6, "responsible4", "responsible4", "Responsible4@DAE.pt");
|
||||
|
||||
// Create Participant
|
||||
System.out.println("Create Participant");
|
||||
participantBean.createParticipant(7, "participant1", "participant1", "Participant1@DAE.pt");
|
||||
participantBean.createParticipant(8, "participant2", "participant2", "Participant2@DAE.pt");
|
||||
participantBean.createParticipant(9, "participant3", "participant3", "Participant3@DAE.pt");
|
||||
|
@ -58,10 +64,12 @@ public class ConfigBean {
|
|||
participantBean.createParticipant(14, "participant8", "participant8", "Participant8@DAE.pt");
|
||||
|
||||
// Create Event
|
||||
eventBean.createEvent(1, formatter.parse("21/01/2016"), "Evento 1", "Aula", "ESTG", 3);
|
||||
System.out.println("Create Event");
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
|
||||
eventBean.createEvent(1, formatter.parse("21/03/2015"), "Evento 1", "Aula", "ESTG", 3);
|
||||
eventBean.createEvent(2, formatter.parse("05/05/2016"), "Evento 2", "Aula", "ESTG", 4);
|
||||
eventBean.createEvent(3, formatter.parse("07/10/2016"), "Evento 3", "Aula", "ESTG", 4);
|
||||
eventBean.createEvent(3, formatter.parse("18/02/2017"), "Evento 4", "Aula", "ESTG", 5);
|
||||
eventBean.createEvent(4, formatter.parse("18/02/2017"), "Evento 4", "Aula", "ESTG", 5);
|
||||
|
||||
participantBean.enrollParticipant(7, 1);
|
||||
participantBean.enrollParticipant(8, 1);
|
||||
|
@ -71,6 +79,7 @@ public class ConfigBean {
|
|||
participantBean.enrollParticipant(12, 2);
|
||||
|
||||
// Create Subject
|
||||
System.out.println("Create Subject");
|
||||
subjectBean.createSubject(1, "IEI", 1, "2015/2016");
|
||||
subjectBean.createSubject(2, "TC", 1, "2015/2016");
|
||||
subjectBean.createSubject(3, "PA", 2, "2015/2016");
|
|
@ -29,7 +29,7 @@ import javax.validation.ConstraintViolationException;
|
|||
@Stateless
|
||||
public class EventBean {
|
||||
|
||||
@PersistenceContext(unitName = "ProjectDAEPU")
|
||||
@PersistenceContext
|
||||
private EntityManager em;
|
||||
|
||||
/*public List<String> list() {
|
|
@ -29,7 +29,7 @@ import javax.validation.ConstraintViolationException;
|
|||
@Stateless
|
||||
public class ParticipantBean {
|
||||
|
||||
@PersistenceContext(unitName = "ProjectDAEPU")
|
||||
@PersistenceContext(unitName = "ProjectDAE-ejbPU")
|
||||
private EntityManager em;
|
||||
|
||||
//Create Participant
|
|
@ -27,7 +27,7 @@ import javax.validation.ConstraintViolationException;
|
|||
@Stateless
|
||||
public class ResponsibleBean {
|
||||
|
||||
@PersistenceContext(unitName = "ProjectDAEPU")
|
||||
@PersistenceContext(unitName = "ProjectDAE-ejbPU")
|
||||
private EntityManager em;
|
||||
|
||||
public List<Event> listEvents() {
|
|
@ -27,7 +27,7 @@ public class SubjectBean {
|
|||
|
||||
// Add business logic below. (Right-click in editor and choose
|
||||
// "Insert Code > Add Business Method")
|
||||
@PersistenceContext(unitName = "ProjectDAEPU")
|
||||
@PersistenceContext
|
||||
private EntityManager em;
|
||||
|
||||
public void createSubject(int id, String name, int courseYear, String scholarYear)
|
|
@ -25,6 +25,7 @@ import javax.persistence.Table;
|
|||
@NamedQuery(name = "getAllResponsibles",
|
||||
query = "SELECT r FROM Responsible r ORDER BY r.name")
|
||||
})
|
||||
|
||||
public class Responsible extends User implements Serializable {
|
||||
|
||||
@OneToMany(mappedBy = "responsible", cascade = CascadeType.REMOVE)
|
|
@ -0,0 +1,71 @@
|
|||
<?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.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="ProjectDAE-war" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project ProjectDAE-war.</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 archive building
|
||||
-post-dist: called after archive 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: 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>
|
|
@ -211,6 +211,46 @@ and open the template in the editor.
|
|||
<h:form>
|
||||
<h:commandLink action="create_event" value="Create Event"></h:commandLink>
|
||||
</h:form>
|
||||
|
||||
<br></br>
|
||||
<!-- //////////////////////////Subjects////////////////////////// -->
|
||||
<div>Subjects</div>
|
||||
<h:dataTable value="#{administratorManager.allSubjects}"
|
||||
var="subject"
|
||||
summary="List of all Subject"
|
||||
rules="all"
|
||||
cellpadding="5">>
|
||||
<h:column>
|
||||
<f:facet name="header">ID</f:facet>
|
||||
<h:outputText value="#{subject.id}"/>
|
||||
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Name</f:facet>
|
||||
<h:outputText value="#{subject.name}"/>
|
||||
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Ano</f:facet>
|
||||
<h:outputText value="#{subject.courseYear}"/>
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Anolectivo</f:facet>
|
||||
<h:outputText value="#{subject.scholarYear}"/>
|
||||
</h:column>
|
||||
|
||||
|
||||
<h:column>
|
||||
<f:facet name="header">
|
||||
<h:outputText value="Actions" />
|
||||
</f:facet>
|
||||
<h:form>
|
||||
<h:commandLink value="Details" action="event_details?faces-redirect=true">
|
||||
<f:setPropertyActionListener target="#{administratorManager.currentSubject}" value="#{subject}" />
|
||||
</h:commandLink>
|
||||
</h:form>
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
|
||||
<h:form>
|
||||
<br></br>
|
|
@ -0,0 +1,4 @@
|
|||
Manifest-Version: 1.0
|
||||
Ant-Version: Apache Ant 1.9.4
|
||||
Created-By: 1.8.0_66-b17 (Oracle Corporation)
|
||||
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue