Class CmsInheritanceGroupUtils

java.lang.Object
org.opencms.ade.containerpage.inherited.CmsInheritanceGroupUtils

public final class CmsInheritanceGroupUtils extends Object
Utility methods for inheritance groups which don't fit anywhere else.

  • Method Details

    • getInheritanceGroupContentByName

      Finds the inheritance group content with a given internal name.

      Currently this is implemented as a property search, which may be potentially slow.

      Parameters:
      cms - the current CMS context
      name - the name to search
      Returns:
      the inheritance group resource
      Throws:
      CmsException - if something goes wrong
    • getNamesOfGroupsContainingResource

      public static Set<String> getNamesOfGroupsContainingResource(CmsObject cms, CmsResource inheritanceConfig, CmsResource target) throws CmsException
      Parses an inheritance group configuration C and returns the names of inheritance groups in C in which a given resource is defined as a new element.

      Parameters:
      cms - the current CMS context
      inheritanceConfig - the inheritance configuration resource
      target - the resource to search in the inheritance configuration
      Returns:
      the names of the inheritance groups in which the target resource is defined as a new element
      Throws:
      CmsException - if something goes wrong