Skip to content

Commit

Permalink
Merge pull request #45 from AMOSTeam1/msg-branches
Browse files Browse the repository at this point in the history
msg-branches
  • Loading branch information
AMOSTeam1 authored Jun 6, 2018
2 parents 901dd6b + 763fec9 commit 15c858a
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
package com.msg.nfabackend.entities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Table;

@Entity
@Table(name ="nfa_factor")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package com.msg.nfabackend.entities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.JoinColumn;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.Table;


/**
Expand Down
18 changes: 10 additions & 8 deletions nfabackend/src/main/resources-filtered/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<persistence 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" version="2.1">

<persistence-unit name="msg-nfa" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>com.msg.nfabackend.entities.Project</class>
<class>com.msg.nfabackend.entities.Metric</class>
<class>com.msg.nfabackend.entities.Nfa</class>
<class>com.msg.nfabackend.entities.Type</class>
<class>com.msg.nfabackend.entities.nfaCatalog</class>
<class>com.msg.nfabackend.entities.NfaFactor</class>
<class>com.msg.nfabackend.entities.NfaCriteria</class>
<class>com.msg.nfabackend.entities.NfaFactor</class>
<class>com.msg.nfabackend.entities.Project</class>
<class>com.msg.nfabackend.entities.Stakeholder</class>
<class>com.msg.nfabackend.entities.Type</class>
<properties>
<property name="javax.persistence.jdbc.user" value="${jdbc.user}"/>
<property name="javax.persistence.jdbc.password" value="${jdbc.password}"/>
<property name="javax.persistence.jdbc.url" value="${jdbc.url}"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"/>
<property name="javax.persistence.schema-generation.scripts.action" value="none"/>
<property name="javax.persistence.jdbc.user" value="${jdbc.user}"/>
<property name="javax.persistence.jdbc.password" value="${jdbc.password}"/>
<property name="javax.persistence.jdbc.url" value="${jdbc.url}"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
</properties>
</persistence-unit>
</persistence>
35 changes: 17 additions & 18 deletions nfabackend/src/main/resources/ddl/NFADB.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
DROP TABLE IF EXISTS project_type;

DROP TABLE IF EXISTS project_stakeholder;
DROP TABLE IF EXISTS stakeholder_factor;

DROP TABLE IF EXISTS stakeholder;
DROP TABLE IF EXISTS nfa_project;
DROP TABLE IF EXISTS metric_nfa;

DROP TABLE IF EXISTS type;
DROP TABLE IF EXISTS new_nfa;
DROP TABLE IF EXISTS nfa;

DROP TABLE IF EXISTS criteria_metric;
DROP TABLE IF EXISTS metric;

DROP TABLE IF EXISTS factor_criteria;
DROP TABLE IF EXISTS nfa_factor;
DROP TABLE IF EXISTS nfa_criteria;


CREATE TABLE public.nfa_project
Expand All @@ -17,16 +29,15 @@ CREATE TABLE public.nfa_project
BRANCH character varying(40),
DEVELOPMENT_PROCESS character varying(40),
PROJECT_PHASE character varying(40),
PROJECT_STATUS character varying(40)
PROJECT_STATUS character varying(40)
);
INSERT INTO nfa_project VALUES (1,'1234','ArbeitAgentur','Tom','Alex','Public Sector','Agile','None','On Process');
INSERT INTO nfa_project VALUES (2,'1234','XYZ','Bob','Alex','Public Sector','Classic','Specification Sheet','Archived');
INSERT INTO nfa_project VALUES (3,'1234','ABC','John','Alex','Public Sector','Agile','None','On Process');
INSERT INTO nfa_project VALUES (4,'1234','ASDF','Andre','Alex','Public Sector','Classic','Requirements Specification','Archived');

DROP TABLE IF EXISTS new_nfa;

CREATE TABLE new_nfa (

CREATE TABLE public.new_nfa (
nfa_id serial NOT NULL,
factor varchar(45) NOT NULL,
criteria varchar(45) NOT NULL,
Expand All @@ -37,16 +48,14 @@ CREATE TABLE new_nfa (

INSERT INTO new_nfa VALUES (1,'any factor','any criteria','any metric','any nfatype');

DROP TABLE IF EXISTS stakeholder;

CREATE TABLE stakeholder (
CREATE TABLE public.stakeholder (
stakeholder_id bigserial NOT NULL,
stakeholder_name varchar(45) NOT NULL,
PRIMARY KEY (stakeholder_id)
);


DROP TABLE IF EXISTS project_stakeholder;
CREATE TABLE public.project_stakeholder
(
project_id bigint NOT NULL,
Expand All @@ -63,7 +72,7 @@ CREATE TABLE public.project_stakeholder



DROP TABLE IF EXISTS public.type;

CREATE TABLE public.type
(
id bigserial NOT NULL,
Expand All @@ -74,7 +83,6 @@ CREATE TABLE public.type
INSERT INTO public.type VALUES (1,'Communication Project');
INSERT INTO public.type VALUES (2,'Data Exchange Project');

DROP TABLE IF EXISTS project_type;
CREATE TABLE public.project_type
(
project_id bigint NOT NULL,
Expand All @@ -100,15 +108,12 @@ INSERT INTO public.project_type VALUES (4,2);
/* NFA CATALOG STUFF */
--------------------------------------------------------------

