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

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

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

origin: org.opencms/opencms-solr

  /**
   * Copies the contents from a source locale to a number of destination locales by overwriting them.<p>
   *  
   * @param content the xml content
   * @param sourceLocale the source locale
   * @param destLocales a list of destination locales
   * @throws CmsException if something goes wrong
   */
  protected void transferContents(CmsXmlContent content, Locale sourceLocale, List destLocales) throws CmsException {

    for (Iterator i = destLocales.iterator(); i.hasNext();) {
      Locale to = (Locale)i.next();
      if (content.hasLocale(to)) {
        content.removeLocale(to);
      }
      content.copyLocale(sourceLocale, to);
    }
  }
}
origin: org.opencms/opencms-core

  /**
   * Copies the contents from a source locale to a number of destination locales by overwriting them.<p>
   *
   * @param content the xml content
   * @param sourceLocale the source locale
   * @param destLocales a list of destination locales
   * @throws CmsException if something goes wrong
   */
  protected void transferContents(CmsXmlContent content, Locale sourceLocale, List<Locale> destLocales)
  throws CmsException {

    for (Iterator<Locale> i = destLocales.iterator(); i.hasNext();) {
      Locale to = i.next();
      if (content.hasLocale(to)) {
        content.removeLocale(to);
      }
      content.copyLocale(sourceLocale, to);
    }
  }
}
origin: org.opencms/opencms-core

m_content.removeLocale(loc);
origin: org.opencms/opencms-solr

m_content.removeLocale(loc);
origin: org.opencms/opencms-core

if (null != props) {
  if (m_xmlBundle.hasLocale(l)) {
    m_xmlBundle.removeLocale(l);
origin: org.opencms/opencms-core

m_descContent.removeLocale(Descriptor.LOCALE);
origin: org.opencms/opencms-core

Locale contentLocale = CmsLocaleManager.getLocale(CmsContentDefinition.getLocaleFromId(entityId));
if (content.hasLocale(contentLocale)) {
  content.removeLocale(contentLocale);
origin: org.opencms/opencms-core

if (content.hasLocale(locale) && newLocale) {
  content.removeLocale(locale);
origin: org.opencms/opencms-core

/**
 * @see org.opencms.ade.contenteditor.shared.rpc.I_CmsContentService#copyLocale(java.util.Collection, org.opencms.acacia.shared.CmsEntity)
 */
public void copyLocale(Collection<String> locales, CmsEntity sourceLocale) throws CmsRpcException {
  try {
    CmsUUID structureId = CmsContentDefinition.entityIdToUuid(sourceLocale.getId());
    CmsResource resource = getCmsObject().readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION);
    CmsFile file = getCmsObject().readFile(resource);
    CmsXmlContent content = getSessionCache().getCacheXmlContent(structureId);
    synchronizeLocaleIndependentForEntity(file, content, Collections.<String> emptyList(), sourceLocale);
    Locale sourceContentLocale = CmsLocaleManager.getLocale(
      CmsContentDefinition.getLocaleFromId(sourceLocale.getId()));
    for (String loc : locales) {
      Locale targetLocale = CmsLocaleManager.getLocale(loc);
      if (content.hasLocale(targetLocale)) {
        content.removeLocale(targetLocale);
      }
      content.copyLocale(sourceContentLocale, targetLocale);
    }
  } catch (Throwable t) {
    error(t);
  }
}
origin: org.opencms/opencms-core

/**
 * Saves the inheritance group.<p>
 *
 * @param resource the inheritance group resource
 * @param inheritanceContainer the inherited group container data
 *
 * @throws CmsException if something goes wrong
 */
private void saveInheritanceGroup(CmsResource resource, CmsInheritanceContainer inheritanceContainer)
throws CmsException {
  CmsObject cms = getCmsObject();
  CmsFile file = cms.readFile(resource);
  CmsXmlContent document = CmsXmlContentFactory.unmarshal(cms, file);
  for (Locale docLocale : document.getLocales()) {
    document.removeLocale(docLocale);
  }
  Locale locale = Locale.ENGLISH;
  document.addLocale(cms, locale);
  document.getValue("Title", locale).setStringValue(cms, inheritanceContainer.getTitle());
  document.getValue("Description", locale).setStringValue(cms, inheritanceContainer.getDescription());
  document.getValue("ConfigName", locale).setStringValue(cms, inheritanceContainer.getName());
  byte[] content = document.marshal();
  file.setContents(content);
  cms.writeFile(file);
}
origin: org.opencms/opencms-core

Locale contentLocale = CmsLocaleManager.getLocale(CmsContentDefinition.getLocaleFromId(deleteId));
if (content.hasLocale(contentLocale)) {
  content.removeLocale(contentLocale);
origin: org.opencms/opencms-core

    entity);
content.removeLocale(contentLocale);
origin: org.opencms/opencms-core

Locale contentLocale = CmsLocaleManager.getLocale(CmsContentDefinition.getLocaleFromId(entityId));
if (content.hasLocale(contentLocale)) {
  content.removeLocale(contentLocale);
origin: org.opencms/opencms-core

for (Locale locale : content.getLocales()) {
  if (!saveLocale.equals(locale)) {
    content.removeLocale(locale);
origin: org.opencms/org.opencms.workplace.tools.content

content.copyLocale(sourceLocale, targetLocale);
if (m_delete) {
  content.removeLocale(sourceLocale);
org.opencms.xml.contentCmsXmlContentremoveLocale

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,
  • getLocaleNode,
  • initDocument,
  • setAutoCorrectionEnabled,
  • toString,
  • visitAllValuesWith

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BoxLayout (javax.swing)
  • JPanel (javax.swing)
  • Best plugins for Eclipse
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