Commit 9eaeef79 authored by Paff's avatar Paff
Browse files

naming

graph for transformation
parent 81f7ee6c
......@@ -79,7 +79,7 @@ public final class MontiSecArcConstants extends Interfaces2Constants {
/**
* name for version entry
*/
public static final String VERSION_NAME = "version";
public static final String CPE_NAME = "version";
/**
* Workflow name for analysis as beginner
......@@ -87,9 +87,14 @@ public final class MontiSecArcConstants extends Interfaces2Constants {
public static final String ANALYSIS_WORKFLOW_BEGINNERS = "secAnalysisBeginners";
/**
* Workflow name for analysis as beginner What if
* Workflow name for analysis as beginner What if trustevel
*/
public static final String ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF = "secAnalysisBeginnersWhatIf";
public static final String ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_TRUSTLEVEL = "secAnalysisBeginnersWhatIfTrustlevel";
/**
* Workflow name for analysis as beginner What if critical port
*/
public static final String ANALYSIS_WORKFLOW_BEGINNERS_WHAT_IF_CRITICAL_PORT = "secAnalysisBeginnersWhatIfCriticalPort";
/**
* Workflow name for analysis as advanced user
......@@ -97,9 +102,14 @@ public final class MontiSecArcConstants extends Interfaces2Constants {
public static final String ANALYSIS_WORKFLOW_ADVANCED = "secAnalysisAdvanced";
/**
* Workflow name for analysis as advanced user What if
* Workflow name for analysis as advanced user What if trustlevel
*/
public static final String ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF_TRUSTLEVEL = "secAnalysisAdvancedWhatIfTrustlevel";
/**
* Workflow name for analysis as advanced user What if trustlevel
*/
public static final String ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF = "secAnalysisAdvancedWhatIf";
public static final String ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF_CRITICAL_PORT = "secAnalysisAdvancedWhatIfCriticalPort";
/**
* Parameter, which activates analysis for critical ports
......
......@@ -314,7 +314,7 @@ public class MontiSecArcCheckVisitor extends MontiArcCheckCoCoVisitor {
*/
public void visit(ASTSecArcCPE node) {
try {
CPEEntry entry = (CPEEntry) resolver.resolve(MontiSecArcConstants.VERSION_NAME, CPEEntry.KIND, getNameSpaceFor(node.getMainParent()));
CPEEntry entry = (CPEEntry) resolver.resolve(MontiSecArcConstants.CPE_NAME, CPEEntry.KIND, getNameSpaceFor(node.getMainParent()));
if (entry != null) {
for (ISecCPEChecker cc : secVersionChecker) {
cc.check(node, entry);
......
......@@ -22,7 +22,7 @@ public class CPEEntryFactory implements ICPEEntryFactory {
@Override
public CPEEntry createCPE() {
CPEEntry entry = new CPEEntry();
entry.setName(MontiSecArcConstants.VERSION_NAME);
entry.setName(MontiSecArcConstants.CPE_NAME);
return entry;
}
......
......@@ -137,10 +137,10 @@ public class ArchitectureGraphBuilder {
visitOutgoingPorts(componentType, componentVertex);
visitFilter(componentType, componentVertex);
visitRole(componentType, componentVertex);
// visitVersion(componentType, componentVertex);
// visitConfiguration(componentType, componentVertex);
// visitPEP(componentType, componentVertex);
// visitTrustlevel(componentType, componentVertex);
visitCPE(componentType, componentVertex);
visitConfiguration(componentType, componentVertex);
visitPEP(componentType, componentVertex);
visitTrustlevel(componentType, componentVertex);
/* Recursively visit all subcomponents and add them as well as their ports
* to the graph before proceeding with connectors. */
......@@ -279,12 +279,12 @@ public class ArchitectureGraphBuilder {
* @param componentType
* @param componentVertex
*/
protected void visitVersion(ComponentEntry componentType, Vertex<ComponentEntry> componentVertex) {
CPEEntry version = ((SecComponentEntry) componentType).getCPE();
if(version != null) {
Vertex<CPEEntry> versionVertex = Vertex.of(version);
this.graph.addVertex(versionVertex);
this.graph.addEdge(componentVertex, versionVertex);
protected void visitCPE(ComponentEntry componentType, Vertex<ComponentEntry> componentVertex) {
CPEEntry cpe = ((SecComponentEntry) componentType).getCPE();
if(cpe != null) {
Vertex<CPEEntry> cpeVertex = Vertex.of(cpe);
this.graph.addVertex(cpeVertex);
this.graph.addEdge(componentVertex, cpeVertex);
}
}
......
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