org.opencms.ade.containerpage.inherited
Class CmsInheritanceGroupUtils

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

public final class CmsInheritanceGroupUtils
extends java.lang.Object

Utility methods for inheritance groups which don't fit anywhere else.


Method Summary
static CmsResource getInheritanceGroupContentByName(CmsObject cms, java.lang.String name)
          Finds the inheritance group content with a given internal name.
static java.util.Set<java.lang.String> getNamesOfGroupsContainingResource(CmsObject cms, CmsResource inheritanceConfig, CmsResource target)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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