Commit fc24c955 authored by Paff's avatar Paff
Browse files

running exmaple

parents b3f49dfc 2584b953
...@@ -11,7 +11,7 @@ import secarc.seccds.fe.Store; ...@@ -11,7 +11,7 @@ import secarc.seccds.fe.Store;
component CashDeskSystem { component CashDeskSystem {
trustlevel -1; trustlevel +0 "interne Angreifer";
autoconnect encrypted port; autoconnect encrypted port;
autoinstantiate on; autoinstantiate on;
...@@ -20,18 +20,14 @@ component CashDeskSystem { ...@@ -20,18 +20,14 @@ component CashDeskSystem {
port port
in Event newSale, in Event newSale,
in Image barcode, in Image barcode,
in String identifier,
in Event endSale, in Event endSale,
out ProductData; out ProductData outProductData;
port port
in Event cardPay, in Event cardPay,
in CardData, in CardData,
in Integer pin, in Integer pin,
out Boolean validation; out Boolean validation;
port
out Bill;
component CashDesk cashDesk component CashDesk cashDesk
[encrypted bdOut -> bank.bankData; [encrypted bdOut -> bank.bankData;
...@@ -46,10 +42,8 @@ component CashDeskSystem { ...@@ -46,10 +42,8 @@ component CashDeskSystem {
connect cashDesk -> store; connect cashDesk -> store;
connect cashDesk.outProductData -> productData; connect cashDesk.outProductData -> outProductData;
connect store.productData -> cashDesk.inProductData;
connect identifier -> cashDesk.inIdentifier; connect store.outProductData -> cashDesk.inProductData;
} }
\ No newline at end of file
...@@ -7,27 +7,26 @@ import java.awt.Image; ...@@ -7,27 +7,26 @@ import java.awt.Image;
component CashDesk { component CashDesk {
trustlevel +1; trustlevel +1;
access cashier;
port port
in Event newSale, in Event newSale,
in Image barcode, in Image barcode,
in String inIdentifier,
out String outIdentifier, out String outIdentifier,
in Event endSale, in Event endSale,
in ProductData inProductData, in ProductData inProductData,
in PaymentAck paymentAck,
out ProductData outProductData; out ProductData outProductData;
port port
in Event cardPay, in Event cardPay,
critical in CardData, in CardData,
critical in Integer pin, in Integer pin,
critical out BankData bdOut, out BankData bdOut,
in PaymentAck paIn, in PaymentAck paIn,
out Boolean validation; out Boolean validation;
port port
out SaleInformation, out SaleInformation;
out Bill;
} }
\ No newline at end of file
...@@ -16,9 +16,8 @@ component Store { ...@@ -16,9 +16,8 @@ component Store {
identity weak cashDesk -> store; identity weak cashDesk -> store;
port port
in String identifier, in String intIdentifier,
out ProductData, out ProductData outProductData;
out PaymentAck;
port port
in SaleInformation; in SaleInformation;
...@@ -29,7 +28,7 @@ component Store { ...@@ -29,7 +28,7 @@ component Store {
cpe "cpeName"; cpe "cpeName";
port port
in String identifier, in String inIdentifier,
out Identifier; out Identifier;
} }
......
...@@ -16,9 +16,8 @@ component CashDeskSystem { ...@@ -16,9 +16,8 @@ component CashDeskSystem {
port port
in Event newSale, in Event newSale,
in Image barcode, in Image barcode,
in String identifier,
in Event endSale, in Event endSale,
out ProductData; out ProductData outProductData;
port port
in Event cardPay, in Event cardPay,
...@@ -26,17 +25,11 @@ component CashDeskSystem { ...@@ -26,17 +25,11 @@ component CashDeskSystem {
in Integer pin, in Integer pin,
out Boolean validation; out Boolean validation;
port
out Bill;
component Store { component Store {
port port
in String inIdentifier, in String inIdentifier,
out ProductData outProductData, out ProductData outProductData,
out PaymentAck;
port
in SaleInformation; in SaleInformation;
} }
...@@ -50,10 +43,8 @@ component CashDeskSystem { ...@@ -50,10 +43,8 @@ component CashDeskSystem {
connect cashDesk -> store; connect cashDesk -> store;
connect cashDesk.outProductData -> productData; connect cashDesk.outProductData -> outProductData;
connect store.outProductData -> cashDesk.inProductData; connect store.outProductData -> cashDesk.inProductData;
connect identifier -> cashDesk.inIdentifier;
} }
\ No newline at end of file
...@@ -6,14 +6,14 @@ import java.awt.Image; ...@@ -6,14 +6,14 @@ import java.awt.Image;
component CashDesk { component CashDesk {
trustlevel +1;
port port
in Event newSale, in Event newSale,
in Image barcode, in Image barcode,
in String inIdentifier,
out String outIdentifier, out String outIdentifier,
in Event endSale, in Event endSale,
in ProductData inProductData, in ProductData inProductData,
in PaymentAck paymentAck,
out ProductData outProductData; out ProductData outProductData;
port port
...@@ -25,7 +25,6 @@ component CashDesk { ...@@ -25,7 +25,6 @@ component CashDesk {
out Boolean validation; out Boolean validation;
port port
out SaleInformation, out SaleInformation;
out Bill;
} }
\ No newline at end of file
...@@ -11,27 +11,23 @@ import secarc.seccds.fe.Store; ...@@ -11,27 +11,23 @@ import secarc.seccds.fe.Store;
component CashDeskSystem { component CashDeskSystem {
trustlevel -1; trustlevel +0 "interne Angreifer";
autoconnect port; autoconnect encrypted port;
autoinstantiate on; autoinstantiate on;
accesscontrol on; accesscontrol on;
port port
in Event newSale, in Event newSale,
in Image barcode, in Image barcode,
in String identifier,
in Event endSale, in Event endSale,
out ProductData; out ProductData outProductData;
port port
in Event cardPay, in Event cardPay,
in CardData, in CardData,
in Integer pin, in Integer pin,
out Boolean validation; out Boolean validation;
port
out Bill;
component CashDesk cashDesk component CashDesk cashDesk
[encrypted bdOut -> bank.bankData; [encrypted bdOut -> bank.bankData;
...@@ -46,10 +42,8 @@ component CashDeskSystem { ...@@ -46,10 +42,8 @@ component CashDeskSystem {
connect cashDesk -> store; connect cashDesk -> store;
connect cashDesk.outProductData -> productData; connect cashDesk.outProductData -> outProductData;
connect store.outProductData -> cashDesk.inProductData; connect store.outProductData -> cashDesk.inProductData;
connect identifier -> cashDesk.inIdentifier;
} }
\ No newline at end of file
...@@ -13,11 +13,9 @@ component CashDesk { ...@@ -13,11 +13,9 @@ component CashDesk {
port port
in Event newSale, in Event newSale,
in Image barcode, in Image barcode,
in String inIdentifier,
out String outIdentifier, out String outIdentifier,
in Event endSale, in Event endSale,
in ProductData inProductData, in ProductData inProductData,
in PaymentAck paymentAck,
out ProductData outProductData; out ProductData outProductData;
port port
...@@ -29,7 +27,6 @@ component CashDesk { ...@@ -29,7 +27,6 @@ component CashDesk {
out Boolean validation; out Boolean validation;
port port
out SaleInformation, out SaleInformation;
out Bill;
} }
\ No newline at end of file
...@@ -17,8 +17,7 @@ component Store { ...@@ -17,8 +17,7 @@ component Store {
port port
in String intIdentifier, in String intIdentifier,
out ProductData outProductData, out ProductData outProductData;
out PaymentAck;
port port
in SaleInformation; in SaleInformation;
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>secarc-example</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
<#if op.callCalculator("demo.Constants")></#if>
<#if op.callCalculator("demo.TransformAssociations")></#if>
<#list ast.getCDClasses() as class>
create table ${class.getName()} (
<#if op.callCalculator("demo.Association", class) >
autoID INT NOT NULL PRIMARY KEY,
</#if>
<#list class.getCDAttributes() as attr>
${attr.printName()} ${op.getValue("constants").getType(attr.printType())}<#if attr_has_next>,</#if>
</#list>
);
<#if op.callCalculator("demo.N2NAssociation", class)>
create table ${class.getName()}_${op.getValue("otherClass")} (
${class.getName()} INT NOT NULL,
${op.getValue("otherClass")} INT NOT NULL,
PRIMARY KEY (${class.getName()}, ${op.getValue("otherClass")})
);
</#if>
</#list>
\ No newline at end of file
<#list ast.getCDClasses() as class>
drop table ${class.getName()};
<#if op.callCalculator("demo.N2NAssociation", class)>
drop table ${class.getName()}_${op.getValue("otherClass")};
</#if>
</#list>
\ No newline at end of file
<#-- Disable Java Comments-->
${op.setTracing(false)}
${op.callTemplates(
"cd.SQLCreate",
ast.printPackage() +".create",
"sql",
ast)}
${op.callTemplates(
"cd.SQLDelete",
ast.printPackage() +".delete",
"sql",
ast)}
\ No newline at end of file
#Generated by Maven
#Tue Oct 28 16:40:43 CET 2014
version=0.0.1-SNAPSHOT
groupId=de.se_rwth.montisecarc
artifactId=generator
demo/TransformAssociations.class
demo/N2NAssociation.class
demo/Constants.class
demo/Association.class
/home/user/workspace/MA-Paff/03.Implementierung/montiSecArcGenerator/generator/src/main/java/demo/N2NAssociation.java
/home/user/workspace/MA-Paff/03.Implementierung/montiSecArcGenerator/generator/src/main/java/demo/Constants.java
/home/user/workspace/MA-Paff/03.Implementierung/montiSecArcGenerator/generator/src/main/java/demo/TransformAssociations.java
/home/user/workspace/MA-Paff/03.Implementierung/montiSecArcGenerator/generator/src/main/java/demo/Association.java
#
#Tue Oct 28 16:40:48 CET 2014
/home/user/workspace/MA-Paff/03.Implementierung/montiSecArcGenerator/usage/src/main/models/sensorcloud/demo/Company.cd=b18c858134bdac7bb3abae3bff741557
/home/user/workspace/MA-Paff/03.Implementierung/montiSecArcGenerator/usage/src/main/models/secarc/usability/Usability_Roles.secarc=cc16aa27c77cb2342e7d216e1c1c4322
#Generated by Maven
#Tue Oct 28 16:40:48 CET 2014
version=0.0.1-SNAPSHOT
groupId=de.se_rwth.montisecarc
artifactId=usage
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment