|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.xml.A_CmsXmlDocument
org.opencms.xml.content.CmsXmlContent
org.opencms.xml.containerpage.CmsXmlGroupContainer
public class CmsXmlGroupContainer
Implementation of a object used to access and manage the xml data of a group container.
In addition to the XML content interface. It also provides access to more comfortable beans.
Nested Class Summary | |
---|---|
static class |
CmsXmlGroupContainer.XmlNode
XML node name constants. |
Field Summary |
---|
Fields inherited from class org.opencms.xml.content.CmsXmlContent |
---|
AUTO_CORRECTION_ATTRIBUTE, m_autoCorrectionEnabled, m_contentDefinition, XERCES_SCHEMA_PROPERTY |
Fields inherited from class org.opencms.xml.A_CmsXmlDocument |
---|
m_conversion, m_document, m_elementLocales, m_elementNames, m_encoding, m_file, m_locales |
Constructor Summary | |
---|---|
protected |
CmsXmlGroupContainer()
Hides the public constructor. |
protected |
CmsXmlGroupContainer(CmsObject cms,
Document document,
String encoding,
EntityResolver resolver)
Creates a new group container based on the provided XML document. |
protected |
CmsXmlGroupContainer(CmsObject cms,
Locale locale,
String modelUri)
Create a new group container based on the given default content, that will have all language nodes of the default content and ensures the presence of the given locale. |
protected |
CmsXmlGroupContainer(CmsObject cms,
Locale locale,
String encoding,
CmsXmlContentDefinition contentDefinition)
Create a new container page based on the given content definition, that will have one language node for the given locale all initialized with default values. |
Method Summary | |
---|---|
protected CmsResource |
fillResource(CmsObject cms,
Element element,
CmsUUID resourceId)
Fills a CmsXmlVfsFileValue with the resource identified by the given id. |
CmsGroupContainerBean |
getGroupContainer(CmsObject cms,
Locale locale)
Returns the group container bean for the given locale. |
protected void |
initDocument(Document document,
String encoding,
CmsXmlContentDefinition definition)
Initializes an XML document based on the provided document, encoding and content definition. |
boolean |
isAutoCorrectionEnabled()
Returns true if the auto correction feature is enabled for saving this XML content. |
void |
save(CmsObject cms,
CmsGroupContainerBean groupContainer,
Locale locale)
Saves given container page in the current locale, and not only in memory but also to VFS. |
protected void |
saveGroupContainer(CmsObject cms,
Element parent,
CmsGroupContainerBean groupContainer)
Adds the given container page to the given element. |
protected void |
setFile(CmsFile file)
Sets the file this XML content is written to. |
Methods inherited from class org.opencms.xml.content.CmsXmlContent |
---|
addBookmarkForElement, addBookmarkForValue, addLocale, addValue, addValue, copyLocale, getBookmark, getBookmarks, getChoiceOptions, getContentDefinition, getContentDefinition, getHandler, getLinkProcessor, getLocaleNode, getSubValues, getValue, getValueSequence, hasChoiceOptions, initDocument, processSchemaNode, removeValue, resolveMappings, setAutoCorrectionEnabled, validate, visitAllValuesWith |
Methods inherited from class org.opencms.xml.A_CmsXmlDocument |
---|
addBookmark, addLocale, clearBookmarks, copyLocale, copyLocale, correctXmlStructure, createDeepElementCopy, getBestMatchingLocale, getBookmark, getBookmarkName, getConversion, getEncoding, getFile, getIndexCount, getLocales, getLocales, getNames, getStringValue, getStringValue, getValue, getValueInternal, getValues, getValues, hasLocale, hasValue, hasValue, initDocument, isEnabled, isEnabled, marshal, marshal, moveLocale, removeBookmark, removeLocale, setConversion, toString, validateXmlStructure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected CmsXmlGroupContainer()
protected CmsXmlGroupContainer(CmsObject cms, Document document, String encoding, EntityResolver resolver)
The given encoding is used when marshalling the XML again later.
cms
- the cms context, if null
no link validation is performeddocument
- the document to create the container page fromencoding
- the encoding of the container pageresolver
- the XML entity resolver to useprotected CmsXmlGroupContainer(CmsObject cms, Locale locale, String modelUri) throws CmsException
The given encoding is used when marshalling the XML again later.
cms
- the current users OpenCms contentlocale
- the locale to generate the default content formodelUri
- the absolute path to the container page file acting as model
CmsException
- in case the model file is not found or not validprotected CmsXmlGroupContainer(CmsObject cms, Locale locale, String encoding, CmsXmlContentDefinition contentDefinition)
The given encoding is used when marshalling the XML again later.
cms
- the current users OpenCms contentlocale
- the locale to generate the default content forencoding
- the encoding to use when marshalling the container page latercontentDefinition
- the content definition to create the content forMethod Detail |
---|
public CmsGroupContainerBean getGroupContainer(CmsObject cms, Locale locale)
cms
- the cms contextlocale
- the locale to use
public boolean isAutoCorrectionEnabled()
A_CmsXmlDocument
true
if the auto correction feature is enabled for saving this XML content.
isAutoCorrectionEnabled
in class CmsXmlContent
true
if the auto correction feature is enabled for saving this XML contentCmsXmlContent.isAutoCorrectionEnabled()
public void save(CmsObject cms, CmsGroupContainerBean groupContainer, Locale locale) throws CmsException
cms
- the current cms contextgroupContainer
- the group-container page to savelocale
- the locale to save
CmsException
- if something goes wrongprotected CmsResource fillResource(CmsObject cms, Element element, CmsUUID resourceId) throws CmsException
CmsXmlVfsFileValue
with the resource identified by the given id.
cms
- the current CMS contextelement
- the XML element to fillresourceId
- the ID identifying the resource to use
CmsException
- if the resource can not be readprotected void initDocument(Document document, String encoding, CmsXmlContentDefinition definition)
A_CmsXmlDocument
initDocument
in class CmsXmlContent
document
- the base XML document to use for initializingencoding
- the encoding to use when marshalling the document laterdefinition
- the content definition to useA_CmsXmlDocument.initDocument(org.dom4j.Document, java.lang.String, org.opencms.xml.CmsXmlContentDefinition)
protected void saveGroupContainer(CmsObject cms, Element parent, CmsGroupContainerBean groupContainer) throws CmsException
cms
- the current CMS objectparent
- the element to add itgroupContainer
- the container page to add
CmsException
- if something goes wrongprotected void setFile(CmsFile file)
CmsXmlContent
setFile
in class CmsXmlContent
file
- the file this XML content content is written toCmsXmlContent.setFile(org.opencms.file.CmsFile)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |