Class CmsInheritanceGroupUtils
java.lang.Object
org.opencms.ade.containerpage.inherited.CmsInheritanceGroupUtils
Utility methods for inheritance groups which don't fit anywhere else.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CmsResource
getInheritanceGroupContentByName
(CmsObject cms, String name) Finds the inheritance group content with a given internal name.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.
-
Method Details
-
getInheritanceGroupContentByName
public static CmsResource getInheritanceGroupContentByName(CmsObject cms, 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 contextname
- 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 contextinheritanceConfig
- the inheritance configuration resourcetarget
- 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
-