Class DfdStructure
java.lang.Object
be.kuleuven.cs.distrinet.sparta.core.model.DfdStructure
Structural facts about where DFD elements and threats sit in the model: enclosing trust
boundaries, nesting depth, direct parents and trust-boundary crossings. Derived purely from
the EMF containment hierarchy, so usable by any consumer (view, exports, report, CI).
All methods are null-tolerant: when a threat has no data flow (or a flow has no
sender/recipient) the corresponding value is null or empty.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BooleancrossesTrustBoundary(Threat threat) Whether the threat's data flow crosses a trust boundary, seecrossesTrustBoundary(EObject, EObject).static booleancrossesTrustBoundary(EObject from, EObject to) Whether a flow between the two elements crosses a trust boundary, i.e.involvedElements(Threat threat) The elements a threat involves: the data flow's sender and recipient, or the threatened element itself when the threat is not tied to a flow.static IntegermaxTrustBoundaryDepth(Threat threat) The highest trust-boundary nesting depth among the involved elements, seeminTrustBoundaryDepth(be.kuleuven.cs.distrinet.sparta.core.model.Threat).static IntegerminTrustBoundaryDepth(Threat threat) The lowest trust-boundary nesting depth among the threat's involved elements: the flow's sender and recipient, or the threatened element itself when the threat is not tied to a flow.static DFDElementThe direct DFD parent (trust boundary, or process for a decomposed process) of the given element, ornullwhen it sits at the root of the model.static List<TrustBoundaryContainer> trustBoundaries(EObject element) The trust boundaries enclosing the given element, outermost first.static inttrustBoundaryDepth(EObject element) The number of trust boundaries enclosing the given element (0 = not inside any).
-
Method Details
-
parent
The direct DFD parent (trust boundary, or process for a decomposed process) of the given element, ornullwhen it sits at the root of the model. -
trustBoundaries
The trust boundaries enclosing the given element, outermost first. -
trustBoundaryDepth
The number of trust boundaries enclosing the given element (0 = not inside any). -
crossesTrustBoundary
Whether a flow between the two elements crosses a trust boundary, i.e. they are not enclosed by exactly the same trust boundaries. This matches theflowContainerDiffpattern used by the threat queries for a flow's direct sender and recipient; the pattern additionally considers the endpoints reached through sender/recipient specifications. -
crossesTrustBoundary
Whether the threat's data flow crosses a trust boundary, seecrossesTrustBoundary(EObject, EObject).- Returns:
nullwhen the threat has no flow with both a sender and a recipient
-
minTrustBoundaryDepth
The lowest trust-boundary nesting depth among the threat's involved elements: the flow's sender and recipient, or the threatened element itself when the threat is not tied to a flow.- Returns:
nullwhen there is no involved element
-
maxTrustBoundaryDepth
The highest trust-boundary nesting depth among the involved elements, seeminTrustBoundaryDepth(be.kuleuven.cs.distrinet.sparta.core.model.Threat). -
involvedElements
The elements a threat involves: the data flow's sender and recipient, or the threatened element itself when the threat is not tied to a flow.
-