Class Services

java.lang.Object
be.kuleuven.cs.distrinet.sparta.design.Services

public class Services extends Object
The services class used by VSM.

Besides the legacy helpers, this exposes "security coverage" services that the Sirius diagram can call from AQL (e.g. aql:self.coverageLabel(), aql:self.mitigatedThreatTypeCount()) to show how much a solution or countermeasure actually covers. All methods are null-tolerant so they are safe to call on partially-built models.

See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.htmlinvalid input: '&cp'=24 for documentation on how to write service methods.

  • Constructor Details

    • Services

      public Services()
  • Method Details

    • mitigatedThreatTypes

      public Collection<AbstractThreatType> mitigatedThreatTypes(CounterMeasure self)
      The distinct threat types a countermeasure mitigates (the resolved mitigates references only; use mitigatedThreatTypeCount(be.kuleuven.cs.distrinet.sparta.spartamodel.CounterMeasure) for the count that also accounts for id-only references).
    • mitigatedThreatTypes

      public Collection<AbstractThreatType> mitigatedThreatTypes(SolutionType self)
      The distinct threat types mitigated by all of a solution type's countermeasures.
    • mitigatedThreatTypes

      public Collection<AbstractThreatType> mitigatedThreatTypes(Solution self)
      The distinct threat types mitigated by the solution's applied pattern.
    • mitigatedThreatTypeCount

      public int mitigatedThreatTypeCount(CounterMeasure self)
      Number of distinct threat types a countermeasure mitigates, counting both resolved mitigates references and id-only mitigatedThreatTypeID references (deduplicated by id).
    • mitigatedThreatTypeCount

      public int mitigatedThreatTypeCount(SolutionType self)
      Number of distinct threat types a solution type mitigates across its countermeasures.
    • mitigatedThreatTypeCount

      public int mitigatedThreatTypeCount(Solution self)
      Number of distinct threat types the solution's applied pattern mitigates.
    • mitigatedThreatTypeNames

      public String mitigatedThreatTypeNames(SolutionType self)
      Comma-separated titles of the threat types a solution type mitigates (for tooltips).
    • mitigatedThreatTypeNames

      public String mitigatedThreatTypeNames(Solution self)
      Comma-separated titles of the threat types the solution's pattern mitigates (for tooltips).
    • unassignedRoleBindings

      public List<RoleBinding> unassignedRoleBindings(Solution self)
      Role bindings of a solution that are not yet bound to any asset.
    • roleBindingCount

      public int roleBindingCount(Solution self)
      Number of role bindings of a solution.
    • unassignedRoleCount

      public int unassignedRoleCount(Solution self)
      Number of role bindings that are still unassigned.
    • boundRoleCount

      public int boundRoleCount(Solution self)
      Number of role bindings that are bound to at least one asset.
    • isFullyBound

      public boolean isFullyBound(Solution self)
      true when the solution has role bindings and all of them are bound.
    • coverageLabel

      public String coverageLabel(Solution self)
      A short human-readable coverage summary for a solution, suitable for a node label or tooltip, e.g. "3 threat types mitigated; 2/3 roles bound".