Class AmetysContextHelper

java.lang.Object
org.ametys.core.AmetysContextHelper
All Implemented Interfaces:
Component
Direct Known Subclasses:
AmetysContextHelper

public class AmetysContextHelper extends Object implements Component
Helper for contexts.
  • Field Details

    • ROLE

      public static final String ROLE
      The Avalon Role
  • Constructor Details

  • Method Details

    • areRelated

      public boolean areRelated(Set<String> contextsSet1, Set<String> contextsSet2)
      Check if the two sets are acquainted with each other: at least one context in both sets
      Parameters:
      contextsSet1 - The first set of context
      contextsSet2 - The second set of context
      Returns:
      true if the two sets are acquainted, false otherwise
    • isRelatedWithContext

      public boolean isRelatedWithContext(Set<String> setOfContexts, String contextToCheck)
      Check if a set of contexts is acquainted with the given context
      Parameters:
      setOfContexts - The set of contexts
      contextToCheck - The context to check
      Returns:
      true if the set is acquainted with the given context, false otherwise
    • isRelatedWithAllContexts

      public boolean isRelatedWithAllContexts(Set<String> setOfContexts, Set<String> contextsToCheck)
      Check if a set of contexts is acquainted with the given contexts
      Parameters:
      setOfContexts - The set of contexts
      contextsToCheck - The contexts to check
      Returns:
      true if the set is acquainted with all the given contexts, false otherwise