Class CmsInheritanceReferenceParser
- java.lang.Object
-
- org.opencms.ade.containerpage.inherited.CmsInheritanceReferenceParser
-
public class CmsInheritanceReferenceParser extends java.lang.Object
Parser class for parsing inheritance container references.
-
-
Constructor Summary
Constructors Constructor Description CmsInheritanceReferenceParser(CmsObject cms)
Creates a new parser instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsInheritanceReference
getReference(java.util.Locale locale)
Gets the parsed reference for a locale.void
parse(CmsResource resource)
Parses a given resource.protected void
parse(CmsXmlContent content)
Parses the given XML content.protected CmsInheritanceReference
parseReference(I_CmsXmlContentLocation location, java.util.Locale locale)
Extracts a single inheritance reference from a location in the XML content.
-
-
-
Constructor Detail
-
CmsInheritanceReferenceParser
public CmsInheritanceReferenceParser(CmsObject cms)
Creates a new parser instance.- Parameters:
cms
- the CMS context to use
-
-
Method Detail
-
getReference
public CmsInheritanceReference getReference(java.util.Locale locale)
Gets the parsed reference for a locale.Gets the reference object for the locale, and uses the reference for the English language as a fallback.
- Parameters:
locale
- the locale to get the reference for- Returns:
- the reference for the locale
-
parse
public void parse(CmsResource resource) throws CmsException
Parses a given resource.- Parameters:
resource
- the resource to parse- Throws:
CmsException
- if something goes wrong
-
parse
protected void parse(CmsXmlContent content)
Parses the given XML content.- Parameters:
content
- the XML content to parse
-
parseReference
protected CmsInheritanceReference parseReference(I_CmsXmlContentLocation location, java.util.Locale locale)
Extracts a single inheritance reference from a location in the XML content.This method may return null if the given location doesn't contain a valid inheritance container reference.
- Parameters:
location
- the location from which to parse the inheritance referencelocale
- the locale from which to parse the inheritance reference- Returns:
- the parsed inheritance reference, or null
-
-