DROP TABLE IF EXISTS nfa_factor CASCADE;
CREATE TABLE public.nfa_factor
(
factor_id serial PRIMARY KEY,
factor varchar(45) NOT NULL
);


DROP TABLE IF EXISTS nfa_criteria CASCADE;
CREATE TABLE public.nfa_criteria
(
criteria_id serial PRIMARY KEY,
Expand All @@ -117,7 +122,6 @@ CREATE TABLE public.nfa_criteria
);


DROP TABLE IF EXISTS factor_criteria;
CREATE TABLE public.factor_criteria
(
factor_id bigint NOT NULL,
Expand Down Expand Up @@ -280,7 +284,6 @@ INSERT INTO public.factor_criteria VALUES (13, 40);
INSERT INTO public.factor_criteria VALUES (13, 41);
INSERT INTO public.factor_criteria VALUES (13, 42);

DROP TABLE IF EXISTS metric CASCADE;
CREATE TABLE public.metric
(
ID serial PRIMARY KEY,
Expand All @@ -296,7 +299,6 @@ INSERT INTO metric VALUES (2,2,'Fehler bei der Arbeit','X = A; A = Anzahl der Fe
INSERT INTO metric VALUES (3,3,'Fehlerhafte Arbeit','X = A/B; A = Anzahl der fehlerhaften Aufgaben; B = Gesamtzahl an Aufgaben','{X | 0 ≤ X ≤ 1}; Je näher der Wert an "0" ist, desto besser.','Bei wie vielen Aufgaben Fehler gemacht wur-den. Hierbei wird die Anzahl der fehlerhaften Aufgaben mit der Gesamtzahl aller Aufgaben verglichen');
INSERT INTO metric VALUES (4,4,'Fehlerintensität','X = A/B; A = Anzahl der Nutzer, die einen Fehler gemacht haben; B = Ge-samtzahl der Nutzer, die eine Aufgabe durchführen','{X | 0 ≤ X ≤ 1}; Je näher der Wert an "0" ist, desto besser.','Wie viele Nutzer einen Fehler gemacht haben. Hierbei wird die Anzahl der Nutzer, die einen Fehler gemacht haben, mit der Gesamtzahl der Nutzer, die eine Aufgabe durchführen, vergli-chen.');

DROP TABLE IF EXISTS criteria_metric CASCADE;
CREATE TABLE public.criteria_metric
(
criteria_id bigint NOT NULL,
Expand All @@ -316,7 +318,6 @@ INSERT INTO public.criteria_metric VALUES (43, 2);
INSERT INTO public.criteria_metric VALUES (43, 3);
INSERT INTO public.criteria_metric VALUES (43, 4);

DROP TABLE IF EXISTS nfa CASCADE;
CREATE TABLE public.nfa
(
nfa_id serial PRIMARY KEY,
Expand All @@ -337,7 +338,6 @@ INSERT INTO nfa VALUES (3,1,'Type:1','Fehleranteil','Verbindlichkeit:1','12.22',
INSERT INTO nfa VALUES (4,1,'Type:1','Entstehende Fehler','Verbindlichkeit:1','12.22','Formulierung:1','Bei der Bearbeitung von Aufgaben mit dem Sys-tem sollen möglichst keine Fehler entstehen.','referenz:1','referenzierte_projekt:1','kritikalitaet', 'document1');
INSERT INTO nfa VALUES (5,1,'Type:1','Fehlerfreie Bedienung','Verbindlichkeit:1','12.22','Formulierung:1','Der bzw. die Anwender_in muss das System möglichst fehlerfrei bedienen können.','referenz:1','referenzierte_projekt:1','kritikalitaet', 'document1');

DROP TABLE IF EXISTS metric_nfa;
CREATE TABLE public.metric_nfa
(
metric_id bigint NOT NULL,
Expand All @@ -358,7 +358,6 @@ INSERT INTO public.metric_nfa VALUES (2, 3);
INSERT INTO public.metric_nfa VALUES (3, 4);
INSERT INTO public.metric_nfa VALUES (4, 5);

DROP TABLE IF EXISTS stakeholder_factor;
CREATE TABLE public.stakeholder_factor
(
stakeholder_id bigint NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@
<label for="branch"><small>{{'nfa.new-project.branch.label' | translate }}</small></label>
<select id="branch" formControlName="branch" class="form-control">
<option value="" disabled>{{'nfa.new-project.branch.choose' | translate }}</option>
<option value="Public Sector">{{'nfa.new-project.branch.public-sector' | translate }}</option>
<option value="Automotive">{{'nfa.new-project.branch.automotive' | translate }}</option>
<option value="Banking">{{'nfa.new-project.branch.banking' | translate }}</option>
<option value="Banking">{{'nfa.new-project.branch.banking'| translate }}</option>
<option value="Food">{{'nfa.new-project.branch.food'| translate }}</option>
<option value="Insurance">{{'nfa.new-project.branch.insurance'| translate }}</option>
<option value="Public Sector">{{'nfa.new-project.branch.public-sector'| translate }}</option>
<option value="Life Science & Healthcare">{{'nfa.new-project.branch.life-science-healthcare'| translate }}</option>
<option value="Telecommunications">{{'nfa.new-project.branch.telecommunications'| translate }}</option>
<option value="Travel & Logistics">{{'nfa.new-project.branch.travel-logistics'| translate }}</option>
<option value="Utilities">{{'nfa.new-project.branch.utilities' | translate }}</option>
</select>
</div>
</div>
Expand Down
19 changes: 8 additions & 11 deletions nfafrontend/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
"customer-name" : "Kundenname",
"customer-name-example" : "Bundesargentur für Arbeit",

"contact-person-customer" : "Kontakt Person des Kunden",
"contact-person-customer" : "Kontaktperson des Kunden",
"contact-person-customer-example" : "Max Mustermann",

"contact-person-msg" : "Kontakt Person msg",
"contact-person-msg" : "Kontaktperson msg",
"contact-person-msg-example" : "Thomas Rauch",

"branch" : {
"label" : "Branche",
"choose" : "Branche auswählen",
"public-sector" : "Öffentlicher Sektor",
"automotive" : "Automobil-Branche",
"banking" : "Bankwesen"
"choose" : "Branche auswählen"
},

"project-type" : {
Expand All @@ -32,17 +29,17 @@
},

"development-process" : {
"label": "Entwicklungs Prozess",
"label": "Entwicklungsprozess",
"choose" : "Prozess wählen",
"agile" : "Agil",
"classic" : "Klassisch"
},

"project-phase" : {
"label": "Projekt Phase",
"choose" : "Projekt Phase auswählen",
"specification" : "Spezifikations Document",
"requrements" : "Anforderungs Spezifizierung"
"label": "Projektphase",
"choose" : "Projektphase auswählen",
"specification" : "Spezifikations Dokument",
"requrements" : "Anforderungsspezifizierung"
},


Expand Down
10 changes: 8 additions & 2 deletions nfafrontend/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@
"branch" : {
"label" : "Branch",
"choose" : "Choose branch",
"public-sector" : "Public Sector",
"automotive" : "Automotive",
"banking" : "Banking"
"banking" : "Banking",
"food" : "Food",
"insurance" : "Insurance",
"public-sector" : "Public Sector",
"life-science-healthcare" : "Life Science & Healthcare",
"telecommunications" : "Telecommunications",
"travel-logistics" : "Travel & Logistics",
"utilities" : "Utilities"
},

"project-type" : {
Expand Down

0 comments on commit 15c858a

Please sign in to comment.