Class AmetysContextHelper

java.lang.Object
org.ametys.core.AmetysContextHelper
org.ametys.web.AmetysContextHelper
All Implemented Interfaces:
Component

Helper for contexts.
  • Constructor Details

  • Method Details

    • areRelated

      public boolean areRelated(Set<String> contextsSet1, Set<String> contextsSet2)
      Description copied from class: AmetysContextHelper
      Check if the two sets are acquainted with each other: at least one context in both sets
      Overrides:
      areRelated in class AmetysContextHelper
      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)
      Description copied from class: AmetysContextHelper
      Check if a set of contexts is acquainted with the given context
      Overrides:
      isRelatedWithContext in class AmetysContextHelper
      Parameters:
      setOfContexts - The set of contexts
      contextToCheck - The context to check
      Returns:
      true if the set is acquainted with the given context, false otherwise
    • getSiteComplementaryContext

      public static String getSiteComplementaryContext(String context)
      Get the complementary context of a context
      Parameters:
      context - The context
      Returns:
      The site complementary context