Class CmsInheritanceGroupUtils


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

    • Method Detail

      • getInheritanceGroupContentByName

        public static CmsResource getInheritanceGroupContentByName​(CmsObject cms,
                                                                   java.lang.String name)
                                                            throws CmsException
        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 java.util.Set<java.lang.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