Tabnine Logo
CmsXmlContent.getLocaleNode
Code IndexAdd Tabnine to your IDE (free)

How to use
getLocaleNode
method
in
org.opencms.xml.content.CmsXmlContent

Best Java code snippets using org.opencms.xml.content.CmsXmlContent.getLocaleNode (Showing top 7 results out of 315)

origin: org.opencms/opencms-solr

} else {
  parentElement = getLocaleNode(locale);
  elementName = CmsXmlUtils.removeXpathIndex(path);
  contentDefinition = m_contentDefinition;
origin: org.opencms/opencms-core

  content.addLocale(cms, locale);
Element parentElement = content.getLocaleNode(locale);
serializeSingleConfiguration(cms, name, configuration, parentElement);
return content;
origin: org.opencms/org.opencms.workplace.tools.modules

/**
 * Adds the given messages to the vfs message bundle.<p>
 *
 * @param messages the messages
 * @param vfsBundleFile the bundle file
 *
 * @throws CmsException if something goes wrong writing the file
 */
private void addMessagesToVfsBundle(Map<String, String> messages, CmsFile vfsBundleFile) throws CmsException {
  lockTemporary(vfsBundleFile);
  CmsObject cms = getCms();
  CmsXmlContent content = CmsXmlContentFactory.unmarshal(cms, vfsBundleFile);
  Locale locale = CmsLocaleManager.getDefaultLocale();
  if (!content.hasLocale(locale)) {
    content.addLocale(cms, locale);
  }
  Element root = content.getLocaleNode(locale);
  for (Entry<String, String> entry : messages.entrySet()) {
    Element message = root.addElement(CmsVfsBundleLoaderXml.N_MESSAGE);
    Element key = message.addElement(CmsVfsBundleLoaderXml.N_KEY);
    key.setText(entry.getKey());
    Element value = message.addElement(CmsVfsBundleLoaderXml.N_VALUE);
    value.setText(entry.getValue());
  }
  content.initDocument();
  vfsBundleFile.setContents(content.marshal());
  cms.writeFile(vfsBundleFile);
}
origin: org.opencms/opencms-core

} else {
  parentElement = getLocaleNode(locale);
  elementName = CmsXmlUtils.removeXpathIndex(path);
  contentDefinition = m_contentDefinition;
origin: org.opencms/opencms-core

Element element = content.getLocaleNode(locale);
if (LOG.isDebugEnabled()) {
  timer = System.currentTimeMillis();
origin: org.opencms/opencms-core

if ((visitor != null) && visitor.hasInvisibleFields()) {
  Element element = content.getLocaleNode(contentLocale);
  originalEntity = readEntity(
    content,
origin: org.opencms/opencms-core

  content.addLocale(cms, saveLocale);
Element parentElement = content.getLocaleNode(saveLocale);
serializeSingleConfiguration(cms, name, configuration, parentElement);
byte[] contentBytes = content.marshal();
org.opencms.xml.contentCmsXmlContentgetLocaleNode

Javadoc

Returns the XML root element node for the given locale.

Popular methods of CmsXmlContent

  • getValue
  • getStringValue
  • getValues
  • hasLocale
  • getFile
  • getLocales
  • marshal
  • addValue
    Adds a new XML schema type with the default value to the given parent node.
  • getIndexCount
  • hasValue
  • addLocale
  • copyLocale
    Copies the content of the given source locale to the given destination locale in this XML document.
  • addLocale,
  • copyLocale,
  • correctXmlStructure,
  • getEncoding,
  • initDocument,
  • removeLocale,
  • setAutoCorrectionEnabled,
  • toString,
  • visitAllValuesWith

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Path (java.nio.file)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now